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

namespace PhpWA\Protocol\Proto\Message\TemplateMessage;

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

/**
 * Generated from protobuf message <code>proto.Message.TemplateMessage.FourRowTemplate</code>
 */
class FourRowTemplate extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional .proto.Message.HighlyStructuredMessage content = 6;</code>
     */
    protected $content = null;
    /**
     * Generated from protobuf field <code>optional .proto.Message.HighlyStructuredMessage footer = 7;</code>
     */
    protected $footer = null;
    /**
     * Generated from protobuf field <code>repeated .proto.TemplateButton buttons = 8;</code>
     */
    private $buttons;
    protected $title;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \PhpWA\Protocol\Proto\Message\HighlyStructuredMessage $content
     *     @type \PhpWA\Protocol\Proto\Message\HighlyStructuredMessage $footer
     *     @type \PhpWA\Protocol\Proto\TemplateButton[] $buttons
     *     @type \PhpWA\Protocol\Proto\Message\DocumentMessage $documentMessage
     *     @type \PhpWA\Protocol\Proto\Message\HighlyStructuredMessage $highlyStructuredMessage
     *     @type \PhpWA\Protocol\Proto\Message\ImageMessage $imageMessage
     *     @type \PhpWA\Protocol\Proto\Message\VideoMessage $videoMessage
     *     @type \PhpWA\Protocol\Proto\Message\LocationMessage $locationMessage
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>optional .proto.Message.HighlyStructuredMessage content = 6;</code>
     * @return \PhpWA\Protocol\Proto\Message\HighlyStructuredMessage|null
     */
    public function getContent()
    {
        return $this->content;
    }

    public function hasContent()
    {
        return isset($this->content);
    }

    public function clearContent()
    {
        unset($this->content);
    }

    /**
     * Generated from protobuf field <code>optional .proto.Message.HighlyStructuredMessage content = 6;</code>
     * @param \PhpWA\Protocol\Proto\Message\HighlyStructuredMessage $var
     * @return $this
     */
    public function setContent($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\Message\HighlyStructuredMessage::class);
        $this->content = $var;

        return $this;
    }

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

    public function hasFooter()
    {
        return isset($this->footer);
    }

    public function clearFooter()
    {
        unset($this->footer);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .proto.TemplateButton buttons = 8;</code>
     * @return RepeatedField<\PhpWA\Protocol\Proto\TemplateButton>
     */
    public function getButtons()
    {
        return $this->buttons;
    }

    /**
     * Generated from protobuf field <code>repeated .proto.TemplateButton buttons = 8;</code>
     * @param \PhpWA\Protocol\Proto\TemplateButton[] $var
     * @return $this
     */
    public function setButtons($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \PhpWA\Protocol\Proto\TemplateButton::class);
        $this->buttons = $arr;

        return $this;
    }

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

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

    /**
     * Generated from protobuf field <code>.proto.Message.DocumentMessage documentMessage = 1;</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(1, $var);

        return $this;
    }

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

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

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

        return $this;
    }

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

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

    /**
     * Generated from protobuf field <code>.proto.Message.ImageMessage imageMessage = 3;</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(3, $var);

        return $this;
    }

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

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

    /**
     * Generated from protobuf field <code>.proto.Message.VideoMessage videoMessage = 4;</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(4, $var);

        return $this;
    }

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

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

    /**
     * Generated from protobuf field <code>.proto.Message.LocationMessage locationMessage = 5;</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(5, $var);

        return $this;
    }

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

}

