<?php
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/ads/googleads/v24/actions/generate_shareable_previews.proto

namespace Google\Ads\GoogleAds\V24\Actions;

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.v24.actions.ShareablePreviewResult</code>
 */
class ShareablePreviewResult extends \Google\Protobuf\Internal\Message
{
    /**
     * Expiration date time using the ISO-8601 format.
     *
     * Generated from protobuf field <code>string expiration_date_time = 3;</code>
     */
    protected $expiration_date_time = '';
    protected $result;
    protected $identifier;

    /**
     * Constructor.
     *
     * @param array $data {
     *                    Optional. Data for populating the Message object.
     *
     * @type string $expiration_date_time
     *           Expiration date time using the ISO-8601 format.
     * @type \Google\Ads\GoogleAds\V24\Actions\UiPreviewResult $ui_preview_result
     *           The result of a UI preview. Only populated for preview type UI_PREVIEW.
     * @type \Google\Ads\GoogleAds\V24\Actions\YouTubeLivePreviewResult $youtube_live_preview_result
     *           The result of a YouTube live preview. Only populated for preview type
     *           YOUTUBE_LIVE_PREVIEW.
     * @type string $ad_group_ad
     *           Ad group ad of the shareable preview.
     *           Format: customers/{customer_id}/adGroupAds/{ad_group_id}~{ad_id}
     * @type string $asset_group
     *           Asset group of the shareable preview.
     *           Format: customers/{customer_id}/assetGroups/{asset_group_id}
     * }
     */
    public function __construct($data = null)
    {
        \GPBMetadata\Google\Ads\GoogleAds\V24\Actions\GenerateShareablePreviews::initOnce();
        parent::__construct($data);
    }

    /**
     * Expiration date time using the ISO-8601 format.
     *
     * Generated from protobuf field <code>string expiration_date_time = 3;</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 = 3;</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 UI preview. Only populated for preview type UI_PREVIEW.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v24.actions.UiPreviewResult ui_preview_result = 1;</code>
     *
     * @return \Google\Ads\GoogleAds\V24\Actions\UiPreviewResult|null
     */
    public function getUiPreviewResult()
    {
        return $this->readOneof(1);
    }

    public function hasUiPreviewResult()
    {
        return $this->hasOneof(1);
    }

    /**
     * The result of a UI preview. Only populated for preview type UI_PREVIEW.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v24.actions.UiPreviewResult ui_preview_result = 1;</code>
     *
     * @param  \Google\Ads\GoogleAds\V24\Actions\UiPreviewResult $var
     * @return $this
     */
    public function setUiPreviewResult($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V24\Actions\UiPreviewResult::class);
        $this->writeOneof(1, $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.v24.actions.YouTubeLivePreviewResult youtube_live_preview_result = 2;</code>
     *
     * @return \Google\Ads\GoogleAds\V24\Actions\YouTubeLivePreviewResult|null
     */
    public function getYoutubeLivePreviewResult()
    {
        return $this->readOneof(2);
    }

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

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

        return $this;
    }

    /**
     * Ad group ad of the shareable preview.
     * Format: customers/{customer_id}/adGroupAds/{ad_group_id}~{ad_id}
     *
     * Generated from protobuf field <code>string ad_group_ad = 4;</code>
     *
     * @return string
     */
    public function getAdGroupAd()
    {
        return $this->readOneof(4);
    }

    public function hasAdGroupAd()
    {
        return $this->hasOneof(4);
    }

    /**
     * Ad group ad of the shareable preview.
     * Format: customers/{customer_id}/adGroupAds/{ad_group_id}~{ad_id}
     *
     * Generated from protobuf field <code>string ad_group_ad = 4;</code>
     *
     * @param  string $var
     * @return $this
     */
    public function setAdGroupAd($var)
    {
        GPBUtil::checkString($var, true);
        $this->writeOneof(4, $var);

        return $this;
    }

    /**
     * Asset group of the shareable preview.
     * Format: customers/{customer_id}/assetGroups/{asset_group_id}
     *
     * Generated from protobuf field <code>string asset_group = 5;</code>
     *
     * @return string
     */
    public function getAssetGroup()
    {
        return $this->readOneof(5);
    }

    public function hasAssetGroup()
    {
        return $this->hasOneof(5);
    }

    /**
     * Asset group of the shareable preview.
     * Format: customers/{customer_id}/assetGroups/{asset_group_id}
     *
     * Generated from protobuf field <code>string asset_group = 5;</code>
     *
     * @param  string $var
     * @return $this
     */
    public function setAssetGroup($var)
    {
        GPBUtil::checkString($var, true);
        $this->writeOneof(5, $var);

        return $this;
    }

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

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

}

