
    j                         d dl mZ d dl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 d dlmZmZ dd	lmZ dd
lmZ ddlmZmZ erd dl
mZ  G d de      Zy)    )deepcopy)AnyTYPE_CHECKINGUnion)Self)PipelineClient)AzureKeyCredential)policies)HttpRequestHttpResponse   )'ContentUnderstandingClientConfiguration)*_ContentUnderstandingClientOperationsMixin)Deserializer
Serializer)TokenCredentialc            	       t    e Zd ZdZdedeedf   deddfdZd	d
de	de
dedefdZddZdefdZdeddfdZy)ContentUnderstandingClienta  ContentUnderstandingClient.

    :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.TokenCredential
    :keyword api_version: The API version to use for this operation. Known values are "2025-11-01"
     and None. 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.
    endpoint
credentialr   kwargsreturnNc                 *   d}t        d||d|| _        |j                  dd       }|'t        j                  di || j                  j
                  | j                  j                  | j                  j                  t        j                  di || j                  j                  | j                  j                  | j                  j                  | j                  j                  | j                  j                  t        j                  di || j                  j                  rt        j                  di |nd | j                  j                   g}t#        d||d|| _        t'               | _        t+               | _        d| j(                  _        y )Nz{endpoint}/contentunderstanding)r   r   r
   )base_urlr
   F )r   _configpopr
   RequestIdPolicyheaders_policyuser_agent_policyproxy_policyContentDecodePolicyredirect_policyretry_policyauthentication_policycustom_hook_policylogging_policyDistributedTracingPolicySensitiveHeaderCleanupPolicyhttp_logging_policyr   _clientr   
_serializer   _deserializeclient_side_validation)selfr   r   r   	_endpoint	_policiess         f/root/aria/tools/markitdown-venv/lib/python3.12/site-packages/azure/ai/contentunderstanding/_client.py__init__z#ContentUnderstandingClient.__init__+   sT    6	> 
*
8>
 JJz40	((262++..)),,6v6,,))22//++11;F; ||33 99CFC00#I& (6 (
(
6<(
 %,(N16.    F)streamrequestr5   c                   t        |      }d| j                  j                  d| j                  j                  dd      i} | j
                  j                  |j                  fi ||_         | j
                  j                  |fd|i|S )a&  Runs the network request through the client's chained policies.

        >>> from azure.core.rest import HttpRequest
        >>> request = HttpRequest("GET", "https://www.example.org/")
        <HttpRequest [GET], url: 'https://www.example.org/'>
        >>> response = client.send_request(request)
        <HttpResponse: 200 OK>

        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
        r   zself._config.endpointstrT)
skip_quoter5   )r   r,   urlr   r   r+   
format_urlsend_request)r/   r6   r5   r   request_copypath_format_argumentss         r2   r<   z'ContentUnderstandingClient.send_requestS   s    (  (++')>)>RV , !
 34<<22
 5
 )t||((OfOOOr4   c                 8    | j                   j                          y N)r+   closer/   s    r2   rA   z ContentUnderstandingClient.closes   s    r4   c                 :    | j                   j                          | S r@   )r+   	__enter__rB   s    r2   rD   z$ContentUnderstandingClient.__enter__v   s     r4   exc_detailsc                 6     | j                   j                  |  y r@   )r+   __exit__)r/   rE   s     r2   rG   z#ContentUnderstandingClient.__exit__z   s    {+r4   )r   N)__name__
__module____qualname____doc__r8   r   r	   r   r3   r   boolr   r<   rA   r   rD   rG   r   r4   r2   r   r      s     &7&7 ,.??@&7 	&7
 
&7R 7<P"P/3PGJP	P@4 ,S ,T ,r4   r   N)copyr   typingr   r   r   typing_extensionsr   
azure.corer   azure.core.credentialsr	   azure.core.pipeliner
   azure.core.restr   r   _configurationr   _operationsr   _utils.serializationr   r   r   r   r   r4   r2   <module>rW      s=     , , " % 5 ( 5 C C :6a,!K a,r4   