
    j)                     `    d dl mZmZmZ d dlmZ d dlmZ ddlm	Z	 erd dlm
Z
  G d d      Zy	)
    )AnyTYPE_CHECKINGUnion)AzureKeyCredential)policies   )VERSION)TokenCredentialc                   H    e Zd ZdZdedeedf   deddfdZd	 Z	deddfd
Z
y)'ContentUnderstandingClientConfigurationa  Configuration for ContentUnderstandingClient.

    Note that all parameters used to create this instance are saved as instance
    attributes.

    :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
    endpoint
credentialr
   kwargsreturnNc                 R   |j                  dd      }|t        d      |t        d      || _        || _        || _        |j                  ddg      | _        |j                  ddj                  t                     |j                  d	d
      | _
         | j                  di | y )Napi_versionz
2025-11-01z&Parameter 'endpoint' must not be None.z(Parameter 'credential' must not be None.credential_scopesz,https://cognitiveservices.azure.com/.defaultsdk_monikerzai-contentunderstanding/{}polling_interval    )pop
ValueErrorr   r   r   r   
setdefaultformatr	   getr   
_configure)selfr   r   r   r   s        m/root/aria/tools/markitdown-venv/lib/python3.12/site-packages/azure/ai/contentunderstanding/_configuration.py__init__z0ContentUnderstandingClientConfiguration.__init__&   s     "::m\BEFFGHH $&!'"P!Q"
 	-)E)L)LW)UV &

+=r B!&!    c                 .   t        | j                  t              r!t        j                  | j                  dfi |S t        | j                  d      r-t        j                  | j                  g| j                  i |S t        d| j                         )NzOcp-Apim-Subscription-Key	get_tokenzUnsupported credential: )	
isinstancer   r   r   AzureKeyCredentialPolicyhasattrBearerTokenCredentialPolicyr   	TypeErrorr   r   s     r   _infer_policyz5ContentUnderstandingClientConfiguration._infer_policy=   s    doo'9:44!<@F  4??K077"&"8"8<B  24??2CDEEr!   c                 b   |j                  d      xs t        j                  d
i || _        |j                  d      xs t        j                  d
i || _        |j                  d      xs t        j                  d
i || _        |j                  d      xs t        j                  d
i || _	        |j                  d      xs t        j                  d
i || _        |j                  d      xs t        j                  d
i || _        |j                  d      xs t        j                  d
i || _        |j                  d      xs t        j                   d
i || _        |j                  d	      | _        | j&                  r%| j$                  s | j(                  d
i || _        y y y )Nuser_agent_policyheaders_policyproxy_policylogging_policyhttp_logging_policycustom_hook_policyredirect_policyretry_policyauthentication_policyr   )r   r   UserAgentPolicyr,   HeadersPolicyr-   ProxyPolicyr.   NetworkTraceLoggingPolicyr/   HttpLoggingPolicyr0   CustomHookPolicyr1   RedirectPolicyr2   RetryPolicyr3   r4   r   r*   r)   s     r   r   z2ContentUnderstandingClientConfiguration._configureH   s   !'"
 "0%%// 	 %jj)9: 
h>T>T ?
?
 #JJ~6X(:N:N:XQW:X$jj
 ://9&9 	 $*::!$
 $2''1&1 	  #)** #
 #1&&00 	  &zz*;<  
@W@W A
A
 #JJ~6X(:N:N:XQW:X%+ZZ0G%H"??4#=#=);););)Ef)ED& $>?r!   )__name__
__module____qualname____doc__strr   r   r   r    r*   r   r   r!   r   r   r      sZ    """ ,.??@" 	"
 
".	FF3 F4 Fr!   r   N)typingr   r   r   azure.core.credentialsr   azure.core.pipeliner   _versionr	   r
   r   r   r!   r   <module>rF      s*    - , 5 ( 6KF KFr!   