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

namespace Google\Ads\GoogleAds\V22\Services;

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

/**
 * A suggested targetable audience relevant to the requested audience.
 *
 * Generated from protobuf message <code>google.ads.googleads.v22.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.v22.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.v22.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.v22.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.v22.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.v22.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 array<\Google\Ads\GoogleAds\V22\Common\AudienceInsightsAttributeMetadata>|\Google\Protobuf\Internal\RepeatedField $locations
     *           Suggested location targeting.  These attributes all have dimension
     *           GEO_TARGET_COUNTRY or SUB_COUNTRY_LOCATION
     *     @type array<\Google\Ads\GoogleAds\V22\Common\AgeRangeInfo>|\Google\Protobuf\Internal\RepeatedField $age_ranges
     *           Suggested age targeting; may be empty indicating no age targeting.
     *     @type \Google\Ads\GoogleAds\V22\Common\GenderInfo $gender
     *           Suggested gender targeting.  If present, this attribute has dimension
     *           GENDER.
     *     @type \Google\Ads\GoogleAds\V22\Common\ParentalStatusInfo $parental_status
     *           A Parental Status value (parent, or not a parent).
     *     @type array<\Google\Ads\GoogleAds\V22\Common\AudienceInsightsAttributeMetadataGroup>|\Google\Protobuf\Internal\RepeatedField $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\V22\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.v22.common.AudienceInsightsAttributeMetadata locations = 9;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    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.v22.common.AudienceInsightsAttributeMetadata locations = 9;</code>
     * @param array<\Google\Ads\GoogleAds\V22\Common\AudienceInsightsAttributeMetadata>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setLocations($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V22\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.v22.common.AgeRangeInfo age_ranges = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    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.v22.common.AgeRangeInfo age_ranges = 2;</code>
     * @param array<\Google\Ads\GoogleAds\V22\Common\AgeRangeInfo>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setAgeRanges($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V22\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.v22.common.GenderInfo gender = 3;</code>
     * @return \Google\Ads\GoogleAds\V22\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.v22.common.GenderInfo gender = 3;</code>
     * @param \Google\Ads\GoogleAds\V22\Common\GenderInfo $var
     * @return $this
     */
    public function setGender($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V22\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.v22.common.ParentalStatusInfo parental_status = 8;</code>
     * @return \Google\Ads\GoogleAds\V22\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.v22.common.ParentalStatusInfo parental_status = 8;</code>
     * @param \Google\Ads\GoogleAds\V22\Common\ParentalStatusInfo $var
     * @return $this
     */
    public function setParentalStatus($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V22\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.v22.common.AudienceInsightsAttributeMetadataGroup user_interests = 11;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    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.v22.common.AudienceInsightsAttributeMetadataGroup user_interests = 11;</code>
     * @param array<\Google\Ads\GoogleAds\V22\Common\AudienceInsightsAttributeMetadataGroup>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setUserInterests($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V22\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;
    }

}

