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

namespace Google\Ads\GoogleAds\V23\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.v23.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.v23.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.v23.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.v23.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.v23.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.v23.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.v23.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.v23.common.AudienceInsightsLineup lineups = 10;</code>
     */
    private $lineups;
    /**
     * User list to be targeted by the audience.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.common.UserListInfo user_list = 11;</code>
     */
    protected $user_list = null;
    /**
     * A combination of entity, category and user interest attributes defining the
     * audience. The combination has a logical AND-of-ORs structure: Attributes
     * within each InsightsAudienceAttributeGroup are combined with OR, and
     * the combinations themselves are combined together with AND.  For example,
     * the expression (Entity OR Affinity) AND (In-Market OR Category) can be
     * formed using two InsightsAudienceAttributeGroups with two Attributes
     * each.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.services.InsightsAudienceAttributeGroup topic_audience_combinations = 8;</code>
     */
    private $topic_audience_combinations;

    /**
     * Constructor.
     *
     * @param array $data {
     *                    Optional. Data for populating the Message object.
     *
     * @type \Google\Ads\GoogleAds\V23\Common\LocationInfo[] $country_locations
     *           Required. The countries for the audience.
     * @type \Google\Ads\GoogleAds\V23\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\V23\Common\GenderInfo $gender
     *           Gender for the audience.  If absent, the audience does not restrict by
     *           gender.
     * @type \Google\Ads\GoogleAds\V23\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\V23\Common\ParentalStatusInfo $parental_status
     *           Parental status for the audience.  If absent, the audience does not
     *           restrict by parental status.
     * @type \Google\Ads\GoogleAds\V23\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\V23\Common\AudienceInsightsLineup[] $lineups
     *           Lineups representing the YouTube content viewed by the audience.
     * @type \Google\Ads\GoogleAds\V23\Common\UserListInfo $user_list
     *           User list to be targeted by the audience.
     * @type \Google\Ads\GoogleAds\V23\Services\InsightsAudienceAttributeGroup[] $topic_audience_combinations
     *           A combination of entity, category and user interest attributes defining the
     *           audience. The combination has a logical AND-of-ORs structure: Attributes
     *           within each InsightsAudienceAttributeGroup are combined with OR, and
     *           the combinations themselves are combined together with AND.  For example,
     *           the expression (Entity OR Affinity) AND (In-Market OR Category) can be
     *           formed using two InsightsAudienceAttributeGroups with two Attributes
     *           each.
     * }
     */
    public function __construct($data = null)
    {
        \GPBMetadata\Google\Ads\GoogleAds\V23\Services\AudienceInsightsService::initOnce();
        parent::__construct($data);
    }

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

    /**
     * Required. The countries for the audience.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.common.LocationInfo country_locations = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @param  \Google\Ads\GoogleAds\V23\Common\LocationInfo[] $var
     * @return $this
     */
    public function setCountryLocations($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V23\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.v23.common.LocationInfo sub_country_locations = 2;</code>
     *
     * @return RepeatedField<\Google\Ads\GoogleAds\V23\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.v23.common.LocationInfo sub_country_locations = 2;</code>
     *
     * @param  \Google\Ads\GoogleAds\V23\Common\LocationInfo[] $var
     * @return $this
     */
    public function setSubCountryLocations($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V23\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.v23.common.GenderInfo gender = 3;</code>
     *
     * @return \Google\Ads\GoogleAds\V23\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.v23.common.GenderInfo gender = 3;</code>
     *
     * @param  \Google\Ads\GoogleAds\V23\Common\GenderInfo $var
     * @return $this
     */
    public function setGender($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V23\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.v23.common.AgeRangeInfo age_ranges = 4;</code>
     *
     * @return RepeatedField<\Google\Ads\GoogleAds\V23\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.v23.common.AgeRangeInfo age_ranges = 4;</code>
     *
     * @param  \Google\Ads\GoogleAds\V23\Common\AgeRangeInfo[] $var
     * @return $this
     */
    public function setAgeRanges($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V23\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.v23.common.ParentalStatusInfo parental_status = 5;</code>
     *
     * @return \Google\Ads\GoogleAds\V23\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.v23.common.ParentalStatusInfo parental_status = 5;</code>
     *
     * @param  \Google\Ads\GoogleAds\V23\Common\ParentalStatusInfo $var
     * @return $this
     */
    public function setParentalStatus($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V23\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.v23.common.IncomeRangeInfo income_ranges = 6;</code>
     *
     * @return RepeatedField<\Google\Ads\GoogleAds\V23\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.v23.common.IncomeRangeInfo income_ranges = 6;</code>
     *
     * @param  \Google\Ads\GoogleAds\V23\Common\IncomeRangeInfo[] $var
     * @return $this
     */
    public function setIncomeRanges($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V23\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.v23.common.AudienceInsightsLineup lineups = 10;</code>
     *
     * @return RepeatedField<\Google\Ads\GoogleAds\V23\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.v23.common.AudienceInsightsLineup lineups = 10;</code>
     *
     * @param  \Google\Ads\GoogleAds\V23\Common\AudienceInsightsLineup[] $var
     * @return $this
     */
    public function setLineups($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V23\Common\AudienceInsightsLineup::class);
        $this->lineups = $arr;

        return $this;
    }

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

        return $this;
    }

    /**
     * A combination of entity, category and user interest attributes defining the
     * audience. The combination has a logical AND-of-ORs structure: Attributes
     * within each InsightsAudienceAttributeGroup are combined with OR, and
     * the combinations themselves are combined together with AND.  For example,
     * the expression (Entity OR Affinity) AND (In-Market OR Category) can be
     * formed using two InsightsAudienceAttributeGroups with two Attributes
     * each.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.services.InsightsAudienceAttributeGroup topic_audience_combinations = 8;</code>
     *
     * @return RepeatedField<\Google\Ads\GoogleAds\V23\Services\InsightsAudienceAttributeGroup>
     */
    public function getTopicAudienceCombinations()
    {
        return $this->topic_audience_combinations;
    }

    /**
     * A combination of entity, category and user interest attributes defining the
     * audience. The combination has a logical AND-of-ORs structure: Attributes
     * within each InsightsAudienceAttributeGroup are combined with OR, and
     * the combinations themselves are combined together with AND.  For example,
     * the expression (Entity OR Affinity) AND (In-Market OR Category) can be
     * formed using two InsightsAudienceAttributeGroups with two Attributes
     * each.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.services.InsightsAudienceAttributeGroup topic_audience_combinations = 8;</code>
     *
     * @param  \Google\Ads\GoogleAds\V23\Services\InsightsAudienceAttributeGroup[] $var
     * @return $this
     */
    public function setTopicAudienceCombinations($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V23\Services\InsightsAudienceAttributeGroup::class);
        $this->topic_audience_combinations = $arr;

        return $this;
    }

}

