<?php

declare(strict_types=1);

namespace PhpWA\Client;

final class DisconnectDecision
{
      private $code;
      private $reason;
      private $reconnect;
      private $credentialResetRequired;

    public function __construct(int $code, string $reason, bool $reconnect, bool $credentialResetRequired)
    {
        $this->code = $code;
        $this->reason = $reason;
        $this->reconnect = $reconnect;
        $this->credentialResetRequired = $credentialResetRequired;
    }

    public function code(): int { return $this->code; }
    public function reason(): string { return $this->reason; }
    public function shouldReconnect(): bool { return $this->reconnect; }
    public function credentialResetRequired(): bool { return $this->credentialResetRequired; }
}
