Ë
    £…jè6  ã            	       ó  — d Z ddlZddlm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mZ ddlmZ d	d
lmZ ddlmZmZmZmZmZmZmZmZmZmZ ern G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z e
d d!¬"«      Zg d#¢Zee e f   Z! G d$„ d%e ee¬&«      Z"d'e d(e fd)„Z# G d*„ d+ee   «      Z$efd,e%d-e d.ed(dfd/„Z&d0„ Z'y)1z{Customize generated code here.

Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
é    N)ÚEnum)ÚTYPE_CHECKINGÚAnyÚDictÚListÚOptionalÚTypeVar)ÚCaseInsensitiveEnumMeta)Ú	LROPollerÚPollingMethodé   ©Ú_modelsé   )Ú_deserialize)
ÚStringFieldÚIntegerFieldÚNumberFieldÚBooleanFieldÚ	DateFieldÚ	TimeFieldÚ
ArrayFieldÚObjectFieldÚ	JsonFieldÚContentFieldc                   ó"   — e Zd Zedefd„«       Zy)r   Úreturnc                  ó   — y ©N© ©Úselfs    úl/root/aria/tools/markitdown-venv/lib/python3.12/site-packages/azure/ai/contentunderstanding/models/_patch.pyÚvaluezContentField.value&   s   € Ø #ó    N)Ú__name__Ú
__module__Ú__qualname__Úpropertyr   r$   r    r%   r#   r   r   %   s   „ Ø	Ø#˜3Ò#ó 
Ù#r%   r   c                   ó(   — e Zd Zedee   fd„«       Zy)r   r   c                  ó   — y r   r    r!   s    r#   r$   zStringField.value*   ó   € Ø*-r%   N©r&   r'   r(   r)   r   Ústrr$   r    r%   r#   r   r   )   ó   „ Ø	Ø-˜8 C™=Ò-ó 
Ù-r%   r   c                   ó(   — e Zd Zedee   fd„«       Zy)r   r   c                  ó   — y r   r    r!   s    r#   r$   zIntegerField.value.   r,   r%   N)r&   r'   r(   r)   r   Úintr$   r    r%   r#   r   r   -   r/   r%   r   c                   ó(   — e Zd Zedee   fd„«       Zy)r   r   c                  ó   — y r   r    r!   s    r#   r$   zNumberField.value2   s   € Ø,/r%   N)r&   r'   r(   r)   r   Úfloatr$   r    r%   r#   r   r   1   s   „ Ø	Ø/˜8 E™?Ò/ó 
Ù/r%   r   c                   ó(   — e Zd Zedee   fd„«       Zy)r   r   c                  ó   — y r   r    r!   s    r#   r$   zBooleanField.value6   s   € Ø+.r%   N)r&   r'   r(   r)   r   Úboolr$   r    r%   r#   r   r   5   s   „ Ø	Ø.˜8 D™>Ò.ó 
Ù.r%   r   c                   ó(   — e Zd Zedee   fd„«       Zy)r   r   c                  ó   — y r   r    r!   s    r#   r$   zDateField.value:   r,   r%   Nr-   r    r%   r#   r   r   9   r/   r%   r   c                   ó(   — e Zd Zedee   fd„«       Zy)r   r   c                  ó   — y r   r    r!   s    r#   r$   zTimeField.value>   r,   r%   Nr-   r    r%   r#   r   r   =   r/   r%   r   c                   ó.   — e Zd Zedeee      fd„«       Zy)r   r   c                  ó   — y r   r    r!   s    r#   r$   zArrayField.valueB   s   € Ø03r%   N)r&   r'   r(   r)   r   r   r   r$   r    r%   r#   r   r   A   s   „ Ø	Ø3˜8 D¨¡IÑ.Ò3ó 
Ù3r%   r   c                   ó2   — e Zd Zedeeeef      fd„«       Zy)r   r   c                  ó   — y r   r    r!   s    r#   r$   zObjectField.valueF   s   € Ø58r%   N)	r&   r'   r(   r)   r   r   r.   r   r$   r    r%   r#   r   r   E   s"   „ Ø	Ø8˜8 D¨¨c¨¡NÑ3Ò8ó 
Ù8r%   r   c                   ó(   — e Zd Zedee   fd„«       Zy)r   r   c                  ó   — y r   r    r!   s    r#   r$   zJsonField.valueJ   r,   r%   N)r&   r'   r(   r)   r   r   r$   r    r%   r#   r   r   I   r/   r%   r   ÚPollingReturnType_coT)Ú	covariant)ÚRecordMergePatchUpdateÚAnalyzeLROPollerÚProcessingLocationr   r   r   r   r   r   r   r   r   r   c                   ó    — e Zd ZdZdZ	 dZ	 dZy)rG   z-The location where the data may be processed.Ú	geographyÚdataZoneÚglobalN)r&   r'   r(   Ú__doc__Ú	GEOGRAPHYÚ	DATA_ZONEÚGLOBALr    r%   r#   rG   rG   i   s   „ Ù7à€IØFØ€IØFØ€FØBr%   rG   )Ú	metaclassÚoperation_location_headerr   c                 ót   — d}t        j                  || «      }|st        d| › �«      ‚|j                  d«      S )a6  Parse operation ID from Operation-Location header for analyze operations.

    :param operation_location_header: The Operation-Location header value
    :type operation_location_header: str
    :return: The extracted operation ID
    :rtype: str
    :raises ValueError: If operation ID cannot be extracted
    z.*/analyzerResults/([^?/]+)z%Could not extract operation ID from: r   )ÚreÚsearchÚ
