Lock/Unlock Status

Could we detect the Lock/Unlock and Screen State Using Screen Time API.

In the Screen Time API when we shield the discourage application. At that time you are using State object MyModal(). Where we can find that MyModal Class.