<?php
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/ads/googleads/v23/common/audience_insights_attribute.proto

namespace Google\Ads\GoogleAds\V23\Common;

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

/**
 * An audience attribute, with metadata about it, returned in response to a
 * search.
 *
 * Generated from protobuf message <code>google.ads.googleads.v23.common.AudienceInsightsAttributeMetadata</code>
 */
class AudienceInsightsAttributeMetadata extends \Google\Protobuf\Internal\Message
{
    /**
     * The type of the attribute.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.enums.AudienceInsightsDimensionEnum.AudienceInsightsDimension dimension = 1;</code>
     */
    protected $dimension = 0;
    /**
     * The attribute itself.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.common.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 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 = 4;</code>
     */
    protected $display_info = '';
    /**
     * An estimate of the number of reachable YouTube users matching this
     * attribute in the requested location, or zero if that information is not
     * available for this attribute. This field is not populated in every
     * response.
     *
     * Generated from protobuf field <code>int64 potential_youtube_reach = 8;</code>
     */
    protected $potential_youtube_reach = 0;
    /**
     * The share of subscribers within this attribute, between and including 0 and
     * 1. This field is not populated in every response.
     *
     * Generated from protobuf field <code>double subscriber_share = 9;</code>
     */
    protected $subscriber_share = 0.0;
    /**
     * The share of viewers within this attribute, between and including 0 and
     * 1. This field is not populated in every response.
     *
     * Generated from protobuf field <code>double viewer_share = 13;</code>
     */
    protected $viewer_share = 0.0;
    protected $dimension_metadata;

    /**
     * Constructor.
     *
     * @param array $data {
     *                    Optional. Data for populating the Message object.
     *
     * @type int $dimension
     *           The type of the attribute.
     * @type \Google\Ads\GoogleAds\V23\Common\AudienceInsightsAttribute $attribute
     *           The attribute itself.
     * @type string $display_name
     *           The human-readable name of the attribute.
     * @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".
     * @type int|string $potential_youtube_reach
     *           An estimate of the number of reachable YouTube users matching this
     *           attribute in the requested location, or zero if that information is not
     *           available for this attribute. This field is not populated in every
     *           response.
     * @type float $subscriber_share
     *           The share of subscribers within this attribute, between and including 0 and
     *           1. This field is not populated in every response.
     * @type float $viewer_share
     *           The share of viewers within this attribute, between and including 0 and
     *           1. This field is not populated in every response.
     * @type \Google\Ads\GoogleAds\V23\Common\YouTubeChannelAttributeMetadata $youtube_channel_metadata
     *           Special metadata for a YouTube channel.
     * @type \Google\Ads\GoogleAds\V23\Common\YouTubeVideoAttributeMetadata $youtube_video_metadata
     *           Special metadata for a YouTube video.
     * @type \Google\Ads\GoogleAds\V23\Common\LineupAttributeMetadata $lineup_attribute_metadata
     *           Special metadata for a YouTube Lineup.
     * @type \Google\Ads\GoogleAds\V23\Common\LocationAttributeMetadata $location_attribute_metadata
     *           Special metadata for a Location.
     * @type \Google\Ads\GoogleAds\V23\Common\UserInterestAttributeMetadata $user_interest_attribute_metadata
     *           Special metadata for a User Interest.
     * @type \Google\Ads\GoogleAds\V23\Common\KnowledgeGraphAttributeMetadata $knowledge_graph_attribute_metadata
     *           Special metadata for a Knowledge Graph Entity.
     * @type \Google\Ads\GoogleAds\V23\Common\UserListAttributeMetadata $user_list_attribute_metadata
     *           Special metadata for a User List.
     * }
     */
    public function __construct($data = null)
    {
        \GPBMetadata\Google\Ads\GoogleAds\V23\Common\AudienceInsightsAttribute::initOnce();
        parent::__construct($data);
    }

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

