'Construct a new L{_EDNSMessage}
@see: U{RFC1035 section-4.1.1<https://tools.ietf.org/html/rfc1035#section-4.1.1>}
@see: U{RFC2535 section-6.1<https://tools.ietf.org/html/rfc2535#section-6.1>}
@see: U{RFC3225 section-3<https://tools.ietf.org/html/rfc3225#section-3>}
@see: U{RFC6891 section-6.1.3<https://tools.ietf.org/html/rfc6891#section-6.1.3>}
@param id: A 16 bit identifier assigned by the program that generates
any kind of query.  This identifier is copied the corresponding
reply and can be used by the requester to match up replies to
outstanding queries.
@type id: L{int}
@param answer: A one bit field that specifies whether this message is a
query (0), or a response (1).
@type answer: L{bool}
@param opCode: A four bit field that specifies kind of query in this
message.  This value is set by the originator of a query and copied
into the response.
@type opCode: L{int}
@param auth: Authoritative Answer - this bit is valid in responses, and
specifies that the responding name server is an authority for the
domain name in question section.
@type auth: L{bool}
@param trunc: Truncation - specifies that this message was truncated due
to length greater than that permitted on the transmission channel.
@type trunc: L{bool}
@param recDes: Recursion Desired - this bit may be set in a query and is
copied into the response.  If set, it directs the name server to
pursue the query recursively. Recursive query support is optional.
@type recDes: L{bool}
@param recAv: Recursion Available - this bit is set or cleared in a
response, and denotes whether recursive query support is available
in the name server.
@type recAv: L{bool}
@param rCode: Extended 12-bit RCODE. Derived from the 4 bits defined in
U{RFC1035 4.1.1<https://tools.ietf.org/html/rfc1035#section-4.1.1>}
and the upper 8bits defined in U{RFC6891
6.1.3<https://tools.ietf.org/html/rfc6891#section-6.1.3>}.
@type rCode: L{int}
@param ednsVersion: Indicates the EDNS implementation level. Set to
L{None} to prevent any EDNS attributes and options being added to
the encoded byte string.
@type ednsVersion: L{int} or L{None}
@param dnssecOK: DNSSEC OK bit as defined by
U{RFC3225 3<https://tools.ietf.org/html/rfc3225#section-3>}.
@type dnssecOK: L{bool}
@param authenticData: A flag indicating in a response that all the data
included in the answer and authority portion of the response has
been authenticated by the server according to the policies of that
server.
See U{RFC2535 section-6.1<https://tools.ietf.org/html/rfc2535#section-6.1>}.
@type authenticData: L{bool}
@param checkingDisabled: A flag indicating in a query that pending
(non-authenticated) data is acceptable to the resolver sending the
query.
See U{RFC2535 section-6.1<https://tools.ietf.org/html/rfc2535#section-6.1>}.
@type authenticData: L{bool}
@param maxSize: The requestor\'s UDP payload size is the number of octets
of the largest UDP payload that can be reassembled and delivered in
the requestor\'s network stack.
@type maxSize: L{int}
@param queries: The L{list} of L{Query} associated with this message.
@type queries: L{list} of L{Query}
@param answers: The L{list} of answers associated with this message.
@type answers: L{list} of L{RRHeader}
@param authority: The L{list} of authority records associated with this
message.
@type authority: L{list} of L{RRHeader}
@param additional: The L{list} of additional records associated with
this message.
@type additional: L{list} of L{RRHeader}'

def __init__(self, id=0, answer=False, opCode=OP_QUERY, auth=False, trunc=False, recDes=False, recAv=False, rCode=0, ednsVersion=0, dnssecOK=False, authenticData=False, checkingDisabled=False, maxSize=512, queries=None, answers=None, authority=None, additional=None):

    self.id = id
    self.answer = answer
    self.opCode = opCode
    self.auth = auth
    self.trunc = trunc
    self.recDes = recDes
    self.recAv = recAv
    self.rCode = rCode
    self.ednsVersion = ednsVersion
    self.dnssecOK = dnssecOK
    self.authenticData = authenticData
    self.checkingDisabled = checkingDisabled
    self.maxSize = maxSize
    if (queries is None):
        queries = []
    self.queries = queries
    if (answers is None):
        answers = []
    self.answers = answers
    if (authority is None):
        authority = []
    self.authority = authority
    if (additional is None):
        additional = []
    self.additional = additional
