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

namespace PhpWA\Protocol\Proto\Message\InteractiveMessage;

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

/**
 * Generated from protobuf message <code>proto.Message.InteractiveMessage.Header</code>
 */
class Header extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional string title = 1;</code>
     */
    protected $title = null;
    /**
     * Generated from protobuf field <code>optional string subtitle = 2;</code>
     */
    protected $subtitle = null;
    /**
     * Generated from protobuf field <code>optional bool hasMediaAttachment = 5;</code>
     */
    protected $hasMediaAttachment = null;
    protected $media;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $title
     *     @type string $subtitle
     *     @type bool $hasMediaAttachment
     *     @type \PhpWA\Protocol\Proto\Message\DocumentMessage $documentMessage
     *     @type \PhpWA\Protocol\Proto\Message\ImageMessage $imageMessage
     *     @type string $jpegThumbnail
     *     @type \PhpWA\Protocol\Proto\Message\VideoMessage $videoMessage
     *     @type \PhpWA\Protocol\Proto\Message\LocationMessage $locationMessage
     *     @type \PhpWA\Protocol\Proto\Message\ProductMessage $productMessage
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>optional string title = 1;</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 = 1;</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 subtitle = 2;</code>
     * @return string
     */
    public function getSubtitle()
    {
        return isset($this->subtitle) ? $this->subtitle : '';
    }

    public function hasSubtitle()
    {
        return isset($this->subtitle);
    }

    public function clearSubtitle()
    {
        unset($this->subtitle);
    }

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

        return $this;
    }

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

    public function hasHasMediaAttachment()
    {
        return isset($this->hasMediaAttachment);
    }

    public function clearHasMediaAttachment()
    {
        unset($this->hasMediaAttachment);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.proto.Message.DocumentMessage documentMessage = 3;</code>
     * @return \PhpWA\Protocol\Proto\Message\DocumentMessage|null
     */
    public function getDocumentMessage()
    {
        return $this->readOneof(3);
    }

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

    /**
     * Generated from protobuf field <code>.proto.Message.DocumentMessage documentMessage = 3;</code>
     * @param \PhpWA\Protocol\Proto\Message\DocumentMessage $var
     * @return $this
     */
    public function setDocumentMessage($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\Message\DocumentMessage::class);
        $this->writeOneof(3, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.proto.Message.ImageMessage imageMessage = 4;</code>
     * @return \PhpWA\Protocol\Proto\Message\ImageMessage|null
     */
    public function getImageMessage()
    {
        return $this->readOneof(4);
    }

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

    /**
     * Generated from protobuf field <code>.proto.Message.ImageMessage imageMessage = 4;</code>
     * @param \PhpWA\Protocol\Proto\Message\ImageMessage $var
     * @return $this
     */
    public function setImageMessage($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\Message\ImageMessage::class);
        $this->writeOneof(4, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>bytes jpegThumbnail = 6;</code>
     * @return string
     */
    public function getJpegThumbnail()
    {
        return $this->readOneof(6);
    }

    public function hasJpegThumbnail()
    {
        return $this->hasOneof(6);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.proto.Message.VideoMessage videoMessage = 7;</code>
     * @return \PhpWA\Protocol\Proto\Message\VideoMessage|null
     */
    public function getVideoMessage()
    {
        return $this->readOneof(7);
    }

    public function hasVideoMessage()
    {
        return $this->hasOneof(7);
    }

    /**
     * Generated from protobuf field <code>.proto.Message.VideoMessage videoMessage = 7;</code>
     * @param \PhpWA\Protocol\Proto\Message\VideoMessage $var
     * @return $this
     */
    public function setVideoMessage($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\Message\VideoMessage::class);
        $this->writeOneof(7, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.proto.Message.LocationMessage locationMessage = 8;</code>
     * @return \PhpWA\Protocol\Proto\Message\LocationMessage|null
     */
    public function getLocationMessage()
    {
        return $this->readOneof(8);
    }

    public function hasLocationMessage()
    {
        return $this->hasOneof(8);
    }

    /**
     * Generated from protobuf field <code>.proto.Message.LocationMessage locationMessage = 8;</code>
     * @param \PhpWA\Protocol\Proto\Message\LocationMessage $var
     * @return $this
     */
    public function setLocationMessage($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\Message\LocationMessage::class);
        $this->writeOneof(8, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.proto.Message.ProductMessage productMessage = 9;</code>
     * @return \PhpWA\Protocol\Proto\Message\ProductMessage|null
     */
    public function getProductMessage()
    {
        return $this->readOneof(9);
    }

    public function hasProductMessage()
    {
        return $this->hasOneof(9);
    }

    /**
     * Generated from protobuf field <code>.proto.Message.ProductMessage productMessage = 9;</code>
     * @param \PhpWA\Protocol\Proto\Message\ProductMessage $var
     * @return $this
     */
    public function setProductMessage($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\Message\ProductMessage::class);
        $this->writeOneof(9, $var);

        return $this;
    }

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

}

