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

namespace Mynaparrot\PlugnmeetProto;

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

/**
 * Generated from protobuf message <code>plugnmeet.FallbackOnFlapping</code>
 */
class FallbackOnFlapping extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>bool enabled = 1;</code>
     */
    protected $enabled = false;
    /**
     * max number of times connection can be poor
     *
     * Generated from protobuf field <code>int32 max_poor_conn_count = 2;</code>
     */
    protected $max_poor_conn_count = 0;
    /**
     * duration in seconds to check for poor connections
     *
     * Generated from protobuf field <code>int32 check_duration_in_sec = 3;</code>
     */
    protected $check_duration_in_sec = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type bool $enabled
     *     @type int $max_poor_conn_count
     *           max number of times connection can be poor
     *     @type int $check_duration_in_sec
     *           duration in seconds to check for poor connections
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\PlugnmeetNatsMsg::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>bool enabled = 1;</code>
     * @return bool
     */
    public function getEnabled()
    {
        return $this->enabled;
    }

    /**
     * Generated from protobuf field <code>bool enabled = 1;</code>
     * @param bool $var
     * @return $this
     */
    public function setEnabled($var)
    {
        GPBUtil::checkBool($var);
        $this->enabled = $var;

        return $this;
    }

    /**
     * max number of times connection can be poor
     *
     * Generated from protobuf field <code>int32 max_poor_conn_count = 2;</code>
     * @return int
     */
    public function getMaxPoorConnCount()
    {
        return $this->max_poor_conn_count;
    }

    /**
     * max number of times connection can be poor
     *
     * Generated from protobuf field <code>int32 max_poor_conn_count = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setMaxPoorConnCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->max_poor_conn_count = $var;

        return $this;
    }

    /**
     * duration in seconds to check for poor connections
     *
     * Generated from protobuf field <code>int32 check_duration_in_sec = 3;</code>
     * @return int
     */
    public function getCheckDurationInSec()
    {
        return $this->check_duration_in_sec;
    }

    /**
     * duration in seconds to check for poor connections
     *
     * Generated from protobuf field <code>int32 check_duration_in_sec = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setCheckDurationInSec($var)
    {
        GPBUtil::checkInt32($var);
        $this->check_duration_in_sec = $var;

        return $this;
    }

}