        return $this;
    }

    /**
     * The attribute itself.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.common.AudienceInsightsAttribute attribute = 2;</code>
     *
     * @return \Google\Ads\GoogleAds\V23\Common\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.v23.common.AudienceInsightsAttribute attribute = 2;</code>
     *
     * @param  \Google\Ads\GoogleAds\V23\Common\AudienceInsightsAttribute $var
     * @return $this
     */
    public function setAttribute($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V23\Common\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 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 = 4;</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 = 4;</code>
     *
     * @param  string $var
     * @return $this
     */
    public function setDisplayInfo($var)
    {
        GPBUtil::checkString($var, true);
        $this->display_info = $var;

        return $this;
    }

    /**
     * An estimate of the number of reachable YouTube users matching this
     * attribute in the requested location, or zero if that information is not
     * available for this attribute. This field is not populated in every
     * response.
     *
     * Generated from protobuf field <code>int64 potential_youtube_reach = 8;</code>
     *
     * @return int|string
     */
    public function getPotentialYoutubeReach()
    {
        return $this->potential_youtube_reach;
    }

    /**
     * An estimate of the number of reachable YouTube users matching this
     * attribute in the requested location, or zero if that information is not
     * available for this attribute. This field is not populated in every
     * response.
     *
     * Generated from protobuf field <code>int64 potential_youtube_reach = 8;</code>
     *
     * @param  int|string $var
     * @return $this
     */
    public function setPotentialYoutubeReach($var)
    {
        GPBUtil::checkInt64($var);
        $this->potential_youtube_reach = $var;

        return $this;
    }

    /**
     * The share of subscribers within this attribute, between and including 0 and
     * 1. This field is not populated in every response.
     *
     * Generated from protobuf field <code>double subscriber_share = 9;</code>
     *
     * @return float
     */
    public function getSubscriberShare()
    {
        return $this->subscriber_share;
    }

    /**
     * The share of subscribers within this attribute, between and including 0 and
     * 1. This field is not populated in every response.
     *
     * Generated from protobuf field <code>double subscriber_share = 9;</code>
     *
     * @param  float $var
     * @return $this
     */
    public function setSubscriberShare($var)
    {
        GPBUtil::checkDouble($var);
        $this->subscriber_share = $var;

        return $this;
    }

    /**
     * The share of viewers within this attribute, between and including 0 and
     * 1. This field is not populated in every response.
     *
     * Generated from protobuf field <code>double viewer_share = 13;</code>
     *
     * @return float
     */
    public function getViewerShare()
    {
        return $this->viewer_share;
    }

    /**
     * The share of viewers within this attribute, between and including 0 and
     * 1. This field is not populated in every response.
     *
     * Generated from protobuf field <code>double viewer_share = 13;</code>
     *
     * @param  float $var
     * @return $this
     */
    public function setViewerShare($var)
    {
        GPBUtil::checkDouble($var);
        $this->viewer_share = $var;

        return $this;
    }

    /**
     * Special metadata for a YouTube channel.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.common.YouTubeChannelAttributeMetadata youtube_channel_metadata = 5;</code>
     *
     * @return \Google\Ads\GoogleAds\V23\Common\YouTubeChannelAttributeMetadata|null
     */
    public function getYoutubeChannelMetadata()
    {
        return $this->readOneof(5);
    }

    public function hasYoutubeChannelMetadata()
    {
        return $this->hasOneof(5);
    }

    /**
     * Special metadata for a YouTube channel.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.common.YouTubeChannelAttributeMetadata youtube_channel_metadata = 5;</code>
     *
     * @param  \Google\Ads\GoogleAds\V23\Common\YouTubeChannelAttributeMetadata $var
     * @return $this
     */
    public function setYoutubeChannelMetadata($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V23\Common\YouTubeChannelAttributeMetadata::class);
        $this->writeOneof(5, $var);

        return $this;
    }

    /**
     * Special metadata for a YouTube video.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.common.YouTubeVideoAttributeMetadata youtube_video_metadata = 10;</code>
     *
     * @return \Google\Ads\GoogleAds\V23\Common\YouTubeVideoAttributeMetadata|null
     */
    public function getYoutubeVideoMetadata()
    {
        return $this->readOneof(10);
    }

    public function hasYoutubeVideoMetadata()
    {
        return $this->hasOneof(10);
    }

    /**
     * Special metadata for a YouTube video.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.common.YouTubeVideoAttributeMetadata youtube_video_metadata = 10;</code>
     *
     * @param  \Google\Ads\GoogleAds\V23\Common\YouTubeVideoAttributeMetadata $var
     * @return $this
     */
    public function setYoutubeVideoMetadata($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V23\Common\YouTubeVideoAttributeMetadata::class);
        $this->writeOneof(10, $var);

        return $this;
    }

    /**
     * Special metadata for a YouTube Lineup.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.common.LineupAttributeMetadata lineup_attribute_metadata = 14;</code>
     *
     * @return \Google\Ads\GoogleAds\V23\Common\LineupAttributeMetadata|null
     */
    public function getLineupAttributeMetadata()
    {
        return $this->readOneof(14);
    }

    public function hasLineupAttributeMetadata()
    {
        return $this->hasOneof(14);
    }

    /**
     * Special metadata for a YouTube Lineup.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.common.LineupAttributeMetadata lineup_attribute_metadata = 14;</code>
     *
     * @param  \Google\Ads\GoogleAds\V23\Common\LineupAttributeMetadata $var
     * @return $this
     */
    public function setLineupAttributeMetadata($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V23\Common\LineupAttributeMetadata::class);
        $this->writeOneof(14, $var);

        return $this;
    }

    /**
     * Special metadata for a Location.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.common.LocationAttributeMetadata location_attribute_metadata = 7;</code>
     *
     * @return \Google\Ads\GoogleAds\V23\Common\LocationAttributeMetadata|null
     */
    public function getLocationAttributeMetadata()
    {
        return $this->readOneof(7);
    }

    public function hasLocationAttributeMetadata()
    {
        return $this->hasOneof(7);
    }

    /**
     * Special metadata for a Location.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.common.LocationAttributeMetadata location_attribute_metadata = 7;</code>
     *
     * @param  \Google\Ads\GoogleAds\V23\Common\LocationAttributeMetadata $var
     * @return $this
     */
    public function setLocationAttributeMetadata($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V23\Common\LocationAttributeMetadata::class);
        $this->writeOneof(7, $var);

        return $this;
    }

    /**
     * Special metadata for a User Interest.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.common.UserInterestAttributeMetadata user_interest_attribute_metadata = 11;</code>
     *
     * @return \Google\Ads\GoogleAds\V23\Common\UserInterestAttributeMetadata|null
     */
    public function getUserInterestAttributeMetadata()
    {
        return $this->readOneof(11);
    }

    public function hasUserInterestAttributeMetadata()
    {
        return $this->hasOneof(11);
    }

    /**
     * Special metadata for a User Interest.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.common.UserInterestAttributeMetadata user_interest_attribute_metadata = 11;</code>
     *
     * @param  \Google\Ads\GoogleAds\V23\Common\UserInterestAttributeMetadata $var
     * @return $this
     */
    public function setUserInterestAttributeMetadata($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V23\Common\UserInterestAttributeMetadata::class);
        $this->writeOneof(11, $var);

        return $this;
    }

    /**
     * Special metadata for a Knowledge Graph Entity.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.common.KnowledgeGraphAttributeMetadata knowledge_graph_attribute_metadata = 12;</code>
     *
     * @return \Google\Ads\GoogleAds\V23\Common\KnowledgeGraphAttributeMetadata|null
     */
    public function getKnowledgeGraphAttributeMetadata()
    {
        return $this->readOneof(12);
    }

    public function hasKnowledgeGraphAttributeMetadata()
    {
        return $this->hasOneof(12);
    }

    /**
     * Special metadata for a Knowledge Graph Entity.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.common.KnowledgeGraphAttributeMetadata knowledge_graph_attribute_metadata = 12;</code>
     *
     * @param  \Google\Ads\GoogleAds\V23\Common\KnowledgeGraphAttributeMetadata $var
     * @return $this
     */
    public function setKnowledgeGraphAttributeMetadata($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V23\Common\KnowledgeGraphAttributeMetadata::class);
        $this->writeOneof(12, $var);

        return $this;
    }

    /**
     * Special metadata for a User List.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.common.UserListAttributeMetadata user_list_attribute_metadata = 15;</code>
     *
     * @return \Google\Ads\GoogleAds\V23\Common\UserListAttributeMetadata|null
     */
    public function getUserListAttributeMetadata()
    {
        return $this->readOneof(15);
    }

    public function hasUserListAttributeMetadata()
    {
        return $this->hasOneof(15);
    }

    /**
     * Special metadata for a User List.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.common.UserListAttributeMetadata user_list_attribute_metadata = 15;</code>
     *
     * @param  \Google\Ads\GoogleAds\V23\Common\UserListAttributeMetadata $var
     * @return $this
     */
    public function setUserListAttributeMetadata($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V23\Common\UserListAttributeMetadata::class);
        $this->writeOneof(15, $var);

        return $this;
    }

    /**
     * @return string
     */
    public function getDimensionMetadata()
    {
        return $this->whichOneof("dimension_metadata");
    }

}

