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

namespace Google\Cloud\Audit\BigQueryAuditMetadata\JobStats;

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

/**
 * Job resource usage breakdown by reservation.
 *
 * Generated from protobuf message <code>google.cloud.audit.BigQueryAuditMetadata.JobStats.ReservationResourceUsage</code>
 */
class ReservationResourceUsage extends \Google\Protobuf\Internal\Message
{
    /**
     * Reservation name or "unreserved" for on-demand resources usage.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    protected $name = '';
    /**
     * Total slot milliseconds used by the reservation for a particular job.
     *
     * Generated from protobuf field <code>int64 slot_ms = 2;</code>
     */
    protected $slot_ms = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Reservation name or "unreserved" for on-demand resources usage.
     *     @type int|string $slot_ms
     *           Total slot milliseconds used by the reservation for a particular job.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Audit\BigqueryAuditMetadata::initOnce();
        parent::__construct($data);
    }

    /**
     * Reservation name or "unreserved" for on-demand resources usage.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Reservation name or "unreserved" for on-demand resources usage.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Total slot milliseconds used by the reservation for a particular job.
     *
     * Generated from protobuf field <code>int64 slot_ms = 2;</code>
     * @return int|string
     */
    public function getSlotMs()
    {
        return $this->slot_ms;
    }

    /**
     * Total slot milliseconds used by the reservation for a particular job.
     *
     * Generated from protobuf field <code>int64 slot_ms = 2;</code>
     * @param int|string $var
     * @return $this
     */
    public function setSlotMs($var)
    {
        GPBUtil::checkInt64($var);
        $this->slot_ms = $var;

        return $this;
    }

}


