Ë
    £…jä;  ã                   ó¾   — U d Z ddlmZmZmZmZmZmZ ddlm	Z	 ddl
mZ ddlmZ ddlmZ erdd	lmZ dd
lmZ eeef   Z e«       Zeed<   dgZ G d„ de«      Zd„ Zy)z{Customize generated code here.

Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
é    )ÚTYPE_CHECKINGÚAnyÚIOÚOptionalÚUnionÚoverload)Údistributed_trace_asyncé   )ÚContentUnderstandingClienté   )Úmodels)ÚAnalyzeAsyncLROPoller)ÚAzureKeyCredential)ÚAsyncTokenCredentialÚ_Unsetr   c                   ó|  ‡ — e Zd ZdZdeded   deddfˆ fd„Zeddd	œd
ede	e
j                     deeeef      deeee
j                  f      deddfd„«       Zedddœd
ededeeee
j                  f      dededdfd„«       Zedddœd
edee   deeee
j                  f      dededdfd„«       Zeefeddddœd
edeeee   f   de	e
j                     deeeef      deeee
j                  f      dee   deddfˆ fd„«       Zeddddœd
ededee   dedeeee
j                  f      deddfˆ fd„«       Zˆ xZS )r   aP  Custom async ContentUnderstandingClient with static patches for analyze operations.

    This wrapper:
    - Hides the string_encoding parameter (always uses "codePoint" for Python)
    - Returns AnalyzeAsyncLROPoller with .operation_id property
    - Fixes content_type default for begin_analyze_binary
    - Defaults polling_interval to 3 seconds

    :param endpoint: Content Understanding service endpoint. Required.
    :type endpoint: str
    :param credential: Credential used to authenticate requests to the service. Is either a key
     credential type or a token credential 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 "2025-11-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. Default value is 3 seconds.
    ÚendpointÚ
credential)r   r   ÚkwargsÚreturnNc                 óN   •— |j                  dd«       t        ‰| �  d||dœ|¤Ž y )NÚpolling_intervalé   )r   r   © )Ú
setdefaultÚsuperÚ__init__)Úselfr   r   r   Ú	__class__s       €úi/root/aria/tools/markitdown-venv/lib/python3.12/site-packages/azure/ai/contentunderstanding/aio/_patch.pyr   z#ContentUnderstandingClient.__init__3   s-   ø€ ð 	×ÑÐ,¨aÔ0Ü‰ÑÐL (°zÑLÀVÓLó    )Úmodel_deploymentsÚprocessing_locationÚanalyzer_idÚinputsr"   r#   z-AnalyzeAsyncLROPoller[_models.AnalysisResult]c             ‹   ó   K  — y­w)aT  Extract content and fields from input.

        :param analyzer_id: The unique identifier of the analyzer. Required.
        :type analyzer_id: str
        :keyword inputs: Inputs to analyze. Currently, only pro mode supports multiple inputs.
         Required.
        :paramtype inputs: list[~azure.ai.contentunderstanding.models.AnalysisInput]
        :keyword model_deployments: Override default mapping of model names to deployments.
         Ex. { "gpt-4.1": "myGpt41Deployment", "text-embedding-3-large":
         "myTextEmbedding3LargeDeployment" }. Default value is None.
        :paramtype model_deployments: dict[str, str]
        :keyword processing_location: The location where the data may be processed. Defaults to
         global. Known values are: "geography", "dataZone", and "global". Default value is None.
        :paramtype processing_location: str or ~azure.ai.contentunderstanding.models.ProcessingLocation
        :return: An instance of AnalyzeAsyncLROPoller that returns AnalysisResult. The AnalysisResult is
         compatible with MutableMapping. The poller includes an .operation_id property.
        :rtype: ~azure.ai.contentunderstanding.aio.models.AnalyzeAsyncLROPoller[~azure.ai.contentunderstanding.models.AnalysisResult]
        :raises ~azure.core.exceptions.HttpResponseError:

        .. note::
           The string_encoding parameter is automatically set to "codePoint" for Python as it
           matches Python's native string indexing behavior (len() and str[i] use code points).
           This ensures ContentSpan offsets work correctly with Python string slicing.
        Nr   )r   r$   r%   r"   r#   r   s         r    Úbegin_analyzez(ContentUnderstandingClient.begin_analyze=   ó   è ø� ùó   ‚úapplication/json)r#   Úcontent_typeÚbodyr+   c             ‹   ó   K  — y­w)af  Extract content and fields from input.

        :param analyzer_id: The unique identifier of the analyzer. Required.
        :type analyzer_id: str
        :param body: JSON body. Required.
        :type body: JSON
        :keyword processing_location: The location where the data may be processed. Defaults to
         global. Known values are: "geography", "dataZone", and "global". Default value is None.
        :paramtype processing_location: str or ~azure.ai.contentunderstanding.models.ProcessingLocation
        :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 AnalyzeAsyncLROPoller that returns AnalysisResult. The AnalysisResult is
         compatible with MutableMapping. The poller includes an .operation_id property.
        :rtype: ~azure.ai.contentunderstanding.aio.models.AnalyzeAsyncLROPoller[~azure.ai.contentunderstanding.models.AnalysisResult]
        :raises ~azure.core.exceptions.HttpResponseError:

        .. note::
           The string_encoding parameter is automatically set to "codePoint" for Python as it
           matches Python's native string indexing behavior (len() and str[i] use code points).
           This ensures ContentSpan offsets work correctly with Python string slicing.
        Nr   ©r   r$   r,   r#   r+   r   s         r    r'   z(ContentUnderstandingClient.begin_analyze`   r(   r)   c             ‹   ó   K  — y­w)av  Extract content and fields from input.

        :param analyzer_id: The unique identifier of the analyzer. Required.
        :type analyzer_id: str
        :param body: Binary stream body. Required.
        :type body: IO[bytes]
        :keyword processing_location: The location where the data may be processed. Defaults to
         global. Known values are: "geography", "dataZone", and "global". Default value is None.
        :paramtype processing_location: str or ~azure.ai.contentunderstanding.models.ProcessingLocation
        :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 AnalyzeAsyncLROPoller that returns AnalysisResult. The AnalysisResult is
         compatible with MutableMapping. The poller includes an .operation_id property.
        :rtype: ~azure.ai.contentunderstanding.aio.models.AnalyzeAsyncLROPoller[~azure.ai.contentunderstanding.models.AnalysisResult]
        :raises ~azure.core.exceptions.HttpResponseError:

        .. note::
           The string_encoding parameter is automatically set to "codePoint" for Python as it
           matches Python's native string indexing behavior (len() and str[i] use code points).
           This ensures ContentSpan offsets work correctly with Python string slicing.
        Nr   r.   s         r    r'   z(ContentUnderstandingClient.begin_analyze�   r(   r)   )r%   r"   r#   r+   c          
   ‹   óÜ   •K  — d|d<   |�|nd}|t         urt        ‰
