Mapping Hug, Fill and Fixed To API

I would like to understand how I can determine what is
Horizontal Fill, Horizontal Hug, Horizontal Fixed
Vertical Fill, Vertical Hug, Vertical Fixed
based on
primaryAxisSizeMode
counterAxisSizeMode
layoutAlign
layoutGrow

and parent Layout constraints

how to get hug, fill and fixed from plugin api in horizontal and vertical direction