<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/googleads/v16/resources/customer_sk_ad_network_conversion_value_schema.proto

namespace Google\Ads\GoogleAds\V16\Resources\CustomerSkAdNetworkConversionValueSchema\SkAdNetworkConversionValueSchema;

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

/**
 * Represents mapping from one conversion value to one or more conversion
 * events.
 *
 * Generated from protobuf message <code>google.ads.googleads.v16.resources.CustomerSkAdNetworkConversionValueSchema.SkAdNetworkConversionValueSchema.ConversionValueMapping</code>
 */
class ConversionValueMapping extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. The minimum of the time range in which a user was last
     * active during the measurement window.
     *
     * Generated from protobuf field <code>int64 min_time_post_install_hours = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $min_time_post_install_hours = 0;
    /**
     * Output only. The maximum of the time range in which a user was last
     * active during the measurement window.
     *
     * Generated from protobuf field <code>int64 max_time_post_install_hours = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $max_time_post_install_hours = 0;
    /**
     * Output only. The conversion value may be mapped to multiple events with
     * various attributes.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v16.resources.CustomerSkAdNetworkConversionValueSchema.SkAdNetworkConversionValueSchema.Event mapped_events = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $mapped_events;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int|string $min_time_post_install_hours
     *           Output only. The minimum of the time range in which a user was last
     *           active during the measurement window.
     *     @type int|string $max_time_post_install_hours
     *           Output only. The maximum of the time range in which a user was last
     *           active during the measurement window.
     *     @type array<\Google\Ads\GoogleAds\V16\Resources\CustomerSkAdNetworkConversionValueSchema\SkAdNetworkConversionValueSchema\Event>|\Google\Protobuf\Internal\RepeatedField $mapped_events
     *           Output only. The conversion value may be mapped to multiple events with
     *           various attributes.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V16\Resources\CustomerSkAdNetworkConversionValueSchema::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. The minimum of the time range in which a user was last
     * active during the measurement window.
     *
     * Generated from protobuf field <code>int64 min_time_post_install_hours = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int|string
     */
    public function getMinTimePostInstallHours()
    {
        return $this->min_time_post_install_hours;
    }

    /**
     * Output only. The minimum of the time range in which a user was last
     * active during the measurement window.
     *
     * Generated from protobuf field <code>int64 min_time_post_install_hours = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int|string $var
     * @return $this
     */
    public function setMinTimePostInstallHours($var)
    {
        GPBUtil::checkInt64($var);
        $this->min_time_post_install_hours = $var;

        return $this;
    }

    /**
     * Output only. The maximum of the time range in which a user was last
     * active during the measurement window.
     *
     * Generated from protobuf field <code>int64 max_time_post_install_hours = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int|string
     */
    public function getMaxTimePostInstallHours()
    {
        return $this->max_time_post_install_hours;
    }

    /**
     * Output only. The maximum of the time range in which a user was last
     * active during the measurement window.
     *
     * Generated from protobuf field <code>int64 max_time_post_install_hours = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int|string $var
     * @return $this
     */
    public function setMaxTimePostInstallHours($var)
    {
        GPBUtil::checkInt64($var);
        $this->max_time_post_install_hours = $var;

        return $this;
    }

    /**
     * Output only. The conversion value may be mapped to multiple events with
     * various attributes.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v16.resources.CustomerSkAdNetworkConversionValueSchema.SkAdNetworkConversionValueSchema.Event mapped_events = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getMappedEvents()
    {
        return $this->mapped_events;
    }

    /**
     * Output only. The conversion value may be mapped to multiple events with
     * various attributes.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v16.resources.CustomerSkAdNetworkConversionValueSchema.SkAdNetworkConversionValueSchema.Event mapped_events = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param array<\Google\Ads\GoogleAds\V16\Resources\CustomerSkAdNetworkConversionValueSchema\SkAdNetworkConversionValueSchema\Event>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setMappedEvents($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V16\Resources\CustomerSkAdNetworkConversionValueSchema\SkAdNetworkConversionValueSchema\Event::class);
        $this->mapped_events = $arr;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ConversionValueMapping::class, \Google\Ads\GoogleAds\V16\Resources\CustomerSkAdNetworkConversionValueSchema_SkAdNetworkConversionValueSchema_ConversionValueMapping::class);

