House

A house, as defined by what an NPC requires to spawn, is a structure that meets the following criteria: For an NPC to move in, the house must also be unoccupied.
 * Has side and back walls, a floor, and a roof.
 * Has a table, a chair, a door.
 * Has a light source.
 * Is at least 12x5 blocks in size. (This needs to be confirmed.)

However, for setting the player spawn point by using a bed, only the first of the above seems to be required.