There is an International Code Council code for swimming pool barriers. A swimming pool is defined very broadly to include “any structure intended for swimming, recreational bathing or wading that contains water over 24” (610mm) deep. This includes in-ground, above-ground and on-ground pools, hot tubs, spas and fixed-on-place wading pools.”
Please see the resource for a complete explanation.