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

namespace PhpWA\Protocol\Proto\BotSourcesMetadata;

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

/**
 * Generated from protobuf message <code>proto.BotSourcesMetadata.BotSourceItem</code>
 */
class BotSourceItem extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional .proto.BotSourcesMetadata.BotSourceItem.SourceProvider provider = 1;</code>
     */
    protected $provider = null;
    /**
     * Generated from protobuf field <code>optional string thumbnailCdnUrl = 2;</code>
     */
    protected $thumbnailCdnUrl = null;
    /**
     * Generated from protobuf field <code>optional string sourceProviderUrl = 3;</code>
     */
    protected $sourceProviderUrl = null;
    /**
     * Generated from protobuf field <code>optional string sourceQuery = 4;</code>
     */
    protected $sourceQuery = null;
    /**
     * Generated from protobuf field <code>optional string faviconCdnUrl = 5;</code>
     */
    protected $faviconCdnUrl = null;
    /**
     * Generated from protobuf field <code>optional uint32 citationNumber = 6;</code>
     */
    protected $citationNumber = null;
    /**
     * Generated from protobuf field <code>optional string sourceTitle = 7;</code>
     */
    protected $sourceTitle = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $provider
     *     @type string $thumbnailCdnUrl
     *     @type string $sourceProviderUrl
     *     @type string $sourceQuery
     *     @type string $faviconCdnUrl
     *     @type int $citationNumber
     *     @type string $sourceTitle
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>optional .proto.BotSourcesMetadata.BotSourceItem.SourceProvider provider = 1;</code>
     * @return int
     */
    public function getProvider()
    {
        return isset($this->provider) ? $this->provider : 0;
    }

    public function hasProvider()
    {
        return isset($this->provider);
    }

    public function clearProvider()
    {
        unset($this->provider);
    }

    /**
     * Generated from protobuf field <code>optional .proto.BotSourcesMetadata.BotSourceItem.SourceProvider provider = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setProvider($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\BotSourcesMetadata\BotSourceItem\SourceProvider::class);
        $this->provider = $var;

        return $this;
    }

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

    public function hasThumbnailCdnUrl()
    {
        return isset($this->thumbnailCdnUrl);
    }

    public function clearThumbnailCdnUrl()
    {
        unset($this->thumbnailCdnUrl);
    }

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

        return $this;
    }

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

    public function hasSourceProviderUrl()
    {
        return isset($this->sourceProviderUrl);
    }

    public function clearSourceProviderUrl()
    {
        unset($this->sourceProviderUrl);
    }

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

        return $this;
    }

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

    public function hasSourceQuery()
    {
        return isset($this->sourceQuery);
    }

    public function clearSourceQuery()
    {
        unset($this->sourceQuery);
    }

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

        return $this;
    }

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

    public function hasFaviconCdnUrl()
    {
        return isset($this->faviconCdnUrl);
    }

    public function clearFaviconCdnUrl()
    {
        unset($this->faviconCdnUrl);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional uint32 citationNumber = 6;</code>
     * @return int
     */
    public function getCitationNumber()
    {
        return isset($this->citationNumber) ? $this->citationNumber : 0;
    }

    public function hasCitationNumber()
    {
        return isset($this->citationNumber);
    }

    public function clearCitationNumber()
    {
        unset($this->citationNumber);
    }

    /**
     * Generated from protobuf field <code>optional uint32 citationNumber = 6;</code>
     * @param int $var
     * @return $this
     */
    public function setCitationNumber($var)
    {
        GPBUtil::checkUint32($var);
        $this->citationNumber = $var;

        return $this;
    }

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

    public function hasSourceTitle()
    {
        return isset($this->sourceTitle);
    }

    public function clearSourceTitle()
    {
        unset($this->sourceTitle);
    }

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

        return $this;
    }

}

