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

namespace Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation;

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

/**
 * Statistical aggregation of samples for a single resource usage.
 *
 * Generated from protobuf message <code>google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats</code>
 */
class Stats extends \Google\Protobuf\Internal\Message
{
    /**
     * Average usage value.
     *
     * Generated from protobuf field <code>float average = 1;</code>
     */
    protected $average = 0.0;
    /**
     * Median usage value.
     *
     * Generated from protobuf field <code>float median = 2;</code>
     */
    protected $median = 0.0;
    /**
     * 95th percentile usage value.
     *
     * Generated from protobuf field <code>float nintey_fifth_percentile = 3;</code>
     */
    protected $nintey_fifth_percentile = 0.0;
    /**
     * Peak usage value.
     *
     * Generated from protobuf field <code>float peak = 4;</code>
     */
    protected $peak = 0.0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type float $average
     *           Average usage value.
     *     @type float $median
     *           Median usage value.
     *     @type float $nintey_fifth_percentile
     *           95th percentile usage value.
     *     @type float $peak
     *           Peak usage value.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce();
        parent::__construct($data);
    }

    /**
     * Average usage value.
     *
     * Generated from protobuf field <code>float average = 1;</code>
     * @return float
     */
    public function getAverage()
    {
        return $this->average;
    }

    /**
     * Average usage value.
     *
     * Generated from protobuf field <code>float average = 1;</code>
     * @param float $var
     * @return $this
     */
    public function setAverage($var)
    {
        GPBUtil::checkFloat($var);
        $this->average = $var;

        return $this;
    }

    /**
     * Median usage value.
     *
     * Generated from protobuf field <code>float median = 2;</code>
     * @return float
     */
    public function getMedian()
    {
        return $this->median;
    }

    /**
     * Median usage value.
     *
     * Generated from protobuf field <code>float median = 2;</code>
     * @param float $var
     * @return $this
     */
    public function setMedian($var)
    {
        GPBUtil::checkFloat($var);
        $this->median = $var;

        return $this;
    }

    /**
     * 95th percentile usage value.
     *
     * Generated from protobuf field <code>float nintey_fifth_percentile = 3;</code>
     * @return float
     */
    public function getNinteyFifthPercentile()
    {
        return $this->nintey_fifth_percentile;
    }

    /**
     * 95th percentile usage value.
     *
     * Generated from protobuf field <code>float nintey_fifth_percentile = 3;</code>
     * @param float $var
     * @return $this
     */
    public function setNinteyFifthPercentile($var)
    {
        GPBUtil::checkFloat($var);
        $this->nintey_fifth_percentile = $var;

        return $this;
    }

    /**
     * Peak usage value.
     *
     * Generated from protobuf field <code>float peak = 4;</code>
     * @return float
     */
    public function getPeak()
    {
        return $this->peak;
    }

    /**
     * Peak usage value.
     *
     * Generated from protobuf field <code>float peak = 4;</code>
     * @param float $var
     * @return $this
     */
    public function setPeak($var)
    {
        GPBUtil::checkFloat($var);
        $this->peak = $var;

        return $this;
    }

}


