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

namespace Google\Ads\GoogleAds\V24\Services;

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

/**
 * A suggested targetable audience relevant to the requested audience.
 *
 * Generated from protobuf message <code>google.ads.googleads.v24.services.TargetingSuggestionMetrics</code>
 */
class TargetingSuggestionMetrics extends \Google\Protobuf\Internal\Message
{
    /**
     * Suggested location targeting.  These attributes all have dimension
     * GEO_TARGET_COUNTRY or SUB_COUNTRY_LOCATION
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v24.common.AudienceInsightsAttributeMetadata locations = 9;</code>
     */
    private $locations;
    /**
     * Suggested age targeting; may be empty indicating no age targeting.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v24.common.AgeRangeInfo age_ranges = 2;</code>
     */
    private $age_ranges;
    /**
     * Suggested gender targeting.  If present, this attribute has dimension
     * GENDER.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v24.common.GenderInfo gender = 3;</code>
     */
    protected $gender = null;
    /**
     * A Parental Status value (parent, or not a parent).
     *
     * Generated from protobuf field <code>.google.ads.googleads.v24.common.ParentalStatusInfo parental_status = 8;</code>
     */
    protected $parental_status = null;
    /**
     * List of user interest attributes with metadata defining the audience. The
     * combination has a logical AND-of-ORs structure: The attributes within each
     * AudienceInsightsAttributeMetadataGroup are ORed, and the groups themselves
     * are ANDed.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v24.common.AudienceInsightsAttributeMetadataGroup user_interests = 11;</code>
     */
    private $user_interests;
    /**
     * The fraction (from 0 to 1 inclusive) of the requested audience that can be
     * reached using the suggested targeting.
     *
     * Generated from protobuf field <code>double coverage = 5;</code>
     */
    protected $coverage = 0.0;
    /**
     * The ratio of coverage to the coverage of the baseline audience or zero if
     * this ratio is undefined or is not meaningful.
     *
     * Generated from protobuf field <code>double index = 6;</code>
     */
    protected $index = 0.0;
    /**
     * The approximate estimated number of people that can be reached on YouTube
     * using this targeting.
     *
     * Generated from protobuf field <code>int64 potential_youtube_reach = 7;</code>
     */
    protected $potential_youtube_reach = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *                    Optional. Data for populating the Message object.
     *
     * @type \Google\Ads\GoogleAds\V24\Common\AudienceInsightsAttributeMetadata[] $locations
     *           Suggested location targeting.  These attributes all have dimension
     *           GEO_TARGET_COUNTRY or SUB_COUNTRY_LOCATION
     * @type \Google\Ads\GoogleAds\V24\Common\AgeRangeInfo[] $age_ranges
     *           Suggested age targeting; may be empty indicating no age targeting.
     * @type \Google\Ads\GoogleAds\V24\Common\GenderInfo $gender
     *           Suggested gender targeting.  If present, this attribute has dimension
     *           GENDER.
     * @type \Google\Ads\GoogleAds\V24\Common\ParentalStatusInfo $parental_status
     *           A Parental Status value (parent, or not a parent).
     * @type \Google\Ads\GoogleAds\V24\Common\AudienceInsightsAttributeMetadataGroup[] $user_interests
     *           List of user interest attributes with metadata defining the audience. The
     *           combination has a logical AND-of-ORs structure: The attributes within each
     *           AudienceInsightsAttributeMetadataGroup are ORed, and the groups themselves
     *           are ANDed.
     * @type float $coverage
     *           The fraction (from 0 to 1 inclusive) of the requested audience that can be
     *           reached using the suggested targeting.
     * @type float $index
     *           The ratio of coverage to the coverage of the baseline audience or zero if
     *           this ratio is undefined or is not meaningful.
     * @type int|string $potential_youtube_reach
     *           The approximate estimated number of people that can be reached on YouTube
     *           using this targeting.
     * }
     */
    public function __construct($data = null)
    {
        \GPBMetadata\Google\Ads\GoogleAds\V24\Services\AudienceInsightsService::initOnce();
        parent::__construct($data);
    }

    /**
     * Suggested location targeting.  These attributes all have dimension
     * GEO_TARGET_COUNTRY or SUB_COUNTRY_LOCATION
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v24.common.AudienceInsightsAttributeMetadata locations = 9;</code>
     *
     * @return RepeatedField<\Google\Ads\GoogleAds\V24\Common\AudienceInsightsAttributeMetadata>
     */
    public function getLocations()
    {
        return $this->locations;
    }

    /**
     * Suggested location targeting.  These attributes all have dimension
     * GEO_TARGET_COUNTRY or SUB_COUNTRY_LOCATION
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v24.common.AudienceInsightsAttributeMetadata locations = 9;</code>
     *
     * @param  \Google\Ads\GoogleAds\V24\Common\AudienceInsightsAttributeMetadata[] $var
     * @return $this
     */
    public function setLocations($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V24\Common\AudienceInsightsAttributeMetadata::class);
        $this->locations = $arr;

        return $this;
    }

    /**
     * Suggested age targeting; may be empty indicating no age targeting.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v24.common.AgeRangeInfo age_ranges = 2;</code>
     *
     * @return RepeatedField<\Google\Ads\GoogleAds\V24\Common\AgeRangeInfo>
     */
    public function getAgeRanges()
    {
        return $this->age_ranges;
    }

    /**
     * Suggested age targeting; may be empty indicating no age targeting.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v24.common.AgeRangeInfo age_ranges = 2;</code>
     *
     * @param  \Google\Ads\GoogleAds\V24\Common\AgeRangeInfo[] $var
     * @return $this
     */
    public function setAgeRanges($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V24\Common\AgeRangeInfo::class);
        $this->age_ranges = $arr;

        return $this;
    }

    /**
     * Suggested gender targeting.  If present, this attribute has dimension
     * GENDER.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v24.common.GenderInfo gender = 3;</code>
     *
     * @return \Google\Ads\GoogleAds\V24\Common\GenderInfo|null
     */
    public function getGender()
    {
        return $this->gender;
    }

    public function hasGender()
    {
        return isset($this->gender);
    }

    public function clearGender()
    {
        unset($this->gender);
    }

    /**
     * Suggested gender targeting.  If present, this attribute has dimension
     * GENDER.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v24.common.GenderInfo gender = 3;</code>
     *
     * @param  \Google\Ads\GoogleAds\V24\Common\GenderInfo $var
     * @return $this
     */
    public function setGender($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V24\Common\GenderInfo::class);
        $this->gender = $var;

        return $this;
    }

    /**
     * A Parental Status value (parent, or not a parent).
     *
     * Generated from protobuf field <code>.google.ads.googleads.v24.common.ParentalStatusInfo parental_status = 8;</code>
     *
     * @return \Google\Ads\GoogleAds\V24\Common\ParentalStatusInfo|null
     */
    public function getParentalStatus()
    {
        return $this->parental_status;
    }

    public function hasParentalStatus()
    {
        return isset($this->parental_status);
    }

    public function clearParentalStatus()
    {
        unset($this->parental_status);
    }

    /**
     * A Parental Status value (parent, or not a parent).
     *
     * Generated from protobuf field <code>.google.ads.googleads.v24.common.ParentalStatusInfo parental_status = 8;</code>
     *
     * @param  \Google\Ads\GoogleAds\V24\Common\ParentalStatusInfo $var
     * @return $this
     */
    public function setParentalStatus($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V24\Common\ParentalStatusInfo::class);
        $this->parental_status = $var;

        return $this;
    }

    /**
     * List of user interest attributes with metadata defining the audience. The
     * combination has a logical AND-of-ORs structure: The attributes within each
     * AudienceInsightsAttributeMetadataGroup are ORed, and the groups themselves
     * are ANDed.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v24.common.AudienceInsightsAttributeMetadataGroup user_interests = 11;</code>
     *
     * @return RepeatedField<\Google\Ads\GoogleAds\V24\Common\AudienceInsightsAttributeMetadataGroup>
     */
    public function getUserInterests()
    {
        return $this->user_interests;
    }

    /**
     * List of user interest attributes with metadata defining the audience. The
     * combination has a logical AND-of-ORs structure: The attributes within each
     * AudienceInsightsAttributeMetadataGroup are ORed, and the groups themselves
     * are ANDed.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v24.common.AudienceInsightsAttributeMetadataGroup user_interests = 11;</code>
     *
     * @param  \Google\Ads\GoogleAds\V24\Common\AudienceInsightsAttributeMetadataGroup[] $var
     * @return $this
     */
    public function setUserInterests($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V24\Common\AudienceInsightsAttributeMetadataGroup::class);
        $this->user_interests = $arr;

        return $this;
    }

    /**
     * The fraction (from 0 to 1 inclusive) of the requested audience that can be
     * reached using the suggested targeting.
     *
     * Generated from protobuf field <code>double coverage = 5;</code>
     *
     * @return float
     */
    public function getCoverage()
    {
        return $this->coverage;
    }

    /**
     * The fraction (from 0 to 1 inclusive) of the requested audience that can be
     * reached using the suggested targeting.
     *
     * Generated from protobuf field <code>double coverage = 5;</code>
     *
     * @param  float $var
     * @return $this
     */
    public function setCoverage($var)
    {
        GPBUtil::checkDouble($var);
        $this->coverage = $var;

        return $this;
    }

    /**
     * The ratio of coverage to the coverage of the baseline audience or zero if
     * this ratio is undefined or is not meaningful.
     *
     * Generated from protobuf field <code>double index = 6;</code>
     *
     * @return float
     */
    public function getIndex()
    {
        return $this->index;
    }

    /**
     * The ratio of coverage to the coverage of the baseline audience or zero if
     * this ratio is undefined or is not meaningful.
     *
     * Generated from protobuf field <code>double index = 6;</code>
     *
     * @param  float $var
     * @return $this
     */
    public function setIndex($var)
    {
        GPBUtil::checkDouble($var);
        $this->index = $var;

        return $this;
    }

    /**
     * The approximate estimated number of people that can be reached on YouTube
     * using this targeting.
     *
     * Generated from protobuf field <code>int64 potential_youtube_reach = 7;</code>
     *
     * @return int|string
     */
    public function getPotentialYoutubeReach()
    {
        return $this->potential_youtube_reach;
    }

    /**
     * The approximate estimated number of people that can be reached on YouTube
     * using this targeting.
     *
     * Generated from protobuf field <code>int64 potential_youtube_reach = 7;</code>
     *
     * @param  int|string $var
     * @return $this
     */
    public function setPotentialYoutubeReach($var)
    {
        GPBUtil::checkInt64($var);
        $this->potential_youtube_reach = $var;

        return $this;
    }

}

