class AutoConfigClass():
    
    def __init__(self, list : list[str], *configs : dict):
        self.valid = True
        for param in list:
            flag = 0
            for c in configs:
                if param in c.keys():
                    flag += 1
            if flag == 0:
                self.valid = False
                raise BufferError("Not enough params to unpack: " + param + " not found")     
            if flag > 1:
                self.valid = False
                raise BufferError("ParamDuplicate: " + param + " not found")     
        for c in configs:
            for key, value in c.items():
                setattr(self, key, value)
