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

namespace Proto;

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

/**
 **
 * Rule-based summaries proposed by StubDroid.
 * id = 0, means the this/self pointer of the object, or the first arg.
 * id = -1, means the return value of the function.
 * For example, if arg0 is tainted, then return value is tainted can be encoded as: {cause: id=0, effects: [id=-1]}
 * 
 * Reference: 
 * format of module summary
 * https://github.com/secure-software-engineering/FlowDroid/blob/develop/soot-infoflow-summaries/schema/ClassSummary.xsd
 * https://github.com/secure-software-engineering/FlowDroid/blob/develop/soot-infoflow-summaries/schema/SummaryMetaData.xsd
 * FIXME: convert xsd to proto and update the taint wrapper here.
 * http://tranchis.github.io/xsd2thrift/
 *
 * Generated from protobuf message <code>proto.ModuleTaintWrapper</code>
 */
class ModuleTaintWrapper extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>.proto.AstNode node = 1;</code>
     */
    private $node = null;
    /**
     * Generated from protobuf field <code>repeated .proto.ModuleTaintWrapper.TaintRule rules = 2;</code>
     */
    private $rules;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Proto\AstNode $node
     *     @type \Proto\ModuleTaintWrapper\TaintRule[]|\Google\Protobuf\Internal\RepeatedField $rules
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Module::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>.proto.AstNode node = 1;</code>
     * @return \Proto\AstNode
     */
    public function getNode()
    {
        return $this->node;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .proto.ModuleTaintWrapper.TaintRule rules = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getRules()
    {
        return $this->rules;
    }

    /**
     * Generated from protobuf field <code>repeated .proto.ModuleTaintWrapper.TaintRule rules = 2;</code>
     * @param \Proto\ModuleTaintWrapper\TaintRule[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setRules($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Proto\ModuleTaintWrapper\TaintRule::class);
        $this->rules = $arr;

        return $this;
    }

}

