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

namespace Google\Cloud\DataFusion\V1;

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

/**
 * Identifies Data Fusion accelerators for an instance.
 *
 * Generated from protobuf message <code>google.cloud.datafusion.v1.Accelerator</code>
 */
class Accelerator extends \Google\Protobuf\Internal\Message
{
    /**
     * The type of an accelator for a CDF instance.
     *
     * Generated from protobuf field <code>.google.cloud.datafusion.v1.Accelerator.AcceleratorType accelerator_type = 1;</code>
     */
    private $accelerator_type = 0;
    /**
     * The state of the accelerator
     *
     * Generated from protobuf field <code>.google.cloud.datafusion.v1.Accelerator.State state = 2;</code>
     */
    private $state = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $accelerator_type
     *           The type of an accelator for a CDF instance.
     *     @type int $state
     *           The state of the accelerator
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Datafusion\V1\Datafusion::initOnce();
        parent::__construct($data);
    }

    /**
     * The type of an accelator for a CDF instance.
     *
     * Generated from protobuf field <code>.google.cloud.datafusion.v1.Accelerator.AcceleratorType accelerator_type = 1;</code>
     * @return int
     */
    public function getAcceleratorType()
    {
        return $this->accelerator_type;
    }

    /**
     * The type of an accelator for a CDF instance.
     *
     * Generated from protobuf field <code>.google.cloud.datafusion.v1.Accelerator.AcceleratorType accelerator_type = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setAcceleratorType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\DataFusion\V1\Accelerator\AcceleratorType::class);
        $this->accelerator_type = $var;

        return $this;
    }

    /**
     * The state of the accelerator
     *
     * Generated from protobuf field <code>.google.cloud.datafusion.v1.Accelerator.State state = 2;</code>
     * @return int
     */
    public function getState()
    {
        return $this->state;
    }

    /**
     * The state of the accelerator
     *
     * Generated from protobuf field <code>.google.cloud.datafusion.v1.Accelerator.State state = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setState($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\DataFusion\V1\Accelerator\State::class);
        $this->state = $var;

        return $this;
    }

}

