id = $id; $this->object = $object; $this->created = $created; $this->model = $model; $this->choices = $choices; $this->usage = $usage; } public static function fromJson(object $json): self { return new self( $json->id, $json->object, $json->created, $json->model, $json->choices, $json->usage ); } }