<?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 text description of the audience of interest for which insights are being
 * requested in AudienceInsightsService.
 *
 * Generated from protobuf message <code>google.ads.googleads.v23.services.InsightsAudienceDescription</code>
 */
class InsightsAudienceDescription 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;
    /**
     * Required. An English language text description of an audience to get
     * suggestions for. Maximum length is 2000 characters. For example, "Women in
     * their 30s who love to travel".
     *
     * Generated from protobuf field <code>string audience_description = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $audience_description = '';
    protected $output_types;

    /**
     * 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 string $audience_description
     *           Required. An English language text description of an audience to get
     *           suggestions for. Maximum length is 2000 characters. For example, "Women in
     *           their 30s who love to travel".
     * @type int $marketing_objective
     *           Optional. An optional marketing objective which will influence the type
     *           of suggestions produced.
     * @type \Google\Ads\GoogleAds\V23\Services\AudienceInsightsDimensions $audience_dimensions
     *           Optional. An optional list of audience dimensions to return.
     * }
     */
    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;
    }

    /**
     * Required. An English language text description of an audience to get
     * suggestions for. Maximum length is 2000 characters. For example, "Women in
     * their 30s who love to travel".
     *
     * Generated from protobuf field <code>string audience_description = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return string
     */
    public function getAudienceDescription()
    {
        return $this->audience_description;
    }

    /**
     * Required. An English language text description of an audience to get
     * suggestions for. Maximum length is 2000 characters. For example, "Women in
     * their 30s who love to travel".
     *
     * Generated from protobuf field <code>string audience_description = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @param  string $var
     * @return $this
     */
    public function setAudienceDescription($var)
    {
        GPBUtil::checkString($var, true);
        $this->audience_description = $var;

        return $this;
    }

    /**
     * Optional. An optional marketing objective which will influence the type
     * of suggestions produced.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.enums.AudienceInsightsMarketingObjectiveEnum.AudienceInsightsMarketingObjective marketing_objective = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return int
     */
    public function getMarketingObjective()
    {
        return $this->readOneof(4);
    }

    public function hasMarketingObjective()
    {
        return $this->hasOneof(4);
    }

    /**
     * Optional. An optional marketing objective which will influence the type
     * of suggestions produced.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.enums.AudienceInsightsMarketingObjectiveEnum.AudienceInsightsMarketingObjective marketing_objective = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @param  int $var
     * @return $this
     */
    public function setMarketingObjective($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V23\Enums\AudienceInsightsMarketingObjectiveEnum\AudienceInsightsMarketingObjective::class);
        $this->writeOneof(4, $var);

        return $this;
    }

    /**
     * Optional. An optional list of audience dimensions to return.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.services.AudienceInsightsDimensions audience_dimensions = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return \Google\Ads\GoogleAds\V23\Services\AudienceInsightsDimensions|null
     */
    public function getAudienceDimensions()
    {
        return $this->readOneof(5);
    }

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

    /**
     * Optional. An optional list of audience dimensions to return.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.services.AudienceInsightsDimensions audience_dimensions = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @param  \Google\Ads\GoogleAds\V23\Services\AudienceInsightsDimensions $var
     * @return $this
     */
    public function setAudienceDimensions($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V23\Services\AudienceInsightsDimensions::class);
        $this->writeOneof(5, $var);

        return $this;
    }

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

}

