<?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 set of users, defined by various characteristics, for which insights can
 * be requested in AudienceInsightsService.
 *
 * Generated from protobuf message <code>google.ads.googleads.v24.services.InsightsAudience</code>
 */
class InsightsAudience extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The countries for the audience.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v24.common.LocationInfo country_locations = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $country_locations;
    /**
     * Sub-country geographic location attributes.  If present, each of these
     * must be contained in one of the countries in this audience.  If absent, the
     * audience is geographically to the country_locations and no further.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v24.common.LocationInfo sub_country_locations = 2;</code>
     */
    private $sub_country_locations;
    /**
     * Gender for the audience.  If absent, the audience does not restrict by
     * gender.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v24.common.GenderInfo gender = 3;</code>
     */
    protected $gender = null;
    /**
     * Age ranges for the audience.  If absent, the audience represents all people
     * over 18 that match the other attributes.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v24.common.AgeRangeInfo age_ranges = 4;</code>
     */
    private $age_ranges;
    /**
     * Parental status for the audience.  If absent, the audience does not
     * restrict by parental status.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v24.common.ParentalStatusInfo parental_status = 5;</code>
     */
    protected $parental_status = null;
    /**
     * Household income percentile ranges for the audience.  If absent, the
     * audience does not restrict by household income range.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v24.common.IncomeRangeInfo income_ranges = 6;</code>
     */
    private $income_ranges;
    /**
     * Lineups representing the YouTube content viewed by the audience.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v24.common.AudienceInsightsLineup lineups = 10;</code>
     */
    private $lineups;
    /**
     * User list to be targeted by the audience.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v24.common.UserListInfo user_list = 11;</code>
     */
    protected $user_list = null;
    /**
     * A list of audience attribute groups consisting of one or more Knowledge
     * Graph entities, Product & Service Categories and user interests that
     * describe an audience. The groups have a logical AND-of-ORs structure:
     * 1. Attributes within each InsightsAudienceAttributeGroup are combined with
     * OR.
     * 2. The groups themselves are combined together with AND.
     * For example, an audience (Interest A OR Interest B) AND (Entity C) is
     * represented using two groups. The first group contains the two interests
     * and the second group contains the entity.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v24.common.InsightsAudienceAttributeGroup topic_audience_combinations = 12;</code>
     */
    private $topic_audience_combinations;

    /**
     * Constructor.
     *
     * @param array $data {
     *                    Optional. Data for populating the Message object.
     *
     * @type \Google\Ads\GoogleAds\V24\Common\LocationInfo[] $country_locations
     *           Required. The countries for the audience.
     * @type \Google\Ads\GoogleAds\V24\Common\LocationInfo[] $sub_country_locations
     *           Sub-country geographic location attributes.  If present, each of these
     *           must be contained in one of the countries in this audience.  If absent, the
     *           audience is geographically to the country_locations and no further.
     * @type \Google\Ads\GoogleAds\V24\Common\GenderInfo $gender
     *           Gender for the audience.  If absent, the audience does not restrict by
     *           gender.
     * @type \Google\Ads\GoogleAds\V24\Common\AgeRangeInfo[] $age_ranges
     *           Age ranges for the audience.  If absent, the audience represents all people
     *           over 18 that match the other attributes.
     * @type \Google\Ads\GoogleAds\V24\Common\ParentalStatusInfo $parental_status
     *           Parental status for the audience.  If absent, the audience does not
     *           restrict by parental status.
     * @type \Google\Ads\GoogleAds\V24\Common\IncomeRangeInfo[] $income_ranges
     *           Household income percentile ranges for the audience.  If absent, the
     *           audience does not restrict by household income range.
     * @type \Google\Ads\GoogleAds\V24\Common\AudienceInsightsLineup[] $lineups
     *           Lineups representing the YouTube content viewed by the audience.
     * @type \Google\Ads\GoogleAds\V24\Common\UserListInfo $user_list
     *           User list to be targeted by the audience.
     * @type \Google\Ads\GoogleAds\V24\Common\InsightsAudienceAttributeGroup[] $topic_audience_combinations
     *           A list of audience attribute groups consisting of one or more Knowledge
     *           Graph entities, Product & Service Categories and user interests that
     *           describe an audience. The groups have a logical AND-of-ORs structure:
     *           1. Attributes within each InsightsAudienceAttributeGroup are combined with
     *           OR.
     *           2. The groups themselves are combined together with AND.
     *           For example, an audience (Interest A OR Interest B) AND (Entity C) is
     *           represented using two groups. The first group contains the two interests
     *           and the second group contains the entity.
     * }
     */
    public function __construct($data = null)
    {
        \GPBMetadata\Google\Ads\GoogleAds\V24\Services\AudienceInsightsService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The countries for the audience.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v24.common.LocationInfo country_locations = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return RepeatedField<\Google\Ads\GoogleAds\V24\Common\LocationInfo>
     */
    public function getCountryLocations()
    {
        return $this->country_locations;
    }

    /**
     * Required. The countries for the audience.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v24.common.LocationInfo country_locations = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @param  \Google\Ads\GoogleAds\V24\Common\LocationInfo[] $var
     * @return $this
     */
    public function setCountryLocations($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V24\Common\LocationInfo::class);
        $this->country_locations = $arr;

        return $this;
    }

    /**
     * Sub-country geographic location attributes.  If present, each of these
     * must be contained in one of the countries in this audience.  If absent, the
     * audience is geographically to the country_locations and no further.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v24.common.LocationInfo sub_country_locations = 2;</code>
     *
     * @return RepeatedField<\Google\Ads\GoogleAds\V24\Common\LocationInfo>
     */
    public function getSubCountryLocations()
    {
        return $this->sub_country_locations;
    }

    /**
     * Sub-country geographic location attributes.  If present, each of these
     * must be contained in one of the countries in this audience.  If absent, the
     * audience is geographically to the country_locations and no further.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v24.common.LocationInfo sub_country_locations = 2;</code>
     *
     * @param  \Google\Ads\GoogleAds\V24\Common\LocationInfo[] $var
     * @return $this
     */
    public function setSubCountryLocations($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V24\Common\LocationInfo::class);
        $this->sub_country_locations = $arr;

        return $this;
    }

    /**
     * Gender for the audience.  If absent, the audience does not restrict by
     * 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);
    }

    /**
     * Gender for the audience.  If absent, the audience does not restrict by
     * 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;
    }

    /**
     * Age ranges for the audience.  If absent, the audience represents all people
     * over 18 that match the other attributes.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v24.common.AgeRangeInfo age_ranges = 4;</code>
     *
     * @return RepeatedField<\Google\Ads\GoogleAds\V24\Common\AgeRangeInfo>
     */
    public function getAgeRanges()
    {
        return $this->age_ranges;
    }

    /**
     * Age ranges for the audience.  If absent, the audience represents all people
     * over 18 that match the other attributes.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v24.common.AgeRangeInfo age_ranges = 4;</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;
    }

    /**
     * Parental status for the audience.  If absent, the audience does not
     * restrict by parental status.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v24.common.ParentalStatusInfo parental_status = 5;</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);
    }

    /**
     * Parental status for the audience.  If absent, the audience does not
     * restrict by parental status.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v24.common.ParentalStatusInfo parental_status = 5;</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;
    }

    /**
     * Household income percentile ranges for the audience.  If absent, the
     * audience does not restrict by household income range.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v24.common.IncomeRangeInfo income_ranges = 6;</code>
     *
     * @return RepeatedField<\Google\Ads\GoogleAds\V24\Common\IncomeRangeInfo>
     */
    public function getIncomeRanges()
    {
        return $this->income_ranges;
    }

    /**
     * Household income percentile ranges for the audience.  If absent, the
     * audience does not restrict by household income range.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v24.common.IncomeRangeInfo income_ranges = 6;</code>
     *
     * @param  \Google\Ads\GoogleAds\V24\Common\IncomeRangeInfo[] $var
     * @return $this
     */
    public function setIncomeRanges($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V24\Common\IncomeRangeInfo::class);
        $this->income_ranges = $arr;

        return $this;
    }

    /**
     * Lineups representing the YouTube content viewed by the audience.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v24.common.AudienceInsightsLineup lineups = 10;</code>
     *
     * @return RepeatedField<\Google\Ads\GoogleAds\V24\Common\AudienceInsightsLineup>
     */
    public function getLineups()
    {
        return $this->lineups;
    }

    /**
     * Lineups representing the YouTube content viewed by the audience.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v24.common.AudienceInsightsLineup lineups = 10;</code>
     *
     * @param  \Google\Ads\GoogleAds\V24\Common\AudienceInsightsLineup[] $var
     * @return $this
     */
    public function setLineups($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V24\Common\AudienceInsightsLineup::class);
        $this->lineups = $arr;

        return $this;
    }

    /**
     * User list to be targeted by the audience.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v24.common.UserListInfo user_list = 11;</code>
     *
     * @return \Google\Ads\GoogleAds\V24\Common\UserListInfo|null
     */
    public function getUserList()
    {
        return $this->user_list;
    }

    public function hasUserList()
    {
        return isset($this->user_list);
    }

    public function clearUserList()
    {
        unset($this->user_list);
    }

    /**
     * User list to be targeted by the audience.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v24.common.UserListInfo user_list = 11;</code>
     *
     * @param  \Google\Ads\GoogleAds\V24\Common\UserListInfo $var
     * @return $this
     */
    public function setUserList($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V24\Common\UserListInfo::class);
        $this->user_list = $var;

        return $this;
    }

    /**
     * A list of audience attribute groups consisting of one or more Knowledge
     * Graph entities, Product & Service Categories and user interests that
     * describe an audience. The groups have a logical AND-of-ORs structure:
     * 1. Attributes within each InsightsAudienceAttributeGroup are combined with
     * OR.
     * 2. The groups themselves are combined together with AND.
     * For example, an audience (Interest A OR Interest B) AND (Entity C) is
     * represented using two groups. The first group contains the two interests
     * and the second group contains the entity.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v24.common.InsightsAudienceAttributeGroup topic_audience_combinations = 12;</code>
     *
     * @return RepeatedField<\Google\Ads\GoogleAds\V24\Common\InsightsAudienceAttributeGroup>
     */
    public function getTopicAudienceCombinations()
    {
        return $this->topic_audience_combinations;
    }

    /**
     * A list of audience attribute groups consisting of one or more Knowledge
     * Graph entities, Product & Service Categories and user interests that
     * describe an audience. The groups have a logical AND-of-ORs structure:
     * 1. Attributes within each InsightsAudienceAttributeGroup are combined with
     * OR.
     * 2. The groups themselves are combined together with AND.
     * For example, an audience (Interest A OR Interest B) AND (Entity C) is
     * represented using two groups. The first group contains the two interests
     * and the second group contains the entity.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v24.common.InsightsAudienceAttributeGroup topic_audience_combinations = 12;</code>
     *
     * @param  \Google\Ads\GoogleAds\V24\Common\InsightsAudienceAttributeGroup[] $var
     * @return $this
     */
    public function setTopicAudienceCombinations($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V24\Common\InsightsAudienceAttributeGroup::class);
        $this->topic_audience_combinations = $arr;

        return $this;
    }

}

