driver-core/src/main/com/mongodb/client/model/Updates.java
public static <TItem> Bson addToSet(final String fieldName, @Nullable final TItem value) {
        return new SimpleUpdate<TItem>(fieldName, value, "$addToSet");
    }
public static <TItem> Bson addToSet(final String fieldName, @Nullable final TItem value) {
        return new SimpleUpdate<TItem>(fieldName, value, "$addToSet");
    }
Creates an update that adds the given value to the array value of the field with the given name, unless the value is
already present, in which case it does nothing

@param fieldName the non-null field name
@param value     the value, which may be null
@param <TItem>   the value type
@return the update
@mongodb.driver.manual reference/operator/update/addToSet/ $addToSet