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