<?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;

/**
 * A guest attributes namespace/key/value entry.
 *
 * Generated from protobuf message <code>google.cloud.compute.v1.GuestAttributesEntry</code>
 */
class GuestAttributesEntry extends \Google\Protobuf\Internal\Message
{
    /**
     * Key for the guest attribute entry.
     *
     * Generated from protobuf field <code>optional string key = 106079;</code>
     */
    private $key = null;
    /**
     * Namespace for the guest attribute entry.
     *
     * Generated from protobuf field <code>optional string namespace = 178476379;</code>
     */
    private $namespace = null;
    /**
     * Value for the guest attribute entry.
     *
     * Generated from protobuf field <code>optional string value = 111972721;</code>
     */
    private $value = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $key
     *           Key for the guest attribute entry.
     *     @type string $namespace
     *           Namespace for the guest attribute entry.
     *     @type string $value
     *           Value for the guest attribute entry.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * Key for the guest attribute entry.
     *
     * Generated from protobuf field <code>optional string key = 106079;</code>
     * @return string
     */
    public function getKey()
    {
        return isset($this->key) ? $this->key : '';
    }

    public function hasKey()
    {
        return isset($this->key);
    }

    public function clearKey()
    {
        unset($this->key);
    }

    /**
     * Key for the guest attribute entry.
     *
     * Generated from protobuf field <code>optional string key = 106079;</code>
     * @param string $var
     * @return $this
     */
    public function setKey($var)
    {
        GPBUtil::checkString($var, True);
        $this->key = $var;

        return $this;
    }

    /**
     * Namespace for the guest attribute entry.
     *
     * Generated from protobuf field <code>optional string namespace = 178476379;</code>
     * @return string
     */
    public function getNamespace()
    {
        return isset($this->namespace) ? $this->namespace : '';
    }

    public function hasNamespace()
    {
        return isset($this->namespace);
    }

    public function clearNamespace()
    {
        unset($this->namespace);
    }

    /**
     * Namespace for the guest attribute entry.
     *
     * Generated from protobuf field <code>optional string namespace = 178476379;</code>
     * @param string $var
     * @return $this
     */
    public function setNamespace($var)
    {
        GPBUtil::checkString($var, True);
        $this->namespace = $var;

        return $this;
    }

    /**
     * Value for the guest attribute entry.
     *
     * Generated from protobuf field <code>optional string value = 111972721;</code>
     * @return string
     */
    public function getValue()
    {
        return isset($this->value) ? $this->value : '';
    }

    public function hasValue()
    {
        return isset($this->value);
    }

    public function clearValue()
    {
        unset($this->value);
    }

    /**
     * Value for the guest attribute entry.
     *
     * Generated from protobuf field <code>optional string value = 111972721;</code>
     * @param string $var
     * @return $this
     */
    public function setValue($var)
    {
        GPBUtil::checkString($var, True);
        $this->value = $var;

        return $this;
    }

}

