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

namespace Google\Ads\GoogleAds\V20\Resources;

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

/**
 * The identifier for YouTube video
 *
 * Generated from protobuf message <code>google.ads.googleads.v20.resources.YoutubeVideoIdentifier</code>
 */
class YoutubeVideoIdentifier extends \Google\Protobuf\Internal\Message
{
    /**
     * Immutable. The ID of the hosting channel of the video. This is a string
     * value with “UC” prefix. For example, "UCK8sQmJBp8GCxrOtXWBpyEA".
     *
     * Generated from protobuf field <code>optional string channel_id = 1 [(.google.api.field_behavior) = IMMUTABLE];</code>
     */
    protected $channel_id = null;
    /**
     * Immutable. The ID of the video associated with the video link. This is the
     * 11 character string value used in the YouTube video URL. For example, video
     * ID is jV1vkHv4zq8 from the YouTube video URL
     * "https://www.youtube.com/watch?v=jV1vkHv4zq8&t=2s".
     *
     * Generated from protobuf field <code>optional string video_id = 2 [(.google.api.field_behavior) = IMMUTABLE];</code>
     */
    protected $video_id = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $channel_id
     *           Immutable. The ID of the hosting channel of the video. This is a string
     *           value with “UC” prefix. For example, "UCK8sQmJBp8GCxrOtXWBpyEA".
     *     @type string $video_id
     *           Immutable. The ID of the video associated with the video link. This is the
     *           11 character string value used in the YouTube video URL. For example, video
     *           ID is jV1vkHv4zq8 from the YouTube video URL
     *           "https://www.youtube.com/watch?v=jV1vkHv4zq8&t=2s".
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V20\Resources\DataLink::initOnce();
        parent::__construct($data);
    }

    /**
     * Immutable. The ID of the hosting channel of the video. This is a string
     * value with “UC” prefix. For example, "UCK8sQmJBp8GCxrOtXWBpyEA".
     *
     * Generated from protobuf field <code>optional string channel_id = 1 [(.google.api.field_behavior) = IMMUTABLE];</code>
     * @return string
     */
    public function getChannelId()
    {
        return isset($this->channel_id) ? $this->channel_id : '';
    }

    public function hasChannelId()
    {
        return isset($this->channel_id);
    }

    public function clearChannelId()
    {
        unset($this->channel_id);
    }

    /**
     * Immutable. The ID of the hosting channel of the video. This is a string
     * value with “UC” prefix. For example, "UCK8sQmJBp8GCxrOtXWBpyEA".
     *
     * Generated from protobuf field <code>optional string channel_id = 1 [(.google.api.field_behavior) = IMMUTABLE];</code>
     * @param string $var
     * @return $this
     */
    public function setChannelId($var)
    {
        GPBUtil::checkString($var, True);
        $this->channel_id = $var;

        return $this;
    }

    /**
     * Immutable. The ID of the video associated with the video link. This is the
     * 11 character string value used in the YouTube video URL. For example, video
     * ID is jV1vkHv4zq8 from the YouTube video URL
     * "https://www.youtube.com/watch?v=jV1vkHv4zq8&t=2s".
     *
     * Generated from protobuf field <code>optional string video_id = 2 [(.google.api.field_behavior) = IMMUTABLE];</code>
     * @return string
     */
    public function getVideoId()
    {
        return isset($this->video_id) ? $this->video_id : '';
    }

    public function hasVideoId()
    {
        return isset($this->video_id);
    }

    public function clearVideoId()
    {
        unset($this->video_id);
    }

    /**
     * Immutable. The ID of the video associated with the video link. This is the
     * 11 character string value used in the YouTube video URL. For example, video
     * ID is jV1vkHv4zq8 from the YouTube video URL
     * "https://www.youtube.com/watch?v=jV1vkHv4zq8&t=2s".
     *
     * Generated from protobuf field <code>optional string video_id = 2 [(.google.api.field_behavior) = IMMUTABLE];</code>
     * @param string $var
     * @return $this
     */
    public function setVideoId($var)
    {
        GPBUtil::checkString($var, True);
        $this->video_id = $var;

        return $this;
    }

}

