class DistributionDataPointSnapshot extends DataPointSnapshot {
    private final long count; // optional, negative value means no count.
    private final double sum; // optional, Double.NaN means no sum.
    private final Exemplars exemplars; // optional, Exemplars.EMPTY means no Exemplars.

    /**
     * See JavaDoc of the child classes.
     */
    protected DistributionDataPointSnapshot(long count, double sum, Exemplars exemplars, Labels labels, long createdTimestampMillis, long scrapeTimestampMillis) {
        super(labels, createdTimestampMillis, scrapeTimestampMillis);
        this.count = count;
        this.sum = sum;
        this.exemplars = exemplars == null ? Exemplars.EMPTY : exemplars;
        validate();
    }

    private void validate() {<FILL_FUNCTION_BODY>}

    public boolean hasCount() {
        return count >= 0;
    }

    public boolean hasSum() {
        return !Double.isNaN(sum);
    }

    /**
     * This will return garbage if {@link #hasCount()} is {@code false}.
     */
    public long getCount() {
        return count;
    }

    /**
     * This will return garbage if {@link #hasSum()} is {@code false}.
     */
    public double getSum() {
        return sum;
    }

    /**
     * May be {@link Exemplars#EMPTY}, but will never be {@code null}.
     */
    public Exemplars getExemplars() {
        return exemplars;
    }

    static abstract class Builder<T extends Builder<T>> extends DataPointSnapshot.Builder<T> {

        protected long count = -1;
        protected double sum = Double.NaN;
        protected long createdTimestampMillis = 0L;
        protected Exemplars exemplars = Exemplars.EMPTY;

        /**
         * Count can be explicitly set on summaries (this is a public method for summary metrics),
         * and it is set implicitly on histograms (derived from the bucket counts).
         */
        protected T count(long count) {
            this.count = count;
            return self();
        }

        public T sum(double sum) {
            this.sum = sum;
            return self();
        }

        public T exemplars(Exemplars exemplars) {
            this.exemplars = exemplars;
            return self();
        }

        public T createdTimestampMillis(long createdTimestampMillis) {
            this.createdTimestampMillis = createdTimestampMillis;
            return self();
        }
    }
}

        // If a histogram or summary observes negative values the sum could be negative.
        // According to OpenMetrics sum should be omitted in that case, but we don't enforce this here.
    
<methods>public long getCreatedTimestampMillis() ,public io.prometheus.metrics.model.snapshots.Labels getLabels() ,public long getScrapeTimestampMillis() ,public boolean hasCreatedTimestamp() ,public boolean hasScrapeTimestamp() <variables>private final non-sealed long createdTimestampMillis,private final non-sealed io.prometheus.metrics.model.snapshots.Labels labels,private final non-sealed long scrapeTimestampMillis