I think the way it's presented in the outliner is a bit confusing. What you have to understand is Collections have global properties :
And view layer properties, which are accessed with a LayerCollection object :
hide_viewport (I know, it's presented as the same path as the monitor icon one, but bear with me)
Global properties are accessed in a straightforward way, ie
bpy.data.collections["Collection"].hide_select = True for instance. This will make the collection unselectable across ALL view layers. Same goes for viewport and render visibility.
View layer- related properties are accessed by their relative
layer_collection which is a property of one and only one
view_layer. Each collection has a related
layer_collection object for each
view_layer in the current scene. This object is responsible for holding and modifying its view layer properties.
The tricky part is collections don't hold a direct reference to their (theoretically infinite number of)
layer_collection counterparts. You have to traverse the entire view layer's layer collections to test against the current collection, and only then can you change its properties. (I'd love to be corrected if there is an easier way).
LayerCollection does have a direct reference to its unique
collection object. (
It then becomes really similar to this question.
for child in t.children:
yield from traverse_tree(child)
coll_name = "Collection"
layer_coll_master = bpy.context.view_layer.layer_collection
for layer_coll in traverse_tree(layer_coll_master):
if layer_coll.collection.name == coll_name:
layer_coll.indirect_only = False
I guess the short answer to your question is, no, you can't change this property with a one-liner expression in python. (Again, please correct me if I'm wrong)