
    p h                        d dl Z d dlmZmZ d dlmZ d dlmZmZ dZ	dZ
dedee j        ef         fd	Zdedee j         ef         fd
Zdedee j                  fdZdee         deeef         fdZdedeeef         fdZdS )    N)BasicContextDecimal)	parsedate)OptionalUnionz%Y-%m-%dz%Y-%m-%dT%H:%M:%SZsreturnc                     	 t           j                             | t                                        t           j        j                                                  S # t          t          f$ r | cY S w xY w)z
    Parses an ISO 8601 date string and returns a UTC date object or the string
    if the parsing failed.
    :param s: ISO 8601-formatted date string (2015-01-25)
    :return:
    tzinfo)	datetimestrptimeISO8601_DATE_FORMATreplacetimezoneutcdate	TypeError
ValueErrorr   s    S/var/www/html/Sam_Eipo/venv/lib/python3.11/site-packages/twilio/base/deserialize.pyiso8601_dater   
   sl    &&q*=>>WH-1W22TVV	

 z"   s   AA A21A2c                     	 t           j                             | t                                        t           j        j                  S # t          t          f$ r | cY S w xY w)z
    Parses an ISO 8601 datetime string and returns a UTC datetime object,
    or the string if parsing failed.
    :param s: ISO 8601-formatted datetime string (2015-01-25T12:34:56Z)
    r   )r   r   ISO8601_DATETIME_FORMATr   r   r   r   r   r   s    r   iso8601_datetimer      sm     ))!-DEEMM$( N 
 
 	
 z"   s   AA
 
A A c                     t          |           }|dS t          j        |dd                              t          j        j                  S )z
    Parses an RFC 2822 date string and returns a UTC datetime object,
    or the string if parsing failed.
    :param s: RFC 2822-formatted string date
    :return: datetime or str
    N   r   )r   r   r   r   r   )r   
date_tuples     r   rfc2822_datetimer   +   sG     1Jtj!n-55X=N=R5SSS    dc                 4    | s| S t          | t                    S )zM
    Parses a decimal string into a Decimal
    :param d: decimal string
    )r   r   )r!   s    r   decimalr#   8   s!    
  1l###r    ic                 T    	 t          |           S # t          t          f$ r | cY S w xY w)z\
    Parses an integer string into an int
    :param i: integer string
    :return: int
    )intr   r   )r$   s    r   integerr'   B   s;    1vvz"   s    '')r   r#   r   r   email.utilsr   typingr   r   r   r   strr   r   r   r   r&   r'    r    r   <module>r,      sN    ) ) ) ) ) ) ) ) ! ! ! ! ! ! " " " " " " " "  . C E(-"45    "

8c!"    
T 
T): ; 
T 
T 
T 
T$x} $w|!4 $ $ $ $	s 	uS#X 	 	 	 	 	 	r    