U mf @sdZddlZddlmZGdddejZGdddejZeeedd d Z eeed d d Z eedddZ eedddZ eedddZ eedddZejZejZejZejZejZejZejZejZdS)zDNS Message Flags.N)Anyc@s(eZdZdZdZdZdZdZdZdZ dS) Flagii N) __name__ __module__ __qualname__QRAATCRDRAADCDrr7/opt/hc_python/lib/python3.8/site-packages/dns/flags.pyrsrc@seZdZdZdS)EDNSFlagrN)r r r DOrrrrr.sr)text enum_classreturncCs*d}|}|D]}|||O}q|S)Nr)splitupper)rrflagstokenstrrr _from_text3s r)rrrcCs8g}|jD]\}}||@dkr||qd|S)Nr ) __members__itemsappendjoin)rrZ text_flagskvrrr_to_text;s   r')rrcCs t|tS)zgConvert a space-separated list of flag text values into a flags value. Returns an ``int`` )rrrrrr from_textCsr))rrcCs t|tS)zgConvert a flags value into a space-separated list of flag text values. Returns a ``str``. )r'rrrrrto_textMsr+cCs t|tS)zqConvert a space-separated list of EDNS flag text values into a EDNS flags value. Returns an ``int`` )rrr(rrredns_from_textWsr,cCs t|tS)zrConvert an EDNS flags value into a space-separated list of EDNS flag text values. Returns a ``str``. )r'rr*rrr edns_to_textasr-)__doc__enumtypingrIntFlagrrstrintrr'r)r+r,r-r r rrrrrrrrrrs$