Wikipedia says, Samurai were the military-nobility and officer-caste of medieval and early-modern Japan.
By the end of the 12th century, samurai became almost entirely synonymous with bushi, and the word was closely associated with the middle and upper echelons of the warrior class.
Most samurai were bound by a code of honor and were expected to set an example for those below them. A notable part of their code is seppuku (hara kiri), which allowed a disgraced samurai to regain his honor by passing into death, where samurai were still beholden to social rules.
One of Japan’s most renowned directors, Akira Kurosawa, greatly influenced the samurai aspect in western film-making.