<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/shopping/merchant/products/v1/products_common.proto

namespace Google\Shopping\Merchant\Products\V1\ProductAttributes;

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

/**
 * The question and answer for the product.
 *
 * Generated from protobuf message <code>google.shopping.merchant.products.v1.ProductAttributes.QuestionAndAnswer</code>
 */
class QuestionAndAnswer extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The question text.
     *
     * Generated from protobuf field <code>string question = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $question = '';
    /**
     * Required. The answer text.
     *
     * Generated from protobuf field <code>string answer = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $answer = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $question
     *           Required. The question text.
     *     @type string $answer
     *           Required. The answer text.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Shopping\Merchant\Products\V1\ProductsCommon::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The question text.
     *
     * Generated from protobuf field <code>string question = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getQuestion()
    {
        return $this->question;
    }

    /**
     * Required. The question text.
     *
     * Generated from protobuf field <code>string question = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setQuestion($var)
    {
        GPBUtil::checkString($var, True);
        $this->question = $var;

        return $this;
    }

    /**
     * Required. The answer text.
     *
     * Generated from protobuf field <code>string answer = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getAnswer()
    {
        return $this->answer;
    }

    /**
     * Required. The answer text.
     *
     * Generated from protobuf field <code>string answer = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setAnswer($var)
    {
        GPBUtil::checkString($var, True);
        $this->answer = $var;

        return $this;
    }

}

