<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/automl/v1beta1/data_stats.proto

namespace Google\Cloud\AutoMl\V1beta1\Float64Stats;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * A bucket of a histogram.
 *
 * Generated from protobuf message <code>google.cloud.automl.v1beta1.Float64Stats.HistogramBucket</code>
 */
class HistogramBucket extends \Google\Protobuf\Internal\Message
{
    /**
     * The minimum value of the bucket, inclusive.
     *
     * Generated from protobuf field <code>double min = 1;</code>
     */
    private $min = 0.0;
    /**
     * The maximum value of the bucket, exclusive unless max = `"Infinity"`, in
     * which case it's inclusive.
     *
     * Generated from protobuf field <code>double max = 2;</code>
     */
    private $max = 0.0;
    /**
     * The number of data values that are in the bucket, i.e. are between
     * min and max values.
     *
     * Generated from protobuf field <code>int64 count = 3;</code>
     */
    private $count = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type float $min
     *           The minimum value of the bucket, inclusive.
     *     @type float $max
     *           The maximum value of the bucket, exclusive unless max = `"Infinity"`, in
     *           which case it's inclusive.
     *     @type int|string $count
     *           The number of data values that are in the bucket, i.e. are between
     *           min and max values.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Automl\V1Beta1\DataStats::initOnce();
        parent::__construct($data);
    }

    /**
     * The minimum value of the bucket, inclusive.
     *
     * Generated from protobuf field <code>double min = 1;</code>
     * @return float
     */
    public function getMin()
    {
        return $this->min;
    }

    /**
     * The minimum value of the bucket, inclusive.
     *
     * Generated from protobuf field <code>double min = 1;</code>
     * @param float $var
     * @return $this
     */
    public function setMin($var)
    {
        GPBUtil::checkDouble($var);
        $this->min = $var;

        return $this;
    }

    /**
     * The maximum value of the bucket, exclusive unless max = `"Infinity"`, in
     * which case it's inclusive.
     *
     * Generated from protobuf field <code>double max = 2;</code>
     * @return float
     */
    public function getMax()
    {
        return $this->max;
    }

    /**
     * The maximum value of the bucket, exclusive unless max = `"Infinity"`, in
     * which case it's inclusive.
     *
     * Generated from protobuf field <code>double max = 2;</code>
     * @param float $var
     * @return $this
     */
    public function setMax($var)
    {
        GPBUtil::checkDouble($var);
        $this->max = $var;

        return $this;
    }

    /**
     * The number of data values that are in the bucket, i.e. are between
     * min and max values.
     *
     * Generated from protobuf field <code>int64 count = 3;</code>
     * @return int|string
     */
    public function getCount()
    {
        return $this->count;
    }

    /**
     * The number of data values that are in the bucket, i.e. are between
     * min and max values.
     *
     * Generated from protobuf field <code>int64 count = 3;</code>
     * @param int|string $var
     * @return $this
     */
    public function setCount($var)
    {
        GPBUtil::checkInt64($var);
        $this->count = $var;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(HistogramBucket::class, \Google\Cloud\AutoMl\V1beta1\Float64Stats_HistogramBucket::class);

