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

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

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

/**
 * Format-restricting control enabling usage of Video Responsive ads in
 * format defined Video campaigns (for example, non-skippable).
 *
 * Generated from protobuf message <code>google.ads.googleads.v20.resources.Campaign.VideoCampaignSettings.VideoAdFormatControl</code>
 */
class VideoAdFormatControl extends \Google\Protobuf\Internal\Message
{
    /**
     * All contained responsive ads are expected to respect this restriction.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v20.enums.VideoAdFormatRestrictionEnum.VideoAdFormatRestriction format_restriction = 1;</code>
     */
    protected $format_restriction = 0;
    /**
     * Restrictions for non-skippable format.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v20.resources.Campaign.VideoCampaignSettings.NonSkippableInStreamRestrictions non_skippable_in_stream_restrictions = 2;</code>
     */
    protected $non_skippable_in_stream_restrictions = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $format_restriction
     *           All contained responsive ads are expected to respect this restriction.
     *     @type \Google\Ads\GoogleAds\V20\Resources\Campaign\VideoCampaignSettings\NonSkippableInStreamRestrictions $non_skippable_in_stream_restrictions
     *           Restrictions for non-skippable format.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V20\Resources\Campaign::initOnce();
        parent::__construct($data);
    }

    /**
     * All contained responsive ads are expected to respect this restriction.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v20.enums.VideoAdFormatRestrictionEnum.VideoAdFormatRestriction format_restriction = 1;</code>
     * @return int
     */
    public function getFormatRestriction()
    {
        return $this->format_restriction;
    }

    /**
     * All contained responsive ads are expected to respect this restriction.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v20.enums.VideoAdFormatRestrictionEnum.VideoAdFormatRestriction format_restriction = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setFormatRestriction($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V20\Enums\VideoAdFormatRestrictionEnum\VideoAdFormatRestriction::class);
        $this->format_restriction = $var;

        return $this;
    }

    /**
     * Restrictions for non-skippable format.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v20.resources.Campaign.VideoCampaignSettings.NonSkippableInStreamRestrictions non_skippable_in_stream_restrictions = 2;</code>
     * @return \Google\Ads\GoogleAds\V20\Resources\Campaign\VideoCampaignSettings\NonSkippableInStreamRestrictions|null
     */
    public function getNonSkippableInStreamRestrictions()
    {
        return $this->non_skippable_in_stream_restrictions;
    }

    public function hasNonSkippableInStreamRestrictions()
    {
        return isset($this->non_skippable_in_stream_restrictions);
    }

    public function clearNonSkippableInStreamRestrictions()
    {
        unset($this->non_skippable_in_stream_restrictions);
    }

    /**
     * Restrictions for non-skippable format.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v20.resources.Campaign.VideoCampaignSettings.NonSkippableInStreamRestrictions non_skippable_in_stream_restrictions = 2;</code>
     * @param \Google\Ads\GoogleAds\V20\Resources\Campaign\VideoCampaignSettings\NonSkippableInStreamRestrictions $var
     * @return $this
     */
    public function setNonSkippableInStreamRestrictions($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V20\Resources\Campaign\VideoCampaignSettings\NonSkippableInStreamRestrictions::class);
        $this->non_skippable_in_stream_restrictions = $var;

        return $this;
    }

}

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

