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

namespace Google\Cloud\Tpu\V1;

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

/**
 * Sets the scheduling options for this node.
 *
 * Generated from protobuf message <code>google.cloud.tpu.v1.SchedulingConfig</code>
 */
class SchedulingConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Defines whether the node is preemptible.
     *
     * Generated from protobuf field <code>bool preemptible = 1;</code>
     */
    private $preemptible = false;
    /**
     * Whether the node is created under a reservation.
     *
     * Generated from protobuf field <code>bool reserved = 2;</code>
     */
    private $reserved = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type bool $preemptible
     *           Defines whether the node is preemptible.
     *     @type bool $reserved
     *           Whether the node is created under a reservation.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Tpu\V1\CloudTpu::initOnce();
        parent::__construct($data);
    }

    /**
     * Defines whether the node is preemptible.
     *
     * Generated from protobuf field <code>bool preemptible = 1;</code>
     * @return bool
     */
    public function getPreemptible()
    {
        return $this->preemptible;
    }

    /**
     * Defines whether the node is preemptible.
     *
     * Generated from protobuf field <code>bool preemptible = 1;</code>
     * @param bool $var
     * @return $this
     */
    public function setPreemptible($var)
    {
        GPBUtil::checkBool($var);
        $this->preemptible = $var;

        return $this;
    }

    /**
     * Whether the node is created under a reservation.
     *
     * Generated from protobuf field <code>bool reserved = 2;</code>
     * @return bool
     */
    public function getReserved()
    {
        return $this->reserved;
    }

    /**
     * Whether the node is created under a reservation.
     *
     * Generated from protobuf field <code>bool reserved = 2;</code>
     * @param bool $var
     * @return $this
     */
    public function setReserved($var)
    {
        GPBUtil::checkBool($var);
        $this->reserved = $var;

        return $this;
    }

}

