# -*- coding: utf-8 -*-
# Copyright (C) 2012 Dr. Ralf Schlatterbeck All rights reserved
# Reichergasse 131, A-3411 Weidling, Austria. rsc@runtux.com
# #*** <License> ************************************************************#
# This package is part of the package GTW.OMP.DNS.
# 
# This package is licensed under the terms of the BSD 3-Clause License
# <http://www.c-tanzer.at/license/bsd_3c.html>.
# #*** </License> ***********************************************************#
#
#++
# Name
#    DNS.Record
#
# Purpose
#    Model a DNS Record
#
# Revision Dates
#    06-Sep-2012 (RS) Creation
#    ««revision-date»»···
#--

from   __future__  import absolute_import, division, print_function, unicode_literals

from   _MOM.import_MOM          import *
from   _GTW._OMP._DNS           import DNS
from   _GTW._OMP._DNS.Attr_Type import *
import _GTW._OMP._DNS.Entity
import _GTW._OMP._DNS.Zone

_Ancestor_Essence = DNS.Link1

class Record (_Ancestor_Essence) :
    """A DNS record"""

    is_partial = True

    class _Attributes (_Ancestor_Essence._Attributes) :

        _Ancestor = _Ancestor_Essence._Attributes

        class left (_Ancestor.left) :
            """The zone to which this record belongs"""

            role_type          = DNS.Zone
            role_name          = "zone"
            ui_allow_new       = False

        # end class name

        class name (A_DNS_Name) :
            """DNS name."""

            kind               = Attr.Primary

        # end class name

        class ttl (A_DNS_Time) :
            """Time to live"""

            kind               = Attr.Optional

        # end class ttl

    # end class _Attributes

# end class Record

if __name__ != "__main__" :
    DNS._Export ("*")
### __END__ DNS.Record
