<?php
namespace boru\boruai\Openai\Stream\Response\Refusal;

use boru\boruai\Openai\Stream\StreamEvent;

class RefusalBase extends StreamEvent {
    private $item;
    private $outputIndex;
    
    public function item($item=null) {
        if ($item !== null) {
            $this->item = $item;
        }
        return $this->item;
    }
    public function outputIndex($outputIndex=null) {
        if ($outputIndex !== null) {
            $this->outputIndex = $outputIndex;
        }
        return $this->outputIndex;
    }

    public function toArray() {
        return [
            'type' => $this->type(),
            'item' => $this->item(),
            'outputIndex' => $this->outputIndex(),
        ];
    }
}