
    j                     t    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 G d	 d
      Zy)    )AnyTYPE_CHECKINGUnion)AzureKeyCredential)policies   )VERSION)AsyncTokenCredentialc                   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)'DocumentIntelligenceClientConfigurationa  Configuration for DocumentIntelligenceClient.

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

    :param endpoint: The Document Intelligence service endpoint. 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-11-30".
     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
2024-11-30z&Parameter 'endpoint' must not be None.z(Parameter 'credential' must not be None.credential_scopesz,https://cognitiveservices.azure.com/.defaultsdk_monikerzai-documentintelligence/{}polling_interval    pop
ValueErrorr   r   r   r   
setdefaultformatr	   getr   
_configureselfr   r   r   r   s        q/root/aria/tools/markitdown-venv/lib/python3.12/site-packages/azure/ai/documentintelligence/aio/_configuration.py__init__z0DocumentIntelligenceClientConfiguration.__init__%        "::m\BEFFGHH $&!',?BpAq!r-)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 AsyncBearerTokenCredentialPolicyr   	TypeErrorr!   r   s     r"   _infer_policyz5DocumentIntelligenceClientConfiguration._infer_policy7   {    doo'9:44T__Falekll4??K0<<T__ptOeOepiopp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   UserAgentPolicyr4   HeadersPolicyr5   ProxyPolicyr6   NetworkTraceLoggingPolicyr7   HttpLoggingPolicyr8   CustomHookPolicyr9   AsyncRedirectPolicyr:   AsyncRetryPolicyr;   r<   r   r0   r/   s     r"   r   z2DocumentIntelligenceClientConfiguration._configure>   p   !',?!@!fHD\D\Df_eDf$jj)9:^h>T>T>^W]>^"JJ~6X(:N:N:XQW:X$jj)9:jh>`>`>jci>j#)::.C#D#lHbHbHlekHl "(**-A"B"ihF_F_FibhFi%zz*;<f@\@\@f_e@f"JJ~6](:S:S:]V\:]%+ZZ0G%H"??4#=#=);););)Ef)ED& $>?r%   __name__
__module____qualname____doc__strr   r   r   r#   r0   r   r   r%   r"   r   r      T     "")./ACY/Y)Z"fi"	"$FF3 F4 Fr%   r   c                   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)5DocumentIntelligenceAdministrationClientConfigurationa  Configuration for DocumentIntelligenceAdministrationClient.

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

    :param endpoint: The Document Intelligence service endpoint. 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-11-30".
     Note that overriding this default value may result in unsupported behavior.
    :paramtype api_version: str
    r   r   r
   r   r   Nc                 R   |j                  dd      }|t        d      |t        d      || _        || _        || _        |j                  ddg      | _        |j                  ddj                  t                     |j                  d	d
      | _
         | j                  di | y r   r   r    s        r"   r#   z>DocumentIntelligenceAdministrationClientConfiguration.__init__]   r$   r%   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                         r'   r)   r/   s     r"   r0   zCDocumentIntelligenceAdministrationClientConfiguration._infer_policyo   r1   r%   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 r3   r=   r/   s     r"   r   z@DocumentIntelligenceAdministrationClientConfiguration._configurev   rF   r%   rG   r   r%   r"   rO   rO   L   rM   r%   rO   N)typingr   r   r   azure.core.credentialsr   azure.core.pipeliner   _versionr	   azure.core.credentials_asyncr
   r   rO   r   r%   r"   <module>rX      s5    - , 5 ( A5F 5Fp5F 5Fr%   