| �  d||||||dœ|¤Žƒ d{  –—† }	nt        ‰
| �  d|||||dœ|¤Žƒ d{  –—† }	t        j                  |	«      S 7 Œ77 Œ­w)aW  Extract content and fields from input.

        :param analyzer_id: The unique identifier of the analyzer. Required.
        :type analyzer_id: str
        :param body: Is either a JSON type or a IO[bytes] type. Default value is None.
        :type body: JSON or IO[bytes]
        :keyword inputs: Inputs to analyze. Currently, only pro mode supports multiple inputs.
         Required.
        :paramtype inputs: list[~azure.ai.contentunderstanding.models.AnalysisInput]
        :keyword model_deployments: Override default mapping of model names to deployments.
         Ex. { "gpt-4.1": "myGpt41Deployment", "text-embedding-3-large":
         "myTextEmbedding3LargeDeployment" }. Default value is None.
        :paramtype model_deployments: dict[str, str]
        :keyword processing_location: The location where the data may be processed. Defaults to
         global. Known values are: "geography", "dataZone", and "global". Default value is None.
        :paramtype processing_location: str or ~azure.ai.contentunderstanding.models.ProcessingLocation
        :keyword content_type: Body Parameter content-type. Default value is "application/json".
        :paramtype content_type: str
        :return: An instance of AnalyzeAsyncLROPoller that returns AnalysisResult. The AnalysisResult is
         compatible with MutableMapping. The poller includes an .operation_id property.
        :rtype: ~azure.ai.contentunderstanding.aio.models.AnalyzeAsyncLROPoller[~azure.ai.contentunderstanding.models.AnalysisResult]
        :raises ~azure.core.exceptions.HttpResponseError:

        .. note::
           The string_encoding parameter is automatically set to "codePoint" for Python as it
           matches Python's native string indexing behavior (len() and str[i] use code points).
           This ensures ContentSpan offsets work correctly with Python string slicing.
        Ú	codePointÚstring_encodingNr*   )r$   r,   r#   r+   r%   r"   )r$   r#   r+   r%   r"   r   )r   r   r'   r   Úfrom_poller)r   r$   r,   r%   r"   r#   r+   r   Úcontent_type_strÚpollerr   s             €r    r'   z(ContentUnderstandingClient.begin_analyze¢   s¸   øè ø€ ðR %0ˆÐ Ñ!ð )Ð4‰LÐ:Lð 	ð ”vÑÜ ™7Ñ0ð Ø'ØØ$7Ø-ØØ"3ñð ñ÷ ‰Fô !™7Ñ0ð Ø'Ø$7Ø-ØØ"3ñð ñ÷ ˆFô %×0Ñ0°Ó8Ð8ð)øðús!   ƒ-A,°A(±A,ÁA*ÁA,Á*A,zapplication/octet-stream)Úcontent_ranger+   r#   Úbinary_inputr6   c          
   ‹   óv   •K  — t        ‰| �  d||d|||dœ|¤Žƒ d{  –—† }t        j                  |«      S 7 Œ­w)aŸ  Extract content and fields from input.

        :param analyzer_id: The unique identifier of the analyzer. Required.
        :type analyzer_id: str
        :param binary_input: The binary content of the document to analyze. Required.
        :type binary_input: bytes
        :keyword content_range: Range of the input to analyze (ex. ``1-3,5,9-``). Document content uses
         1-based page numbers, while audio visual content uses integer milliseconds. Default value is None.
        :paramtype content_range: str
        :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
         Default value is "application/octet-stream".
        :paramtype content_type: str
        :keyword processing_location: The location where the data may be processed. Defaults to
         global. Known values are: "geography", "dataZone", and "global". Default value is None.
        :paramtype processing_location: str or ~azure.ai.contentunderstanding.models.ProcessingLocation
        :return: An instance of AnalyzeAsyncLROPoller that returns AnalysisResult. The AnalysisResult is
         compatible with MutableMapping. The poller includes an .operation_id property.
        :rtype: ~azure.ai.contentunderstanding.aio.models.AnalyzeAsyncLROPoller[~azure.ai.contentunderstanding.models.AnalysisResult]
        :raises ~azure.core.exceptions.HttpResponseError:

        .. note::
           The string_encoding parameter is automatically set to "codePoint" for Python as it
           matches Python's native string indexing behavior (len() and str[i] use code points).
           This ensures ContentSpan offsets work correctly with Python string slicing.
        r1   )r$   r7   r2   r6   r+   r#   Nr   )r   Úbegin_analyze_binaryr   r3   )	r   r$   r7   r6   r+   r#   r   r5   r   s	           €r    r9   z/ContentUnderstandingClient.begin_analyze_binaryê   sW   øè ø€ ôL ‘wÑ3ð 
