<?php
namespace boru\boruai\Openai\Models;

class RunStep extends BaseModel {
    private $id;
    private $object = "thread.run.step";
    private $createdAt;
    private $threadId;
    private $runId;
    private $type;
    private $status;
    private $stepDetails;
    private $lastError;
    private $expiredAt;
    private $cancelledAt;
    private $failedAt;
    private $metadata;

    public function id($id=null) {
        if ($id) {
            $this->id = $id;
        }
        return $this->id;
    }
    public function object($object=null) {
        if ($object) {
            $this->object = $object;
        }
        return $this->object;
    }
    public function createdAt($created=null) {
        if ($created) {
            $this->createdAt = $created;
        }
        return $this->createdAt;
    }
    public function threadId($threadId=null) {
        if ($threadId) {
            $this->threadId = $threadId;
        }
        return $this->threadId;
    }
    public function runId($runId=null) {
        if ($runId) {
            $this->runId = $runId;
        }
        return $this->runId;
    }
    public function type($type=null) {
        if ($type) {
            $this->type = $type;
        }
        return $this->type;
    }
    public function status($status=null) {
        if ($status) {
            $this->status = $status;
        }
        return $this->status;
    }
    public function stepDetails($stepDetails=null) {
        if ($stepDetails) {
            $this->stepDetails = $stepDetails;
        }
        return $this->stepDetails;
    }
    public function lastError($lastError=null) {
        if ($lastError) {
            $this->lastError = $lastError;
        }
        return $this->lastError;
    }
    public function expiredAt($expiresAt=null) {
        if ($expiresAt) {
            $this->expiredAt = $expiresAt;
        }
        return $this->expiredAt;
    }
    public function cancelledAt($cancelledAt=null) {
        if ($cancelledAt) {
            $this->cancelledAt = $cancelledAt;
        }
        return $this->cancelledAt;
    }
    public function failedAt($failedAt=null) {
        if ($failedAt) {
            $this->failedAt = $failedAt;
        }
        return $this->failedAt;
    }
    public function metadata($metadata=null) {
        if ($metadata) {
            $this->metadata = $metadata;
        }
        return $this->metadata;
    }

    public function toArray() {
        return [
            "id"=>$this->id(),
            "object"=>$this->object(),
            "created_at"=>$this->createdAt(),
            "thread_id"=>$this->threadId(),
            "run_id"=>$this->runId(),
            "type"=>$this->type(),
            "status"=>$this->status(),
            "step_details"=>$this->stepDetails(),
            "last_error"=>$this->lastError(),
            "expired_at"=>$this->expiredAt(),
            "cancelled_at"=>$this->cancelledAt(),
            "failed_at"=>$this->failedAt(),
            "metadata"=>$this->metadata()
        ];
    }
}