def to_dict(message):
    """Create a dictionary from a message, including all defaults."""
    fields = dict(message.DESCRIPTOR.fields_by_name)
    return {k:getattr(message, k) for k in fields.keys()}