Source code for asyncdnspy.dns_message

#!/usr/bin/env python

from asyncdnspy.dns_message_header import Header
from asyncdnspy.dns_message_question import Question
from asyncdnspy.dns_message_resourcerecord import ResourceRecord

from typing import List


[docs]class DNSMessage(object): __header = None __questions = None __answers = None __authority = None __additional = None @property def header(self): """Header property of dns message.""" return self.__header @header.setter def header(self, value: Header): """Setter function of header property. :param value: Value of header. :type value: Header instance. """ self.__header = value @property def questions(self): """Questions property of dns message.""" return self.__questions @questions.setter def questions(self, value: List[ResourceRecord]): """Setter function of questions property. :param value: Questions. :type value: List of resource record/s. """ self.__questions = value @property def answers(self): """Asnwers property of dns message.""" return self.__answers @answers.setter def answers(self, value: List[ResourceRecord]): """Setter function of answers property. :param value: Answers. :type value: List of resource record/s. """ self.__answers = value @property def authority(self): """Authority property of dns message.""" return self.__authority @authority.setter def authority(self, value: List[ResourceRecord]): """Setter function of authority property. :param value: Authority. :type value: List of resource record/s. """ self.__authority = value @property def additional(self): """Additional property of dns message.""" return self.__additional @additional.setter def additional(self, value: List[ResourceRecord]): """Setter function of additional property. :param value: Additional. :type value: List of resource record/s. """ self.__additional = value