<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: apache/rocketmq/v2/definition.proto

namespace Apache\Rocketmq\V2;

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

/**
 * Generated from protobuf message <code>apache.rocketmq.v2.CustomizedBackoff</code>
 */
class CustomizedBackoff extends \Google\Protobuf\Internal\Message
{
    /**
     * To support classic backoff strategy which is arbitrary defined by end users.
     * Typical values are: `1s 5s 10s 30s 1m 2m 3m 4m 5m 6m 7m 8m 9m 10m 20m 30m 1h 2h`
     *
     * Generated from protobuf field <code>repeated .google.protobuf.Duration next = 1;</code>
     */
    private $next;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Protobuf\Duration>|\Google\Protobuf\Internal\RepeatedField $next
     *           To support classic backoff strategy which is arbitrary defined by end users.
     *           Typical values are: `1s 5s 10s 30s 1m 2m 3m 4m 5m 6m 7m 8m 9m 10m 20m 30m 1h 2h`
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Apache\Rocketmq\V2\Definition::initOnce();
        parent::__construct($data);
    }

    /**
     * To support classic backoff strategy which is arbitrary defined by end users.
     * Typical values are: `1s 5s 10s 30s 1m 2m 3m 4m 5m 6m 7m 8m 9m 10m 20m 30m 1h 2h`
     *
     * Generated from protobuf field <code>repeated .google.protobuf.Duration next = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getNext()
    {
        return $this->next;
    }

    /**
     * To support classic backoff strategy which is arbitrary defined by end users.
     * Typical values are: `1s 5s 10s 30s 1m 2m 3m 4m 5m 6m 7m 8m 9m 10m 20m 30m 1h 2h`
     *
     * Generated from protobuf field <code>repeated .google.protobuf.Duration next = 1;</code>
     * @param array<\Google\Protobuf\Duration>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setNext($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Duration::class);
        $this->next = $arr;

        return $this;
    }

}

