Get and Set Hide in viewport and Disable in viewport via Python API
bpy.context.active_object.hide_viewport = True for MONITOR icon
bpy.context.active_object.hide_set(True) for EYE icon
for collections it's bit different
bpy.context.collection.hide_viewport = True will globally hide collection(MONITOR icon)
bpy.context.view_layer.layer_collection.children.get('Your_Collection_Name').hide_viewport = True wil hide collectiob locally (EYE icon)