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

namespace Google\Cloud\Notebooks\V1beta1\Instance;

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

/**
 * Definition of a hardware accelerator. Note that not all combinations
 * of `type` and `core_count` are valid. Check [GPUs on Compute
 * Engine](https://cloud.google.com/compute/docs/gpus/#gpus-list) to find a
 * valid combination. TPUs are not supported.
 *
 * Generated from protobuf message <code>google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig</code>
 */
class AcceleratorConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Type of this accelerator.
     *
     * Generated from protobuf field <code>.google.cloud.notebooks.v1beta1.Instance.AcceleratorType type = 1;</code>
     */
    private $type = 0;
    /**
     * Count of cores of this accelerator.
     *
     * Generated from protobuf field <code>int64 core_count = 2;</code>
     */
    private $core_count = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $type
     *           Type of this accelerator.
     *     @type int|string $core_count
     *           Count of cores of this accelerator.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Notebooks\V1Beta1\Instance::initOnce();
        parent::__construct($data);
    }

    /**
     * Type of this accelerator.
     *
     * Generated from protobuf field <code>.google.cloud.notebooks.v1beta1.Instance.AcceleratorType type = 1;</code>
     * @return int
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * Type of this accelerator.
     *
     * Generated from protobuf field <code>.google.cloud.notebooks.v1beta1.Instance.AcceleratorType type = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1beta1\Instance\AcceleratorType::class);
        $this->type = $var;

        return $this;
    }

    /**
     * Count of cores of this accelerator.
     *
     * Generated from protobuf field <code>int64 core_count = 2;</code>
     * @return int|string
     */
    public function getCoreCount()
    {
        return $this->core_count;
    }

    /**
     * Count of cores of this accelerator.
     *
     * Generated from protobuf field <code>int64 core_count = 2;</code>
     * @param int|string $var
     * @return $this
     */
    public function setCoreCount($var)
    {
        GPBUtil::checkInt64($var);
        $this->core_count = $var;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AcceleratorConfig::class, \Google\Cloud\Notebooks\V1beta1\Instance_AcceleratorConfig::class);

