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

namespace PhpWA\Protocol\Proto\Message\ListMessage;

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

/**
 * Generated from protobuf message <code>proto.Message.ListMessage.Section</code>
 */
class Section extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional string title = 1;</code>
     */
    protected $title = null;
    /**
     * Generated from protobuf field <code>repeated .proto.Message.ListMessage.Row rows = 2;</code>
     */
    private $rows;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $title
     *     @type \PhpWA\Protocol\Proto\Message\ListMessage\Row[] $rows
     * }
     */
    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>repeated .proto.Message.ListMessage.Row rows = 2;</code>
     * @return RepeatedField<\PhpWA\Protocol\Proto\Message\ListMessage\Row>
     */
    public function getRows()
    {
        return $this->rows;
    }

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

        return $this;
    }

}

