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

namespace OS\PB;

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

/**
 * Generated from protobuf message <code>OS.PB.EventRuleConfig</code>
 */
class EventRuleConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * This matches the oneof EventType in EventMessage to this rule
     *
     * Generated from protobuf field <code>uint32 EventType = 1;</code>
     */
    protected $EventType = 0;
    /**
     * Generated from protobuf field <code>repeated .OS.PB.EventRule Rules = 5;</code>
     */
    private $Rules;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $EventType
     *           This matches the oneof EventType in EventMessage to this rule
     *     @type \OS\PB\EventRule[] $Rules
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Eventrules::initOnce();
        parent::__construct($data);
    }

    /**
     * This matches the oneof EventType in EventMessage to this rule
     *
     * Generated from protobuf field <code>uint32 EventType = 1;</code>
     * @return int
     */
    public function getEventType()
    {
        return $this->EventType;
    }

    /**
     * This matches the oneof EventType in EventMessage to this rule
     *
     * Generated from protobuf field <code>uint32 EventType = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setEventType($var)
    {
        GPBUtil::checkUint32($var);
        $this->EventType = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .OS.PB.EventRule Rules = 5;</code>
     * @return RepeatedField<\OS\PB\EventRule>
     */
    public function getRules()
    {
        return $this->Rules;
    }

    /**
     * Generated from protobuf field <code>repeated .OS.PB.EventRule Rules = 5;</code>
     * @param \OS\PB\EventRule[] $var
     * @return $this
     */
    public function setRules($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \OS\PB\EventRule::class);
        $this->Rules = $arr;

        return $this;
    }

}

