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

namespace Google\Ads\GoogleAds\V23\Services;

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

/**
 * Request message for
 * [ContentCreatorInsightsService.GenerateCreatorInsights][google.ads.googleads.v23.services.ContentCreatorInsightsService.GenerateCreatorInsights].
 *
 * Generated from protobuf message <code>google.ads.googleads.v23.services.GenerateCreatorInsightsRequest</code>
 */
class GenerateCreatorInsightsRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The ID of the customer.
     *
     * Generated from protobuf field <code>string customer_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $customer_id = '';
    /**
     * Required. The name of the customer being planned for.  This is a
     * user-defined value.
     *
     * Generated from protobuf field <code>string customer_insights_group = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $customer_insights_group = '';
    /**
     * Optional. Additional information on the application issuing the request.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.common.AdditionalApplicationInfo insights_application_info = 8 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $insights_application_info = null;
    /**
     * Required. The countries to search that apply to the criteria.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.common.LocationInfo country_locations = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $country_locations;
    /**
     * The sub-country geographic locations to search that apply to the criteria.
     * Only supported for
     * [SearchAttributes][google.ads.googleads.v23.services.GenerateCreatorInsightsRequest.SearchAttributes]
     * criteria.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.common.LocationInfo sub_country_locations = 7;</code>
     */
    private $sub_country_locations;
    protected $criteria;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $customer_id
     *           Required. The ID of the customer.
     *     @type string $customer_insights_group
     *           Required. The name of the customer being planned for.  This is a
     *           user-defined value.
     *     @type \Google\Ads\GoogleAds\V23\Common\AdditionalApplicationInfo $insights_application_info
     *           Optional. Additional information on the application issuing the request.
     *     @type array<\Google\Ads\GoogleAds\V23\Common\LocationInfo>|\Google\Protobuf\Internal\RepeatedField $country_locations
     *           Required. The countries to search that apply to the criteria.
     *     @type array<\Google\Ads\GoogleAds\V23\Common\LocationInfo>|\Google\Protobuf\Internal\RepeatedField $sub_country_locations
     *           The sub-country geographic locations to search that apply to the criteria.
     *           Only supported for
     *           [SearchAttributes][google.ads.googleads.v23.services.GenerateCreatorInsightsRequest.SearchAttributes]
     *           criteria.
     *     @type \Google\Ads\GoogleAds\V23\Services\GenerateCreatorInsightsRequest\SearchAttributes $search_attributes
     *           The attributes used to identify top creators. Data fetched is based on
     *           the list of countries or sub-country locations specified in
     *           [country_locations][google.ads.googleads.v23.services.GenerateCreatorInsightsRequest.country_locations]
     *           or
     *           [sub_country_locations][google.ads.googleads.v23.services.GenerateCreatorInsightsRequest.sub_country_locations].
     *     @type \Google\Ads\GoogleAds\V23\Services\GenerateCreatorInsightsRequest\SearchBrand $search_brand
     *           A brand used to search for top creators. Data fetched is based on the
     *           list of countries specified in
     *           [country_locations][google.ads.googleads.v23.services.GenerateCreatorInsightsRequest.country_locations].
     *     @type \Google\Ads\GoogleAds\V23\Services\GenerateCreatorInsightsRequest\YouTubeChannels $search_channels
     *           YouTube Channel IDs for Creator Insights. Data fetched for channels is
     *           based on the list of countries specified in
     *           [country_locations][google.ads.googleads.v23.services.GenerateCreatorInsightsRequest.country_locations].
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V23\Services\ContentCreatorInsightsService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The ID of the customer.
     *
     * Generated from protobuf field <code>string customer_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getCustomerId()
    {
        return $this->customer_id;
    }

    /**
     * Required. The ID of the customer.
     *
     * Generated from protobuf field <code>string customer_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setCustomerId($var)
    {
        GPBUtil::checkString($var, True);
        $this->customer_id = $var;

        return $this;
    }

    /**
     * Required. The name of the customer being planned for.  This is a
     * user-defined value.
     *
     * Generated from protobuf field <code>string customer_insights_group = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getCustomerInsightsGroup()
    {
        return $this->customer_insights_group;
    }

    /**
     * Required. The name of the customer being planned for.  This is a
     * user-defined value.
     *
     * Generated from protobuf field <code>string customer_insights_group = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setCustomerInsightsGroup($var)
    {
        GPBUtil::checkString($var, True);
        $this->customer_insights_group = $var;

        return $this;
    }

    /**
     * Optional. Additional information on the application issuing the request.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.common.AdditionalApplicationInfo insights_application_info = 8 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Ads\GoogleAds\V23\Common\AdditionalApplicationInfo|null
     */
    public function getInsightsApplicationInfo()
    {
        return $this->insights_application_info;
    }

    public function hasInsightsApplicationInfo()
    {
        return isset($this->insights_application_info);
    }

    public function clearInsightsApplicationInfo()
    {
        unset($this->insights_application_info);
    }

    /**
     * Optional. Additional information on the application issuing the request.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.common.AdditionalApplicationInfo insights_application_info = 8 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Ads\GoogleAds\V23\Common\AdditionalApplicationInfo $var
     * @return $this
     */
    public function setInsightsApplicationInfo($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V23\Common\AdditionalApplicationInfo::class);
        $this->insights_application_info = $var;

        return $this;
    }

    /**
     * Required. The countries to search that apply to the criteria.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.common.LocationInfo country_locations = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getCountryLocations()
    {
        return $this->country_locations;
    }

    /**
     * Required. The countries to search that apply to the criteria.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.common.LocationInfo country_locations = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param array<\Google\Ads\GoogleAds\V23\Common\LocationInfo>|\Google\Protobuf\Internal\RepeatedField $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;
    }

    /**
     * The sub-country geographic locations to search that apply to the criteria.
     * Only supported for
     * [SearchAttributes][google.ads.googleads.v23.services.GenerateCreatorInsightsRequest.SearchAttributes]
     * criteria.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.common.LocationInfo sub_country_locations = 7;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getSubCountryLocations()
    {
        return $this->sub_country_locations;
    }

    /**
     * The sub-country geographic locations to search that apply to the criteria.
     * Only supported for
     * [SearchAttributes][google.ads.googleads.v23.services.GenerateCreatorInsightsRequest.SearchAttributes]
     * criteria.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.common.LocationInfo sub_country_locations = 7;</code>
     * @param array<\Google\Ads\GoogleAds\V23\Common\LocationInfo>|\Google\Protobuf\Internal\RepeatedField $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;
    }

    /**
     * The attributes used to identify top creators. Data fetched is based on
     * the list of countries or sub-country locations specified in
     * [country_locations][google.ads.googleads.v23.services.GenerateCreatorInsightsRequest.country_locations]
     * or
     * [sub_country_locations][google.ads.googleads.v23.services.GenerateCreatorInsightsRequest.sub_country_locations].
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.services.GenerateCreatorInsightsRequest.SearchAttributes search_attributes = 3;</code>
     * @return \Google\Ads\GoogleAds\V23\Services\GenerateCreatorInsightsRequest\SearchAttributes|null
     */
    public function getSearchAttributes()
    {
        return $this->readOneof(3);
    }

    public function hasSearchAttributes()
    {
        return $this->hasOneof(3);
    }

    /**
     * The attributes used to identify top creators. Data fetched is based on
     * the list of countries or sub-country locations specified in
     * [country_locations][google.ads.googleads.v23.services.GenerateCreatorInsightsRequest.country_locations]
     * or
     * [sub_country_locations][google.ads.googleads.v23.services.GenerateCreatorInsightsRequest.sub_country_locations].
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.services.GenerateCreatorInsightsRequest.SearchAttributes search_attributes = 3;</code>
     * @param \Google\Ads\GoogleAds\V23\Services\GenerateCreatorInsightsRequest\SearchAttributes $var
     * @return $this
     */
    public function setSearchAttributes($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V23\Services\GenerateCreatorInsightsRequest\SearchAttributes::class);
        $this->writeOneof(3, $var);

        return $this;
    }

    /**
     * A brand used to search for top creators. Data fetched is based on the
     * list of countries specified in
     * [country_locations][google.ads.googleads.v23.services.GenerateCreatorInsightsRequest.country_locations].
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.services.GenerateCreatorInsightsRequest.SearchBrand search_brand = 5;</code>
     * @return \Google\Ads\GoogleAds\V23\Services\GenerateCreatorInsightsRequest\SearchBrand|null
     */
    public function getSearchBrand()
    {
        return $this->readOneof(5);
    }

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

    /**
     * A brand used to search for top creators. Data fetched is based on the
     * list of countries specified in
     * [country_locations][google.ads.googleads.v23.services.GenerateCreatorInsightsRequest.country_locations].
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.services.GenerateCreatorInsightsRequest.SearchBrand search_brand = 5;</code>
     * @param \Google\Ads\GoogleAds\V23\Services\GenerateCreatorInsightsRequest\SearchBrand $var
     * @return $this
     */
    public function setSearchBrand($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V23\Services\GenerateCreatorInsightsRequest\SearchBrand::class);
        $this->writeOneof(5, $var);

        return $this;
    }

    /**
     * YouTube Channel IDs for Creator Insights. Data fetched for channels is
     * based on the list of countries specified in
     * [country_locations][google.ads.googleads.v23.services.GenerateCreatorInsightsRequest.country_locations].
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.services.GenerateCreatorInsightsRequest.YouTubeChannels search_channels = 4;</code>
     * @return \Google\Ads\GoogleAds\V23\Services\GenerateCreatorInsightsRequest\YouTubeChannels|null
     */
    public function getSearchChannels()
    {
        return $this->readOneof(4);
    }

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

    /**
     * YouTube Channel IDs for Creator Insights. Data fetched for channels is
     * based on the list of countries specified in
     * [country_locations][google.ads.googleads.v23.services.GenerateCreatorInsightsRequest.country_locations].
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.services.GenerateCreatorInsightsRequest.YouTubeChannels search_channels = 4;</code>
     * @param \Google\Ads\GoogleAds\V23\Services\GenerateCreatorInsightsRequest\YouTubeChannels $var
     * @return $this
     */
    public function setSearchChannels($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V23\Services\GenerateCreatorInsightsRequest\YouTubeChannels::class);
        $this->writeOneof(4, $var);

        return $this;
    }

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

}

