1:   2:   3:   4:   5:   6:   7:   8:   9:  10:  11:  12:  13:  14:  15:  16:  17:  18:  19:  20:  21:  22:  23:  24:  25:  26:  27:  28:  29:  30:  31:  32:  33:  34:  35:  36:  37:  38:  39:  40:  41:  42:  43:  44:  45:  46:  47:  48:  49:  50:  51:  52:  53:  54:  55:  56:  57:  58:  59:  60:  61:  62:  63:  64:  65:  66:  67:  68:  69:  70:  71:  72:  73:  74:  75:  76:  77:  78:  79:  80:  81:  82:  83:  84:  85:  86:  87:  88:  89:  90:  91:  92:  93:  94:  95:  96:  97:  98:  99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: 113: 114: 115: 116: 
<?php


namespace SAREhub\Client\Amqp;


use PhpAmqpLib\Wire\AMQPTable;

class AmqpQueueSchema
{
    /**
     * @var string
     */
    private $name = "";

    /**
     * @var bool
     */
    private $passive = false;

    /**
     * @var bool
     */
    private $durable = false;

    /**
     * @var bool
     */
    private $exclusive = false;

    /**
     * @var bool
     */
    private $autoDelete = true;

    /**
     * @var AMQPTable
     */
    private $arguments;

    public static function newInstance(): self
    {
        return new self();
    }

    public function __construct()
    {
        $this->arguments = new AMQPTable();
    }

    public function getName(): string
    {
        return $this->name;
    }

    public function withName(string $name): AmqpQueueSchema
    {
        $this->name = $name;
        return $this;
    }

    public function isPassive(): bool
    {
        return $this->passive;
    }

    public function withPassive(bool $passive): AmqpQueueSchema
    {
        $this->passive = $passive;
        return $this;
    }

    public function isDurable(): bool
    {
        return $this->durable;
    }

    public function withDurable(bool $durable): AmqpQueueSchema
    {
        $this->durable = $durable;
        return $this;
    }

    public function isExclusive(): bool
    {
        return $this->exclusive;
    }

    public function withExclusive(bool $exclusive): AmqpQueueSchema
    {
        $this->exclusive = $exclusive;
        return $this;
    }

    public function isAutoDelete(): bool
    {
        return $this->autoDelete;
    }

    public function withAutoDelete(bool $autoDelete): AmqpQueueSchema
    {
        $this->autoDelete = $autoDelete;
        return $this;
    }

    public function getArguments(): AMQPTable
    {
        return $this->arguments;
    }

    public function withArguments(AMQPTable $arguments): AmqpQueueSchema
    {
        $this->arguments = $arguments;
        return $this;
    }
}