U
    <æ{f¨  ã                   @   s²   d Z ddlZddlZG dd„ dejjƒZejejhZ	G dd„ dej
jƒZeedœdd	„Zeed
œdd„Zeedœdd„ZejZejZejZejZejZejZejZejZejZdS )zDNS Rdata Classes.é    Nc                   @   sd   e Zd ZdZdZdZeZdZeZdZ	e	Z
dZdZedd	„ ƒZed
d„ ƒZedd„ ƒZedd„ ƒZdS )Ú
RdataClasszDNS Rdata Classr   é   é   é   éþ   éÿ   c                 C   s   dS )Niÿÿ  © ©Úclsr   r   úM/var/www/html/Darija-Ai-API/env/lib/python3.8/site-packages/dns/rdataclass.pyÚ_maximum%   s    zRdataClass._maximumc                 C   s   dS )NÚclassr   r	   r   r   r   Ú_short_name)   s    zRdataClass._short_namec                 C   s   dS )NZCLASSr   r	   r   r   r   Ú_prefix-   s    zRdataClass._prefixc                 C   s   t S )N)ÚUnknownRdataclassr	   r   r   r   Ú_unknown_exception_class1   s    z#RdataClass._unknown_exception_classN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	RESERVED0ÚINÚINTERNETÚCHÚCHAOSÚHSÚHESIODÚNONEÚANYÚclassmethodr   r   r   r   r   r   r   r   r      s$   


r   c                   @   s   e Zd ZdZdS )r   zA DNS class is unknown.N)r   r   r   r   r   r   r   r   r   9   s   r   )ÚtextÚreturnc                 C   s
   t  | ¡S )a¦  Convert text into a DNS rdata class value.

    The input text can be a defined DNS RR class mnemonic or
    instance of the DNS generic class syntax.

    For example, "IN" and "CLASS1" will both result in a value of 1.

    Raises ``dns.rdatatype.UnknownRdataclass`` if the class is unknown.

    Raises ``ValueError`` if the rdata class value is not >= 0 and <= 65535.

    Returns a ``dns.rdataclass.RdataClass``.
    )r   Ú	from_text)r    r   r   r   r"   =   s    r"   )Úvaluer!   c                 C   s
   t  | ¡S )a  Convert a DNS rdata class value to text.

    If the value has a known mnemonic, it will be used, otherwise the
    DNS generic class syntax will be used.

    Raises ``ValueError`` if the rdata class value is not >= 0 and <= 65535.

    Returns a ``str``.
    )r   Úto_text)r#   r   r   r   r$   O   s    r$   )Úrdclassr!   c                 C   s   | t krdS dS )zœTrue if the specified class is a metaclass.

    The currently defined metaclasses are ANY and NONE.

    *rdclass* is a ``dns.rdataclass.RdataClass``.
    TF)Ú_metaclasses)r%   r   r   r   Úis_metaclass]   s    r'   )r   Zdns.enumZdnsZdns.exceptionÚenumÚIntEnumr   r   r   r&   Ú	exceptionZDNSExceptionr   Ústrr"   r$   Úboolr'   r   r   r   r   r   r   r   r   r   r   r   Ú<module>   s"   