
    di                        S SK Jr  S SKJr  SSKJrJrJr  SSKJ	r
JrJrJrJrJrJr  SSKJr  SrS r " S	 S
\5      rSS jrg)    )annotations)Any   )	NODEFAULTStructfield)FactoryStructConfig
StructMetaasdictastupleforce_setattrreplace)get_class_annotations)	FieldInfor
   r   r   fieldsr   r   c                     [         $ N)__all__     Y/var/www/fortnox.synktek.com/backend/venv/lib/python3.13/site-packages/msgspec/structs.py__dir__r      s    Nr   c                  |    \ rS rSr% SrS\S'   S\S'   S\S'   \" S S	9rS\S
'   \" S S	9rS\S'   \	SS j5       r
Srg)r       aE  A record describing a field in a struct type.

Parameters
----------
name: str
    The field name as seen by Python code (e.g. ``field_one``).
encode_name: str
    The name used when encoding/decoding the field. This may differ if
    the field is renamed (e.g. ``fieldOne``).
type: Any
    The full field type annotation.
default: Any, optional
    A default value for the field. Will be `NODEFAULT` if no default value
    is set.
default_factory: Any, optional
    A callable that creates a default value for the field. Will be
    `NODEFAULT` if no ``default_factory`` is set.
strnameencode_namer   typec                     [         $ r   r   r   r   r   <lambda>FieldInfo.<lambda>7   s    r   )default_factorydefaultc                     [         $ r   r!   r   r   r   r"   r#   8   s    r   r$   c                X    U R                   [        L =(       a    U R                  [        L $ )z1A helper for checking whether a field is required)r%   r   r$   )selfs    r   requiredFieldInfo.required:   s#     ||y(NT-A-AY-NNr   r   N)returnbool)__name__
__module____qualname____firstlineno____doc____annotations__r   r%   r$   propertyr)   __static_attributes__r   r   r   r   r       sM    & I
I):;GS; 1BCOSCO Or   r   c           	        U n[        U[        5      (       a  U=p#OZ[        [        U5      [        5      (       a  [        U5      =p#O/Un[        USU5      n[        U[        5      (       d  [	        S5      e[        U5      n[        UR                  5      [        UR                  5      -
  n/ n[        UR                  UR                  [        4U-  UR                  -   5       HZ  u  pxn	[        =p[        U	[        5      (       a  U	R                  nOU	[        La  U	n
[        UUXG   U
US9nUR                  U5        M\     [!        U5      $ )zGet information about the fields in a Struct.

Parameters
----------
type_or_instance:
    A struct type or instance.

Returns
-------
tuple[FieldInfo]

__origin__z-Must be called with a struct type or instance)r   r   r   r%   r$   )
isinstancer   r   getattr	TypeError_get_class_annotationslen__struct_fields____struct_defaults__zip__struct_encode_fields__r   _Factoryfactoryr   appendtuple)type_or_instanceobjannotated_clsclshintsnposr   r   r   default_objr%   r$   r   s                r   r   r   @   s=    C #z""!!	DIz	*	*"3i' c<-#z**KLL"=1Es$$%C,C,C(DDDF*-$$	tc555+&;
 %.-k8,,)11O	)!G#+
 	e%+( =r   N)rD   zStruct | type[Struct]r+   ztuple[FieldInfo])
__future__r   typingr    r   r   r   _corer	   r@   r
   r   r   r   r   r   _utilsr   r:   r   r   r   r   r   r   r   <module>rP      sF    "  & &   DO O@2r   