ValueErrorÚgroup)rQ   ÚregexÚmatchs      r#   Ú_parse_operation_idrY   t   sF   € ð +€Eä�I‰I�eÐ6Ó7€EÙÜØ3Ð4MÐ3NÐOó
ð 	
ð �;‰;�q‹>Ðr%   c            	       óŠ   — e Zd ZdZedefd„«       Zeded   fd„«       Ze	de
e   ddfd„«       Ze	d	ee   d
ededd fd„«       Zy)rF   zŠCustom LROPoller for Content Understanding analyze operations.

    Provides access to the operation ID for tracking and diagnostics.
    r   c                 óÚ   — 	 | j                  «       j                  j                  j                  d   }t	        |«      S # t
        t        f$ r}t        dt        |«      › �«      |‚d}~ww xY w)aC  Returns the operation ID for this long-running operation.

        The operation ID can be used with get_result_file() to retrieve
        intermediate or final result files from the service.

        :return: The operation ID
        :rtype: str
        :raises ValueError: If the operation ID cannot be extracted
        zOperation-Locationz Could not extract operation ID: N)Úpolling_methodÚ_initial_responseÚhttp_responseÚheadersrY   ÚKeyErrorrU   r.   )r"   Úoperation_locationÚes      r#   Úoperation_idzAnalyzeLROPoller.operation_id�   sk   € ð	QØ!%×!4Ñ!4Ó!6×!HÑ!H×!VÑ!V×!^Ñ!^Ð_sÑ!tÐÜ&Ð'9Ó:Ð:øÜœ*Ð%ò 	QÜÐ?ÄÀAÃ¸xÐHÓIÈqÐPûð	Qús   ‚;> ¾A*ÁA%Á%A*z_models.UsageDetailsc                 óä   — | j                  «       sy| j                  «       j                  j                  }|j	                  «       j                  d«      }|€yt        t        j                  |«      S )a  Returns the usage details from the completed analyze operation.

        This property is available after the operation has completed successfully.
        It provides information about the resources consumed during analysis,
        including document pages, contextualization tokens, and LLM token breakdown.

        :return: The usage details, or None if the operation is not yet complete
            or usage information is not available.
        :rtype: ~azure.ai.contentunderstanding.models.UsageDetails or None
        NÚusage)	Údoner\   Ú_pipeline_responser^   ÚjsonÚgetr   r   ÚUsageDetails)r"   ÚresponseÚ
