Junos yaml compliance check : how to construct conditional statements in a yaml file

Hi

I am looking to achieve the following but might be missing something