Ø#Ø%Ø'Ø'Ø%Ø 3ñ
ð ñ
÷ 
ˆô %×0Ñ0°Ó8Ð8ð
ús   ƒ9�7ž9)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ústrr   r   r   r   ÚlistÚ_modelsÚAnalysisInputr   ÚdictÚProcessingLocationr'   ÚJSONr   Úbytesr	   r   r9   Ú__classcell__)r   s   @r    r   r      sâ  ø„ ñð*MàðMð ÐFÑGðMð ð	Mð
 
õMð ð 7;ØPTò àð ð �W×*Ñ*Ñ+ð	 ð
 $ D¨¨c¨¡NÑ3ð ð & e¨C°×1KÑ1KÐ,KÑ&LÑMð ð ð ð 
9ò ó ð ðD ð QUØ.òàðð ðð
 & e¨C°×1KÑ1KÐ,KÑ&LÑMðð ðð ðð 
9òó ðð@ ð QUØ.òàðð �‰iðð
 & e¨C°×1KÑ1KÐ,KÑ&LÑMðð ðð ðð 
9òó ðð@ ð (.ðE9ð
 /5Ø6:ØPTØ&*òE9àðE9ð �D˜"˜U™)�OÑ$ðE9ð
 �W×*Ñ*Ñ+ðE9ð $ D¨¨c¨¡NÑ3ðE9ð & e¨C°×1KÑ1KÐ,KÑ&LÑMðE9ð ˜s‘mðE9ð ðE9ð 
9ôE9ó ðE9ðN ð (,Ø6ØPTò09àð09ð ð09ð
   ‘}ð09ð ð09ð & e¨C°×1KÑ1KÐ,KÑ&LÑMð09ð ð09ð 
9ô09ó ô09r!   c                   ó   — y)zìDo not remove from this file.

    `patch_sdk` is a last resort escape hatch that allows you to do customizations
    you can't accomplish using the techniques described in
    https://aka.ms/azsdk/python/dpcodegen/python/customize
    Nr   r   r!   r    Ú	patch_sdkrH     s   � r!   N)r=   Útypingr   r   r   r   r   r   Ú"azure.core.tracing.decorator_asyncr	   Ú_clientr   ÚGeneratedClientÚ r   r@   r   Úazure.core.credentialsr   Úazure.core.credentials_asyncr   rB   r>   rD   Úobjectr   Ú__annotations__Ú__all__rH   r   r!   r    ú<module>rS      s]   ðò÷
 E× DÝ Få BÝ  Ý )áÝ9ÝAàˆC�ˆH�~€Ù‹h€ˆÓ à'Ð
(€ô~9 ô ~9óBr!   