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

namespace PhpWA\Protocol\Proto\InThreadSurveyMetadata;

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

/**
 * Generated from protobuf message <code>proto.InThreadSurveyMetadata.InThreadSurveyQuestion</code>
 */
class InThreadSurveyQuestion extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional string questionText = 1;</code>
     */
    protected $questionText = null;
    /**
     * Generated from protobuf field <code>optional string questionId = 2;</code>
     */
    protected $questionId = null;
    /**
     * Generated from protobuf field <code>repeated .proto.InThreadSurveyMetadata.InThreadSurveyOption questionOptions = 3;</code>
     */
    private $questionOptions;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $questionText
     *     @type string $questionId
     *     @type \PhpWA\Protocol\Proto\InThreadSurveyMetadata\InThreadSurveyOption[] $questionOptions
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

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

    public function hasQuestionText()
    {
        return isset($this->questionText);
    }

    public function clearQuestionText()
    {
        unset($this->questionText);
    }

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

        return $this;
    }

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

    public function hasQuestionId()
    {
        return isset($this->questionId);
    }

    public function clearQuestionId()
    {
        unset($this->questionId);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .proto.InThreadSurveyMetadata.InThreadSurveyOption questionOptions = 3;</code>
     * @return RepeatedField<\PhpWA\Protocol\Proto\InThreadSurveyMetadata\InThreadSurveyOption>
     */
    public function getQuestionOptions()
    {
        return $this->questionOptions;
    }

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

        return $this;
    }

}

