from designate.objects import base


class Server(base.DictObjectMixin, base.PersistentObjectMixin,
             base.DesignateObject):
    FIELDS = {
        'name': {
            'schema': {
                'type': 'string',
                'description': 'Zone name',
                'format': 'domainname',
                'maxLength': 255,
            },
            'immutable': True,
            'required': True
        }
    }


class ServerList(base.ListObjectMixin, base.DesignateObject):
    LIST_ITEM_TYPE = Server