usage_datas      r#   re   zAnalyzeLROPoller.usage    s\   € ð �y‰yŒ{ØØ×&Ñ&Ó(×;Ñ;×IÑIˆØ—]‘]“_×(Ñ(¨Ó1ˆ
ØÐØÜœG×0Ñ0°*Ó=Ð=r%   Úpollerz&AnalyzeLROPoller[PollingReturnType_co]c                 óz   — t         j                  | «      }|j                  j                  |j                  «       |S )a¾  Wrap an existing LROPoller without re-initializing the polling method.

        This avoids duplicate HTTP requests that would occur if we created a new
        LROPoller instance (which calls polling_method.initialize() again).

        :param poller: The existing LROPoller to wrap
        :type poller: ~azure.core.polling.LROPoller
        :return: An AnalyzeLROPoller wrapping the same polling state
        :rtype: AnalyzeLROPoller
        )ÚobjectÚ__new__Ú__dict__Úupdate)Úclsrm   Úinstances      r#   Úfrom_pollerzAnalyzeLROPoller.from_poller´   s0   € ô >D¿^¹^ÈCÓ=Pˆà×Ñ× Ñ  §¡Ô1Øˆr%   r\   Úcontinuation_tokenÚkwargsc                 óF   —  |j                   |fi |¤Ž\  }}} | ||||«      S )aÉ  Create a poller from a continuation token.

        :param polling_method: The polling strategy to adopt
        :type polling_method: ~azure.core.polling.PollingMethod
        :param continuation_token: An opaque continuation token
        :type continuation_token: str
        :return: An instance of AnalyzeLROPoller
        :rtype: AnalyzeLROPoller
        :raises ~azure.core.exceptions.HttpResponseError: If the continuation token is invalid.
        )Úfrom_continuation_token)rs   r\   rv   rw   ÚclientÚinitial_responseÚdeserialization_callbacks          r#   ry   z(AnalyzeLROPoller.from_continuation_tokenÆ   s=   € ð* 3ˆN×2Ñ2Ð3EÑPÈÑPñ		
ØØØ$ñ �6Ð+Ð-EÀ~ÓVÐVr%   N)r&   r'   r(   rL   r)   r.   rc   r   re   Úclassmethodr   rC   ru   r   r   ry   r    r%   r#   rF   rF   ‰   sµ   „ ñð
 ðQ˜cò Qó ðQð  ð>�xÐ 6Ñ7ò >ó ð>ð& ð Ð+?Ñ!@ð ÐEmò ó ðð" ðWà%Ð&:Ñ;ðWð  ðWð ð	Wð
 
òWó ñWr%   rF   Úfield_classÚ
value_attrÚreturn_typec                 ó¼   ‡— dt         dt         fˆfd„}||j                  d<   t        |«      }t        | d|«       t	        | d«      si | _        || j                  d<   y)a%  Add a .value property implementation at runtime.

    This function adds the actual property implementation so IntelliSense works.
    The type declarations in TYPE_CHECKING tell type checkers about the types.

    :param field_class: The field class to add the property to.
    :type field_class: type
    :param value_attr: The attribute name to read from (e.g., "value_string").
    :type value_attr: str
    :param return_type: The expected return type for better type checking.
    :type return_type: Any
    :return: None
    :rtype: None
    r"   r   c                 ó   •— t        | ‰d«      S )zcGet the value of this field.

        :return: The value of the field.
        :rtype: Any
        N)Úgetattr)r"   r   s    €r#   Úvalue_getterz2_add_value_property_to_field.<locals>.value_getterò   s   ø€ ô �t˜Z¨Ó.Ð.r%   r$   Ú__annotations__N)r   r…   r)   ÚsetattrÚhasattr)r~   r   r€   r„   Úvalue_propertys    `   r#   Ú_add_value_property_to_fieldr‰   à   sg   ø€ ð$/œ3ð /¤3õ /ð .9€L× Ñ  Ñ*ô ˜lÓ+€Nô ˆK˜ .Ô1ô �;Ð 1Ô2Ø&(ˆÔ#Ø+6€K×Ñ Ò(r%   c                  ó   ‡— ddl m}  t        | _        t        t        dt
        t           «       t        t        dt
        t           «       t        t        dt
        t           «       t        t        dt
        t           «       t        t        dt
        t           «       t        t        dt
        t           «       t        t        d	t
        t         t"              «       t        t$        d
t
        t&        t        t"        f      «       t        t(        dt
        t"           «       dt*        dt"        fd„}t"        |j,                  d<   t/        |«      }t1        t*        d|«       t3        t*        d«      si t*        _        t"        t*        j,                  d<   | j4                  j6                  Šdt"        dt"        ddfˆfd„}|| j4                  _        y)z?Patch the SDK to add missing models and convenience properties.r   r   Úvalue_stringÚvalue_integerÚvalue_numberÚvalue_booleanÚ
