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

namespace Google\Ads\GoogleAds\V23\Resources\Campaign\VideoCampaignSettings;

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

/**
 * Restrictions for non-skippable format.
 *
 * Generated from protobuf message <code>google.ads.googleads.v23.resources.Campaign.VideoCampaignSettings.NonSkippableInStreamRestrictions</code>
 */
class NonSkippableInStreamRestrictions extends \Google\Protobuf\Internal\Message
{
    /**
     * The minimum allowed duration for non-skippable ads.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.enums.NonSkippableMinDurationEnum.NonSkippableMinDuration min_duration = 1;</code>
     */
    protected $min_duration = 0;
    /**
     * The maximum allowed duration for non-skippable ads.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.enums.NonSkippableMaxDurationEnum.NonSkippableMaxDuration max_duration = 2;</code>
     */
    protected $max_duration = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $min_duration
     *           The minimum allowed duration for non-skippable ads.
     *     @type int $max_duration
     *           The maximum allowed duration for non-skippable ads.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V23\Resources\Campaign::initOnce();
        parent::__construct($data);
    }

    /**
     * The minimum allowed duration for non-skippable ads.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.enums.NonSkippableMinDurationEnum.NonSkippableMinDuration min_duration = 1;</code>
     * @return int
     */
    public function getMinDuration()
    {
        return $this->min_duration;
    }

    /**
     * The minimum allowed duration for non-skippable ads.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.enums.NonSkippableMinDurationEnum.NonSkippableMinDuration min_duration = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setMinDuration($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V23\Enums\NonSkippableMinDurationEnum\NonSkippableMinDuration::class);
        $this->min_duration = $var;

        return $this;
    }

    /**
     * The maximum allowed duration for non-skippable ads.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.enums.NonSkippableMaxDurationEnum.NonSkippableMaxDuration max_duration = 2;</code>
     * @return int
     */
    public function getMaxDuration()
    {
        return $this->max_duration;
    }

    /**
     * The maximum allowed duration for non-skippable ads.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.enums.NonSkippableMaxDurationEnum.NonSkippableMaxDuration max_duration = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setMaxDuration($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V23\Enums\NonSkippableMaxDurationEnum\NonSkippableMaxDuration::class);
        $this->max_duration = $var;

        return $this;
    }

}

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

