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

namespace Google\Cloud\DatabaseCenter\V1beta;

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

/**
 * Metrics represents the metrics for a database resource.
 *
 * Generated from protobuf message <code>google.cloud.databasecenter.v1beta.Metrics</code>
 */
class Metrics extends \Google\Protobuf\Internal\Message
{
    /**
     * P99 CPU utilization observed for the resource. The value is a
     * fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases).
     *
     * Generated from protobuf field <code>optional .google.cloud.databasecenter.v1beta.MetricData p99_cpu_utilization = 1;</code>
     */
    protected $p99_cpu_utilization = null;
    /**
     * P95 CPU utilization observed for the resource. The value is a
     * fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases).
     *
     * Generated from protobuf field <code>optional .google.cloud.databasecenter.v1beta.MetricData p95_cpu_utilization = 2;</code>
     */
    protected $p95_cpu_utilization = null;
    /**
     * Current storage used by the resource in bytes.
     *
     * Generated from protobuf field <code>optional .google.cloud.databasecenter.v1beta.MetricData current_storage_used_bytes = 3;</code>
     */
    protected $current_storage_used_bytes = null;
    /**
     * Peak storage utilization observed for the resource. The value is a
     * fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases).
     *
     * Generated from protobuf field <code>optional .google.cloud.databasecenter.v1beta.MetricData peak_storage_utilization = 4;</code>
     */
    protected $peak_storage_utilization = null;
    /**
     * Peak memory utilization observed for the resource. The value is a
     * fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases).
     *
     * Generated from protobuf field <code>optional .google.cloud.databasecenter.v1beta.MetricData peak_memory_utilization = 5;</code>
     */
    protected $peak_memory_utilization = null;
    /**
     * Peak number of connections observed for the resource. The value is a
     * positive integer.
     *
     * Generated from protobuf field <code>optional .google.cloud.databasecenter.v1beta.MetricData peak_number_connections = 6;</code>
     */
    protected $peak_number_connections = null;
    /**
     * Number of nodes in instance for spanner or bigtable.
     *
     * Generated from protobuf field <code>optional .google.cloud.databasecenter.v1beta.MetricData node_count = 7;</code>
     */
    protected $node_count = null;
    /**
     * Number of processing units in spanner.
     *
     * Generated from protobuf field <code>optional .google.cloud.databasecenter.v1beta.MetricData processing_unit_count = 8;</code>
     */
    protected $processing_unit_count = null;
    /**
     * Current memory used by the resource in bytes.
     *
     * Generated from protobuf field <code>optional .google.cloud.databasecenter.v1beta.MetricData current_memory_used_bytes = 9;</code>
     */
    protected $current_memory_used_bytes = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\DatabaseCenter\V1beta\MetricData $p99_cpu_utilization
     *           P99 CPU utilization observed for the resource. The value is a
     *           fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases).
     *     @type \Google\Cloud\DatabaseCenter\V1beta\MetricData $p95_cpu_utilization
     *           P95 CPU utilization observed for the resource. The value is a
     *           fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases).
     *     @type \Google\Cloud\DatabaseCenter\V1beta\MetricData $current_storage_used_bytes
     *           Current storage used by the resource in bytes.
     *     @type \Google\Cloud\DatabaseCenter\V1beta\MetricData $peak_storage_utilization
     *           Peak storage utilization observed for the resource. The value is a
     *           fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases).
     *     @type \Google\Cloud\DatabaseCenter\V1beta\MetricData $peak_memory_utilization
     *           Peak memory utilization observed for the resource. The value is a
     *           fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases).
     *     @type \Google\Cloud\DatabaseCenter\V1beta\MetricData $peak_number_connections
     *           Peak number of connections observed for the resource. The value is a
     *           positive integer.
     *     @type \Google\Cloud\DatabaseCenter\V1beta\MetricData $node_count
     *           Number of nodes in instance for spanner or bigtable.
     *     @type \Google\Cloud\DatabaseCenter\V1beta\MetricData $processing_unit_count
     *           Number of processing units in spanner.
     *     @type \Google\Cloud\DatabaseCenter\V1beta\MetricData $current_memory_used_bytes
     *           Current memory used by the resource in bytes.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Databasecenter\V1Beta\MetricData::initOnce();
        parent::__construct($data);
    }

    /**
     * P99 CPU utilization observed for the resource. The value is a
     * fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases).
     *
     * Generated from protobuf field <code>optional .google.cloud.databasecenter.v1beta.MetricData p99_cpu_utilization = 1;</code>
     * @return \Google\Cloud\DatabaseCenter\V1beta\MetricData|null
     */
    public function getP99CpuUtilization()
    {
        return $this->p99_cpu_utilization;
    }

    public function hasP99CpuUtilization()
    {
        return isset($this->p99_cpu_utilization);
    }

    public function clearP99CpuUtilization()
    {
        unset($this->p99_cpu_utilization);
    }

    /**
     * P99 CPU utilization observed for the resource. The value is a
     * fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases).
     *
     * Generated from protobuf field <code>optional .google.cloud.databasecenter.v1beta.MetricData p99_cpu_utilization = 1;</code>
     * @param \Google\Cloud\DatabaseCenter\V1beta\MetricData $var
     * @return $this
     */
    public function setP99CpuUtilization($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DatabaseCenter\V1beta\MetricData::class);
        $this->p99_cpu_utilization = $var;

        return $this;
    }

    /**
     * P95 CPU utilization observed for the resource. The value is a
     * fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases).
     *
     * Generated from protobuf field <code>optional .google.cloud.databasecenter.v1beta.MetricData p95_cpu_utilization = 2;</code>
     * @return \Google\Cloud\DatabaseCenter\V1beta\MetricData|null
     */
    public function getP95CpuUtilization()
    {
        return $this->p95_cpu_utilization;
    }

    public function hasP95CpuUtilization()
    {
        return isset($this->p95_cpu_utilization);
    }

    public function clearP95CpuUtilization()
    {
        unset($this->p95_cpu_utilization);
    }

    /**
     * P95 CPU utilization observed for the resource. The value is a
     * fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases).
     *
     * Generated from protobuf field <code>optional .google.cloud.databasecenter.v1beta.MetricData p95_cpu_utilization = 2;</code>
     * @param \Google\Cloud\DatabaseCenter\V1beta\MetricData $var
     * @return $this
     */
    public function setP95CpuUtilization($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DatabaseCenter\V1beta\MetricData::class);
        $this->p95_cpu_utilization = $var;

        return $this;
    }

    /**
     * Current storage used by the resource in bytes.
     *
     * Generated from protobuf field <code>optional .google.cloud.databasecenter.v1beta.MetricData current_storage_used_bytes = 3;</code>
     * @return \Google\Cloud\DatabaseCenter\V1beta\MetricData|null
     */
    public function getCurrentStorageUsedBytes()
    {
        return $this->current_storage_used_bytes;
    }

    public function hasCurrentStorageUsedBytes()
    {
        return isset($this->current_storage_used_bytes);
    }

    public function clearCurrentStorageUsedBytes()
    {
        unset($this->current_storage_used_bytes);
    }

    /**
     * Current storage used by the resource in bytes.
     *
     * Generated from protobuf field <code>optional .google.cloud.databasecenter.v1beta.MetricData current_storage_used_bytes = 3;</code>
     * @param \Google\Cloud\DatabaseCenter\V1beta\MetricData $var
     * @return $this
     */
    public function setCurrentStorageUsedBytes($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DatabaseCenter\V1beta\MetricData::class);
        $this->current_storage_used_bytes = $var;

        return $this;
    }

    /**
     * Peak storage utilization observed for the resource. The value is a
     * fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases).
     *
     * Generated from protobuf field <code>optional .google.cloud.databasecenter.v1beta.MetricData peak_storage_utilization = 4;</code>
     * @return \Google\Cloud\DatabaseCenter\V1beta\MetricData|null
     */
    public function getPeakStorageUtilization()
    {
        return $this->peak_storage_utilization;
    }

    public function hasPeakStorageUtilization()
    {
        return isset($this->peak_storage_utilization);
    }

    public function clearPeakStorageUtilization()
    {
        unset($this->peak_storage_utilization);
    }

    /**
     * Peak storage utilization observed for the resource. The value is a
     * fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases).
     *
     * Generated from protobuf field <code>optional .google.cloud.databasecenter.v1beta.MetricData peak_storage_utilization = 4;</code>
     * @param \Google\Cloud\DatabaseCenter\V1beta\MetricData $var
     * @return $this
     */
    public function setPeakStorageUtilization($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DatabaseCenter\V1beta\MetricData::class);
        $this->peak_storage_utilization = $var;

        return $this;
    }

    /**
     * Peak memory utilization observed for the resource. The value is a
     * fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases).
     *
     * Generated from protobuf field <code>optional .google.cloud.databasecenter.v1beta.MetricData peak_memory_utilization = 5;</code>
     * @return \Google\Cloud\DatabaseCenter\V1beta\MetricData|null
     */
    public function getPeakMemoryUtilization()
    {
        return $this->peak_memory_utilization;
    }

    public function hasPeakMemoryUtilization()
    {
        return isset($this->peak_memory_utilization);
    }

    public function clearPeakMemoryUtilization()
    {
        unset($this->peak_memory_utilization);
    }

    /**
     * Peak memory utilization observed for the resource. The value is a
     * fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases).
     *
     * Generated from protobuf field <code>optional .google.cloud.databasecenter.v1beta.MetricData peak_memory_utilization = 5;</code>
     * @param \Google\Cloud\DatabaseCenter\V1beta\MetricData $var
     * @return $this
     */
    public function setPeakMemoryUtilization($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DatabaseCenter\V1beta\MetricData::class);
        $this->peak_memory_utilization = $var;

        return $this;
    }

    /**
     * Peak number of connections observed for the resource. The value is a
     * positive integer.
     *
     * Generated from protobuf field <code>optional .google.cloud.databasecenter.v1beta.MetricData peak_number_connections = 6;</code>
     * @return \Google\Cloud\DatabaseCenter\V1beta\MetricData|null
     */
    public function getPeakNumberConnections()
    {
        return $this->peak_number_connections;
    }

    public function hasPeakNumberConnections()
    {
        return isset($this->peak_number_connections);
    }

    public function clearPeakNumberConnections()
    {
        unset($this->peak_number_connections);
    }

    /**
     * Peak number of connections observed for the resource. The value is a
     * positive integer.
     *
     * Generated from protobuf field <code>optional .google.cloud.databasecenter.v1beta.MetricData peak_number_connections = 6;</code>
     * @param \Google\Cloud\DatabaseCenter\V1beta\MetricData $var
     * @return $this
     */
    public function setPeakNumberConnections($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DatabaseCenter\V1beta\MetricData::class);
        $this->peak_number_connections = $var;

        return $this;
    }

    /**
     * Number of nodes in instance for spanner or bigtable.
     *
     * Generated from protobuf field <code>optional .google.cloud.databasecenter.v1beta.MetricData node_count = 7;</code>
     * @return \Google\Cloud\DatabaseCenter\V1beta\MetricData|null
     */
    public function getNodeCount()
    {
        return $this->node_count;
    }

    public function hasNodeCount()
    {
        return isset($this->node_count);
    }

    public function clearNodeCount()
    {
        unset($this->node_count);
    }

    /**
     * Number of nodes in instance for spanner or bigtable.
     *
     * Generated from protobuf field <code>optional .google.cloud.databasecenter.v1beta.MetricData node_count = 7;</code>
     * @param \Google\Cloud\DatabaseCenter\V1beta\MetricData $var
     * @return $this
     */
    public function setNodeCount($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DatabaseCenter\V1beta\MetricData::class);
        $this->node_count = $var;

        return $this;
    }

    /**
     * Number of processing units in spanner.
     *
     * Generated from protobuf field <code>optional .google.cloud.databasecenter.v1beta.MetricData processing_unit_count = 8;</code>
     * @return \Google\Cloud\DatabaseCenter\V1beta\MetricData|null
     */
    public function getProcessingUnitCount()
    {
        return $this->processing_unit_count;
    }

    public function hasProcessingUnitCount()
    {
        return isset($this->processing_unit_count);
    }

    public function clearProcessingUnitCount()
    {
        unset($this->processing_unit_count);
    }

    /**
     * Number of processing units in spanner.
     *
     * Generated from protobuf field <code>optional .google.cloud.databasecenter.v1beta.MetricData processing_unit_count = 8;</code>
     * @param \Google\Cloud\DatabaseCenter\V1beta\MetricData $var
     * @return $this
     */
    public function setProcessingUnitCount($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DatabaseCenter\V1beta\MetricData::class);
        $this->processing_unit_count = $var;

        return $this;
    }

    /**
     * Current memory used by the resource in bytes.
     *
     * Generated from protobuf field <code>optional .google.cloud.databasecenter.v1beta.MetricData current_memory_used_bytes = 9;</code>
     * @return \Google\Cloud\DatabaseCenter\V1beta\MetricData|null
     */
    public function getCurrentMemoryUsedBytes()
    {
        return $this->current_memory_used_bytes;
    }

    public function hasCurrentMemoryUsedBytes()
    {
        return isset($this->current_memory_used_bytes);
    }

    public function clearCurrentMemoryUsedBytes()
    {
        unset($this->current_memory_used_bytes);
    }

    /**
     * Current memory used by the resource in bytes.
     *
     * Generated from protobuf field <code>optional .google.cloud.databasecenter.v1beta.MetricData current_memory_used_bytes = 9;</code>
     * @param \Google\Cloud\DatabaseCenter\V1beta\MetricData $var
     * @return $this
     */
    public function setCurrentMemoryUsedBytes($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DatabaseCenter\V1beta\MetricData::class);
        $this->current_memory_used_bytes = $var;

        return $this;
    }

}

