'Set attribute.
Setting a value on an object of this type will only work for attributes
defined in ATTRIBUTES.  To make other assignments possible it is necessary
to override this method in subclasses.
It is important that assignment is restricted in this way because
this validation is used as validation for parsing.  Absent this restriction
it would be possible for method names to be overwritten.
Args:
key: Name of attribute to set.
value: Attributes new value.
Raises:
ValidationError: when trying to assign to an attribute
that does not exist.'

def __setattr__(self, key, value):

    value = self.GetValidator(key)(value, key)
    object.__setattr__(self, key, value)
