How to trigger on changes in specified branch?

Hi all,
is there any way I can trigger build task only if the change is in specified branch (one of many) ?

I should have RTFM:

trigger:
    branch:
        - master

Actually what is the difference between the one above and:

when:
  branch:
  - master

?