import uuid
import datetime as dt
from marshmallow import Schema, fields, post_load, EXCLUDE

from vrpmdvmonfiles import VRPMDV_Monfiles




class VRPMDV_MonfilesSchema(Schema):   
        id =  fields.String(required=True)
        monid =  fields.String(required=True) 
        name = fields.String(required=True)
        samplerate = fields.Integer(required=True)
        sampleperiod = fields.Integer(required=True)
        downtime = fields.Integer(required=True)
        timestamp = fields.Integer(required=True)
        hwdescription = fields.List(fields.Nested("VRPMDV_MonSensorSchema"))


        @post_load
        def make_vrpmdv_Monfiles(self, data, **kwargs):
            return VRPMDV_Monfiles(**data)

