<?php

# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/analytics/admin/v1alpha/resources.proto
namespace Matomo\Dependencies\GoogleAnalyticsImporter\Google\Analytics\Admin\V1alpha;

use Matomo\Dependencies\GoogleAnalyticsImporter\Google\Protobuf\Internal\GPBType;
use Matomo\Dependencies\GoogleAnalyticsImporter\Google\Protobuf\Internal\RepeatedField;
use Matomo\Dependencies\GoogleAnalyticsImporter\Google\Protobuf\Internal\GPBUtil;
/**
 * Settings for a SKAdNetwork conversion postback window.
 *
 * Generated from protobuf message <code>google.analytics.admin.v1alpha.PostbackWindow</code>
 */
class PostbackWindow extends \Matomo\Dependencies\GoogleAnalyticsImporter\Google\Protobuf\Internal\Message
{
    /**
     * Ordering of the repeated field will be used to prioritize the conversion
     * value settings. Lower indexed entries are prioritized higher. The first
     * conversion value setting that evaluates to true will be selected. It must
     * have at least one entry if enable_postback_window_settings is set to
     * true. It can have maximum of 128 entries.
     *
     * Generated from protobuf field <code>repeated .google.analytics.admin.v1alpha.ConversionValues conversion_values = 1;</code>
     */
    private $conversion_values;
    /**
     * If enable_postback_window_settings is true, conversion_values
     * must be populated and will be used for determining when and how to set the
     * Conversion Value on a client device and exporting schema to linked Ads
     * accounts. If false, the settings are not used, but are retained in case
     * they may be used in the future. This must always be true for
     * postback_window_one.
     *
     * Generated from protobuf field <code>bool postback_window_settings_enabled = 2;</code>
     */
    private $postback_window_settings_enabled = \false;
    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Analytics\Admin\V1alpha\ConversionValues>|\Google\Protobuf\Internal\RepeatedField $conversion_values
     *           Ordering of the repeated field will be used to prioritize the conversion
     *           value settings. Lower indexed entries are prioritized higher. The first
     *           conversion value setting that evaluates to true will be selected. It must
     *           have at least one entry if enable_postback_window_settings is set to
     *           true. It can have maximum of 128 entries.
     *     @type bool $postback_window_settings_enabled
     *           If enable_postback_window_settings is true, conversion_values
     *           must be populated and will be used for determining when and how to set the
     *           Conversion Value on a client device and exporting schema to linked Ads
     *           accounts. If false, the settings are not used, but are retained in case
     *           they may be used in the future. This must always be true for
     *           postback_window_one.
     * }
     */
    public function __construct($data = NULL)
    {
        \Matomo\Dependencies\GoogleAnalyticsImporter\GPBMetadata\Google\Analytics\Admin\V1Alpha\Resources::initOnce();
        parent::__construct($data);
    }
    /**
     * Ordering of the repeated field will be used to prioritize the conversion
     * value settings. Lower indexed entries are prioritized higher. The first
     * conversion value setting that evaluates to true will be selected. It must
     * have at least one entry if enable_postback_window_settings is set to
     * true. It can have maximum of 128 entries.
     *
     * Generated from protobuf field <code>repeated .google.analytics.admin.v1alpha.ConversionValues conversion_values = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getConversionValues()
    {
        return $this->conversion_values;
    }
    /**
     * Ordering of the repeated field will be used to prioritize the conversion
     * value settings. Lower indexed entries are prioritized higher. The first
     * conversion value setting that evaluates to true will be selected. It must
     * have at least one entry if enable_postback_window_settings is set to
     * true. It can have maximum of 128 entries.
     *
     * Generated from protobuf field <code>repeated .google.analytics.admin.v1alpha.ConversionValues conversion_values = 1;</code>
     * @param array<\Google\Analytics\Admin\V1alpha\ConversionValues>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setConversionValues($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Matomo\Dependencies\GoogleAnalyticsImporter\Google\Protobuf\Internal\GPBType::MESSAGE, \Matomo\Dependencies\GoogleAnalyticsImporter\Google\Analytics\Admin\V1alpha\ConversionValues::class);
        $this->conversion_values = $arr;
        return $this;
    }
    /**
     * If enable_postback_window_settings is true, conversion_values
     * must be populated and will be used for determining when and how to set the
     * Conversion Value on a client device and exporting schema to linked Ads
     * accounts. If false, the settings are not used, but are retained in case
     * they may be used in the future. This must always be true for
     * postback_window_one.
     *
     * Generated from protobuf field <code>bool postback_window_settings_enabled = 2;</code>
     * @return bool
     */
    public function getPostbackWindowSettingsEnabled()
    {
        return $this->postback_window_settings_enabled;
    }
    /**
     * If enable_postback_window_settings is true, conversion_values
     * must be populated and will be used for determining when and how to set the
     * Conversion Value on a client device and exporting schema to linked Ads
     * accounts. If false, the settings are not used, but are retained in case
     * they may be used in the future. This must always be true for
     * postback_window_one.
     *
     * Generated from protobuf field <code>bool postback_window_settings_enabled = 2;</code>
     * @param bool $var
     * @return $this
     */
    public function setPostbackWindowSettingsEnabled($var)
    {
        GPBUtil::checkBool($var);
        $this->postback_window_settings_enabled = $var;
        return $this;
    }
}
