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

namespace Google\Ads\GoogleAds\V11\Services;

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

/**
 * An audience attribute, with metadata about it, returned in response to a
 * search.
 *
 * Generated from protobuf message <code>google.ads.googleads.v11.services.AudienceInsightsAttributeMetadata</code>
 */
class AudienceInsightsAttributeMetadata extends \Google\Protobuf\Internal\Message
{
    /**
     * The type of the attribute.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v11.enums.AudienceInsightsDimensionEnum.AudienceInsightsDimension dimension = 1;</code>
     */
    protected $dimension = 0;
    /**
     * The attribute itself.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v11.services.AudienceInsightsAttribute attribute = 2;</code>
     */
    protected $attribute = null;
    /**
     * The human-readable name of the attribute.
     *
     * Generated from protobuf field <code>string display_name = 3;</code>
     */
    protected $display_name = '';
    /**
     * A relevance score for this attribute, between 0 and 1.
     *
     * Generated from protobuf field <code>double score = 4;</code>
     */
    protected $score = 0.0;
    /**
     * A string that supplements the display_name to identify the attribute.
     * If the dimension is TOPIC, this is a brief description of the
     * Knowledge Graph entity, such as "American singer-songwriter".
     * If the dimension is CATEGORY, this is the complete path to the category in
     * The Product & Service taxonomy, for example
     * "/Apparel/Clothing/Outerwear".
     *
     * Generated from protobuf field <code>string display_info = 5;</code>
     */
    protected $display_info = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $dimension
     *           The type of the attribute.
     *     @type \Google\Ads\GoogleAds\V11\Services\AudienceInsightsAttribute $attribute
     *           The attribute itself.
     *     @type string $display_name
     *           The human-readable name of the attribute.
     *     @type float $score
     *           A relevance score for this attribute, between 0 and 1.
     *     @type string $display_info
     *           A string that supplements the display_name to identify the attribute.
     *           If the dimension is TOPIC, this is a brief description of the
     *           Knowledge Graph entity, such as "American singer-songwriter".
     *           If the dimension is CATEGORY, this is the complete path to the category in
     *           The Product & Service taxonomy, for example
     *           "/Apparel/Clothing/Outerwear".
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V11\Services\AudienceInsightsService::initOnce();
        parent::__construct($data);
    }

    /**
     * The type of the attribute.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v11.enums.AudienceInsightsDimensionEnum.AudienceInsightsDimension dimension = 1;</code>
     * @return int
     */
    public function getDimension()
    {
        return $this->dimension;
    }

    /**
     * The type of the attribute.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v11.enums.AudienceInsightsDimensionEnum.AudienceInsightsDimension dimension = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setDimension($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V11\Enums\AudienceInsightsDimensionEnum\AudienceInsightsDimension::class);
        $this->dimension = $var;

        return $this;
    }

    /**
     * The attribute itself.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v11.services.AudienceInsightsAttribute attribute = 2;</code>
     * @return \Google\Ads\GoogleAds\V11\Services\AudienceInsightsAttribute|null
     */
    public function getAttribute()
    {
        return $this->attribute;
    }

    public function hasAttribute()
    {
        return isset($this->attribute);
    }

    public function clearAttribute()
    {
        unset($this->attribute);
    }

    /**
     * The attribute itself.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v11.services.AudienceInsightsAttribute attribute = 2;</code>
     * @param \Google\Ads\GoogleAds\V11\Services\AudienceInsightsAttribute $var
     * @return $this
     */
    public function setAttribute($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V11\Services\AudienceInsightsAttribute::class);
        $this->attribute = $var;

        return $this;
    }

    /**
     * The human-readable name of the attribute.
     *
     * Generated from protobuf field <code>string display_name = 3;</code>
     * @return string
     */
    public function getDisplayName()
    {
        return $this->display_name;
    }

    /**
     * The human-readable name of the attribute.
     *
     * Generated from protobuf field <code>string display_name = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setDisplayName($var)
    {
        GPBUtil::checkString($var, True);
        $this->display_name = $var;

        return $this;
    }

    /**
     * A relevance score for this attribute, between 0 and 1.
     *
     * Generated from protobuf field <code>double score = 4;</code>
     * @return float
     */
    public function getScore()
    {
        return $this->score;
    }

    /**
     * A relevance score for this attribute, between 0 and 1.
     *
     * Generated from protobuf field <code>double score = 4;</code>
     * @param float $var
     * @return $this
     */
    public function setScore($var)
    {
        GPBUtil::checkDouble($var);
        $this->score = $var;

        return $this;
    }

    /**
     * A string that supplements the display_name to identify the attribute.
     * If the dimension is TOPIC, this is a brief description of the
     * Knowledge Graph entity, such as "American singer-songwriter".
     * If the dimension is CATEGORY, this is the complete path to the category in
     * The Product & Service taxonomy, for example
     * "/Apparel/Clothing/Outerwear".
     *
     * Generated from protobuf field <code>string display_info = 5;</code>
     * @return string
     */
    public function getDisplayInfo()
    {
        return $this->display_info;
    }

    /**
     * A string that supplements the display_name to identify the attribute.
     * If the dimension is TOPIC, this is a brief description of the
     * Knowledge Graph entity, such as "American singer-songwriter".
     * If the dimension is CATEGORY, this is the complete path to the category in
     * The Product & Service taxonomy, for example
     * "/Apparel/Clothing/Outerwear".
     *
     * Generated from protobuf field <code>string display_info = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setDisplayInfo($var)
    {
        GPBUtil::checkString($var, True);
        $this->display_info = $var;

        return $this;
    }

}

