How to change collision set with a smart component?

I want to update a collision set with a smart component. Is that somehow possible?

// Index through the collision sets in a station
for (int i = 0; i < station.CollisionSets.Count; i++)
{
// We make a change to the collision set
station.CollisionSets[i].Name = “Changed Name”;
}

OR

station.CollisionSets.First(x => x.DisplayName == “SpecificName”).CollisionColor = Color.Black;

This is via SDK right?