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

namespace Google\Ads\GoogleAds\V23\Services;

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

/**
 * Message to hold a shareable preview result.
 *
 * Generated from protobuf message <code>google.ads.googleads.v23.services.ShareablePreviewResult</code>
 */
class ShareablePreviewResult extends \Google\Protobuf\Internal\Message
{
    /**
     * The shareable preview URL. Only populated if preview type is UI_PREVIEW
     * or unset.
     *
     * Generated from protobuf field <code>string shareable_preview_url = 1;</code>
     */
    protected $shareable_preview_url = '';
    /**
     * Expiration date time using the ISO-8601 format.
     *
     * Generated from protobuf field <code>string expiration_date_time = 2;</code>
     */
    protected $expiration_date_time = '';
    protected $result;

    /**
     * Constructor.
     *
     * @param array $data {
     *                    Optional. Data for populating the Message object.
     *
     * @type string $shareable_preview_url
     *           The shareable preview URL. Only populated if preview type is UI_PREVIEW
     *           or unset.
     * @type string $expiration_date_time
     *           Expiration date time using the ISO-8601 format.
     * @type \Google\Ads\GoogleAds\V23\Services\YouTubeLivePreviewResult $youtube_live_preview_result
     *           The result of a YouTube live preview. Only populated for preview type
     *           YOUTUBE_LIVE_PREVIEW.
     * }
     */
    public function __construct($data = null)
    {
        \GPBMetadata\Google\Ads\GoogleAds\V23\Services\ShareablePreviewService::initOnce();
        parent::__construct($data);
    }

    /**
     * The shareable preview URL. Only populated if preview type is UI_PREVIEW
     * or unset.
     *
     * Generated from protobuf field <code>string shareable_preview_url = 1;</code>
     *
     * @return string
     */
    public function getShareablePreviewUrl()
    {
        return $this->shareable_preview_url;
    }

    /**
     * The shareable preview URL. Only populated if preview type is UI_PREVIEW
     * or unset.
     *
     * Generated from protobuf field <code>string shareable_preview_url = 1;</code>
     *
     * @param  string $var
     * @return $this
     */
    public function setShareablePreviewUrl($var)
    {
        GPBUtil::checkString($var, true);
        $this->shareable_preview_url = $var;

        return $this;
    }

    /**
     * Expiration date time using the ISO-8601 format.
     *
     * Generated from protobuf field <code>string expiration_date_time = 2;</code>
     *
     * @return string
     */
    public function getExpirationDateTime()
    {
        return $this->expiration_date_time;
    }

    /**
     * Expiration date time using the ISO-8601 format.
     *
     * Generated from protobuf field <code>string expiration_date_time = 2;</code>
     *
     * @param  string $var
     * @return $this
     */
    public function setExpirationDateTime($var)
    {
        GPBUtil::checkString($var, true);
        $this->expiration_date_time = $var;

        return $this;
    }

    /**
     * The result of a YouTube live preview. Only populated for preview type
     * YOUTUBE_LIVE_PREVIEW.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.services.YouTubeLivePreviewResult youtube_live_preview_result = 3;</code>
     *
     * @return \Google\Ads\GoogleAds\V23\Services\YouTubeLivePreviewResult|null
     */
    public function getYoutubeLivePreviewResult()
    {
        return $this->readOneof(3);
    }

    public function hasYoutubeLivePreviewResult()
    {
        return $this->hasOneof(3);
    }

    /**
     * The result of a YouTube live preview. Only populated for preview type
     * YOUTUBE_LIVE_PREVIEW.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.services.YouTubeLivePreviewResult youtube_live_preview_result = 3;</code>
     *
     * @param  \Google\Ads\GoogleAds\V23\Services\YouTubeLivePreviewResult $var
     * @return $this
     */
    public function setYoutubeLivePreviewResult($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V23\Services\YouTubeLivePreviewResult::class);
        $this->writeOneof(3, $var);

        return $this;
    }

    /**
     * @return string
     */
    public function getResult()
    {
        return $this->whichOneof("result");
    }

}

