<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: WAProto.proto

namespace PhpWA\Protocol\Proto\ChatRowOpaqueData\DraftMessage;

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

/**
 * Generated from protobuf message <code>proto.ChatRowOpaqueData.DraftMessage.CtwaContextData</code>
 */
class CtwaContextData extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional string conversionSource = 1;</code>
     */
    protected $conversionSource = null;
    /**
     * Generated from protobuf field <code>optional bytes conversionData = 2;</code>
     */
    protected $conversionData = null;
    /**
     * Generated from protobuf field <code>optional string sourceUrl = 3;</code>
     */
    protected $sourceUrl = null;
    /**
     * Generated from protobuf field <code>optional string sourceId = 4;</code>
     */
    protected $sourceId = null;
    /**
     * Generated from protobuf field <code>optional string sourceType = 5;</code>
     */
    protected $sourceType = null;
    /**
     * Generated from protobuf field <code>optional string title = 6;</code>
     */
    protected $title = null;
    /**
     * Generated from protobuf field <code>optional string description = 7;</code>
     */
    protected $description = null;
    /**
     * Generated from protobuf field <code>optional string thumbnail = 8;</code>
     */
    protected $thumbnail = null;
    /**
     * Generated from protobuf field <code>optional string thumbnailUrl = 9;</code>
     */
    protected $thumbnailUrl = null;
    /**
     * Generated from protobuf field <code>optional .proto.ChatRowOpaqueData.DraftMessage.CtwaContextData.ContextInfoExternalAdReplyInfoMediaType mediaType = 10;</code>
     */
    protected $mediaType = null;
    /**
     * Generated from protobuf field <code>optional string mediaUrl = 11;</code>
     */
    protected $mediaUrl = null;
    /**
     * Generated from protobuf field <code>optional bool isSuspiciousLink = 12;</code>
     */
    protected $isSuspiciousLink = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $conversionSource
     *     @type string $conversionData
     *     @type string $sourceUrl
     *     @type string $sourceId
     *     @type string $sourceType
     *     @type string $title
     *     @type string $description
     *     @type string $thumbnail
     *     @type string $thumbnailUrl
     *     @type int $mediaType
     *     @type string $mediaUrl
     *     @type bool $isSuspiciousLink
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>optional string conversionSource = 1;</code>
     * @return string
     */
    public function getConversionSource()
    {
        return isset($this->conversionSource) ? $this->conversionSource : '';
    }

    public function hasConversionSource()
    {
        return isset($this->conversionSource);
    }

    public function clearConversionSource()
    {
        unset($this->conversionSource);
    }

    /**
     * Generated from protobuf field <code>optional string conversionSource = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setConversionSource($var)
    {
        GPBUtil::checkString($var, True);
        $this->conversionSource = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional bytes conversionData = 2;</code>
     * @return string
     */
    public function getConversionData()
    {
        return isset($this->conversionData) ? $this->conversionData : '';
    }

    public function hasConversionData()
    {
        return isset($this->conversionData);
    }

    public function clearConversionData()
    {
        unset($this->conversionData);
    }

    /**
     * Generated from protobuf field <code>optional bytes conversionData = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setConversionData($var)
    {
        GPBUtil::checkString($var, False);
        $this->conversionData = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional string sourceUrl = 3;</code>
     * @return string
     */
    public function getSourceUrl()
    {
        return isset($this->sourceUrl) ? $this->sourceUrl : '';
    }

    public function hasSourceUrl()
    {
        return isset($this->sourceUrl);
    }

    public function clearSourceUrl()
    {
        unset($this->sourceUrl);
    }

    /**
     * Generated from protobuf field <code>optional string sourceUrl = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setSourceUrl($var)
    {
        GPBUtil::checkString($var, True);
        $this->sourceUrl = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional string sourceId = 4;</code>
     * @return string
     */
    public function getSourceId()
    {
        return isset($this->sourceId) ? $this->sourceId : '';
    }

    public function hasSourceId()
    {
        return isset($this->sourceId);
    }

    public function clearSourceId()
    {
        unset($this->sourceId);
    }

    /**
     * Generated from protobuf field <code>optional string sourceId = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setSourceId($var)
    {
        GPBUtil::checkString($var, True);
        $this->sourceId = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional string sourceType = 5;</code>
     * @return string
     */
    public function getSourceType()
    {
        return isset($this->sourceType) ? $this->sourceType : '';
    }

    public function hasSourceType()
    {
        return isset($this->sourceType);
    }

    public function clearSourceType()
    {
        unset($this->sourceType);
    }

    /**
     * Generated from protobuf field <code>optional string sourceType = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setSourceType($var)
    {
        GPBUtil::checkString($var, True);
        $this->sourceType = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional string title = 6;</code>
     * @return string
     */
    public function getTitle()
    {
        return isset($this->title) ? $this->title : '';
    }

    public function hasTitle()
    {
        return isset($this->title);
    }

    public function clearTitle()
    {
        unset($this->title);
    }

    /**
     * Generated from protobuf field <code>optional string title = 6;</code>
     * @param string $var
     * @return $this
     */
    public function setTitle($var)
    {
        GPBUtil::checkString($var, True);
        $this->title = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional string description = 7;</code>
     * @return string
     */
    public function getDescription()
    {
        return isset($this->description) ? $this->description : '';
    }

    public function hasDescription()
    {
        return isset($this->description);
    }

    public function clearDescription()
    {
        unset($this->description);
    }

    /**
     * Generated from protobuf field <code>optional string description = 7;</code>
     * @param string $var
     * @return $this
     */
    public function setDescription($var)
    {
        GPBUtil::checkString($var, True);
        $this->description = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional string thumbnail = 8;</code>
     * @return string
     */
    public function getThumbnail()
    {
        return isset($this->thumbnail) ? $this->thumbnail : '';
    }

    public function hasThumbnail()
    {
        return isset($this->thumbnail);
    }

    public function clearThumbnail()
    {
        unset($this->thumbnail);
    }

    /**
     * Generated from protobuf field <code>optional string thumbnail = 8;</code>
     * @param string $var
     * @return $this
     */
    public function setThumbnail($var)
    {
        GPBUtil::checkString($var, True);
        $this->thumbnail = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional string thumbnailUrl = 9;</code>
     * @return string
     */
    public function getThumbnailUrl()
    {
        return isset($this->thumbnailUrl) ? $this->thumbnailUrl : '';
    }

    public function hasThumbnailUrl()
    {
        return isset($this->thumbnailUrl);
    }

    public function clearThumbnailUrl()
    {
        unset($this->thumbnailUrl);
    }

    /**
     * Generated from protobuf field <code>optional string thumbnailUrl = 9;</code>
     * @param string $var
     * @return $this
     */
    public function setThumbnailUrl($var)
    {
        GPBUtil::checkString($var, True);
        $this->thumbnailUrl = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.ChatRowOpaqueData.DraftMessage.CtwaContextData.ContextInfoExternalAdReplyInfoMediaType mediaType = 10;</code>
     * @return int
     */
    public function getMediaType()
    {
        return isset($this->mediaType) ? $this->mediaType : 0;
    }

    public function hasMediaType()
    {
        return isset($this->mediaType);
    }

    public function clearMediaType()
    {
        unset($this->mediaType);
    }

    /**
     * Generated from protobuf field <code>optional .proto.ChatRowOpaqueData.DraftMessage.CtwaContextData.ContextInfoExternalAdReplyInfoMediaType mediaType = 10;</code>
     * @param int $var
     * @return $this
     */
    public function setMediaType($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\ChatRowOpaqueData\DraftMessage\CtwaContextData\ContextInfoExternalAdReplyInfoMediaType::class);
        $this->mediaType = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional string mediaUrl = 11;</code>
     * @return string
     */
    public function getMediaUrl()
    {
        return isset($this->mediaUrl) ? $this->mediaUrl : '';
    }

    public function hasMediaUrl()
    {
        return isset($this->mediaUrl);
    }

    public function clearMediaUrl()
    {
        unset($this->mediaUrl);
    }

    /**
     * Generated from protobuf field <code>optional string mediaUrl = 11;</code>
     * @param string $var
     * @return $this
     */
    public function setMediaUrl($var)
    {
        GPBUtil::checkString($var, True);
        $this->mediaUrl = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional bool isSuspiciousLink = 12;</code>
     * @return bool
     */
    public function getIsSuspiciousLink()
    {
        return isset($this->isSuspiciousLink) ? $this->isSuspiciousLink : false;
    }

    public function hasIsSuspiciousLink()
    {
        return isset($this->isSuspiciousLink);
    }

    public function clearIsSuspiciousLink()
    {
        unset($this->isSuspiciousLink);
    }

    /**
     * Generated from protobuf field <code>optional bool isSuspiciousLink = 12;</code>
     * @param bool $var
     * @return $this
     */
    public function setIsSuspiciousLink($var)
    {
        GPBUtil::checkBool($var);
        $this->isSuspiciousLink = $var;

        return $this;
    }

}

