driver-core/src/main/com/mongodb/client/model/Updates.java
public static <TItem> Bson set(final String fieldName, @Nullable final TItem value) {
        return new SimpleUpdate<TItem>(fieldName, value, "$set");
    }
public static <TItem> Bson set(final String fieldName, @Nullable final TItem value) {
        return new SimpleUpdate<TItem>(fieldName, value, "$set");
    }
Creates an update that sets the value of the field with the given name to the given value.

@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/set/ $set