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

/**
 * MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the load balancer.
 *
 * Generated from protobuf message <code>google.cloud.compute.v1.MetadataFilterLabelMatch</code>
 */
class MetadataFilterLabelMatch extends \Google\Protobuf\Internal\Message
{
    /**
     * Name of metadata label. The name can have a maximum length of 1024 characters and must be at least 1 character long.
     *
     * Generated from protobuf field <code>optional string name = 3373707;</code>
     */
    private $name = null;
    /**
     * The value of the label must match the specified value. value can have a maximum length of 1024 characters.
     *
     * 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 $name
     *           Name of metadata label. The name can have a maximum length of 1024 characters and must be at least 1 character long.
     *     @type string $value
     *           The value of the label must match the specified value. value can have a maximum length of 1024 characters.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * Name of metadata label. The name can have a maximum length of 1024 characters and must be at least 1 character long.
     *
     * Generated from protobuf field <code>optional string name = 3373707;</code>
     * @return string
     */
    public function getName()
    {
        return isset($this->name) ? $this->name : '';
    }

    public function hasName()
    {
        return isset($this->name);
    }

    public function clearName()
    {
        unset($this->name);
    }

    /**
     * Name of metadata label. The name can have a maximum length of 1024 characters and must be at least 1 character long.
     *
     * Generated from protobuf field <code>optional string name = 3373707;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * The value of the label must match the specified value. value can have a maximum length of 1024 characters.
     *
     * 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);
    }

    /**
     * The value of the label must match the specified value. value can have a maximum length of 1024 characters.
     *
     * 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;
    }

}

