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

namespace Google\Ads\GoogleAds\V20\Common;

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

/**
 * A video asset used inside an ad.
 *
 * Generated from protobuf message <code>google.ads.googleads.v20.common.AdVideoAsset</code>
 */
class AdVideoAsset extends \Google\Protobuf\Internal\Message
{
    /**
     * The Asset resource name of this video.
     *
     * Generated from protobuf field <code>optional string asset = 2;</code>
     */
    protected $asset = null;
    /**
     * Contains info fields for this AdVideoAsset.
     *
     * Generated from protobuf field <code>optional .google.ads.googleads.v20.common.AdVideoAssetInfo ad_video_asset_info = 4;</code>
     */
    protected $ad_video_asset_info = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $asset
     *           The Asset resource name of this video.
     *     @type \Google\Ads\GoogleAds\V20\Common\AdVideoAssetInfo $ad_video_asset_info
     *           Contains info fields for this AdVideoAsset.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V20\Common\AdAsset::initOnce();
        parent::__construct($data);
    }

    /**
     * The Asset resource name of this video.
     *
     * Generated from protobuf field <code>optional string asset = 2;</code>
     * @return string
     */
    public function getAsset()
    {
        return isset($this->asset) ? $this->asset : '';
    }

    public function hasAsset()
    {
        return isset($this->asset);
    }

    public function clearAsset()
    {
        unset($this->asset);
    }

    /**
     * The Asset resource name of this video.
     *
     * Generated from protobuf field <code>optional string asset = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setAsset($var)
    {
        GPBUtil::checkString($var, True);
        $this->asset = $var;

        return $this;
    }

    /**
     * Contains info fields for this AdVideoAsset.
     *
     * Generated from protobuf field <code>optional .google.ads.googleads.v20.common.AdVideoAssetInfo ad_video_asset_info = 4;</code>
     * @return \Google\Ads\GoogleAds\V20\Common\AdVideoAssetInfo|null
     */
    public function getAdVideoAssetInfo()
    {
        return $this->ad_video_asset_info;
    }

    public function hasAdVideoAssetInfo()
    {
        return isset($this->ad_video_asset_info);
    }

    public function clearAdVideoAssetInfo()
    {
        unset($this->ad_video_asset_info);
    }

    /**
     * Contains info fields for this AdVideoAsset.
     *
     * Generated from protobuf field <code>optional .google.ads.googleads.v20.common.AdVideoAssetInfo ad_video_asset_info = 4;</code>
     * @param \Google\Ads\GoogleAds\V20\Common\AdVideoAssetInfo $var
     * @return $this
     */
    public function setAdVideoAssetInfo($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V20\Common\AdVideoAssetInfo::class);
        $this->ad_video_asset_info = $var;

        return $this;
    }

}

