<?php
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/ads/googleads/v24/services/google_ads_service.proto

namespace Google\Ads\GoogleAds\V24\Services\MetricAttributes;

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

/**
 * The attribute of the metric in key value pair format.
 *
 * Generated from protobuf message <code>google.ads.googleads.v24.services.MetricAttributes.Attribute</code>
 */
class Attribute extends \Google\Protobuf\Internal\Message
{
    /**
     * The key of the attribute.
     *
     * Generated from protobuf field <code>string key = 1;</code>
     */
    protected $key = '';
    /**
     * The value of the attribute.
     *
     * Generated from protobuf field <code>string value = 2;</code>
     */
    protected $value = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *                    Optional. Data for populating the Message object.
     *
     * @type string $key
     *           The key of the attribute.
     * @type string $value
     *           The value of the attribute.
     * }
     */
    public function __construct($data = null)
    {
        \GPBMetadata\Google\Ads\GoogleAds\V24\Services\GoogleAdsService::initOnce();
        parent::__construct($data);
    }

    /**
     * The key of the attribute.
     *
     * Generated from protobuf field <code>string key = 1;</code>
     *
     * @return string
     */
    public function getKey()
    {
        return $this->key;
    }

    /**
     * The key of the attribute.
     *
     * Generated from protobuf field <code>string key = 1;</code>
     *
     * @param  string $var
     * @return $this
     */
    public function setKey($var)
    {
        GPBUtil::checkString($var, true);
        $this->key = $var;

        return $this;
    }

    /**
     * The value of the attribute.
     *
     * Generated from protobuf field <code>string value = 2;</code>
     *
     * @return string
     */
    public function getValue()
    {
        return $this->value;
    }

    /**
     * The value of the attribute.
     *
     * Generated from protobuf field <code>string value = 2;</code>
     *
     * @param  string $var
     * @return $this
     */
    public function setValue($var)
    {
        GPBUtil::checkString($var, true);
        $this->value = $var;

        return $this;
    }

}

