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

namespace Google\Cloud\Compute\V1;

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

/**
 *
 * Generated from protobuf message <code>google.cloud.compute.v1.ManagedInstanceLastAttempt</code>
 */
class ManagedInstanceLastAttempt extends \Google\Protobuf\Internal\Message
{
    /**
     * [Output Only] Encountered errors during the last attempt to create or delete the instance.
     *
     * Generated from protobuf field <code>optional .google.cloud.compute.v1.Errors errors = 315977579;</code>
     */
    private $errors = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Compute\V1\Errors $errors
     *           [Output Only] Encountered errors during the last attempt to create or delete the instance.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * [Output Only] Encountered errors during the last attempt to create or delete the instance.
     *
     * Generated from protobuf field <code>optional .google.cloud.compute.v1.Errors errors = 315977579;</code>
     * @return \Google\Cloud\Compute\V1\Errors|null
     */
    public function getErrors()
    {
        return $this->errors;
    }

    public function hasErrors()
    {
        return isset($this->errors);
    }

    public function clearErrors()
    {
        unset($this->errors);
    }

    /**
     * [Output Only] Encountered errors during the last attempt to create or delete the instance.
     *
     * Generated from protobuf field <code>optional .google.cloud.compute.v1.Errors errors = 315977579;</code>
     * @param \Google\Cloud\Compute\V1\Errors $var
     * @return $this
     */
    public function setErrors($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\Errors::class);
        $this->errors = $var;

        return $this;
    }

}

