<?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;

/**
 * Request message for
 * [AudienceInsightsService.GenerateAudienceCompositionInsights][google.ads.googleads.v24.services.AudienceInsightsService.GenerateAudienceCompositionInsights].
 *
 * Generated from protobuf message <code>google.ads.googleads.v24.services.GenerateAudienceCompositionInsightsRequest</code>
 */
class GenerateAudienceCompositionInsightsRequest 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 audience of interest for which insights are being requested.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v24.services.InsightsAudience audience = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $audience = null;
    /**
     * The baseline audience to which the audience of interest is being
     * compared.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v24.services.InsightsAudience baseline_audience = 6;</code>
     */
    protected $baseline_audience = null;
    /**
     * The one-month range of historical data to use for insights, in the format
     * "yyyy-mm". If unset, insights will be returned for the last thirty days of
     * data.
     *
     * Generated from protobuf field <code>string data_month = 3;</code>
     */
    protected $data_month = '';
    /**
     * Required. The audience dimensions for which composition insights should be
     * returned. Supported dimensions are KNOWLEDGE_GRAPH, GEO_TARGET_COUNTRY,
     * SUB_COUNTRY_LOCATION, YOUTUBE_CHANNEL, YOUTUBE_LINEUP,
     * AFFINITY_USER_INTEREST, IN_MARKET_USER_INTEREST, LIFE_EVENT_USER_INTEREST,
     *  PARENTAL_STATUS, INCOME_RANGE, AGE_RANGE, GENDER, and USER_LIST.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v24.enums.AudienceInsightsDimensionEnum.AudienceInsightsDimension dimensions = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $dimensions;
    /**
     * The name of the customer being planned for.  This is a user-defined value.
     *
     * Generated from protobuf field <code>string customer_insights_group = 5;</code>
     */
    protected $customer_insights_group = '';
    /**
     * Optional. Additional information on the application issuing the request.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v24.common.AdditionalApplicationInfo insights_application_info = 7 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $insights_application_info = null;

    /**
     * @param string                                              $customerId Required. The ID of the customer.
     * @param \Google\Ads\GoogleAds\V24\Services\InsightsAudience $audience   Required. The audience of interest for which insights are being requested.
     * @param int[]                                               $dimensions Required. The audience dimensions for which composition insights should be
     *                                                                        returned. Supported dimensions are KNOWLEDGE_GRAPH, GEO_TARGET_COUNTRY,
     *                                                                        SUB_COUNTRY_LOCATION, YOUTUBE_CHANNEL, YOUTUBE_LINEUP,
     *                                                                        AFFINITY_USER_INTEREST, IN_MARKET_USER_INTEREST, LIFE_EVENT_USER_INTEREST,
     *                                                                        PARENTAL_STATUS, INCOME_RANGE, AGE_RANGE, GENDER, and USER_LIST.
     *                                                                        For allowed values, use constants defined on {@see \Google\Ads\GoogleAds\V24\Enums\AudienceInsightsDimensionEnum\AudienceInsightsDimension}
     *
     * @return \Google\Ads\GoogleAds\V24\Services\GenerateAudienceCompositionInsightsRequest
     *
     * @experimental
     */
    public static function build(string $customerId, \Google\Ads\GoogleAds\V24\Services\InsightsAudience $audience, array $dimensions): self
    {
        return (new self())
            ->setCustomerId($customerId)
            ->setAudience($audience)
            ->setDimensions($dimensions);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *                    Optional. Data for populating the Message object.
     *
     * @type string $customer_id
     *           Required. The ID of the customer.
     * @type \Google\Ads\GoogleAds\V24\Services\InsightsAudience $audience
     *           Required. The audience of interest for which insights are being requested.
     * @type \Google\Ads\GoogleAds\V24\Services\InsightsAudience $baseline_audience
     *           The baseline audience to which the audience of interest is being
     *           compared.
     * @type string $data_month
     *           The one-month range of historical data to use for insights, in the format
     *           "yyyy-mm". If unset, insights will be returned for the last thirty days of
     *           data.
     * @type int[] $dimensions
     *           Required. The audience dimensions for which composition insights should be
     *           returned. Supported dimensions are KNOWLEDGE_GRAPH, GEO_TARGET_COUNTRY,
     *           SUB_COUNTRY_LOCATION, YOUTUBE_CHANNEL, YOUTUBE_LINEUP,
     *           AFFINITY_USER_INTEREST, IN_MARKET_USER_INTEREST, LIFE_EVENT_USER_INTEREST,
     *            PARENTAL_STATUS, INCOME_RANGE, AGE_RANGE, GENDER, and USER_LIST.
     * @type string $customer_insights_group
     *           The name of the customer being planned for.  This is a user-defined value.
     * @type \Google\Ads\GoogleAds\V24\Common\AdditionalApplicationInfo $insights_application_info
     *           Optional. Additional information on the application issuing the request.
     * }
     */
    public function __construct($data = null)
    {
        \GPBMetadata\Google\Ads\GoogleAds\V24\Services\AudienceInsightsService::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 audience of interest for which insights are being requested.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v24.services.InsightsAudience audience = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return \Google\Ads\GoogleAds\V24\Services\InsightsAudience|null
     */
    public function getAudience()
    {
        return $this->audience;
    }

    public function hasAudience()
    {
        return isset($this->audience);
    }

    public function clearAudience()
    {
        unset($this->audience);
    }

    /**
     * Required. The audience of interest for which insights are being requested.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v24.services.InsightsAudience audience = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @param  \Google\Ads\GoogleAds\V24\Services\InsightsAudience $var
     * @return $this
     */
    public function setAudience($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V24\Services\InsightsAudience::class);
        $this->audience = $var;

        return $this;
    }

    /**
     * The baseline audience to which the audience of interest is being
     * compared.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v24.services.InsightsAudience baseline_audience = 6;</code>
     *
     * @return \Google\Ads\GoogleAds\V24\Services\InsightsAudience|null
     */
    public function getBaselineAudience()
    {
        return $this->baseline_audience;
    }

    public function hasBaselineAudience()
    {
        return isset($this->baseline_audience);
    }

    public function clearBaselineAudience()
    {
        unset($this->baseline_audience);
    }

    /**
     * The baseline audience to which the audience of interest is being
     * compared.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v24.services.InsightsAudience baseline_audience = 6;</code>
     *
     * @param  \Google\Ads\GoogleAds\V24\Services\InsightsAudience $var
     * @return $this
     */
    public function setBaselineAudience($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V24\Services\InsightsAudience::class);
        $this->baseline_audience = $var;

        return $this;
    }

    /**
     * The one-month range of historical data to use for insights, in the format
     * "yyyy-mm". If unset, insights will be returned for the last thirty days of
     * data.
     *
     * Generated from protobuf field <code>string data_month = 3;</code>
     *
     * @return string
     */
    public function getDataMonth()
    {
        return $this->data_month;
    }

    /**
     * The one-month range of historical data to use for insights, in the format
     * "yyyy-mm". If unset, insights will be returned for the last thirty days of
     * data.
     *
     * Generated from protobuf field <code>string data_month = 3;</code>
     *
     * @param  string $var
     * @return $this
     */
    public function setDataMonth($var)
    {
        GPBUtil::checkString($var, true);
        $this->data_month = $var;

        return $this;
    }

    /**
     * Required. The audience dimensions for which composition insights should be
     * returned. Supported dimensions are KNOWLEDGE_GRAPH, GEO_TARGET_COUNTRY,
     * SUB_COUNTRY_LOCATION, YOUTUBE_CHANNEL, YOUTUBE_LINEUP,
     * AFFINITY_USER_INTEREST, IN_MARKET_USER_INTEREST, LIFE_EVENT_USER_INTEREST,
     *  PARENTAL_STATUS, INCOME_RANGE, AGE_RANGE, GENDER, and USER_LIST.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v24.enums.AudienceInsightsDimensionEnum.AudienceInsightsDimension dimensions = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return RepeatedField<int>
     */
    public function getDimensions()
    {
        return $this->dimensions;
    }

    /**
     * Required. The audience dimensions for which composition insights should be
     * returned. Supported dimensions are KNOWLEDGE_GRAPH, GEO_TARGET_COUNTRY,
     * SUB_COUNTRY_LOCATION, YOUTUBE_CHANNEL, YOUTUBE_LINEUP,
     * AFFINITY_USER_INTEREST, IN_MARKET_USER_INTEREST, LIFE_EVENT_USER_INTEREST,
     *  PARENTAL_STATUS, INCOME_RANGE, AGE_RANGE, GENDER, and USER_LIST.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v24.enums.AudienceInsightsDimensionEnum.AudienceInsightsDimension dimensions = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @param  int[] $var
     * @return $this
     */
    public function setDimensions($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Ads\GoogleAds\V24\Enums\AudienceInsightsDimensionEnum\AudienceInsightsDimension::class);
        $this->dimensions = $arr;

        return $this;
    }

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

    /**
     * The name of the customer being planned for.  This is a user-defined value.
     *
     * Generated from protobuf field <code>string customer_insights_group = 5;</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.v24.common.AdditionalApplicationInfo insights_application_info = 7 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return \Google\Ads\GoogleAds\V24\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.v24.common.AdditionalApplicationInfo insights_application_info = 7 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @param  \Google\Ads\GoogleAds\V24\Common\AdditionalApplicationInfo $var
     * @return $this
     */
    public function setInsightsApplicationInfo($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V24\Common\AdditionalApplicationInfo::class);
        $this->insights_application_info = $var;

        return $this;
    }

}

