diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/_meta.json b/sdk/healthinsights/azure-healthinsights-radiologyinsights/_meta.json new file mode 100644 index 000000000000..f6b875d5ab6b --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/_meta.json @@ -0,0 +1,6 @@ +{ + "commit": "6b9c3af72e8e2b88b4dcb67c3deab5136f7ed9a6", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "typespec_src": "specification/ai/HealthInsights/HealthInsights.RadiologyInsights", + "@azure-tools/typespec-python": "0.36.1" +} \ No newline at end of file diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/__init__.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/__init__.py index 6b6d1d35581a..4933e190f6a7 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/__init__.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/__init__.py @@ -5,18 +5,28 @@ # Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._patch import RadiologyInsightsClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._client import RadiologyInsightsClient # type: ignore from ._version import VERSION __version__ = VERSION - +try: + from ._patch import __all__ as _patch_all + from ._patch import * +except ImportError: + _patch_all = [] from ._patch import patch_sdk as _patch_sdk __all__ = [ "RadiologyInsightsClient", ] - +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/_client.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/_client.py index 744299e0905c..c94210c68b35 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/_client.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/_client.py @@ -20,13 +20,10 @@ from ._serialization import Deserializer, Serializer if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class RadiologyInsightsClient( - RadiologyInsightsClientOperationsMixin -): # pylint: disable=client-accepts-api-version-keyword +class RadiologyInsightsClient(RadiologyInsightsClientOperationsMixin): """RadiologyInsightsClient. :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example: @@ -36,8 +33,9 @@ class RadiologyInsightsClient( AzureKeyCredential type or a TokenCredential type. Required. :type credential: ~azure.core.credentials.AzureKeyCredential or ~azure.core.credentials.TokenCredential - :keyword api_version: The API version to use for this operation. Default value is "2024-04-01". - Note that overriding this default value may result in unsupported behavior. + :keyword api_version: The API version to use for this operation. Default value is + "2024-08-01-preview". Note that overriding this default value may result in unsupported + behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/_configuration.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/_configuration.py index 209906a0759e..6e9a6d7e52d8 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/_configuration.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/_configuration.py @@ -14,11 +14,10 @@ from ._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class RadiologyInsightsClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class RadiologyInsightsClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for RadiologyInsightsClient. Note that all parameters used to create this instance are saved as instance @@ -31,13 +30,14 @@ class RadiologyInsightsClientConfiguration: # pylint: disable=too-many-instance AzureKeyCredential type or a TokenCredential type. Required. :type credential: ~azure.core.credentials.AzureKeyCredential or ~azure.core.credentials.TokenCredential - :keyword api_version: The API version to use for this operation. Default value is "2024-04-01". - Note that overriding this default value may result in unsupported behavior. + :keyword api_version: The API version to use for this operation. Default value is + "2024-08-01-preview". Note that overriding this default value may result in unsupported + behavior. :paramtype api_version: str """ def __init__(self, endpoint: str, credential: Union[AzureKeyCredential, "TokenCredential"], **kwargs: Any) -> None: - api_version: str = kwargs.pop("api_version", "2024-04-01") + api_version: str = kwargs.pop("api_version", "2024-08-01-preview") if endpoint is None: raise ValueError("Parameter 'endpoint' must not be None.") diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/_model_base.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/_model_base.py index 12ad7f29c71e..e6a2730f9276 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/_model_base.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/_model_base.py @@ -1,10 +1,11 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- -# pylint: disable=protected-access, arguments-differ, signature-differs, broad-except, too-many-lines +# pylint: disable=protected-access, broad-except import copy import calendar @@ -573,7 +574,7 @@ def __init__(self, *args: typing.Any, **kwargs: typing.Any) -> None: def copy(self) -> "Model": return Model(self.__dict__) - def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self: # pylint: disable=unused-argument + def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self: if f"{cls.__module__}.{cls.__qualname__}" not in cls._calculated: # we know the last nine classes in mro are going to be 'Model', '_MyMutableMapping', 'MutableMapping', # 'Mapping', 'Collection', 'Sized', 'Iterable', 'Container' and 'object' @@ -584,8 +585,8 @@ def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self: # pylint: di annotations = { k: v for mro_class in mros - if hasattr(mro_class, "__annotations__") # pylint: disable=no-member - for k, v in mro_class.__annotations__.items() # pylint: disable=no-member + if hasattr(mro_class, "__annotations__") + for k, v in mro_class.__annotations__.items() } for attr, rf in attr_to_rest_field.items(): rf._module = cls.__module__ @@ -600,8 +601,8 @@ def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self: # pylint: di def __init_subclass__(cls, discriminator: typing.Optional[str] = None) -> None: for base in cls.__bases__: - if hasattr(base, "__mapping__"): # pylint: disable=no-member - base.__mapping__[discriminator or cls.__name__] = cls # type: ignore # pylint: disable=no-member + if hasattr(base, "__mapping__"): + base.__mapping__[discriminator or cls.__name__] = cls # type: ignore @classmethod def _get_discriminator(cls, exist_discriminators) -> typing.Optional["_RestField"]: @@ -612,7 +613,7 @@ def _get_discriminator(cls, exist_discriminators) -> typing.Optional["_RestField @classmethod def _deserialize(cls, data, exist_discriminators): - if not hasattr(cls, "__mapping__"): # pylint: disable=no-member + if not hasattr(cls, "__mapping__"): return cls(data) discriminator = cls._get_discriminator(exist_discriminators) if discriminator is None: @@ -632,11 +633,11 @@ def _deserialize(cls, data, exist_discriminators): discriminator_value = data.find(xml_name).text # pyright: ignore else: discriminator_value = data.get(discriminator._rest_name) - mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore # pylint: disable=no-member + mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/_operations/__init__.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/_operations/__init__.py index 24be3b0c64fc..ba57f3464683 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/_operations/__init__.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/_operations/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import RadiologyInsightsClientOperationsMixin +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import RadiologyInsightsClientOperationsMixin # type: ignore from ._patch import __all__ as _patch_all -from ._patch import * # pylint: disable=unused-wildcard-import +from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ "RadiologyInsightsClientOperationsMixin", ] -__all__.extend([p for p in _patch_all if p not in __all__]) +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/_operations/_operations.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/_operations/_operations.py index 72fc5d89cbc2..ecf8e226c2e4 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/_operations/_operations.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Iterator, List, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterator, List, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -36,7 +35,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +51,7 @@ def build_radiology_insights_infer_radiology_insights_request( # pylint: disabl _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-08-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -86,7 +85,7 @@ def _infer_radiology_insights_initial( expand: Optional[List[str]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/_patch.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/_patch.py index d599e61e8554..f7dd32510333 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/_patch.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/_patch.py @@ -1,4 +1,3 @@ -# pylint: disable=protected-access # ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. @@ -7,264 +6,9 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ -from typing import ( - Any, - IO, - Optional, - Dict, - Union, - cast, - overload, - List, - MutableMapping, - TypeVar, - Callable, - TYPE_CHECKING, -) # pylint: disable=line-too-long -from azure.core.credentials import AzureKeyCredential -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.polling.base_polling import LROBasePolling -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict +from typing import List -from . import models as _models -from ._model_base import _deserialize -from ._client import RadiologyInsightsClient as _RadiologyInsightsClient - - -JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from azure.core.credentials import TokenCredential - - -class RadiologyInsightsClient: # pylint: disable=client-accepts-api-version-keyword - """RadiologyInsightsClient. - - :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example: - https://westus2.api.cognitive.microsoft.com). Required. - :type endpoint: str - :param credential: Credential used to authenticate requests to the service. Is either a - AzureKeyCredential type or a TokenCredential type. Required. - :type credential: ~azure.core.credentials.AzureKeyCredential or - ~azure.core.credentials.TokenCredential - :keyword api_version: The API version to use for this operation. Default value is "2024-04-01". - Note that overriding this default value may result in unsupported behavior. - :paramtype api_version: str - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. - """ - - def __init__(self, endpoint: str, credential: Union[AzureKeyCredential, "TokenCredential"], **kwargs: Any) -> None: - self._client = _RadiologyInsightsClient(endpoint=endpoint, credential=credential, **kwargs) - - @overload - def begin_infer_radiology_insights( - self, - id: str, - resource: _models.RadiologyInsightsJob, - *, - expand: Optional[List[str]] = None, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.RadiologyInsightsInferenceResult]: - # pylint: disable=line-too-long - """Create Radiology Insights inference result. - - Creates a Radiology Insights inference result with the given request body. - - :param id: The unique ID of the inference result. Required. - :type id: str - :param resource: The resource instance. Required. - :type resource: ~azure.healthinsights.radiologyinsights.models.RadiologyInsightsJob - :keyword expand: Expand the indicated resources into the response. Default value is None. - :paramtype expand: list[str] - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns RadiologyInsightsInferenceResult. The RadiologyInsightsInferenceResult is compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.healthinsights.radiologyinsights.models.RadiologyInsightsResult] - :raises ~azure.core.exceptions.HttpResponseError:""" - - @overload - def begin_infer_radiology_insights( - self, - id: str, - resource: JSON, - *, - expand: Optional[List[str]] = None, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.RadiologyInsightsInferenceResult]: - # pylint: disable=line-too-long - """Create Radiology Insights inference result. - - Creates a Radiology Insights inference result with the given request body. - - :param id: The unique ID of the inference result. Required. - :type id: str - :param resource: The resource instance. Required. - :type resource: JSON - :keyword expand: Expand the indicated resources into the response. Default value is None. - :paramtype expand: list[str] - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns RadiologyInsightsInferenceResult. The RadiologyInsightsInferenceResult is compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.healthinsights.radiologyinsights.models.RadiologyInsightsInferenceResult] - :raises ~azure.core.exceptions.HttpResponseError:""" - - @overload - def begin_infer_radiology_insights( - self, - id: str, - resource: IO[bytes], - *, - expand: Optional[List[str]] = None, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.RadiologyInsightsInferenceResult]: - # pylint: disable=line-too-long - """Create Radiology Insights inference result. - - Creates a Radiology Insights inference result with the given request body. - - :param id: The unique ID of the inference result. Required. - :type id: str - :param resource: The resource instance. Required. - :type resource: IO[bytes] - :keyword expand: Expand the indicated resources into the response. Default value is None. - :paramtype expand: list[str] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns RadiologyInsightsInferenceResult. The RadiologyInsightsInferenceResult is compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.healthinsights.radiologyinsights.models.RadiologyInsightsInferenceResult] - :raises ~azure.core.exceptions.HttpResponseError:""" - - @distributed_trace - def begin_infer_radiology_insights( - self, - id: str, - resource: Union[_models.RadiologyInsightsJob, JSON, IO[bytes]], - *, - expand: Optional[List[str]] = None, - **kwargs: Any - ) -> LROPoller[_models.RadiologyInsightsInferenceResult]: - # pylint: disable=line-too-long - """Create Radiology Insights inference result. - - Creates a Radiology Insights inference result with the given request body. - - :param id: The unique ID of the inference result. Required. - :type id: str - :param resource: The resource instance. Is one of the following types: RadiologyInsightsJob, JSON, IO[bytes] Required. - :type resource: ~azure.healthinsights.radiologyinsights.models.RadiologyInsightsJob or JSON or IO[bytes] - :keyword expand: Expand the indicated resources into the response. Default value is None. - :paramtype expand: list[str] - :return: An instance of LROPoller that returns RadiologyInsightsInferenceResult. The RadiologyInsightsInferenceResult is compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.healthinsights.radiologyinsights.models.RadiologyInsightsInferenceResult] - :raises ~azure.core.exceptions.HttpResponseError:""" - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.RadiologyInsightsJob] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop( - "polling_interval", self._client._config.polling_interval # pylint: disable=protected-access - ) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._client._infer_radiology_insights_initial( # pylint: disable=protected-access - id=id, - resource=resource, - expand=expand, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["x-ms-request-id"] = self._client._deserialize( # pylint: disable=protected-access - "str", response.headers.get("x-ms-request-id") - ) - response_headers["Operation-Location"] = self._client._deserialize( # pylint: disable=protected-access - "str", response.headers.get("Operation-Location") - ) - deserialized = _deserialize(_models.RadiologyInsightsInferenceResult, response.json().get("result")) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._client._serialize.url( # pylint: disable=protected-access - "self._client._config.endpoint", self._client._config.endpoint, "str", skip_quote=True - ), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, LROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.RadiologyInsightsInferenceResult].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client._client, # pylint: disable=protected-access - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.RadiologyInsightsInferenceResult]( - self._client._client, raw_result, get_long_running_output, polling_method # type: ignore # pylint: disable=protected-access - ) - - def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: - """Runs the network request through the client's chained policies. - - >>> from azure.core.rest import HttpRequest - >>> request = HttpRequest("GET", "https://www.example.org/") - - >>> response = client.send_request(request) - - - For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request - - :param request: The network request you want to make. Required. - :type request: ~azure.core.rest.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to False. - :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.rest.HttpResponse - """ - - return self._client.send_request(request, stream=stream, **kwargs) # type: ignore - - def close(self) -> None: - self._client.close() - - def __enter__(self) -> "RadiologyInsightsClient": - self._client.__enter__() - return self - - def __exit__(self, *exc_details: Any) -> None: - self._client.__exit__(*exc_details) - - -__all__: List[str] = [ - "RadiologyInsightsClient" -] # Add all objects you want publicly available to users at this package level # pylint: disable=line-too-long +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level def patch_sdk(): diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/_serialization.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/_serialization.py index 01a226bd7f14..ce17d1798ce7 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/_serialization.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/_serialization.py @@ -227,7 +227,7 @@ class _FixedOffset(datetime.tzinfo): # type: ignore :param datetime.timedelta offset: offset in timedelta format """ - def __init__(self, offset): + def __init__(self, offset) -> None: self.__offset = offset def utcoffset(self, dt): @@ -507,7 +507,6 @@ def _flatten_subtype(cls, key, objects): def _classify(cls, response, objects): """Check the class _subtype_map for any child classes. We want to ignore any inherited _subtype_maps. - Remove the polymorphic key from the initial data. :param dict response: The initial data :param dict objects: The class objects @@ -519,7 +518,7 @@ def _classify(cls, response, objects): if not isinstance(response, ET.Element): rest_api_response_key = cls._get_rest_key_parts(subtype_key)[-1] - subtype_value = response.pop(rest_api_response_key, None) or response.pop(subtype_key, None) + subtype_value = response.get(rest_api_response_key, None) or response.get(subtype_key, None) else: subtype_value = xml_key_extractor(subtype_key, cls._attribute_map[subtype_key], response) if subtype_value: @@ -599,7 +598,7 @@ class Serializer(object): # pylint: disable=too-many-public-methods "multiple": lambda x, y: x % y != 0, } - def __init__(self, classes: Optional[Mapping[str, type]] = None): + def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: self.serialize_type = { "iso-8601": Serializer.serialize_iso, "rfc-1123": Serializer.serialize_rfc, @@ -1453,7 +1452,7 @@ class Deserializer(object): valid_date = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") - def __init__(self, classes: Optional[Mapping[str, type]] = None): + def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: self.deserialize_type = { "iso-8601": Deserializer.deserialize_iso, "rfc-1123": Deserializer.deserialize_rfc, diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/_types.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/_types.py deleted file mode 100644 index b2586801fb70..000000000000 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/_types.py +++ /dev/null @@ -1,17 +0,0 @@ -# coding=utf-8 -# pylint: disable=too-many-lines -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -import sys -from typing import Union - -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports -RepeatabilityResult = Union[Literal["accepted"], Literal["rejected"]] diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/_vendor.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/_vendor.py index cea1829f79e3..3dfa8ff5fa0e 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/_vendor.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import RadiologyInsightsClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/_version.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/_version.py index 83602e6274bc..0ec13ea52bbf 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/_version.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.1" +VERSION = "1.0.0" diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/aio/__init__.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/aio/__init__.py index 1dcea5894741..63659dada473 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/aio/__init__.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/aio/__init__.py @@ -5,15 +5,25 @@ # Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._patch import RadiologyInsightsClient +from typing import TYPE_CHECKING +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import +from ._client import RadiologyInsightsClient # type: ignore + +try: + from ._patch import __all__ as _patch_all + from ._patch import * +except ImportError: + _patch_all = [] from ._patch import patch_sdk as _patch_sdk __all__ = [ "RadiologyInsightsClient", ] - +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/aio/_client.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/aio/_client.py index 958b0baba68b..a6aa747fd86f 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/aio/_client.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/aio/_client.py @@ -20,13 +20,10 @@ from ._operations import RadiologyInsightsClientOperationsMixin if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class RadiologyInsightsClient( - RadiologyInsightsClientOperationsMixin -): # pylint: disable=client-accepts-api-version-keyword +class RadiologyInsightsClient(RadiologyInsightsClientOperationsMixin): """RadiologyInsightsClient. :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example: @@ -36,8 +33,9 @@ class RadiologyInsightsClient( AzureKeyCredential type or a TokenCredential type. Required. :type credential: ~azure.core.credentials.AzureKeyCredential or ~azure.core.credentials_async.AsyncTokenCredential - :keyword api_version: The API version to use for this operation. Default value is "2024-04-01". - Note that overriding this default value may result in unsupported behavior. + :keyword api_version: The API version to use for this operation. Default value is + "2024-08-01-preview". Note that overriding this default value may result in unsupported + behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/aio/_configuration.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/aio/_configuration.py index b42d868a8896..24a2ee5a837d 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/aio/_configuration.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/aio/_configuration.py @@ -14,11 +14,10 @@ from .._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class RadiologyInsightsClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class RadiologyInsightsClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for RadiologyInsightsClient. Note that all parameters used to create this instance are saved as instance @@ -31,15 +30,16 @@ class RadiologyInsightsClientConfiguration: # pylint: disable=too-many-instance AzureKeyCredential type or a TokenCredential type. Required. :type credential: ~azure.core.credentials.AzureKeyCredential or ~azure.core.credentials_async.AsyncTokenCredential - :keyword api_version: The API version to use for this operation. Default value is "2024-04-01". - Note that overriding this default value may result in unsupported behavior. + :keyword api_version: The API version to use for this operation. Default value is + "2024-08-01-preview". Note that overriding this default value may result in unsupported + behavior. :paramtype api_version: str """ def __init__( self, endpoint: str, credential: Union[AzureKeyCredential, "AsyncTokenCredential"], **kwargs: Any ) -> None: - api_version: str = kwargs.pop("api_version", "2024-04-01") + api_version: str = kwargs.pop("api_version", "2024-08-01-preview") if endpoint is None: raise ValueError("Parameter 'endpoint' must not be None.") diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/aio/_operations/__init__.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/aio/_operations/__init__.py index 24be3b0c64fc..ba57f3464683 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/aio/_operations/__init__.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/aio/_operations/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import RadiologyInsightsClientOperationsMixin +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import RadiologyInsightsClientOperationsMixin # type: ignore from ._patch import __all__ as _patch_all -from ._patch import * # pylint: disable=unused-wildcard-import +from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ "RadiologyInsightsClientOperationsMixin", ] -__all__.extend([p for p in _patch_all if p not in __all__]) +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/aio/_operations/_operations.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/aio/_operations/_operations.py index edcb1f1d5894..0cf956c3ff00 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/aio/_operations/_operations.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, AsyncIterator, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -36,7 +35,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +51,7 @@ async def _infer_radiology_insights_initial( expand: Optional[List[str]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/aio/_operations/_patch.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/aio/_operations/_patch.py index 455941122974..f7dd32510333 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/aio/_operations/_patch.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/aio/_operations/_patch.py @@ -6,7 +6,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/aio/_patch.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/aio/_patch.py index 1a00f5c523e0..f7dd32510333 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/aio/_patch.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/aio/_patch.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines, protected-access # ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. @@ -7,275 +6,9 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ -from typing import ( - Any, - Callable, - Dict, - IO, - TYPE_CHECKING, - List, - Optional, - Awaitable, - TypeVar, - Union, - cast, - overload, - MutableMapping, -) # pylint: disable=line-too-long +from typing import List -from azure.core.pipeline import PipelineResponse -from azure.core.credentials import AzureKeyCredential -from azure.core.polling import AsyncLROPoller, AsyncPollingMethod, AsyncNoPolling -from azure.core.polling.async_base_polling import AsyncLROBasePolling -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict - -from ._client import RadiologyInsightsClient as _RadiologyInsightsClient -from .._model_base import _deserialize -from .. import models as _models - - -JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from azure.core.credentials_async import AsyncTokenCredential - - -class RadiologyInsightsClient: # pylint: disable=client-accepts-api-version-keyword - """RadiologyInsightsClient. - - :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example: - https://westus2.api.cognitive.microsoft.com). Required. - :type endpoint: str - :param credential: Credential used to authenticate requests to the service. Is either a - AzureKeyCredential type or a TokenCredential type. Required. - :type credential: ~azure.core.credentials.AzureKeyCredential or - ~azure.core.credentials_async.AsyncTokenCredential - :keyword api_version: The API version to use for this operation. Default value is "2024-04-01". - Note that overriding this default value may result in unsupported behavior. - :paramtype api_version: str - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. - """ - - def __init__( - self, endpoint: str, credential: Union[AzureKeyCredential, "AsyncTokenCredential"], **kwargs: Any - ) -> None: # pylint: disable=line-too-long - self._client = _RadiologyInsightsClient(endpoint=endpoint, credential=credential, **kwargs) - - @overload # type: ignore[override] - async def begin_infer_radiology_insights( - self, - id: str, - resource: _models.RadiologyInsightsJob, - *, - expand: Optional[List[str]] = None, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.RadiologyInsightsInferenceResult]: - # pylint: disable=line-too-long - """Create Radiology Insights inference result. - - Creates a Radiology Insights inference result with the given request body. - - :param id: The unique ID of the inference result. Required. - :type id: str - :param resource: The resource instance. Required. - :type resource: ~azure.healthinsights.radiologyinsights.models.RadiologyInsightsJob - :keyword expand: Expand the indicated resources into the response. Default value is None. - :paramtype expand: list[str] - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns RadiologyInsightsInferenceResult. The RadiologyInsightsInferenceResult is compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.healthinsights.radiologyinsights.models.RadiologyInsightsInferenceResult] - :raises ~azure.core.exceptions.HttpResponseError:""" - - @overload # type: ignore[override] - async def begin_infer_radiology_insights( - self, - id: str, - resource: JSON, - *, - expand: Optional[List[str]] = None, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.RadiologyInsightsInferenceResult]: - # pylint: disable=line-too-long - """Create Radiology Insights inference result. - - Creates a Radiology Insights inference result with the given request body. - - :param id: The unique ID of the inference result. Required. - :type id: str - :param resource: The resource instance. Required. - :type resource: JSON - :keyword expand: Expand the indicated resources into the response. Default value is None. - :paramtype expand: list[str] - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns RadiologyInsightsInferenceResult. The RadiologyInsightsInferenceResult is compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.healthinsights.radiologyinsights.models.RadiologyInsightsInferenceResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload # type: ignore[override] - async def begin_infer_radiology_insights( - self, - id: str, - resource: IO[bytes], - *, - expand: Optional[List[str]] = None, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.RadiologyInsightsInferenceResult]: - # pylint: disable=line-too-long - """Create Radiology Insights inference result. - - Creates a Radiology Insights inference result with the given request body. - - :param id: The unique ID of the inference result. Required. - :type id: str - :param resource: The resource instance. Required. - :type resource: IO[bytes] - :keyword expand: Expand the indicated resources into the response. Default value is None. - :paramtype expand: list[str] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns RadiologyInsightsInferenceResult. The RadiologyInsightsInferenceResult is compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.healthinsights.radiologyinsights.models.RadiologyInsightsInferenceResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async # type: ignore[override] - async def begin_infer_radiology_insights( - self, - id: str, - resource: Union[_models.RadiologyInsightsJob, JSON, IO[bytes]], - *, - expand: Optional[List[str]] = None, - **kwargs: Any - ) -> AsyncLROPoller[_models.RadiologyInsightsInferenceResult]: - # pylint: disable=line-too-long - """Create Radiology Insights inference result. - - Creates a Radiology Insights inference result with the given request body. - - :param id: The unique ID of the inference result. Required. - :type id: str - :param resource: The resource instance. Is one of the following types: RadiologyInsightsJob, JSON, IO[bytes] Required. - :type resource: ~azure.healthinsights.radiologyinsights.models.RadiologyInsightsJob or JSON or IO[bytes] - :keyword expand: Expand the indicated resources into the response. Default value is None. - :paramtype expand: list[str] - :return: An instance of AsyncLROPoller that returns RadiologyInsightsInferenceResult. The RadiologyInsightsInferenceResult is compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.healthinsights.radiologyinsights.models.RadiologyInsightsInferenceResult] - :raises ~azure.core.exceptions.HttpResponseError: - - """ - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.RadiologyInsightsJob] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop( - "polling_interval", self._client._config.polling_interval - ) # pylint: disable=protected-access - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._client._infer_radiology_insights_initial( # pylint: disable=protected-access - id=id, - resource=resource, - expand=expand, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["x-ms-request-id"] = self._client._deserialize( - "str", response.headers.get("x-ms-request-id") - ) # pylint: disable=protected-access - response_headers["Operation-Location"] = self._client._deserialize( - "str", response.headers.get("Operation-Location") - ) # pylint: disable=protected-access - deserialized = _deserialize(_models.RadiologyInsightsInferenceResult, response.json().get("result")) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._client._serialize.url( - "self._client._config.endpoint", self._client._config.endpoint, "str", skip_quote=True - ), # pylint: disable=protected-access - } - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncLROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.RadiologyInsightsInferenceResult].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - - return AsyncLROPoller[_models.RadiologyInsightsInferenceResult]( - self._client._client, raw_result, get_long_running_output, polling_method # type: ignore # pylint: disable=protected-access - ) - - def send_request( - self, request: HttpRequest, *, stream: bool = False, **kwargs: Any - ) -> Awaitable[AsyncHttpResponse]: - """Runs the network request through the client's chained policies. - - >>> from azure.core.rest import HttpRequest - >>> request = HttpRequest("GET", "https://www.example.org/") - - >>> response = await client.send_request(request) - - - For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request - - :param request: The network request you want to make. Required. - :type request: ~azure.core.rest.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to False. - :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.rest.AsyncHttpResponse - """ - - return self._client.send_request(request, stream=stream, **kwargs) # type: ignore - - async def close(self) -> None: - await self._client.close() - - async def __aenter__(self) -> "RadiologyInsightsClient": - await self._client.__aenter__() - return self - - async def __aexit__(self, *exc_details: Any) -> None: - await self._client.__aexit__(*exc_details) - - -__all__: List[str] = [ - "RadiologyInsightsClient" -] # Add all objects you want publicly available to users at this package level +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level def patch_sdk(): diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/aio/_vendor.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/aio/_vendor.py index e2c3b938b89d..069c5cc081e4 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/aio/_vendor.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import RadiologyInsightsClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/models/__init__.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/models/__init__.py index 0d91f6e06980..a3b9c5b9152c 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/models/__init__.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/models/__init__.py @@ -5,80 +5,91 @@ # Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models import AgeMismatchInference -from ._models import Annotation -from ._models import CodeableConcept -from ._models import Coding -from ._models import CompleteOrderDiscrepancyInference -from ._models import CriticalResult -from ._models import CriticalResultInference -from ._models import DocumentAdministrativeMetadata -from ._models import DocumentAuthor -from ._models import DocumentContent -from ._models import DomainResource -from ._models import Element -from ._models import Extension -from ._models import FindingInference -from ._models import FindingOptions -from ._models import FollowupCommunicationInference -from ._models import FollowupRecommendationInference -from ._models import FollowupRecommendationOptions -from ._models import GenericProcedureRecommendation -from ._models import HealthInsightsErrorResponse -from ._models import Identifier -from ._models import ImagingProcedure -from ._models import ImagingProcedureRecommendation -from ._models import LateralityDiscrepancyInference -from ._models import LimitedOrderDiscrepancyInference -from ._models import Meta -from ._models import Narrative -from ._models import Observation -from ._models import ObservationComponent -from ._models import ObservationReferenceRange -from ._models import OrderedProcedure -from ._models import PatientDetails -from ._models import PatientDocument -from ._models import PatientEncounter -from ._models import PatientRecord -from ._models import Period -from ._models import ProcedureRecommendation -from ._models import Quantity -from ._models import RadiologyCodeWithTypes -from ._models import RadiologyInsightsData -from ._models import RadiologyInsightsInference -from ._models import RadiologyInsightsInferenceOptions -from ._models import RadiologyInsightsInferenceResult -from ._models import RadiologyInsightsJob -from ._models import RadiologyInsightsModelConfiguration -from ._models import RadiologyInsightsPatientResult -from ._models import RadiologyProcedureInference -from ._models import Range -from ._models import Ratio -from ._models import RecommendationFinding -from ._models import Reference -from ._models import Resource -from ._models import SampledData -from ._models import SexMismatchInference -from ._models import TimePeriod +from typing import TYPE_CHECKING -from ._enums import ClinicalDocumentType -from ._enums import ContactPointSystem -from ._enums import ContactPointUse -from ._enums import DocumentContentSourceType -from ._enums import DocumentType -from ._enums import EncounterClass -from ._enums import JobStatus -from ._enums import LateralityDiscrepancyType -from ._enums import MedicalProfessionalType -from ._enums import ObservationStatusCodeType -from ._enums import PatientSex -from ._enums import RadiologyInsightsInferenceType -from ._enums import RecommendationFindingStatusType -from ._enums import ResearchStudyStatusCodeType -from ._enums import SpecialtyType +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models import ( # type: ignore + AgeMismatchInference, + Annotation, + CodeableConcept, + Coding, + CompleteOrderDiscrepancyInference, + CriticalResult, + CriticalResultInference, + DocumentAdministrativeMetadata, + DocumentAuthor, + DocumentContent, + DomainResource, + Element, + Extension, + FindingInference, + FindingOptions, + FollowupCommunicationInference, + FollowupRecommendationInference, + FollowupRecommendationOptions, + GenericProcedureRecommendation, + HealthInsightsErrorResponse, + Identifier, + ImagingProcedure, + ImagingProcedureRecommendation, + LateralityDiscrepancyInference, + LimitedOrderDiscrepancyInference, + Meta, + Narrative, + Observation, + ObservationComponent, + ObservationReferenceRange, + OrderedProcedure, + PatientDetails, + PatientDocument, + PatientEncounter, + PatientRecord, + Period, + ProcedureRecommendation, + Quantity, + RadiologyCodeWithTypes, + RadiologyInsightsData, + RadiologyInsightsInference, + RadiologyInsightsInferenceOptions, + RadiologyInsightsInferenceResult, + RadiologyInsightsJob, + RadiologyInsightsModelConfiguration, + RadiologyInsightsPatientResult, + RadiologyProcedureInference, + Range, + Ratio, + RecommendationFinding, + Reference, + Resource, + SampledData, + SexMismatchInference, + TimePeriod, +) + +from ._enums import ( # type: ignore + ClinicalDocumentType, + ContactPointSystem, + ContactPointUse, + DocumentContentSourceType, + DocumentType, + EncounterClass, + JobStatus, + LateralityDiscrepancyType, + MedicalProfessionalType, + ObservationStatusCodeType, + PatientSex, + RadiologyInsightsInferenceType, + RecommendationFindingStatusType, + ResearchStudyStatusCodeType, + SpecialtyType, +) from ._patch import __all__ as _patch_all -from ._patch import * # pylint: disable=unused-wildcard-import +from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ @@ -153,5 +164,5 @@ "ResearchStudyStatusCodeType", "SpecialtyType", ] -__all__.extend([p for p in _patch_all if p not in __all__]) +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/models/_models.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/models/_models.py index 5394f78299e0..f76cc19d3efc 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/models/_models.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/models/_models.py @@ -1,23 +1,23 @@ +# pylint: disable=too-many-lines # coding=utf-8 -# pylint: disable=too-many-lines, line-too-long # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=useless-super-delegation import datetime from typing import Any, Dict, List, Literal, Mapping, Optional, TYPE_CHECKING, Union, overload -from azure.core.exceptions import HttpResponseError +from azure.core.exceptions import ODataV4Format from .. import _model_base from .._model_base import rest_discriminator, rest_field from ._enums import RadiologyInsightsInferenceType if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models @@ -68,16 +68,16 @@ def __init__( *, kind: str, extension: Optional[List["_models.Extension"]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -100,22 +100,22 @@ def __init__( self, *, extension: Optional[List["_models.Extension"]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, kind=RadiologyInsightsInferenceType.AGE_MISMATCH, **kwargs) class Element(_model_base.Model): """The base definition for all elements contained inside a resource. - Based on `FHIR Element `__. + Based on `FHIR Element `_. :ivar id: Unique id for inter-element referencing. :vartype id: str @@ -134,16 +134,16 @@ def __init__( *, id: Optional[str] = None, # pylint: disable=redefined-builtin extension: Optional[List["_models.Extension"]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -180,16 +180,16 @@ def __init__( extension: Optional[List["_models.Extension"]] = None, author_string: Optional[str] = None, time: Optional[str] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -214,16 +214,16 @@ def __init__( *, coding: Optional[List["_models.Coding"]] = None, text: Optional[str] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -264,16 +264,16 @@ def __init__( version: Optional[str] = None, code: Optional[str] = None, display: Optional[str] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -319,16 +319,16 @@ def __init__( extension: Optional[List["_models.Extension"]] = None, missing_body_parts: Optional[List["_models.CodeableConcept"]] = None, missing_body_part_measurements: Optional[List["_models.CodeableConcept"]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, kind=RadiologyInsightsInferenceType.COMPLETE_ORDER_DISCREPANCY, **kwargs) @@ -353,16 +353,16 @@ def __init__( *, description: str, finding: Optional["_models.Observation"] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -392,16 +392,16 @@ def __init__( *, result: "_models.CriticalResult", extension: Optional[List["_models.Extension"]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, kind=RadiologyInsightsInferenceType.CRITICAL_RESULT, **kwargs) @@ -426,16 +426,16 @@ def __init__( *, ordered_procedures: Optional[List["_models.OrderedProcedure"]] = None, encounter_id: Optional[str] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -459,16 +459,16 @@ def __init__( *, id: Optional[str] = None, # pylint: disable=redefined-builtin full_name: Optional[str] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -502,16 +502,16 @@ def __init__( *, source_type: Union[str, "_models.DocumentContentSourceType"], value: str, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -553,16 +553,16 @@ def __init__( meta: Optional["_models.Meta"] = None, implicit_rules: Optional[str] = None, language: Optional[str] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -620,22 +620,22 @@ def __init__( contained: Optional[List["_models.Resource"]] = None, extension: Optional[List["_models.Extension"]] = None, modifier_extension: Optional[List["_models.Extension"]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class Extension(Element): # pylint: disable=too-many-instance-attributes +class Extension(Element): """Base for all elements - Based on `FHIR Element `_. + Based on `FHIR Element `_. :ivar url: Source of the definition for the extension code - a logical name or a URL. Required. @@ -710,16 +710,16 @@ def __init__( value_date_time: Optional[str] = None, value_period: Optional["_models.Period"] = None, value_reference: Optional["_models.Reference"] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -748,16 +748,16 @@ def __init__( *, finding: "_models.Observation", extension: Optional[List["_models.Extension"]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, kind=RadiologyInsightsInferenceType.FINDING, **kwargs) @@ -781,16 +781,16 @@ def __init__( self, *, provide_focused_sentence_evidence: Optional[bool] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -812,7 +812,7 @@ class FollowupCommunicationInference(RadiologyInsightsInference, discriminator=" :vartype was_acknowledged: bool """ - kind: Literal[RadiologyInsightsInferenceType.FOLLOWUP_COMMUNICATION] = rest_discriminator(name="kind") # type: ignore + kind: Literal[RadiologyInsightsInferenceType.FOLLOWUP_COMMUNICATION] = rest_discriminator(name="kind") # type: ignore # pylint: disable=line-too-long """Inference type. Required. Followup Communication inference type""" communicated_at: Optional[List[datetime.datetime]] = rest_field(name="communicatedAt", format="rfc3339") """Communication date and time.""" @@ -829,16 +829,16 @@ def __init__( extension: Optional[List["_models.Extension"]] = None, communicated_at: Optional[List[datetime.datetime]] = None, recipient: Optional[List[Union[str, "_models.MedicalProfessionalType"]]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, kind=RadiologyInsightsInferenceType.FOLLOWUP_COMMUNICATION, **kwargs) @@ -879,7 +879,7 @@ class FollowupRecommendationInference(RadiologyInsightsInference, discriminator= ~azure.healthinsights.radiologyinsights.models.ProcedureRecommendation """ - kind: Literal[RadiologyInsightsInferenceType.FOLLOWUP_RECOMMENDATION] = rest_discriminator(name="kind") # type: ignore + kind: Literal[RadiologyInsightsInferenceType.FOLLOWUP_RECOMMENDATION] = rest_discriminator(name="kind") # type: ignore # pylint: disable=line-too-long """Inference type. Required. Recommendation inference type""" effective_at: Optional[str] = rest_field(name="effectiveAt") """Date and time are displayed when the procedure is recommended to be done at a specific point in @@ -918,16 +918,16 @@ def __init__( effective_at: Optional[str] = None, effective_period: Optional["_models.Period"] = None, findings: Optional[List["_models.RecommendationFinding"]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, kind=RadiologyInsightsInferenceType.FOLLOWUP_RECOMMENDATION, **kwargs) @@ -966,16 +966,16 @@ def __init__( include_recommendations_with_no_specified_modality: Optional[bool] = None, include_recommendations_in_references: Optional[bool] = None, provide_focused_sentence_evidence: Optional[bool] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -1005,16 +1005,16 @@ def __init__( *, kind: str, extension: Optional[List["_models.Extension"]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -1049,16 +1049,16 @@ def __init__( code: "_models.CodeableConcept", extension: Optional[List["_models.Extension"]] = None, description: Optional[str] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, kind="genericProcedureRecommendation", **kwargs) @@ -1067,27 +1067,27 @@ class HealthInsightsErrorResponse(_model_base.Model): :ivar error: The error object. Required. - :vartype error: ~azure.core.HttpResponseError + :vartype error: ~azure.core.ODataV4Format """ - error: HttpResponseError = rest_field() + error: ODataV4Format = rest_field() """The error object. Required.""" @overload def __init__( self, *, - error: HttpResponseError, - ): ... + error: ODataV4Format, + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -1132,16 +1132,16 @@ def __init__( value: Optional[str] = None, period: Optional["_models.Period"] = None, assigner: Optional["_models.Reference"] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -1181,16 +1181,16 @@ def __init__( laterality: Optional["_models.CodeableConcept"] = None, contrast: Optional["_models.RadiologyCodeWithTypes"] = None, view: Optional["_models.RadiologyCodeWithTypes"] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -1224,16 +1224,16 @@ def __init__( imaging_procedures: List["_models.ImagingProcedure"], extension: Optional[List["_models.Extension"]] = None, procedure_codes: Optional[List["_models.CodeableConcept"]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, kind="imagingProcedureRecommendation", **kwargs) @@ -1257,7 +1257,7 @@ class LateralityDiscrepancyInference(RadiologyInsightsInference, discriminator=" ~azure.healthinsights.radiologyinsights.models.LateralityDiscrepancyType """ - kind: Literal[RadiologyInsightsInferenceType.LATERALITY_DISCREPANCY] = rest_discriminator(name="kind") # type: ignore + kind: Literal[RadiologyInsightsInferenceType.LATERALITY_DISCREPANCY] = rest_discriminator(name="kind") # type: ignore # pylint: disable=line-too-long """Inference type. Required. Laterality discrepancy inference type""" laterality_indication: Optional["_models.CodeableConcept"] = rest_field(name="lateralityIndication") """Laterality indication : SNOMED CT code for laterality qualifier value.""" @@ -1273,16 +1273,16 @@ def __init__( discrepancy_type: Union[str, "_models.LateralityDiscrepancyType"], extension: Optional[List["_models.Extension"]] = None, laterality_indication: Optional["_models.CodeableConcept"] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, kind=RadiologyInsightsInferenceType.LATERALITY_DISCREPANCY, **kwargs) @@ -1327,16 +1327,16 @@ def __init__( extension: Optional[List["_models.Extension"]] = None, present_body_parts: Optional[List["_models.CodeableConcept"]] = None, present_body_part_measurements: Optional[List["_models.CodeableConcept"]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, kind=RadiologyInsightsInferenceType.LIMITED_ORDER_DISCREPANCY, **kwargs) @@ -1400,16 +1400,16 @@ def __init__( profile: Optional[List[str]] = None, security: Optional[List["_models.Coding"]] = None, tag: Optional[List["_models.Coding"]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -1443,20 +1443,20 @@ def __init__( div: str, id: Optional[str] = None, # pylint: disable=redefined-builtin extension: Optional[List["_models.Extension"]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class Observation(DomainResource, discriminator="Observation"): # pylint: disable=too-many-instance-attributes +class Observation(DomainResource, discriminator="Observation"): """Detailed information about observations Based on `FHIR Observation `_. @@ -1652,20 +1652,20 @@ def __init__( # pylint: disable=too-many-locals has_member: Optional[List["_models.Reference"]] = None, derived_from: Optional[List["_models.Reference"]] = None, component: Optional[List["_models.ObservationComponent"]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, resource_type="Observation", **kwargs) -class ObservationComponent(Element): # pylint: disable=too-many-instance-attributes +class ObservationComponent(Element): """Component results Based on `FHIR Observation.component `_. @@ -1764,16 +1764,16 @@ def __init__( data_absent_reason: Optional["_models.CodeableConcept"] = None, interpretation: Optional[List["_models.CodeableConcept"]] = None, reference_range: Optional[List["_models.ObservationReferenceRange"]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -1818,16 +1818,16 @@ def __init__( applies_to: Optional[List["_models.CodeableConcept"]] = None, age: Optional["_models.Range"] = None, text: Optional[str] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -1856,16 +1856,16 @@ def __init__( code: Optional["_models.CodeableConcept"] = None, description: Optional[str] = None, extension: Optional[List["_models.Extension"]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -1895,16 +1895,16 @@ def __init__( sex: Optional[Union[str, "_models.PatientSex"]] = None, birth_date: Optional[datetime.date] = None, clinical_info: Optional[List["_models.Resource"]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -1980,16 +1980,16 @@ def __init__( authors: Optional[List["_models.DocumentAuthor"]] = None, specialty_type: Optional[Union[str, "_models.SpecialtyType"]] = None, administrative_metadata: Optional["_models.DocumentAdministrativeMetadata"] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -2025,16 +2025,16 @@ def __init__( id: str, # pylint: disable=redefined-builtin period: Optional["_models.TimePeriod"] = None, class_property: Optional[Union[str, "_models.EncounterClass"]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -2074,16 +2074,16 @@ def __init__( details: Optional["_models.PatientDetails"] = None, encounters: Optional[List["_models.PatientEncounter"]] = None, patient_documents: Optional[List["_models.PatientDocument"]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -2108,16 +2108,16 @@ def __init__( *, start: Optional[str] = None, end: Optional[str] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -2157,16 +2157,16 @@ def __init__( unit: Optional[str] = None, system: Optional[str] = None, code: Optional[str] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -2197,16 +2197,16 @@ def __init__( *, code: "_models.CodeableConcept", types: List["_models.CodeableConcept"], - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -2232,16 +2232,16 @@ def __init__( *, patients: List["_models.PatientRecord"], configuration: Optional["_models.RadiologyInsightsModelConfiguration"] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -2268,16 +2268,16 @@ def __init__( *, followup_recommendation_options: Optional["_models.FollowupRecommendationOptions"] = None, finding_options: Optional["_models.FindingOptions"] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -2305,16 +2305,16 @@ def __init__( *, patient_results: List["_models.RadiologyInsightsPatientResult"], model_version: str, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -2341,7 +2341,7 @@ class RadiologyInsightsJob(_model_base.Model): :ivar updated_at: The date and time when the processing job was last updated. :vartype updated_at: ~datetime.datetime :ivar error: Error object that describes the error when status is "Failed". - :vartype error: ~azure.core.HttpResponseError + :vartype error: ~azure.core.ODataV4Format """ job_data: Optional["_models.RadiologyInsightsData"] = rest_field(name="jobData", visibility=["read", "create"]) @@ -2359,7 +2359,7 @@ class RadiologyInsightsJob(_model_base.Model): """The date and time when the processing job is set to expire.""" updated_at: Optional[datetime.datetime] = rest_field(name="updatedAt", visibility=["read"], format="rfc3339") """The date and time when the processing job was last updated.""" - error: Optional[HttpResponseError] = rest_field(visibility=["read"]) + error: Optional[ODataV4Format] = rest_field(visibility=["read"]) """Error object that describes the error when status is \"Failed\".""" @overload @@ -2367,16 +2367,16 @@ def __init__( self, *, job_data: Optional["_models.RadiologyInsightsData"] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -2426,16 +2426,16 @@ def __init__( inference_types: Optional[List[Union[str, "_models.RadiologyInsightsInferenceType"]]] = None, inference_options: Optional["_models.RadiologyInsightsInferenceOptions"] = None, locale: Optional[str] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -2461,16 +2461,16 @@ def __init__( *, patient_id: str, inferences: List["_models.RadiologyInsightsInference"], - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -2510,16 +2510,16 @@ def __init__( ordered_procedure: "_models.OrderedProcedure", extension: Optional[List["_models.Extension"]] = None, procedure_codes: Optional[List["_models.CodeableConcept"]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, kind=RadiologyInsightsInferenceType.RADIOLOGY_PROCEDURE, **kwargs) @@ -2544,16 +2544,16 @@ def __init__( *, low: Optional["_models.Quantity"] = None, high: Optional["_models.Quantity"] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -2578,16 +2578,16 @@ def __init__( *, numerator: Optional["_models.Quantity"] = None, denominator: Optional["_models.Quantity"] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -2627,16 +2627,16 @@ def __init__( finding: Optional["_models.Observation"] = None, critical_finding: Optional["_models.CriticalResult"] = None, extension: Optional[List["_models.Extension"]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -2671,16 +2671,16 @@ def __init__( type: Optional[str] = None, identifier: Optional["_models.Identifier"] = None, display: Optional[str] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -2731,16 +2731,16 @@ def __init__( lower_limit: Optional[float] = None, upper_limit: Optional[float] = None, data: Optional[str] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -2770,16 +2770,16 @@ def __init__( *, sex_indication: "_models.CodeableConcept", extension: Optional[List["_models.Extension"]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, kind=RadiologyInsightsInferenceType.SEX_MISMATCH, **kwargs) @@ -2803,14 +2803,14 @@ def __init__( *, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/generated_tests/conftest.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/generated_tests/conftest.py new file mode 100644 index 000000000000..9e422a805079 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/generated_tests/conftest.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import os +import pytest +from dotenv import load_dotenv +from devtools_testutils import ( + test_proxy, + add_general_regex_sanitizer, + add_body_key_sanitizer, + add_header_regex_sanitizer, +) + +load_dotenv() + + +# For security, please avoid record sensitive identity information in recordings +@pytest.fixture(scope="session", autouse=True) +def add_sanitizers(test_proxy): + radiologyinsights_subscription_id = os.environ.get( + "RADIOLOGYINSIGHTS_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000" + ) + radiologyinsights_tenant_id = os.environ.get("RADIOLOGYINSIGHTS_TENANT_ID", "00000000-0000-0000-0000-000000000000") + radiologyinsights_client_id = os.environ.get("RADIOLOGYINSIGHTS_CLIENT_ID", "00000000-0000-0000-0000-000000000000") + radiologyinsights_client_secret = os.environ.get( + "RADIOLOGYINSIGHTS_CLIENT_SECRET", "00000000-0000-0000-0000-000000000000" + ) + add_general_regex_sanitizer(regex=radiologyinsights_subscription_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=radiologyinsights_tenant_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=radiologyinsights_client_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=radiologyinsights_client_secret, value="00000000-0000-0000-0000-000000000000") + + add_header_regex_sanitizer(key="Set-Cookie", value="[set-cookie;]") + add_header_regex_sanitizer(key="Cookie", value="cookie;") + add_body_key_sanitizer(json_path="$..access_token", value="access_token") diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/generated_tests/test_radiology_insights.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/generated_tests/test_radiology_insights.py new file mode 100644 index 000000000000..0532b08ad53e --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/generated_tests/test_radiology_insights.py @@ -0,0 +1,472 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import RadiologyInsightsClientTestBase, RadiologyInsightsPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestRadiologyInsights(RadiologyInsightsClientTestBase): + @RadiologyInsightsPreparer() + @recorded_by_proxy + def test_begin_infer_radiology_insights(self, radiologyinsights_endpoint): + client = self.create_client(endpoint=radiologyinsights_endpoint) + response = client.begin_infer_radiology_insights( + id="str", + resource={ + "id": "str", + "status": "str", + "createdAt": "2020-02-20 00:00:00", + "error": ~azure.core.ODataV4Format, + "expiresAt": "2020-02-20 00:00:00", + "jobData": { + "patients": [ + { + "id": "str", + "details": { + "birthDate": "2020-02-20", + "clinicalInfo": [ + { + "resourceType": "str", + "id": "str", + "implicitRules": "str", + "language": "str", + "meta": { + "lastUpdated": "str", + "profile": ["str"], + "security": [ + { + "code": "str", + "display": "str", + "extension": [ + { + "url": "str", + "valueBoolean": bool, + "valueCodeableConcept": {"coding": [...], "text": "str"}, + "valueDateTime": "str", + "valueInteger": 0, + "valuePeriod": {"end": "str", "start": "str"}, + "valueQuantity": { + "code": "str", + "comparator": "str", + "system": "str", + "unit": "str", + "value": 0.0, + }, + "valueRange": { + "high": { + "code": "str", + "comparator": "str", + "system": "str", + "unit": "str", + "value": 0.0, + }, + "low": { + "code": "str", + "comparator": "str", + "system": "str", + "unit": "str", + "value": 0.0, + }, + }, + "valueRatio": { + "denominator": { + "code": "str", + "comparator": "str", + "system": "str", + "unit": "str", + "value": 0.0, + }, + "numerator": { + "code": "str", + "comparator": "str", + "system": "str", + "unit": "str", + "value": 0.0, + }, + }, + "valueReference": { + "display": "str", + "identifier": { + "assigner": ..., + "period": {"end": "str", "start": "str"}, + "system": "str", + "type": {"coding": [...], "text": "str"}, + "use": "str", + "value": "str", + }, + "reference": "str", + "type": "str", + }, + "valueSampledData": { + "dimensions": 0, + "origin": { + "code": "str", + "comparator": "str", + "system": "str", + "unit": "str", + "value": 0.0, + }, + "period": 0.0, + "data": "str", + "factor": 0.0, + "lowerLimit": 0.0, + "upperLimit": 0.0, + }, + "valueString": "str", + "valueTime": "12:30:00", + } + ], + "id": "str", + "system": "str", + "version": "str", + } + ], + "source": "str", + "tag": [ + { + "code": "str", + "display": "str", + "extension": [ + { + "url": "str", + "valueBoolean": bool, + "valueCodeableConcept": {"coding": [...], "text": "str"}, + "valueDateTime": "str", + "valueInteger": 0, + "valuePeriod": {"end": "str", "start": "str"}, + "valueQuantity": { + "code": "str", + "comparator": "str", + "system": "str", + "unit": "str", + "value": 0.0, + }, + "valueRange": { + "high": { + "code": "str", + "comparator": "str", + "system": "str", + "unit": "str", + "value": 0.0, + }, + "low": { + "code": "str", + "comparator": "str", + "system": "str", + "unit": "str", + "value": 0.0, + }, + }, + "valueRatio": { + "denominator": { + "code": "str", + "comparator": "str", + "system": "str", + "unit": "str", + "value": 0.0, + }, + "numerator": { + "code": "str", + "comparator": "str", + "system": "str", + "unit": "str", + "value": 0.0, + }, + }, + "valueReference": { + "display": "str", + "identifier": { + "assigner": ..., + "period": {"end": "str", "start": "str"}, + "system": "str", + "type": {"coding": [...], "text": "str"}, + "use": "str", + "value": "str", + }, + "reference": "str", + "type": "str", + }, + "valueSampledData": { + "dimensions": 0, + "origin": { + "code": "str", + "comparator": "str", + "system": "str", + "unit": "str", + "value": 0.0, + }, + "period": 0.0, + "data": "str", + "factor": 0.0, + "lowerLimit": 0.0, + "upperLimit": 0.0, + }, + "valueString": "str", + "valueTime": "12:30:00", + } + ], + "id": "str", + "system": "str", + "version": "str", + } + ], + "versionId": "str", + }, + } + ], + "sex": "str", + }, + "encounters": [ + { + "id": "str", + "class": "str", + "period": {"end": "2020-02-20 00:00:00", "start": "2020-02-20 00:00:00"}, + } + ], + "patientDocuments": [ + { + "content": {"sourceType": "str", "value": "str"}, + "id": "str", + "type": "str", + "administrativeMetadata": { + "encounterId": "str", + "orderedProcedures": [ + { + "code": { + "coding": [ + { + "code": "str", + "display": "str", + "extension": [ + { + "url": "str", + "valueBoolean": bool, + "valueCodeableConcept": ..., + "valueDateTime": "str", + "valueInteger": 0, + "valuePeriod": {"end": "str", "start": "str"}, + "valueQuantity": { + "code": "str", + "comparator": "str", + "system": "str", + "unit": "str", + "value": 0.0, + }, + "valueRange": { + "high": { + "code": "str", + "comparator": "str", + "system": "str", + "unit": "str", + "value": 0.0, + }, + "low": { + "code": "str", + "comparator": "str", + "system": "str", + "unit": "str", + "value": 0.0, + }, + }, + "valueRatio": { + "denominator": { + "code": "str", + "comparator": "str", + "system": "str", + "unit": "str", + "value": 0.0, + }, + "numerator": { + "code": "str", + "comparator": "str", + "system": "str", + "unit": "str", + "value": 0.0, + }, + }, + "valueReference": { + "display": "str", + "identifier": { + "assigner": ..., + "period": {"end": "str", "start": "str"}, + "system": "str", + "type": ..., + "use": "str", + "value": "str", + }, + "reference": "str", + "type": "str", + }, + "valueSampledData": { + "dimensions": 0, + "origin": { + "code": "str", + "comparator": "str", + "system": "str", + "unit": "str", + "value": 0.0, + }, + "period": 0.0, + "data": "str", + "factor": 0.0, + "lowerLimit": 0.0, + "upperLimit": 0.0, + }, + "valueString": "str", + "valueTime": "12:30:00", + } + ], + "id": "str", + "system": "str", + "version": "str", + } + ], + "text": "str", + }, + "description": "str", + "extension": [ + { + "url": "str", + "valueBoolean": bool, + "valueCodeableConcept": { + "coding": [ + { + "code": "str", + "display": "str", + "extension": [...], + "id": "str", + "system": "str", + "version": "str", + } + ], + "text": "str", + }, + "valueDateTime": "str", + "valueInteger": 0, + "valuePeriod": {"end": "str", "start": "str"}, + "valueQuantity": { + "code": "str", + "comparator": "str", + "system": "str", + "unit": "str", + "value": 0.0, + }, + "valueRange": { + "high": { + "code": "str", + "comparator": "str", + "system": "str", + "unit": "str", + "value": 0.0, + }, + "low": { + "code": "str", + "comparator": "str", + "system": "str", + "unit": "str", + "value": 0.0, + }, + }, + "valueRatio": { + "denominator": { + "code": "str", + "comparator": "str", + "system": "str", + "unit": "str", + "value": 0.0, + }, + "numerator": { + "code": "str", + "comparator": "str", + "system": "str", + "unit": "str", + "value": 0.0, + }, + }, + "valueReference": { + "display": "str", + "identifier": { + "assigner": ..., + "period": {"end": "str", "start": "str"}, + "system": "str", + "type": { + "coding": [ + { + "code": "str", + "display": "str", + "extension": [...], + "id": "str", + "system": "str", + "version": "str", + } + ], + "text": "str", + }, + "use": "str", + "value": "str", + }, + "reference": "str", + "type": "str", + }, + "valueSampledData": { + "dimensions": 0, + "origin": { + "code": "str", + "comparator": "str", + "system": "str", + "unit": "str", + "value": 0.0, + }, + "period": 0.0, + "data": "str", + "factor": 0.0, + "lowerLimit": 0.0, + "upperLimit": 0.0, + }, + "valueString": "str", + "valueTime": "12:30:00", + } + ], + } + ], + }, + "authors": [{"fullName": "str", "id": "str"}], + "clinicalType": "str", + "createdAt": "2020-02-20 00:00:00", + "language": "str", + "specialtyType": "str", + } + ], + } + ], + "configuration": { + "includeEvidence": bool, + "inferenceOptions": { + "findingOptions": {"provideFocusedSentenceEvidence": bool}, + "followupRecommendationOptions": { + "includeRecommendationsInReferences": bool, + "includeRecommendationsWithNoSpecifiedModality": bool, + "provideFocusedSentenceEvidence": bool, + }, + }, + "inferenceTypes": ["str"], + "locale": "str", + "verbose": bool, + }, + }, + "result": { + "modelVersion": "str", + "patientResults": [{"inferences": ["radiology_insights_inference"], "patientId": "str"}], + }, + "updatedAt": "2020-02-20 00:00:00", + }, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/generated_tests/test_radiology_insights_async.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/generated_tests/test_radiology_insights_async.py new file mode 100644 index 000000000000..502e77960a4d --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/generated_tests/test_radiology_insights_async.py @@ -0,0 +1,484 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import RadiologyInsightsPreparer +from testpreparer_async import RadiologyInsightsClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestRadiologyInsightsAsync(RadiologyInsightsClientTestBaseAsync): + @RadiologyInsightsPreparer() + @recorded_by_proxy_async + async def test_begin_infer_radiology_insights(self, radiologyinsights_endpoint): + client = self.create_async_client(endpoint=radiologyinsights_endpoint) + response = await ( + await client.begin_infer_radiology_insights( + id="str", + resource={ + "id": "str", + "status": "str", + "createdAt": "2020-02-20 00:00:00", + "error": ~azure.core.ODataV4Format, + "expiresAt": "2020-02-20 00:00:00", + "jobData": { + "patients": [ + { + "id": "str", + "details": { + "birthDate": "2020-02-20", + "clinicalInfo": [ + { + "resourceType": "str", + "id": "str", + "implicitRules": "str", + "language": "str", + "meta": { + "lastUpdated": "str", + "profile": ["str"], + "security": [ + { + "code": "str", + "display": "str", + "extension": [ + { + "url": "str", + "valueBoolean": bool, + "valueCodeableConcept": { + "coding": [...], + "text": "str", + }, + "valueDateTime": "str", + "valueInteger": 0, + "valuePeriod": {"end": "str", "start": "str"}, + "valueQuantity": { + "code": "str", + "comparator": "str", + "system": "str", + "unit": "str", + "value": 0.0, + }, + "valueRange": { + "high": { + "code": "str", + "comparator": "str", + "system": "str", + "unit": "str", + "value": 0.0, + }, + "low": { + "code": "str", + "comparator": "str", + "system": "str", + "unit": "str", + "value": 0.0, + }, + }, + "valueRatio": { + "denominator": { + "code": "str", + "comparator": "str", + "system": "str", + "unit": "str", + "value": 0.0, + }, + "numerator": { + "code": "str", + "comparator": "str", + "system": "str", + "unit": "str", + "value": 0.0, + }, + }, + "valueReference": { + "display": "str", + "identifier": { + "assigner": ..., + "period": {"end": "str", "start": "str"}, + "system": "str", + "type": {"coding": [...], "text": "str"}, + "use": "str", + "value": "str", + }, + "reference": "str", + "type": "str", + }, + "valueSampledData": { + "dimensions": 0, + "origin": { + "code": "str", + "comparator": "str", + "system": "str", + "unit": "str", + "value": 0.0, + }, + "period": 0.0, + "data": "str", + "factor": 0.0, + "lowerLimit": 0.0, + "upperLimit": 0.0, + }, + "valueString": "str", + "valueTime": "12:30:00", + } + ], + "id": "str", + "system": "str", + "version": "str", + } + ], + "source": "str", + "tag": [ + { + "code": "str", + "display": "str", + "extension": [ + { + "url": "str", + "valueBoolean": bool, + "valueCodeableConcept": { + "coding": [...], + "text": "str", + }, + "valueDateTime": "str", + "valueInteger": 0, + "valuePeriod": {"end": "str", "start": "str"}, + "valueQuantity": { + "code": "str", + "comparator": "str", + "system": "str", + "unit": "str", + "value": 0.0, + }, + "valueRange": { + "high": { + "code": "str", + "comparator": "str", + "system": "str", + "unit": "str", + "value": 0.0, + }, + "low": { + "code": "str", + "comparator": "str", + "system": "str", + "unit": "str", + "value": 0.0, + }, + }, + "valueRatio": { + "denominator": { + "code": "str", + "comparator": "str", + "system": "str", + "unit": "str", + "value": 0.0, + }, + "numerator": { + "code": "str", + "comparator": "str", + "system": "str", + "unit": "str", + "value": 0.0, + }, + }, + "valueReference": { + "display": "str", + "identifier": { + "assigner": ..., + "period": {"end": "str", "start": "str"}, + "system": "str", + "type": {"coding": [...], "text": "str"}, + "use": "str", + "value": "str", + }, + "reference": "str", + "type": "str", + }, + "valueSampledData": { + "dimensions": 0, + "origin": { + "code": "str", + "comparator": "str", + "system": "str", + "unit": "str", + "value": 0.0, + }, + "period": 0.0, + "data": "str", + "factor": 0.0, + "lowerLimit": 0.0, + "upperLimit": 0.0, + }, + "valueString": "str", + "valueTime": "12:30:00", + } + ], + "id": "str", + "system": "str", + "version": "str", + } + ], + "versionId": "str", + }, + } + ], + "sex": "str", + }, + "encounters": [ + { + "id": "str", + "class": "str", + "period": {"end": "2020-02-20 00:00:00", "start": "2020-02-20 00:00:00"}, + } + ], + "patientDocuments": [ + { + "content": {"sourceType": "str", "value": "str"}, + "id": "str", + "type": "str", + "administrativeMetadata": { + "encounterId": "str", + "orderedProcedures": [ + { + "code": { + "coding": [ + { + "code": "str", + "display": "str", + "extension": [ + { + "url": "str", + "valueBoolean": bool, + "valueCodeableConcept": ..., + "valueDateTime": "str", + "valueInteger": 0, + "valuePeriod": {"end": "str", "start": "str"}, + "valueQuantity": { + "code": "str", + "comparator": "str", + "system": "str", + "unit": "str", + "value": 0.0, + }, + "valueRange": { + "high": { + "code": "str", + "comparator": "str", + "system": "str", + "unit": "str", + "value": 0.0, + }, + "low": { + "code": "str", + "comparator": "str", + "system": "str", + "unit": "str", + "value": 0.0, + }, + }, + "valueRatio": { + "denominator": { + "code": "str", + "comparator": "str", + "system": "str", + "unit": "str", + "value": 0.0, + }, + "numerator": { + "code": "str", + "comparator": "str", + "system": "str", + "unit": "str", + "value": 0.0, + }, + }, + "valueReference": { + "display": "str", + "identifier": { + "assigner": ..., + "period": { + "end": "str", + "start": "str", + }, + "system": "str", + "type": ..., + "use": "str", + "value": "str", + }, + "reference": "str", + "type": "str", + }, + "valueSampledData": { + "dimensions": 0, + "origin": { + "code": "str", + "comparator": "str", + "system": "str", + "unit": "str", + "value": 0.0, + }, + "period": 0.0, + "data": "str", + "factor": 0.0, + "lowerLimit": 0.0, + "upperLimit": 0.0, + }, + "valueString": "str", + "valueTime": "12:30:00", + } + ], + "id": "str", + "system": "str", + "version": "str", + } + ], + "text": "str", + }, + "description": "str", + "extension": [ + { + "url": "str", + "valueBoolean": bool, + "valueCodeableConcept": { + "coding": [ + { + "code": "str", + "display": "str", + "extension": [...], + "id": "str", + "system": "str", + "version": "str", + } + ], + "text": "str", + }, + "valueDateTime": "str", + "valueInteger": 0, + "valuePeriod": {"end": "str", "start": "str"}, + "valueQuantity": { + "code": "str", + "comparator": "str", + "system": "str", + "unit": "str", + "value": 0.0, + }, + "valueRange": { + "high": { + "code": "str", + "comparator": "str", + "system": "str", + "unit": "str", + "value": 0.0, + }, + "low": { + "code": "str", + "comparator": "str", + "system": "str", + "unit": "str", + "value": 0.0, + }, + }, + "valueRatio": { + "denominator": { + "code": "str", + "comparator": "str", + "system": "str", + "unit": "str", + "value": 0.0, + }, + "numerator": { + "code": "str", + "comparator": "str", + "system": "str", + "unit": "str", + "value": 0.0, + }, + }, + "valueReference": { + "display": "str", + "identifier": { + "assigner": ..., + "period": {"end": "str", "start": "str"}, + "system": "str", + "type": { + "coding": [ + { + "code": "str", + "display": "str", + "extension": [...], + "id": "str", + "system": "str", + "version": "str", + } + ], + "text": "str", + }, + "use": "str", + "value": "str", + }, + "reference": "str", + "type": "str", + }, + "valueSampledData": { + "dimensions": 0, + "origin": { + "code": "str", + "comparator": "str", + "system": "str", + "unit": "str", + "value": 0.0, + }, + "period": 0.0, + "data": "str", + "factor": 0.0, + "lowerLimit": 0.0, + "upperLimit": 0.0, + }, + "valueString": "str", + "valueTime": "12:30:00", + } + ], + } + ], + }, + "authors": [{"fullName": "str", "id": "str"}], + "clinicalType": "str", + "createdAt": "2020-02-20 00:00:00", + "language": "str", + "specialtyType": "str", + } + ], + } + ], + "configuration": { + "includeEvidence": bool, + "inferenceOptions": { + "findingOptions": {"provideFocusedSentenceEvidence": bool}, + "followupRecommendationOptions": { + "includeRecommendationsInReferences": bool, + "includeRecommendationsWithNoSpecifiedModality": bool, + "provideFocusedSentenceEvidence": bool, + }, + }, + "inferenceTypes": ["str"], + "locale": "str", + "verbose": bool, + }, + }, + "result": { + "modelVersion": "str", + "patientResults": [{"inferences": ["radiology_insights_inference"], "patientId": "str"}], + }, + "updatedAt": "2020-02-20 00:00:00", + }, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/generated_tests/testpreparer.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/generated_tests/testpreparer.py new file mode 100644 index 000000000000..ec55a05d610b --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/generated_tests/testpreparer.py @@ -0,0 +1,26 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from azure.healthinsights.radiologyinsights import RadiologyInsightsClient +from devtools_testutils import AzureRecordedTestCase, PowerShellPreparer +import functools + + +class RadiologyInsightsClientTestBase(AzureRecordedTestCase): + + def create_client(self, endpoint): + credential = self.get_credential(RadiologyInsightsClient) + return self.create_client_from_credential( + RadiologyInsightsClient, + credential=credential, + endpoint=endpoint, + ) + + +RadiologyInsightsPreparer = functools.partial( + PowerShellPreparer, "radiologyinsights", radiologyinsights_endpoint="https://fake_radiologyinsights_endpoint.com" +) diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/generated_tests/testpreparer_async.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/generated_tests/testpreparer_async.py new file mode 100644 index 000000000000..d95a566f99fa --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/generated_tests/testpreparer_async.py @@ -0,0 +1,20 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from azure.healthinsights.radiologyinsights.aio import RadiologyInsightsClient +from devtools_testutils import AzureRecordedTestCase + + +class RadiologyInsightsClientTestBaseAsync(AzureRecordedTestCase): + + def create_async_client(self, endpoint): + credential = self.get_credential(RadiologyInsightsClient, is_async=True) + return self.create_client_from_credential( + RadiologyInsightsClient, + credential=credential, + endpoint=endpoint, + ) diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/tsp-location.yaml b/sdk/healthinsights/azure-healthinsights-radiologyinsights/tsp-location.yaml index 93646ace46f4..970224878d36 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/tsp-location.yaml +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/tsp-location.yaml @@ -1,7 +1,6 @@ directory: specification/ai/HealthInsights/HealthInsights.RadiologyInsights -additionalDirectories: -- specification/ai/HealthInsights/HealthInsights.Common/ -- specification/ai/HealthInsights/HealthInsights.OpenAPI/ +commit: 6b9c3af72e8e2b88b4dcb67c3deab5136f7ed9a6 repo: Azure/azure-rest-api-specs -commit: db63bea839f5648462c94e685d5cc96f8e8b38ba - +additionalDirectories: +- specification/ai/HealthInsights/HealthInsights.Common +- specification/ai/HealthInsights/HealthInsights.OpenAPI