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

namespace Google\Ads\GoogleAds\V20\Resources\ConversionValueRule;

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

/**
 * Condition on Device dimension.
 *
 * Generated from protobuf message <code>google.ads.googleads.v20.resources.ConversionValueRule.ValueRuleDeviceCondition</code>
 */
class ValueRuleDeviceCondition extends \Google\Protobuf\Internal\Message
{
    /**
     * Value for device type condition.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v20.enums.ValueRuleDeviceTypeEnum.ValueRuleDeviceType device_types = 1;</code>
     */
    private $device_types;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<int>|\Google\Protobuf\Internal\RepeatedField $device_types
     *           Value for device type condition.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V20\Resources\ConversionValueRule::initOnce();
        parent::__construct($data);
    }

    /**
     * Value for device type condition.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v20.enums.ValueRuleDeviceTypeEnum.ValueRuleDeviceType device_types = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getDeviceTypes()
    {
        return $this->device_types;
    }

    /**
     * Value for device type condition.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v20.enums.ValueRuleDeviceTypeEnum.ValueRuleDeviceType device_types = 1;</code>
     * @param array<int>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setDeviceTypes($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Ads\GoogleAds\V20\Enums\ValueRuleDeviceTypeEnum\ValueRuleDeviceType::class);
        $this->device_types = $arr;

        return $this;
    }

}

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

