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

namespace Google\Ads\GoogleAds\V23\Resources\CustomerSkAdNetworkConversionValueSchema;

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

/**
 * The CustomerLink specific SkAdNetworkConversionValueSchema.
 *
 * Generated from protobuf message <code>google.ads.googleads.v23.resources.CustomerSkAdNetworkConversionValueSchema.SkAdNetworkConversionValueSchema</code>
 */
class SkAdNetworkConversionValueSchema extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Output only. Apple App Store app ID.
     *
     * Generated from protobuf field <code>string app_id = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $app_id = '';
    /**
     * Output only. A time window (measured in hours) post-install, after which
     * the App Attribution Partner or advertiser stops calling
     * [updateConversionValue]
     * (https://developer.apple.com/documentation/storekit/skadnetwork/3566697-updateconversionvalue).
     *
     * Generated from protobuf field <code>int32 measurement_window_hours = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $measurement_window_hours = 0;
    /**
     * Output only. Fine grained conversion value mappings.
     * For SkAdNetwork versions >= 4.0 that support multiple conversion
     * windows, fine grained conversion value mappings are only applicable to
     * the first postback.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.resources.CustomerSkAdNetworkConversionValueSchema.SkAdNetworkConversionValueSchema.FineGrainedConversionValueMappings fine_grained_conversion_value_mappings = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $fine_grained_conversion_value_mappings;
    /**
     * Output only. Per-postback conversion value mappings for postbacks in
     * multiple conversion windows. Only applicable for SkAdNetwork versions
     * >= 4.0.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.resources.CustomerSkAdNetworkConversionValueSchema.SkAdNetworkConversionValueSchema.PostbackMapping postback_mappings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $postback_mappings;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $app_id
     *           Required. Output only. Apple App Store app ID.
     *     @type int $measurement_window_hours
     *           Output only. A time window (measured in hours) post-install, after which
     *           the App Attribution Partner or advertiser stops calling
     *           [updateConversionValue]
     *           (https://developer.apple.com/documentation/storekit/skadnetwork/3566697-updateconversionvalue).
     *     @type array<\Google\Ads\GoogleAds\V23\Resources\CustomerSkAdNetworkConversionValueSchema\SkAdNetworkConversionValueSchema\FineGrainedConversionValueMappings>|\Google\Protobuf\Internal\RepeatedField $fine_grained_conversion_value_mappings
     *           Output only. Fine grained conversion value mappings.
     *           For SkAdNetwork versions >= 4.0 that support multiple conversion
     *           windows, fine grained conversion value mappings are only applicable to
     *           the first postback.
     *     @type array<\Google\Ads\GoogleAds\V23\Resources\CustomerSkAdNetworkConversionValueSchema\SkAdNetworkConversionValueSchema\PostbackMapping>|\Google\Protobuf\Internal\RepeatedField $postback_mappings
     *           Output only. Per-postback conversion value mappings for postbacks in
     *           multiple conversion windows. Only applicable for SkAdNetwork versions
     *           >= 4.0.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V23\Resources\CustomerSkAdNetworkConversionValueSchema::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Output only. Apple App Store app ID.
     *
     * Generated from protobuf field <code>string app_id = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getAppId()
    {
        return $this->app_id;
    }

    /**
     * Required. Output only. Apple App Store app ID.
     *
     * Generated from protobuf field <code>string app_id = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setAppId($var)
    {
        GPBUtil::checkString($var, True);
        $this->app_id = $var;

        return $this;
    }

    /**
     * Output only. A time window (measured in hours) post-install, after which
     * the App Attribution Partner or advertiser stops calling
     * [updateConversionValue]
     * (https://developer.apple.com/documentation/storekit/skadnetwork/3566697-updateconversionvalue).
     *
     * Generated from protobuf field <code>int32 measurement_window_hours = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getMeasurementWindowHours()
    {
        return $this->measurement_window_hours;
    }

    /**
     * Output only. A time window (measured in hours) post-install, after which
     * the App Attribution Partner or advertiser stops calling
     * [updateConversionValue]
     * (https://developer.apple.com/documentation/storekit/skadnetwork/3566697-updateconversionvalue).
     *
     * Generated from protobuf field <code>int32 measurement_window_hours = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setMeasurementWindowHours($var)
    {
        GPBUtil::checkInt32($var);
        $this->measurement_window_hours = $var;

        return $this;
    }

    /**
     * Output only. Fine grained conversion value mappings.
     * For SkAdNetwork versions >= 4.0 that support multiple conversion
     * windows, fine grained conversion value mappings are only applicable to
     * the first postback.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.resources.CustomerSkAdNetworkConversionValueSchema.SkAdNetworkConversionValueSchema.FineGrainedConversionValueMappings fine_grained_conversion_value_mappings = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getFineGrainedConversionValueMappings()
    {
        return $this->fine_grained_conversion_value_mappings;
    }

    /**
     * Output only. Fine grained conversion value mappings.
     * For SkAdNetwork versions >= 4.0 that support multiple conversion
     * windows, fine grained conversion value mappings are only applicable to
     * the first postback.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.resources.CustomerSkAdNetworkConversionValueSchema.SkAdNetworkConversionValueSchema.FineGrainedConversionValueMappings fine_grained_conversion_value_mappings = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param array<\Google\Ads\GoogleAds\V23\Resources\CustomerSkAdNetworkConversionValueSchema\SkAdNetworkConversionValueSchema\FineGrainedConversionValueMappings>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setFineGrainedConversionValueMappings($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V23\Resources\CustomerSkAdNetworkConversionValueSchema\SkAdNetworkConversionValueSchema\FineGrainedConversionValueMappings::class);
        $this->fine_grained_conversion_value_mappings = $arr;

        return $this;
    }

    /**
     * Output only. Per-postback conversion value mappings for postbacks in
     * multiple conversion windows. Only applicable for SkAdNetwork versions
     * >= 4.0.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.resources.CustomerSkAdNetworkConversionValueSchema.SkAdNetworkConversionValueSchema.PostbackMapping postback_mappings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getPostbackMappings()
    {
        return $this->postback_mappings;
    }

    /**
     * Output only. Per-postback conversion value mappings for postbacks in
     * multiple conversion windows. Only applicable for SkAdNetwork versions
     * >= 4.0.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.resources.CustomerSkAdNetworkConversionValueSchema.SkAdNetworkConversionValueSchema.PostbackMapping postback_mappings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param array<\Google\Ads\GoogleAds\V23\Resources\CustomerSkAdNetworkConversionValueSchema\SkAdNetworkConversionValueSchema\PostbackMapping>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setPostbackMappings($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V23\Resources\CustomerSkAdNetworkConversionValueSchema\SkAdNetworkConversionValueSchema\PostbackMapping::class);
        $this->postback_mappings = $arr;

        return $this;
    }

}

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

