The Geneva Convention relative to the Protection of Civilian Persons in Time of War states that
Persons taking no active part in the hostilities, including members of armed forces who have laid down their arms and those placed hors de combat by sickness, wounds, detention, or any other cause, shall in all circumstances be treated humanely ...
In the comments to an answer to another question, there were questions as to the definition there. When is a soldier taking "active part" in the hostilities?
Are they considered to take an active part when they are sleeping? Awake but eating dinner? Does it matter if they are armed at the time, or merely "in uniform"? Are there (other) times when a uniformed member of the military would not be considered "taking active part" in the hostilities? Or are they considered to be taking an active part simply by being a uniformed member of a belligerent party?