driver-core/src/main/com/mongodb/client/model/Aggregates.java
public static <TExpression> Bson bucketAuto(final TExpression groupBy, final int buckets) {
        return bucketAuto(groupBy, buckets, new BucketAutoOptions());
    }
public static <TExpression> Bson bucketAuto(final TExpression groupBy, final int buckets) {
        return bucketAuto(groupBy, buckets, new BucketAutoOptions());
    }
Creates a $bucketAuto pipeline stage

@param <TExpression> the groupBy expression type
@param groupBy       the criteria to group By
@param buckets       the number of the buckets
@return the $bucketAuto pipeline stage
@mongodb.driver.manual reference/operator/aggregation/bucketAuto/ $bucketAuto
@mongodb.server.release 3.4
@since 3.4