def METHOD_NAME(self, name, value, connection):
    if name == 'MetricName':
        self.name = value
    elif name == 'Namespace':
        self.namespace = value
    else:
        setattr(self, name, value)