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

namespace Google\Cloud\MigrationCenter\V1\ReportSummary;

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

/**
 * A Histogram Chart shows a distribution of values into buckets, showing
 * a count of values which fall into a bucket.
 *
 * Generated from protobuf message <code>google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData</code>
 */
class HistogramChartData extends \Google\Protobuf\Internal\Message
{
    /**
     * Buckets in the histogram.
     * There will be `n+1` buckets matching `n` lower bounds in the request.
     * The first bucket will be from -infinity to the first bound.
     * Subsequent buckets will be between one bound and the next.
     * The final bucket will be from the final bound to infinity.
     *
     * Generated from protobuf field <code>repeated .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket buckets = 1;</code>
     */
    private $buckets;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\MigrationCenter\V1\ReportSummary\HistogramChartData\Bucket>|\Google\Protobuf\Internal\RepeatedField $buckets
     *           Buckets in the histogram.
     *           There will be `n+1` buckets matching `n` lower bounds in the request.
     *           The first bucket will be from -infinity to the first bound.
     *           Subsequent buckets will be between one bound and the next.
     *           The final bucket will be from the final bound to infinity.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce();
        parent::__construct($data);
    }

    /**
     * Buckets in the histogram.
     * There will be `n+1` buckets matching `n` lower bounds in the request.
     * The first bucket will be from -infinity to the first bound.
     * Subsequent buckets will be between one bound and the next.
     * The final bucket will be from the final bound to infinity.
     *
     * Generated from protobuf field <code>repeated .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket buckets = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getBuckets()
    {
        return $this->buckets;
    }

    /**
     * Buckets in the histogram.
     * There will be `n+1` buckets matching `n` lower bounds in the request.
     * The first bucket will be from -infinity to the first bound.
     * Subsequent buckets will be between one bound and the next.
     * The final bucket will be from the final bound to infinity.
     *
     * Generated from protobuf field <code>repeated .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket buckets = 1;</code>
     * @param array<\Google\Cloud\MigrationCenter\V1\ReportSummary\HistogramChartData\Bucket>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setBuckets($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\ReportSummary\HistogramChartData\Bucket::class);
        $this->buckets = $arr;

        return $this;
    }

}


