+ class Selector:
+ Full = 0
+ SubjectPublicKeyInfo = 1
+
+ class MatchingType:
+ Exact = 0
+ SHA256 = 1
+ SHA512 = 2
+
+ def __init__(self, protocol: str, port: int, usage: int, selector: int, matching_type: int, data: str) -> None:
+ self._port = int(port)
+ self._protocol = str(protocol)
+ self._usage = int(usage)
+ self._selector = int(selector)
+ self._matching_type = int(matching_type)
+ self._data = check_hex(data)
+
+ def generate_rr(self, owner: str, zone: 'Zone') -> Any:
+ return zone.RR('_{0}._{1}.{2}'.format(self._port, self._protocol, owner), 'TLSA', '{0} {1} {2} {3}'.format(self._usage, self._selector, self._matching_type, self._data))
+
+
+class CNAME: