def validate(self, strict=True):
    information = []
    warnings = []
    critical = []

    def extendWithKey(values, key=None, sourceObject=None):
        seen = set()
        seen_add = seen.add
        values = [x for x in values if (not ((x in seen) or seen_add(x)))]
        _list = []
        for value in values:
            if (sourceObject and key):
                _list.append(('%s.%s --> %s --> %s' % (self, key, sourceObject, value)))
            elif key:
                _list.append(('%s.%s --> %s' % (self, key, value)))
            else:
                _list.append(('%s --> %s' % (self, value)))
        return _list
    for key in list(self._structure.keys()):
        self.initAttr(key)
        if (self.discardThisKey(key) is False):
            if (strict and self._structure[key][1] and self._content[key].isEmpty()):
                critical.append(('%s.%s is a required attribute, but empty' % (self, key)))
            else:
                if issubclass(self._content[key].__class__, Proxy):
                    if (self._content[key].isEmpty() is False):
                        (newInformation, newWarnings, newCritical) = self._content[key].value.validate(strict=strict)
                        information.extend(extendWithKey(newInformation, key))
                        warnings.extend(extendWithKey(newWarnings, key))
                        critical.extend(extendWithKey(newCritical, key))
                        if (hasattr(self._content[key].value, 'customValidation') and isinstance(self._content[key].value.customValidation, types.MethodType)):
                            (newInformation, newWarnings, newCritical) = self._content[key].value.customValidation()
                            information.extend(extendWithKey(newInformation, key, self._content[key]))
                            warnings.extend(extendWithKey(newWarnings, key, self._content[key]))
                            critical.extend(extendWithKey(newCritical, key, self._content[key]))
                if issubclass(self._content[key].__class__, ListProxy):
                    if (self._content[key].isEmpty() is False):
                        for item in self._content[key]:
                            if (hasattr(item, 'validate') and isinstance(item.validate, types.MethodType)):
                                (newInformation, newWarnings, newCritical) = item.validate(strict=strict)
                                information.extend(extendWithKey(newInformation, key))
                                warnings.extend(extendWithKey(newWarnings, key))
                                critical.extend(extendWithKey(newCritical, key))
                            if (hasattr(item, 'customValidation') and isinstance(item.customValidation, types.MethodType)):
                                (newInformation, newWarnings, newCritical) = item.customValidation()
                                information.extend(extendWithKey(newInformation, key, item))
                                warnings.extend(extendWithKey(newWarnings, key, item))
                                critical.extend(extendWithKey(newCritical, key, item))
    if (issubclass(self.__class__, BaseResponse) and hasattr(self, 'customValidation') and isinstance(self.customValidation, types.MethodType)):
        (newInformation, newWarnings, newCritical) = self.customValidation()
        information.extend(extendWithKey(newInformation))
        warnings.extend(extendWithKey(newWarnings))
        critical.extend(extendWithKey(newCritical))
    return (information, warnings, critical)
def validate(self, strict=True):
    information = []
    warnings = []
    critical = []

    def extendWithKey(values, key=None, sourceObject=None):
        seen = set()
        seen_add = seen.add
        values = [x for x in values if (not ((x in seen) or seen_add(x)))]
        _list = []
        for value in values:
            if (sourceObject and key):
                _list.append(('%s.%s --> %s --> %s' % (self, key, sourceObject, value)))
            elif key:
                _list.append(('%s.%s --> %s' % (self, key, value)))
            else:
                _list.append(('%s --> %s' % (self, value)))
        return _list
    for key in list(self._structure.keys()):
        self.initAttr(key)
        if (self.discardThisKey(key) is False):
            if (strict and self._structure[key][1] and self._content[key].isEmpty()):
                critical.append(('%s.%s is a required attribute, but empty' % (self, key)))
            else:
                if issubclass(self._content[key].__class__, Proxy):
                    if (self._content[key].isEmpty() is False):
                        (newInformation, newWarnings, newCritical) = self._content[key].value.validate(strict=strict)
                        information.extend(extendWithKey(newInformation, key))
                        warnings.extend(extendWithKey(newWarnings, key))
                        critical.extend(extendWithKey(newCritical, key))
                        if (hasattr(self._content[key].value, 'customValidation') and isinstance(self._content[key].value.customValidation, types.MethodType)):
                            (newInformation, newWarnings, newCritical) = self._content[key].value.customValidation()
                            information.extend(extendWithKey(newInformation, key, self._content[key]))
                            warnings.extend(extendWithKey(newWarnings, key, self._content[key]))
                            critical.extend(extendWithKey(newCritical, key, self._content[key]))
                if issubclass(self._content[key].__class__, ListProxy):
                    if (self._content[key].isEmpty() is False):
                        for item in self._content[key]:
                            if (hasattr(item, 'validate') and isinstance(item.validate, types.MethodType)):
                                (newInformation, newWarnings, newCritical) = item.validate(strict=strict)
                                information.extend(extendWithKey(newInformation, key))
                                warnings.extend(extendWithKey(newWarnings, key))
                                critical.extend(extendWithKey(newCritical, key))
                            if (hasattr(item, 'customValidation') and isinstance(item.customValidation, types.MethodType)):
                                (newInformation, newWarnings, newCritical) = item.customValidation()
                                information.extend(extendWithKey(newInformation, key, item))
                                warnings.extend(extendWithKey(newWarnings, key, item))
                                critical.extend(extendWithKey(newCritical, key, item))
    if (issubclass(self.__class__, BaseResponse) and hasattr(self, 'customValidation') and isinstance(self.customValidation, types.MethodType)):
        (newInformation, newWarnings, newCritical) = self.customValidation()
        information.extend(extendWithKey(newInformation))
        warnings.extend(extendWithKey(newWarnings))
        critical.extend(extendWithKey(newCritical))
    return (information, warnings, critical)