<?php
 
 
 

namespace PhpWA\Protocol\Proto\Message;

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




class TemplateMessage extends \Google\Protobuf\Internal\Message
{
    


    protected $contextInfo = null;
    


    protected $hydratedTemplate = null;
    


    protected $templateId = null;
    protected $format;

    













    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

    



    public function getContextInfo()
    {
        return $this->contextInfo;
    }

    public function hasContextInfo()
    {
        return isset($this->contextInfo);
    }

    public function clearContextInfo()
    {
        unset($this->contextInfo);
    }

    




    public function setContextInfo($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\ContextInfo::class);
        $this->contextInfo = $var;

        return $this;
    }

    



    public function getHydratedTemplate()
    {
        return $this->hydratedTemplate;
    }

    public function hasHydratedTemplate()
    {
        return isset($this->hydratedTemplate);
    }

    public function clearHydratedTemplate()
    {
        unset($this->hydratedTemplate);
    }

    




    public function setHydratedTemplate($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\Message\TemplateMessage\HydratedFourRowTemplate::class);
        $this->hydratedTemplate = $var;

        return $this;
    }

    



    public function getTemplateId()
    {
        return isset($this->templateId) ? $this->templateId : '';
    }

    public function hasTemplateId()
    {
        return isset($this->templateId);
    }

    public function clearTemplateId()
    {
        unset($this->templateId);
    }

    




    public function setTemplateId($var)
    {
        GPBUtil::checkString($var, True);
        $this->templateId = $var;

        return $this;
    }

    



    public function getFourRowTemplate()
    {
        return $this->readOneof(1);
    }

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

    




    public function setFourRowTemplate($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\Message\TemplateMessage\FourRowTemplate::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    



    public function getHydratedFourRowTemplate()
    {
        return $this->readOneof(2);
    }

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

    




    public function setHydratedFourRowTemplate($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\Message\TemplateMessage\HydratedFourRowTemplate::class);
        $this->writeOneof(2, $var);

        return $this;
    }

    



    public function getInteractiveMessageTemplate()
    {
        return $this->readOneof(5);
    }

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

    




    public function setInteractiveMessageTemplate($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\Message\InteractiveMessage::class);
        $this->writeOneof(5, $var);

        return $this;
    }

    


    public function getFormat()
    {
        return $this->whichOneof("format");
    }

}

