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

namespace Google\Ads\GoogleAds\V16\Common;

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

/**
 * Target Frequency bidding goal details.
 *
 * Generated from protobuf message <code>google.ads.googleads.v16.common.TargetCpmTargetFrequencyGoal</code>
 */
class TargetCpmTargetFrequencyGoal extends \Google\Protobuf\Internal\Message
{
    /**
     * Target Frequency count representing how many times you want to reach
     * a single user.
     *
     * Generated from protobuf field <code>int64 target_count = 1;</code>
     */
    protected $target_count = 0;
    /**
     * Time window expressing the period over which you want to reach
     * the specified target_count.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v16.enums.TargetFrequencyTimeUnitEnum.TargetFrequencyTimeUnit time_unit = 2;</code>
     */
    protected $time_unit = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int|string $target_count
     *           Target Frequency count representing how many times you want to reach
     *           a single user.
     *     @type int $time_unit
     *           Time window expressing the period over which you want to reach
     *           the specified target_count.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V16\Common\Bidding::initOnce();
        parent::__construct($data);
    }

    /**
     * Target Frequency count representing how many times you want to reach
     * a single user.
     *
     * Generated from protobuf field <code>int64 target_count = 1;</code>
     * @return int|string
     */
    public function getTargetCount()
    {
        return $this->target_count;
    }

    /**
     * Target Frequency count representing how many times you want to reach
     * a single user.
     *
     * Generated from protobuf field <code>int64 target_count = 1;</code>
     * @param int|string $var
     * @return $this
     */
    public function setTargetCount($var)
    {
        GPBUtil::checkInt64($var);
        $this->target_count = $var;

        return $this;
    }

    /**
     * Time window expressing the period over which you want to reach
     * the specified target_count.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v16.enums.TargetFrequencyTimeUnitEnum.TargetFrequencyTimeUnit time_unit = 2;</code>
     * @return int
     */
    public function getTimeUnit()
    {
        return $this->time_unit;
    }

    /**
     * Time window expressing the period over which you want to reach
     * the specified target_count.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v16.enums.TargetFrequencyTimeUnitEnum.TargetFrequencyTimeUnit time_unit = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setTimeUnit($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V16\Enums\TargetFrequencyTimeUnitEnum\TargetFrequencyTimeUnit::class);
        $this->time_unit = $var;

        return $this;
    }

}

