<?php
namespace App\AI\Api\ChatGpt\Responses; class Property extends \stdClass { public $type; public $enum; public $items; public $description; public $format; public $pattern; public $minimum; public $maximum; public $properties; public function __construct() { $this->properties = new \App\AI\Api\ChatGpt\Responses\Properties(); } public function addProperty(string $propertyName, \App\AI\Api\ChatGpt\Responses\Property $propertyStdObj): void { if (is_null($this->type)) { unset($this->type); } if (is_null($propertyStdObj->enum)) { unset($propertyStdObj->enum); } if (is_null($propertyStdObj->items)) { unset($propertyStdObj->items); } if (is_null($propertyStdObj->description)) { unset($propertyStdObj->description); } if (is_null($propertyStdObj->format)) { unset($propertyStdObj->format); } if (is_null($propertyStdObj->pattern)) { unset($propertyStdObj->pattern); } if (is_null($propertyStdObj->minimum)) { unset($propertyStdObj->minimum); } if (is_null($propertyStdObj->maximum)) { unset($propertyStdObj->maximum); } if (is_null($propertyStdObj->properties) || empty(get_object_vars($propertyStdObj->properties))) { unset($propertyStdObj->properties); } $this->properties->{$propertyName} = $propertyStdObj; } } 