<?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.Footer</code>
 */
class Footer extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional string text = 1;</code>
     */
    protected $text = null;
    /**
     * Generated from protobuf field <code>optional bool hasMediaAttachment = 3;</code>
     */
    protected $hasMediaAttachment = null;
    protected $media;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $text
     *     @type bool $hasMediaAttachment
     *     @type \PhpWA\Protocol\Proto\Message\AudioMessage $audioMessage
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

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

    public function hasText()
    {
        return isset($this->text);
    }

    public function clearText()
    {
        unset($this->text);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional bool hasMediaAttachment = 3;</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 = 3;</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.AudioMessage audioMessage = 2;</code>
     * @return \PhpWA\Protocol\Proto\Message\AudioMessage|null
     */
    public function getAudioMessage()
    {
        return $this->readOneof(2);
    }

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

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

        return $this;
    }

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

}

