*/ final class ThreadRunStepResponseFunction implements ResponseContract { /** * @use ArrayAccessible */ use ArrayAccessible; use Fakeable; private function __construct( public string $name, public string $arguments, public ?string $output, ) { } /** * Acts as static factory, and returns a new Response instance. * * @param array{name: string, arguments: string, output?: ?string} $attributes */ public static function from(array $attributes): self { return new self( $attributes['name'], $attributes['arguments'], $attributes['output'] ?? null, ); } /** * {@inheritDoc} */ public function toArray(): array { return [ 'name' => $this->name, 'arguments' => $this->arguments, 'output' => $this->output, ]; } }