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

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

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

/**
 * Condition on Device dimension.
 *
 * Generated from protobuf message <code>google.ads.googleads.v23.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.v23.enums.ValueRuleDeviceTypeEnum.ValueRuleDeviceType device_types = 1;</code>
     */
    private $device_types;

    /**
     * Constructor.
     *
     * @param array $data {
     *                    Optional. Data for populating the Message object.
     *
     * @type int[] $device_types
     *           Value for device type condition.
     * }
     */
    public function __construct($data = null)
    {
        \GPBMetadata\Google\Ads\GoogleAds\V23\Resources\ConversionValueRule::initOnce();
        parent::__construct($data);
    }

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

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

        return $this;
    }

}