value_dateÚ
value_timeÚvalue_arrayÚvalue_objectÚ
value_jsonr"   r   c                 óF   — dD ]  }t        | |«      sŒt        | |«      c S  y)zÔGet the value of this field regardless of its specific type.

        :param self: The ContentField instance.
        :type self: ContentField
        :return: The value of the field.
        :rtype: Any
        )	r‹   rŒ   r�   rŽ   r�   r�   r‘   r’   r“   N)r‡   rƒ   )r"   Úattrs     r#   Ú_content_field_value_getterz.patch_sdk.<locals>._content_field_value_getter  s1   € ð

ò 	+ˆDô �t˜TÕ"Ü˜t TÓ*Ò*ð	+ð r%   r$   r…   Úargsrw   Nc                 ó–   •— |r:t        |d   t        «      r't        |d   «      }d|v rd|vr|d   |d<   |f|dd z   } ‰| g|¢­i |¤Ž y)ax  Patched __init__ that normalizes casing for KeyFrameTimesMs before calling parent.

        This patch is forward compatible: it only normalizes when the service returns incorrect casing.
        If the service returns the correct "keyFrameTimesMs" casing, the patch does nothing.

        :param args: Positional arguments passed to __init__.
        :type args: Any
        r   ÚKeyFrameTimesMsÚkeyFrameTimesMsr   N)Ú
isinstanceÚdict)r"   r—   rw   ÚmappingÚ#_original_audio_visual_content_inits       €r#   Ú"_patched_audio_visual_content_initz5patch_sdk.<locals>._patched_audio_visual_content_initH  si   ø€ ñ ”J˜t A™w¬Ô-Ü˜4 ™7“mˆGð ! GÑ+Ð0AÈÑ0PØ-4Ð5FÑ-G�Ð)Ñ*à�:  Q R Ñ(ˆDÙ+¨DÐB°4ÒB¸6ÓBr%   )Ú r   rE   r‰   r   r   r.   r   r2   r   r5   r   r8   r   r   r   r   r   r   r   r   r   r…   r)   r†   r‡   ÚAudioVisualContentÚ__init__)r   r–   Úcontent_field_valuerŸ   rž   s       @r#   Ú	patch_sdkr¤   	  s[  ø€ åô &<€GÔ"ô
 !¤¨n¼hÄs¹mÔLÜ ¤¨ÄÌÁÔNÜ ¤¨n¼hÄu¹oÔNÜ ¤¨ÄÌÁÔOÜ ¤¨L¼(Ä3¹-ÔHÜ ¤¨L¼(Ä3¹-ÔHÜ ¤¨]¼HÄTÌ#ÁYÑ<OÔPÜ ¤¨n¼hÄtÌCÔQTÈHÁ~Ñ>VÔWÜ ¤¨L¼(Ä3¹-ÔHð¬,ð ¼3ó ô0 =@Ð×/Ñ/°Ñ9ô #Ð#>Ó?ÐÜŒL˜'Ð#6Ô7ô ”<Ð!2Ô3Ø')ŒÔ$Ü,/„L× Ñ  Ñ)ð +2×*DÑ*D×*MÑ*MÐ'ðC¼ð CÄsð CÈtõ Cð( +M€G×ÑÕ'r%   )(rL   rS   Úenumr   Útypingr   r   r   r   r   r	   Ú
azure.corer
   Úazure.core.pollingr   r   r    r   Ú_utils.model_baser   r   r   r   r   r   r   r   r   r   r   rC   Ú__all__r.   rE   rG   rY   rF   Útyper‰   r¤   r    r%   r#   ú<module>r¬      sF  ðñó
 
Ý ß D× DÝ .ß 7Ý Ý ,÷÷ ÷ ñ  ô$�|ô $ô.�kô .ô.�|ô .ô0�kô 0ô/�|ô /ô.�Iô .ô.�Iô .ô4�Zô 4ô9�kô 9ô.�Iô .ñ
 Ð5ÀÔFÐ ò€ð$ ˜c 3˜h™Ð ôC˜˜dÐ.Eõ Cð°3ð ¸3ó ô*TW�yÐ!5Ñ6ô TWðp <?ñ&7Øð&7Ø#&ð&7Ø58ð&7à	ó&7óRSMr%   