<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: ast.proto

namespace Proto;

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

/**
 * Generated from protobuf message <code>proto.PkgAstResult</code>
 */
class PkgAstResult extends \Google\Protobuf\Internal\Message
{
    /**
     * Package information
     *
     * Generated from protobuf field <code>string pkg_name = 1;</code>
     */
    private $pkg_name = '';
    /**
     * Generated from protobuf field <code>string pkg_version = 2;</code>
     */
    private $pkg_version = '';
    /**
     * Generated from protobuf field <code>.proto.Language language = 3;</code>
     */
    private $language = 0;
    /**
     * Generated from protobuf field <code>string input_path = 4;</code>
     */
    private $input_path = '';
    /**
     * Generated from protobuf field <code>.proto.AstLookupConfig config = 5;</code>
     */
    private $config = null;
    /**
     * Ast lookup results
     *
     * Generated from protobuf field <code>repeated .proto.AstNode api_results = 6;</code>
     */
    private $api_results;
    /**
     * Abstract syntax tree for files
     *
     * Generated from protobuf field <code>repeated .proto.AstNode root_nodes = 7;</code>
     */
    private $root_nodes;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $pkg_name
     *           Package information
     *     @type string $pkg_version
     *     @type int $language
     *     @type string $input_path
     *     @type \Proto\AstLookupConfig $config
     *     @type \Proto\AstNode[]|\Google\Protobuf\Internal\RepeatedField $api_results
     *           Ast lookup results
     *     @type \Proto\AstNode[]|\Google\Protobuf\Internal\RepeatedField $root_nodes
     *           Abstract syntax tree for files
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Ast::initOnce();
        parent::__construct($data);
    }

    /**
     * Package information
     *
     * Generated from protobuf field <code>string pkg_name = 1;</code>
     * @return string
     */
    public function getPkgName()
    {
        return $this->pkg_name;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string pkg_version = 2;</code>
     * @return string
     */
    public function getPkgVersion()
    {
        return $this->pkg_version;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.proto.Language language = 3;</code>
     * @return int
     */
    public function getLanguage()
    {
        return $this->language;
    }

    /**
     * Generated from protobuf field <code>.proto.Language language = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setLanguage($var)
    {
        GPBUtil::checkEnum($var, \Proto\Language::class);
        $this->language = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>string input_path = 4;</code>
     * @return string
     */
    public function getInputPath()
    {
        return $this->input_path;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.proto.AstLookupConfig config = 5;</code>
     * @return \Proto\AstLookupConfig
     */
    public function getConfig()
    {
        return $this->config;
    }

    /**
     * Generated from protobuf field <code>.proto.AstLookupConfig config = 5;</code>
     * @param \Proto\AstLookupConfig $var
     * @return $this
     */
    public function setConfig($var)
    {
        GPBUtil::checkMessage($var, \Proto\AstLookupConfig::class);
        $this->config = $var;

        return $this;
    }

    /**
     * Ast lookup results
     *
     * Generated from protobuf field <code>repeated .proto.AstNode api_results = 6;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getApiResults()
    {
        return $this->api_results;
    }

    /**
     * Ast lookup results
     *
     * Generated from protobuf field <code>repeated .proto.AstNode api_results = 6;</code>
     * @param \Proto\AstNode[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setApiResults($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Proto\AstNode::class);
        $this->api_results = $arr;

        return $this;
    }

    /**
     * Abstract syntax tree for files
     *
     * Generated from protobuf field <code>repeated .proto.AstNode root_nodes = 7;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getRootNodes()
    {
        return $this->root_nodes;
    }

    /**
     * Abstract syntax tree for files
     *
     * Generated from protobuf field <code>repeated .proto.AstNode root_nodes = 7;</code>
     * @param \Proto\AstNode[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setRootNodes($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Proto\AstNode::class);
        $this->root_nodes = $arr;

        return $this;
    }

}

