<?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.GenerateTargetingSuggestionMetrics][google.ads.googleads.v24.services.AudienceInsightsService.GenerateTargetingSuggestionMetrics].
 *
 * Generated from protobuf message <code>google.ads.googleads.v24.services.GenerateTargetingSuggestionMetricsRequest</code>
 */
class GenerateTargetingSuggestionMetricsRequest 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. Audiences to request metrics for.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v24.services.InsightsAudience audiences = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $audiences;
    /**
     * Optional. The name of the customer being planned for.  This is a
     * user-defined value.
     *
     * Generated from protobuf field <code>string customer_insights_group = 3 [(.google.api.field_behavior) = OPTIONAL];</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 = 4 [(.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[] $audiences  Required. Audiences to request metrics for.
     *
     * @return \Google\Ads\GoogleAds\V24\Services\GenerateTargetingSuggestionMetricsRequest
     *
     * @experimental
     */
    public static function build(string $customerId, array $audiences): self
    {
        return (new self())
            ->setCustomerId($customerId)
            ->setAudiences($audiences);
    }

    /**
     * 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[] $audiences
     *           Required. Audiences to request metrics for.
     * @type string $customer_insights_group
     *           Optional. 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. Audiences to request metrics for.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v24.services.InsightsAudience audiences = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return RepeatedField<\Google\Ads\GoogleAds\V24\Services\InsightsAudience>
     */
    public function getAudiences()
    {
        return $this->audiences;
    }

    /**
     * Required. Audiences to request metrics for.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v24.services.InsightsAudience audiences = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @param  \Google\Ads\GoogleAds\V24\Services\InsightsAudience[] $var
     * @return $this
     */
    public function setAudiences($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V24\Services\InsightsAudience::class);
        $this->audiences = $arr;

        return $this;
    }

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

    /**
     * Optional. The name of the customer being planned for.  This is a
     * user-defined value.
     *
     * Generated from protobuf field <code>string customer_insights_group = 3 [(.google.api.field_behavior) = OPTIONAL];</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 = 4 [(.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 = 4 [(.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;
    }

}

