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

namespace Grpc\Testing;

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

/**
 * For reconnect interop test only.
 * Server tells client whether its reconnects are following the spec and the
 * reconnect backoffs it saw.
 *
 * Generated from protobuf message <code>grpc.testing.ReconnectInfo</code>
 */
class ReconnectInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>bool passed = 1;</code>
     */
    protected $passed = false;
    /**
     * Generated from protobuf field <code>repeated int32 backoff_ms = 2;</code>
     */
    private $backoff_ms;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type bool $passed
     *     @type int[] $backoff_ms
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce();
        parent::__construct($data);
    }

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

    /**
     * Generated from protobuf field <code>bool passed = 1;</code>
     * @param bool $var
     * @return $this
     */
    public function setPassed(bool $var)
    {
        $this->passed = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated int32 backoff_ms = 2;</code>
     * @return RepeatedField<int>
     */
    public function getBackoffMs()
    {
        return $this->backoff_ms;
    }

    /**
     * Generated from protobuf field <code>repeated int32 backoff_ms = 2;</code>
     * @param int[] $var
     * @return $this
     */
    public function setBackoffMs(array|RepeatedField $var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
        $this->backoff_ms = $arr;

        return $this;
    }

}

