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

namespace Google\Cloud\AIPlatform\V1;

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

/**
 * Statistics information about resource consumption.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.ResourcesConsumed</code>
 */
class ResourcesConsumed extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. The number of replica hours used. Note that many replicas may
     * run in parallel, and additionally any given work may be queued for some
     * time. Therefore this value is not strictly related to wall time.
     *
     * Generated from protobuf field <code>double replica_hours = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $replica_hours = 0.0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type float $replica_hours
     *           Output only. The number of replica hours used. Note that many replicas may
     *           run in parallel, and additionally any given work may be queued for some
     *           time. Therefore this value is not strictly related to wall time.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\MachineResources::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. The number of replica hours used. Note that many replicas may
     * run in parallel, and additionally any given work may be queued for some
     * time. Therefore this value is not strictly related to wall time.
     *
     * Generated from protobuf field <code>double replica_hours = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return float
     */
    public function getReplicaHours()
    {
        return $this->replica_hours;
    }

    /**
     * Output only. The number of replica hours used. Note that many replicas may
     * run in parallel, and additionally any given work may be queued for some
     * time. Therefore this value is not strictly related to wall time.
     *
     * Generated from protobuf field <code>double replica_hours = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param float $var
     * @return $this
     */
    public function setReplicaHours($var)
    {
        GPBUtil::checkDouble($var);
        $this->replica_hours = $var;

        return $this;
    }

}

