<?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;
/**
 * Conversion value settings for a postback window for SKAdNetwork conversion
 * value schema.
 *
 * Generated from protobuf message <code>google.analytics.admin.v1alpha.ConversionValues</code>
 */
class ConversionValues extends \Matomo\Dependencies\GoogleAnalyticsImporter\Google\Protobuf\Internal\Message
{
    /**
     * Display name of the SKAdNetwork conversion value.
     * The max allowed display name length is 50 UTF-16 code units.
     *
     * Generated from protobuf field <code>string display_name = 1;</code>
     */
    private $display_name = '';
    /**
     * The fine-grained conversion value.  This is applicable only to the first
     * postback window. Its valid values are [0,63], both inclusive. It must be
     * set for postback window 1, and must not be set for postback window 2 & 3.
     * This value is not guaranteed to be unique.
     * If the configuration for the first postback window is re-used for second or
     * third postback windows this field has no effect.
     *
     * Generated from protobuf field <code>optional int32 fine_value = 2;</code>
     */
    private $fine_value = null;
    /**
     * Required. A coarse grained conversion value.
     * This value is not guaranteed to be unique.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1alpha.CoarseValue coarse_value = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $coarse_value = 0;
    /**
     * Event conditions that must be met for this Conversion Value to be achieved.
     * The conditions in this list are ANDed together. It must have minimum of 1
     * entry and maximum of 3 entries, if the postback window is enabled.
     *
     * Generated from protobuf field <code>repeated .google.analytics.admin.v1alpha.EventMapping event_mappings = 4;</code>
     */
    private $event_mappings;
    /**
     * If true, the SDK should lock to this conversion value for the current
     * postback window.
     *
     * Generated from protobuf field <code>bool lock_enabled = 5;</code>
     */
    private $lock_enabled = \false;
    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $display_name
     *           Display name of the SKAdNetwork conversion value.
     *           The max allowed display name length is 50 UTF-16 code units.
     *     @type int $fine_value
     *           The fine-grained conversion value.  This is applicable only to the first
     *           postback window. Its valid values are [0,63], both inclusive. It must be
     *           set for postback window 1, and must not be set for postback window 2 & 3.
     *           This value is not guaranteed to be unique.
     *           If the configuration for the first postback window is re-used for second or
     *           third postback windows this field has no effect.
     *     @type int $coarse_value
     *           Required. A coarse grained conversion value.
     *           This value is not guaranteed to be unique.
     *     @type array<\Google\Analytics\Admin\V1alpha\EventMapping>|\Google\Protobuf\Internal\RepeatedField $event_mappings
     *           Event conditions that must be met for this Conversion Value to be achieved.
     *           The conditions in this list are ANDed together. It must have minimum of 1
     *           entry and maximum of 3 entries, if the postback window is enabled.
     *     @type bool $lock_enabled
     *           If true, the SDK should lock to this conversion value for the current
     *           postback window.
     * }
     */
    public function __construct($data = NULL)
    {
        \Matomo\Dependencies\GoogleAnalyticsImporter\GPBMetadata\Google\Analytics\Admin\V1Alpha\Resources::initOnce();
        parent::__construct($data);
    }
    /**
     * Display name of the SKAdNetwork conversion value.
     * The max allowed display name length is 50 UTF-16 code units.
     *
     * Generated from protobuf field <code>string display_name = 1;</code>
     * @return string
     */
    public function getDisplayName()
    {
        return $this->display_name;
    }
    /**
     * Display name of the SKAdNetwork conversion value.
     * The max allowed display name length is 50 UTF-16 code units.
     *
     * Generated from protobuf field <code>string display_name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setDisplayName($var)
    {
        GPBUtil::checkString($var, True);
        $this->display_name = $var;
        return $this;
    }
    /**
     * The fine-grained conversion value.  This is applicable only to the first
     * postback window. Its valid values are [0,63], both inclusive. It must be
     * set for postback window 1, and must not be set for postback window 2 & 3.
     * This value is not guaranteed to be unique.
     * If the configuration for the first postback window is re-used for second or
     * third postback windows this field has no effect.
     *
     * Generated from protobuf field <code>optional int32 fine_value = 2;</code>
     * @return int
     */
    public function getFineValue()
    {
        return isset($this->fine_value) ? $this->fine_value : 0;
    }
    public function hasFineValue()
    {
        return isset($this->fine_value);
    }
    public function clearFineValue()
    {
        unset($this->fine_value);
    }
    /**
     * The fine-grained conversion value.  This is applicable only to the first
     * postback window. Its valid values are [0,63], both inclusive. It must be
     * set for postback window 1, and must not be set for postback window 2 & 3.
     * This value is not guaranteed to be unique.
     * If the configuration for the first postback window is re-used for second or
     * third postback windows this field has no effect.
     *
     * Generated from protobuf field <code>optional int32 fine_value = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setFineValue($var)
    {
        GPBUtil::checkInt32($var);
        $this->fine_value = $var;
        return $this;
    }
    /**
     * Required. A coarse grained conversion value.
     * This value is not guaranteed to be unique.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1alpha.CoarseValue coarse_value = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getCoarseValue()
    {
        return $this->coarse_value;
    }
    /**
     * Required. A coarse grained conversion value.
     * This value is not guaranteed to be unique.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1alpha.CoarseValue coarse_value = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setCoarseValue($var)
    {
        GPBUtil::checkEnum($var, \Matomo\Dependencies\GoogleAnalyticsImporter\Google\Analytics\Admin\V1alpha\CoarseValue::class);
        $this->coarse_value = $var;
        return $this;
    }
    /**
     * Event conditions that must be met for this Conversion Value to be achieved.
     * The conditions in this list are ANDed together. It must have minimum of 1
     * entry and maximum of 3 entries, if the postback window is enabled.
     *
     * Generated from protobuf field <code>repeated .google.analytics.admin.v1alpha.EventMapping event_mappings = 4;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getEventMappings()
    {
        return $this->event_mappings;
    }
    /**
     * Event conditions that must be met for this Conversion Value to be achieved.
     * The conditions in this list are ANDed together. It must have minimum of 1
     * entry and maximum of 3 entries, if the postback window is enabled.
     *
     * Generated from protobuf field <code>repeated .google.analytics.admin.v1alpha.EventMapping event_mappings = 4;</code>
     * @param array<\Google\Analytics\Admin\V1alpha\EventMapping>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setEventMappings($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Matomo\Dependencies\GoogleAnalyticsImporter\Google\Protobuf\Internal\GPBType::MESSAGE, \Matomo\Dependencies\GoogleAnalyticsImporter\Google\Analytics\Admin\V1alpha\EventMapping::class);
        $this->event_mappings = $arr;
        return $this;
    }
    /**
     * If true, the SDK should lock to this conversion value for the current
     * postback window.
     *
     * Generated from protobuf field <code>bool lock_enabled = 5;</code>
     * @return bool
     */
    public function getLockEnabled()
    {
        return $this->lock_enabled;
    }
    /**
     * If true, the SDK should lock to this conversion value for the current
     * postback window.
     *
     * Generated from protobuf field <code>bool lock_enabled = 5;</code>
     * @param bool $var
     * @return $this
     */
    public function setLockEnabled($var)
    {
        GPBUtil::checkBool($var);
        $this->lock_enabled = $var;
        return $this;
    }
}
