a
    yn„f°  ã                   @  sF   d dl mZ d dlmZmZmZmZ d dlmZm	Z	 G dd„ dƒZ
dS )é    )Úannotations)ÚClassVarÚJSONMappingÚJSONSerializableÚSelf)ÚUNSETÚSentinelc                   @  sj  e Zd ZU dZded< dZded< dZded< dZded< dZded< dZ	ded< dZ
ded	< dZded
< dZded< ded< eddœdd„ƒZdddœdd„Zdddœdd„Zdddœdd„Zeddœdd„ƒZeddœdd „ƒZed!dœd"d#„ƒZed$dœd%d&„ƒZed'dœd(d)„ƒZed*dœd+d,„ƒZeddœd-d.„ƒZeddœd/d0„ƒZed1œd2d3d4œd5d6„Zd7S )8ÚMetaFzClassVar[bool]Úis_numpyÚ
is_unknownÚis_listÚ
is_regularÚ	is_optionÚ
is_indexedÚ	is_recordÚis_unionÚis_leafzJSONMapping | NoneÚ_parametersr   )Úreturnc                 C  s   | j du ri | _ | j S )a‡  
        Free-form parameters associated with every array node as a dict from parameter
        name to its JSON-like value. Some parameters are special and are used to assign
        behaviors to the data.

        Note that the dict returned by this property is a *view* of the array node's
        parameters. *Changing the dict will change the array!*

        See #ak.behavior.
        N)r   ©Úself© r   úU/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/site-packages/awkward/_meta/meta.pyÚ
parameters   s    
zMeta.parametersÚstrr   )Úkeyr   c                 C  s   | j du rdS | j  |¡S dS )z’
        Returns a parameter's value or None.

        (No distinction is ever made between unset parameters and parameters set to None.)
        N)r   Úget©r   r   r   r   r   Ú	parameter+   s    
zMeta.parameterc                 C  s
   |   |¡S )a  
        Return the value of the outermost parameter matching `key` in a sequence
        of nested lists, stopping at the first record or tuple layer.

        If a layer has #ak.types.UnionType, the value is only returned if all
        possibilities have the same value.
        )Úpurelist_parametersr   r   r   r   Úpurelist_parameter6   s    zMeta.purelist_parameter)Úkeysr   c                 G  s   t ‚dS )a"  
        Return the value of the outermost parameter matching one of `keys` in a sequence
        of nested lists, stopping at the first record or tuple layer.

        If a layer has #ak.types.UnionType, the value is only returned if all
        possibilities have the same value.
        N©ÚNotImplementedError)r   r!   r   r   r   r   @   s    zMeta.purelist_parametersÚboolc                 C  s   t ‚d S ©Nr"   r   r   r   r   Úis_identity_likeJ   s    zMeta.is_identity_likec                 C  s   t ‚dS )z�
        Returns True if all dimensions down to the first record or tuple layer have
        #ak.types.RegularType; False otherwise.
        Nr"   r   r   r   r   Úpurelist_isregularN   s    zMeta.purelist_isregularÚintc                 C  s   t ‚dS )a‡  
        Number of dimensions of nested lists, not counting anything deeper than the
        first record or tuple layer, if any. The depth of a one-dimensional array is
        `1`.

        If the array contains #ak.types.UnionType data and its contents have
        equal depths, the return value is that depth. If they do not have equal
        depths, the return value is `-1`.
        Nr"   r   r   r   r   Úpurelist_depthV   s    zMeta.purelist_depthztuple[int, int]c                 C  s   t ‚d S r%   r"   r   r   r   r   Úminmax_depthc   s    zMeta.minmax_depthztuple[bool, int]c                 C  s   t ‚d S r%   r"   r   r   r   r   Úbranch_depthg   s    zMeta.branch_depthz	list[str]c                 C  s   t ‚d S r%   r"   r   r   r   r   Úfieldsk   s    zMeta.fieldsc                 C  s   t ‚d S r%   r"   r   r   r   r   Úis_tupleo   s    zMeta.is_tuplec                 C  s   t ‚d S r%   r"   r   r   r   r   Údimension_optiontypes   s    zMeta.dimension_optiontype)r   zJSONMapping | None | Sentinelr   )r   r   c                C  s   t ‚d S r%   r"   )r   r   r   r   r   Úcopyw   s    z	Meta.copyN)Ú__name__Ú
__module__Ú__qualname__r
   Ú__annotations__r   r   r   r   r   r   r   r   Úpropertyr   r   r    r   r&   r'   r)   r*   r+   r,   r-   r.   r   r/   r   r   r   r   r	      s@   


r	   N)Ú
__future__r   Zawkward._typingr   r   r   r   Zawkward._utilr   r   r	   r   r   r   r   Ú<module>   s   