@classmethod
def _from_object(cls, receiver):
    """Construct a receiver from receiver object.

        @param cls: The target class.
        @param receiver: a receiver object that contains all fields.
        """
    kwargs = {'id': receiver.id, 'name': receiver.name, 'user': receiver.
        user, 'project': receiver.project, 'domain': receiver.domain,
        'created_at': receiver.created_at, 'updated_at': receiver.
        updated_at, 'actor': receiver.actor, 'params': receiver.params,
        'channel': receiver.channel}
    return cls(receiver.type, receiver.cluster_id, receiver.action, **kwargs)
