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

namespace PhpWA\Protocol\Proto\Message;

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

/**
 * Generated from protobuf message <code>proto.Message.ListMessage</code>
 */
class ListMessage 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 description = 2;</code>
     */
    protected $description = null;
    /**
     * Generated from protobuf field <code>optional string buttonText = 3;</code>
     */
    protected $buttonText = null;
    /**
     * Generated from protobuf field <code>optional .proto.Message.ListMessage.ListType listType = 4;</code>
     */
    protected $listType = null;
    /**
     * Generated from protobuf field <code>repeated .proto.Message.ListMessage.Section sections = 5;</code>
     */
    private $sections;
    /**
     * Generated from protobuf field <code>optional .proto.Message.ListMessage.ProductListInfo productListInfo = 6;</code>
     */
    protected $productListInfo = null;
    /**
     * Generated from protobuf field <code>optional string footerText = 7;</code>
     */
    protected $footerText = null;
    /**
     * Generated from protobuf field <code>optional .proto.ContextInfo contextInfo = 8;</code>
     */
    protected $contextInfo = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $title
     *     @type string $description
     *     @type string $buttonText
     *     @type int $listType
     *     @type \PhpWA\Protocol\Proto\Message\ListMessage\Section[] $sections
     *     @type \PhpWA\Protocol\Proto\Message\ListMessage\ProductListInfo $productListInfo
     *     @type string $footerText
     *     @type \PhpWA\Protocol\Proto\ContextInfo $contextInfo
     * }
     */
    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 description = 2;</code>
     * @return string
     */
    public function getDescription()
    {
        return isset($this->description) ? $this->description : '';
    }

    public function hasDescription()
    {
        return isset($this->description);
    }

    public function clearDescription()
    {
        unset($this->description);
    }

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

        return $this;
    }

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

    public function hasButtonText()
    {
        return isset($this->buttonText);
    }

    public function clearButtonText()
    {
        unset($this->buttonText);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.Message.ListMessage.ListType listType = 4;</code>
     * @return int
     */
    public function getListType()
    {
        return isset($this->listType) ? $this->listType : 0;
    }

    public function hasListType()
    {
        return isset($this->listType);
    }

    public function clearListType()
    {
        unset($this->listType);
    }

    /**
     * Generated from protobuf field <code>optional .proto.Message.ListMessage.ListType listType = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setListType($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\Message\ListMessage\ListType::class);
        $this->listType = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .proto.Message.ListMessage.Section sections = 5;</code>
     * @return RepeatedField<\PhpWA\Protocol\Proto\Message\ListMessage\Section>
     */
    public function getSections()
    {
        return $this->sections;
    }

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

        return $this;
    }

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

    public function hasProductListInfo()
    {
        return isset($this->productListInfo);
    }

    public function clearProductListInfo()
    {
        unset($this->productListInfo);
    }

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

        return $this;
    }

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

    public function hasFooterText()
    {
        return isset($this->footerText);
    }

    public function clearFooterText()
    {
        unset($this->footerText);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.ContextInfo contextInfo = 8;</code>
     * @return \PhpWA\Protocol\Proto\ContextInfo|null
     */
    public function getContextInfo()
    {
        return $this->contextInfo;
    }

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

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

    /**
     * Generated from protobuf field <code>optional .proto.ContextInfo contextInfo = 8;</code>
     * @param \PhpWA\Protocol\Proto\ContextInfo $var
     * @return $this
     */
    public function setContextInfo($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\ContextInfo::class);
        $this->contextInfo = $var;

        return $this;
    }

}

