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

namespace Google\Cloud\Batch\V1\JobStatus;

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

/**
 * VM instance status.
 *
 * Generated from protobuf message <code>google.cloud.batch.v1.JobStatus.InstanceStatus</code>
 */
class InstanceStatus extends \Google\Protobuf\Internal\Message
{
    /**
     * The Compute Engine machine type.
     *
     * Generated from protobuf field <code>string machine_type = 1;</code>
     */
    private $machine_type = '';
    /**
     * The VM instance provisioning model.
     *
     * Generated from protobuf field <code>.google.cloud.batch.v1.AllocationPolicy.ProvisioningModel provisioning_model = 2;</code>
     */
    private $provisioning_model = 0;
    /**
     * The max number of tasks can be assigned to this instance type.
     *
     * Generated from protobuf field <code>int64 task_pack = 3;</code>
     */
    private $task_pack = 0;
    /**
     * The VM boot disk.
     *
     * Generated from protobuf field <code>.google.cloud.batch.v1.AllocationPolicy.Disk boot_disk = 4;</code>
     */
    private $boot_disk = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $machine_type
     *           The Compute Engine machine type.
     *     @type int $provisioning_model
     *           The VM instance provisioning model.
     *     @type int|string $task_pack
     *           The max number of tasks can be assigned to this instance type.
     *     @type \Google\Cloud\Batch\V1\AllocationPolicy\Disk $boot_disk
     *           The VM boot disk.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce();
        parent::__construct($data);
    }

    /**
     * The Compute Engine machine type.
     *
     * Generated from protobuf field <code>string machine_type = 1;</code>
     * @return string
     */
    public function getMachineType()
    {
        return $this->machine_type;
    }

    /**
     * The Compute Engine machine type.
     *
     * Generated from protobuf field <code>string machine_type = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setMachineType($var)
    {
        GPBUtil::checkString($var, True);
        $this->machine_type = $var;

        return $this;
    }

    /**
     * The VM instance provisioning model.
     *
     * Generated from protobuf field <code>.google.cloud.batch.v1.AllocationPolicy.ProvisioningModel provisioning_model = 2;</code>
     * @return int
     */
    public function getProvisioningModel()
    {
        return $this->provisioning_model;
    }

    /**
     * The VM instance provisioning model.
     *
     * Generated from protobuf field <code>.google.cloud.batch.v1.AllocationPolicy.ProvisioningModel provisioning_model = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setProvisioningModel($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\AllocationPolicy\ProvisioningModel::class);
        $this->provisioning_model = $var;

        return $this;
    }

    /**
     * The max number of tasks can be assigned to this instance type.
     *
     * Generated from protobuf field <code>int64 task_pack = 3;</code>
     * @return int|string
     */
    public function getTaskPack()
    {
        return $this->task_pack;
    }

    /**
     * The max number of tasks can be assigned to this instance type.
     *
     * Generated from protobuf field <code>int64 task_pack = 3;</code>
     * @param int|string $var
     * @return $this
     */
    public function setTaskPack($var)
    {
        GPBUtil::checkInt64($var);
        $this->task_pack = $var;

        return $this;
    }

    /**
     * The VM boot disk.
     *
     * Generated from protobuf field <code>.google.cloud.batch.v1.AllocationPolicy.Disk boot_disk = 4;</code>
     * @return \Google\Cloud\Batch\V1\AllocationPolicy\Disk|null
     */
    public function getBootDisk()
    {
        return $this->boot_disk;
    }

    public function hasBootDisk()
    {
        return isset($this->boot_disk);
    }

    public function clearBootDisk()
    {
        unset($this->boot_disk);
    }

    /**
     * The VM boot disk.
     *
     * Generated from protobuf field <code>.google.cloud.batch.v1.AllocationPolicy.Disk boot_disk = 4;</code>
     * @param \Google\Cloud\Batch\V1\AllocationPolicy\Disk $var
     * @return $this
     */
    public function setBootDisk($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\AllocationPolicy\Disk::class);
        $this->boot_disk = $var;

        return $this;
    }

}


