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

namespace Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\GuidedSearchResult;

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

/**
 * Useful attribute for search result refinements.
 *
 * Generated from protobuf message <code>google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute</code>
 */
class RefinementAttribute extends \Google\Protobuf\Internal\Message
{
    /**
     * Attribute key used to refine the results e.g. 'movie_type'.
     *
     * Generated from protobuf field <code>string attribute_key = 1;</code>
     */
    protected $attribute_key = '';
    /**
     * Attribute value used to refine the results e.g. 'drama'.
     *
     * Generated from protobuf field <code>string attribute_value = 2;</code>
     */
    protected $attribute_value = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $attribute_key
     *           Attribute key used to refine the results e.g. 'movie_type'.
     *     @type string $attribute_value
     *           Attribute value used to refine the results e.g. 'drama'.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SearchService::initOnce();
        parent::__construct($data);
    }

    /**
     * Attribute key used to refine the results e.g. 'movie_type'.
     *
     * Generated from protobuf field <code>string attribute_key = 1;</code>
     * @return string
     */
    public function getAttributeKey()
    {
        return $this->attribute_key;
    }

    /**
     * Attribute key used to refine the results e.g. 'movie_type'.
     *
     * Generated from protobuf field <code>string attribute_key = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setAttributeKey($var)
    {
        GPBUtil::checkString($var, True);
        $this->attribute_key = $var;

        return $this;
    }

    /**
     * Attribute value used to refine the results e.g. 'drama'.
     *
     * Generated from protobuf field <code>string attribute_value = 2;</code>
     * @return string
     */
    public function getAttributeValue()
    {
        return $this->attribute_value;
    }

    /**
     * Attribute value used to refine the results e.g. 'drama'.
     *
     * Generated from protobuf field <code>string attribute_value = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setAttributeValue($var)
    {
        GPBUtil::checkString($var, True);
        $this->attribute_value = $var;

        return $this;
    }

}


