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

namespace PhpWA\Protocol\Proto;

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

/**
 * Generated from protobuf message <code>proto.AIRichResponseCodeMetadata</code>
 */
class AIRichResponseCodeMetadata extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional string codeLanguage = 1;</code>
     */
    protected $codeLanguage = null;
    /**
     * Generated from protobuf field <code>repeated .proto.AIRichResponseCodeMetadata.AIRichResponseCodeBlock codeBlocks = 2;</code>
     */
    private $codeBlocks;

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

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

    public function hasCodeLanguage()
    {
        return isset($this->codeLanguage);
    }

    public function clearCodeLanguage()
    {
        unset($this->codeLanguage);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .proto.AIRichResponseCodeMetadata.AIRichResponseCodeBlock codeBlocks = 2;</code>
     * @return RepeatedField<\PhpWA\Protocol\Proto\AIRichResponseCodeMetadata\AIRichResponseCodeBlock>
     */
    public function getCodeBlocks()
    {
        return $this->codeBlocks;
    }

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

        return $this;
    }

}

