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

namespace PhpWA\Protocol\Proto\ContextInfo;

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

/**
 * Generated from protobuf message <code>proto.ContextInfo.AdReplyInfo</code>
 */
class AdReplyInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional string advertiserName = 1;</code>
     */
    protected $advertiserName = null;
    /**
     * Generated from protobuf field <code>optional .proto.ContextInfo.AdReplyInfo.MediaType mediaType = 2;</code>
     */
    protected $mediaType = null;
    /**
     * Generated from protobuf field <code>optional bytes jpegThumbnail = 16;</code>
     */
    protected $jpegThumbnail = null;
    /**
     * Generated from protobuf field <code>optional string caption = 17;</code>
     */
    protected $caption = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $advertiserName
     *     @type int $mediaType
     *     @type string $jpegThumbnail
     *     @type string $caption
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

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

    public function hasAdvertiserName()
    {
        return isset($this->advertiserName);
    }

    public function clearAdvertiserName()
    {
        unset($this->advertiserName);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.ContextInfo.AdReplyInfo.MediaType mediaType = 2;</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.ContextInfo.AdReplyInfo.MediaType mediaType = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setMediaType($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\ContextInfo\AdReplyInfo\MediaType::class);
        $this->mediaType = $var;

        return $this;
    }

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

    public function hasJpegThumbnail()
    {
        return isset($this->jpegThumbnail);
    }

    public function clearJpegThumbnail()
    {
        unset($this->jpegThumbnail);
    }

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

        return $this;
    }

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

    public function hasCaption()
    {
        return isset($this->caption);
    }

    public function clearCaption()
    {
        unset($this->caption);
    }

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

        return $this;
    }

}

