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

namespace Google\Cloud\GSuiteAddOns\V1;

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

/**
 * Developer mode install status of a deployment
 *
 * Generated from protobuf message <code>google.cloud.gsuiteaddons.v1.InstallStatus</code>
 */
class InstallStatus extends \Google\Protobuf\Internal\Message
{
    /**
     * The canonical full resource name of the deployment install status.
     * Example:  `projects/123/deployments/my_deployment/installStatus`.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    private $name = '';
    /**
     * True if the deployment is installed for the user
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue installed = 2;</code>
     */
    private $installed = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           The canonical full resource name of the deployment install status.
     *           Example:  `projects/123/deployments/my_deployment/installStatus`.
     *     @type \Google\Protobuf\BoolValue $installed
     *           True if the deployment is installed for the user
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Gsuiteaddons\V1\Gsuiteaddons::initOnce();
        parent::__construct($data);
    }

    /**
     * The canonical full resource name of the deployment install status.
     * Example:  `projects/123/deployments/my_deployment/installStatus`.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * The canonical full resource name of the deployment install status.
     * Example:  `projects/123/deployments/my_deployment/installStatus`.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * True if the deployment is installed for the user
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue installed = 2;</code>
     * @return \Google\Protobuf\BoolValue|null
     */
    public function getInstalled()
    {
        return $this->installed;
    }

    public function hasInstalled()
    {
        return isset($this->installed);
    }

    public function clearInstalled()
    {
        unset($this->installed);
    }

    /**
     * Returns the unboxed value from <code>getInstalled()</code>

     * True if the deployment is installed for the user
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue installed = 2;</code>
     * @return bool|null
     */
    public function getInstalledValue()
    {
        return $this->readWrapperValue("installed");
    }

    /**
     * True if the deployment is installed for the user
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue installed = 2;</code>
     * @param \Google\Protobuf\BoolValue $var
     * @return $this
     */
    public function setInstalled($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class);
        $this->installed = $var;

        return $this;
    }

    /**
     * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object.

     * True if the deployment is installed for the user
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue installed = 2;</code>
     * @param bool|null $var
     * @return $this
     */
    public function setInstalledValue($var)
    {
        $this->writeWrapperValue("installed", $var);
        return $this;}

}

