From ac404f930e0038293ae6c47642bdcabb0577a7e1 Mon Sep 17 00:00:00 2001 From: activitysmith-bot Date: Sun, 3 May 2026 12:17:47 +0000 Subject: [PATCH] chore: regenerate SDK --- generated/Configuration.php | 4 +- generated/Model/MetricFormat.php | 71 -- generated/Model/MetricUnitSpacing.php | 62 -- generated/Model/MetricValueUpdateResponse.php | 38 +- generated/Model/WidgetMetric.php | 878 ------------------ generated/Model/WidgetMetricLatestValue.php | 382 -------- 6 files changed, 21 insertions(+), 1414 deletions(-) delete mode 100644 generated/Model/MetricFormat.php delete mode 100644 generated/Model/MetricUnitSpacing.php delete mode 100644 generated/Model/WidgetMetric.php delete mode 100644 generated/Model/WidgetMetricLatestValue.php diff --git a/generated/Configuration.php b/generated/Configuration.php index d12bcb4..ab518e5 100644 --- a/generated/Configuration.php +++ b/generated/Configuration.php @@ -100,7 +100,7 @@ class Configuration * * @var string */ - protected $userAgent = 'OpenAPI-Generator/1.1.0/PHP'; + protected $userAgent = 'OpenAPI-Generator/1.2.0/PHP'; /** * Debug switch (default set to false) @@ -433,7 +433,7 @@ public static function toDebugReport() $report .= ' OS: ' . php_uname() . PHP_EOL; $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; $report .= ' The version of the OpenAPI document: 1.0.0' . PHP_EOL; - $report .= ' SDK Package Version: 1.1.0' . PHP_EOL; + $report .= ' SDK Package Version: 1.2.0' . PHP_EOL; $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; return $report; diff --git a/generated/Model/MetricFormat.php b/generated/Model/MetricFormat.php deleted file mode 100644 index 00fb598..0000000 --- a/generated/Model/MetricFormat.php +++ /dev/null @@ -1,71 +0,0 @@ - '\ActivitySmith\Generated\Model\WidgetMetric' + 'success' => 'bool' ]; /** @@ -68,7 +68,7 @@ class MetricValueUpdateResponse implements ModelInterface, ArrayAccess, \JsonSer * @psalm-var array */ protected static $openAPIFormats = [ - 'metric' => null + 'success' => null ]; /** @@ -77,7 +77,7 @@ class MetricValueUpdateResponse implements ModelInterface, ArrayAccess, \JsonSer * @var boolean[] */ protected static array $openAPINullables = [ - 'metric' => false + 'success' => false ]; /** @@ -166,7 +166,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'metric' => 'metric' + 'success' => 'success' ]; /** @@ -175,7 +175,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'metric' => 'setMetric' + 'success' => 'setSuccess' ]; /** @@ -184,7 +184,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'metric' => 'getMetric' + 'success' => 'getSuccess' ]; /** @@ -244,7 +244,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->setIfExists('metric', $data ?? [], null); + $this->setIfExists('success', $data ?? [], null); } /** @@ -274,8 +274,8 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['metric'] === null) { - $invalidProperties[] = "'metric' can't be null"; + if ($this->container['success'] === null) { + $invalidProperties[] = "'success' can't be null"; } return $invalidProperties; } @@ -293,28 +293,28 @@ public function valid() /** - * Gets metric + * Gets success * - * @return \ActivitySmith\Generated\Model\WidgetMetric + * @return bool */ - public function getMetric() + public function getSuccess() { - return $this->container['metric']; + return $this->container['success']; } /** - * Sets metric + * Sets success * - * @param \ActivitySmith\Generated\Model\WidgetMetric $metric metric + * @param bool $success success * * @return self */ - public function setMetric($metric) + public function setSuccess($success) { - if (is_null($metric)) { - throw new \InvalidArgumentException('non-nullable metric cannot be null'); + if (is_null($success)) { + throw new \InvalidArgumentException('non-nullable success cannot be null'); } - $this->container['metric'] = $metric; + $this->container['success'] = $success; return $this; } diff --git a/generated/Model/WidgetMetric.php b/generated/Model/WidgetMetric.php deleted file mode 100644 index fca6f47..0000000 --- a/generated/Model/WidgetMetric.php +++ /dev/null @@ -1,878 +0,0 @@ - - */ -class WidgetMetric implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'WidgetMetric'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'publicId' => 'string', - 'key' => 'string', - 'label' => 'string', - 'currencyCode' => 'string', - 'unit' => 'string', - 'unitSpacing' => '\ActivitySmith\Generated\Model\MetricUnitSpacing', - 'format' => '\ActivitySmith\Generated\Model\MetricFormat', - 'latestValue' => '\ActivitySmith\Generated\Model\WidgetMetricLatestValue', - 'latestValueAt' => '\DateTime', - 'createdAt' => '\DateTime', - 'updatedAt' => '\DateTime' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'publicId' => null, - 'key' => null, - 'label' => null, - 'currencyCode' => null, - 'unit' => null, - 'unitSpacing' => null, - 'format' => null, - 'latestValue' => null, - 'latestValueAt' => 'date-time', - 'createdAt' => 'date-time', - 'updatedAt' => 'date-time' - ]; - - /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ - protected static array $openAPINullables = [ - 'publicId' => false, - 'key' => false, - 'label' => false, - 'currencyCode' => true, - 'unit' => true, - 'unitSpacing' => false, - 'format' => false, - 'latestValue' => true, - 'latestValueAt' => true, - 'createdAt' => false, - 'updatedAt' => false - ]; - - /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ - protected array $openAPINullablesSetToNull = []; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of nullable properties - * - * @return array - */ - protected static function openAPINullables(): array - { - return self::$openAPINullables; - } - - /** - * Array of nullable field names deliberately set to null - * - * @return boolean[] - */ - private function getOpenAPINullablesSetToNull(): array - { - return $this->openAPINullablesSetToNull; - } - - /** - * Setter - Array of nullable field names deliberately set to null - * - * @param boolean[] $openAPINullablesSetToNull - */ - private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void - { - $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; - } - - /** - * Checks if a property is nullable - * - * @param string $property - * @return bool - */ - public static function isNullable(string $property): bool - { - return self::openAPINullables()[$property] ?? false; - } - - /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool - */ - public function isNullableSetToNull(string $property): bool - { - return in_array($property, $this->getOpenAPINullablesSetToNull(), true); - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'publicId' => 'public_id', - 'key' => 'key', - 'label' => 'label', - 'currencyCode' => 'currency_code', - 'unit' => 'unit', - 'unitSpacing' => 'unit_spacing', - 'format' => 'format', - 'latestValue' => 'latest_value', - 'latestValueAt' => 'latest_value_at', - 'createdAt' => 'created_at', - 'updatedAt' => 'updated_at' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'publicId' => 'setPublicId', - 'key' => 'setKey', - 'label' => 'setLabel', - 'currencyCode' => 'setCurrencyCode', - 'unit' => 'setUnit', - 'unitSpacing' => 'setUnitSpacing', - 'format' => 'setFormat', - 'latestValue' => 'setLatestValue', - 'latestValueAt' => 'setLatestValueAt', - 'createdAt' => 'setCreatedAt', - 'updatedAt' => 'setUpdatedAt' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'publicId' => 'getPublicId', - 'key' => 'getKey', - 'label' => 'getLabel', - 'currencyCode' => 'getCurrencyCode', - 'unit' => 'getUnit', - 'unitSpacing' => 'getUnitSpacing', - 'format' => 'getFormat', - 'latestValue' => 'getLatestValue', - 'latestValueAt' => 'getLatestValueAt', - 'createdAt' => 'getCreatedAt', - 'updatedAt' => 'getUpdatedAt' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->setIfExists('publicId', $data ?? [], null); - $this->setIfExists('key', $data ?? [], null); - $this->setIfExists('label', $data ?? [], null); - $this->setIfExists('currencyCode', $data ?? [], null); - $this->setIfExists('unit', $data ?? [], null); - $this->setIfExists('unitSpacing', $data ?? [], null); - $this->setIfExists('format', $data ?? [], null); - $this->setIfExists('latestValue', $data ?? [], null); - $this->setIfExists('latestValueAt', $data ?? [], null); - $this->setIfExists('createdAt', $data ?? [], null); - $this->setIfExists('updatedAt', $data ?? [], null); - } - - /** - * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName - * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the - * $this->openAPINullablesSetToNull array - * - * @param string $variableName - * @param array $fields - * @param mixed $defaultValue - */ - private function setIfExists(string $variableName, array $fields, $defaultValue): void - { - if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { - $this->openAPINullablesSetToNull[] = $variableName; - } - - $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['publicId'] === null) { - $invalidProperties[] = "'publicId' can't be null"; - } - if ($this->container['key'] === null) { - $invalidProperties[] = "'key' can't be null"; - } - if ((mb_strlen($this->container['key']) > 64)) { - $invalidProperties[] = "invalid value for 'key', the character length must be smaller than or equal to 64."; - } - - if ((mb_strlen($this->container['key']) < 1)) { - $invalidProperties[] = "invalid value for 'key', the character length must be bigger than or equal to 1."; - } - - if (!preg_match("/^[a-z0-9][a-z0-9_.-]{0,63}$/", $this->container['key'])) { - $invalidProperties[] = "invalid value for 'key', must be conform to the pattern /^[a-z0-9][a-z0-9_.-]{0,63}$/."; - } - - if ($this->container['label'] === null) { - $invalidProperties[] = "'label' can't be null"; - } - if ((mb_strlen($this->container['label']) > 80)) { - $invalidProperties[] = "invalid value for 'label', the character length must be smaller than or equal to 80."; - } - - if ((mb_strlen($this->container['label']) < 1)) { - $invalidProperties[] = "invalid value for 'label', the character length must be bigger than or equal to 1."; - } - - if ($this->container['currencyCode'] === null) { - $invalidProperties[] = "'currencyCode' can't be null"; - } - if ((mb_strlen($this->container['currencyCode']) > 3)) { - $invalidProperties[] = "invalid value for 'currencyCode', the character length must be smaller than or equal to 3."; - } - - if ((mb_strlen($this->container['currencyCode']) < 3)) { - $invalidProperties[] = "invalid value for 'currencyCode', the character length must be bigger than or equal to 3."; - } - - if (!preg_match("/^[A-Z]{3}$/", $this->container['currencyCode'])) { - $invalidProperties[] = "invalid value for 'currencyCode', must be conform to the pattern /^[A-Z]{3}$/."; - } - - if ($this->container['unit'] === null) { - $invalidProperties[] = "'unit' can't be null"; - } - if ((mb_strlen($this->container['unit']) > 16)) { - $invalidProperties[] = "invalid value for 'unit', the character length must be smaller than or equal to 16."; - } - - if ($this->container['unitSpacing'] === null) { - $invalidProperties[] = "'unitSpacing' can't be null"; - } - if ($this->container['format'] === null) { - $invalidProperties[] = "'format' can't be null"; - } - if ($this->container['latestValue'] === null) { - $invalidProperties[] = "'latestValue' can't be null"; - } - if ($this->container['latestValueAt'] === null) { - $invalidProperties[] = "'latestValueAt' can't be null"; - } - if ($this->container['createdAt'] === null) { - $invalidProperties[] = "'createdAt' can't be null"; - } - if ($this->container['updatedAt'] === null) { - $invalidProperties[] = "'updatedAt' can't be null"; - } - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets publicId - * - * @return string - */ - public function getPublicId() - { - return $this->container['publicId']; - } - - /** - * Sets publicId - * - * @param string $publicId publicId - * - * @return self - */ - public function setPublicId($publicId) - { - if (is_null($publicId)) { - throw new \InvalidArgumentException('non-nullable publicId cannot be null'); - } - $this->container['publicId'] = $publicId; - - return $this; - } - - /** - * Gets key - * - * @return string - */ - public function getKey() - { - return $this->container['key']; - } - - /** - * Sets key - * - * @param string $key key - * - * @return self - */ - public function setKey($key) - { - if (is_null($key)) { - throw new \InvalidArgumentException('non-nullable key cannot be null'); - } - if ((mb_strlen($key) > 64)) { - throw new \InvalidArgumentException('invalid length for $key when calling WidgetMetric., must be smaller than or equal to 64.'); - } - if ((mb_strlen($key) < 1)) { - throw new \InvalidArgumentException('invalid length for $key when calling WidgetMetric., must be bigger than or equal to 1.'); - } - if ((!preg_match("/^[a-z0-9][a-z0-9_.-]{0,63}$/", ObjectSerializer::toString($key)))) { - throw new \InvalidArgumentException("invalid value for \$key when calling WidgetMetric., must conform to the pattern /^[a-z0-9][a-z0-9_.-]{0,63}$/."); - } - - $this->container['key'] = $key; - - return $this; - } - - /** - * Gets label - * - * @return string - */ - public function getLabel() - { - return $this->container['label']; - } - - /** - * Sets label - * - * @param string $label label - * - * @return self - */ - public function setLabel($label) - { - if (is_null($label)) { - throw new \InvalidArgumentException('non-nullable label cannot be null'); - } - if ((mb_strlen($label) > 80)) { - throw new \InvalidArgumentException('invalid length for $label when calling WidgetMetric., must be smaller than or equal to 80.'); - } - if ((mb_strlen($label) < 1)) { - throw new \InvalidArgumentException('invalid length for $label when calling WidgetMetric., must be bigger than or equal to 1.'); - } - - $this->container['label'] = $label; - - return $this; - } - - /** - * Gets currencyCode - * - * @return string - */ - public function getCurrencyCode() - { - return $this->container['currencyCode']; - } - - /** - * Sets currencyCode - * - * @param string $currencyCode Present when format is currency. - * - * @return self - */ - public function setCurrencyCode($currencyCode) - { - if (is_null($currencyCode)) { - array_push($this->openAPINullablesSetToNull, 'currencyCode'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('currencyCode', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($currencyCode) && (mb_strlen($currencyCode) > 3)) { - throw new \InvalidArgumentException('invalid length for $currencyCode when calling WidgetMetric., must be smaller than or equal to 3.'); - } - if (!is_null($currencyCode) && (mb_strlen($currencyCode) < 3)) { - throw new \InvalidArgumentException('invalid length for $currencyCode when calling WidgetMetric., must be bigger than or equal to 3.'); - } - if (!is_null($currencyCode) && (!preg_match("/^[A-Z]{3}$/", ObjectSerializer::toString($currencyCode)))) { - throw new \InvalidArgumentException("invalid value for \$currencyCode when calling WidgetMetric., must conform to the pattern /^[A-Z]{3}$/."); - } - - $this->container['currencyCode'] = $currencyCode; - - return $this; - } - - /** - * Gets unit - * - * @return string - */ - public function getUnit() - { - return $this->container['unit']; - } - - /** - * Sets unit - * - * @param string $unit Present when format is unit. - * - * @return self - */ - public function setUnit($unit) - { - if (is_null($unit)) { - array_push($this->openAPINullablesSetToNull, 'unit'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('unit', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($unit) && (mb_strlen($unit) > 16)) { - throw new \InvalidArgumentException('invalid length for $unit when calling WidgetMetric., must be smaller than or equal to 16.'); - } - - $this->container['unit'] = $unit; - - return $this; - } - - /** - * Gets unitSpacing - * - * @return \ActivitySmith\Generated\Model\MetricUnitSpacing - */ - public function getUnitSpacing() - { - return $this->container['unitSpacing']; - } - - /** - * Sets unitSpacing - * - * @param \ActivitySmith\Generated\Model\MetricUnitSpacing $unitSpacing unitSpacing - * - * @return self - */ - public function setUnitSpacing($unitSpacing) - { - if (is_null($unitSpacing)) { - throw new \InvalidArgumentException('non-nullable unitSpacing cannot be null'); - } - $this->container['unitSpacing'] = $unitSpacing; - - return $this; - } - - /** - * Gets format - * - * @return \ActivitySmith\Generated\Model\MetricFormat - */ - public function getFormat() - { - return $this->container['format']; - } - - /** - * Sets format - * - * @param \ActivitySmith\Generated\Model\MetricFormat $format format - * - * @return self - */ - public function setFormat($format) - { - if (is_null($format)) { - throw new \InvalidArgumentException('non-nullable format cannot be null'); - } - $this->container['format'] = $format; - - return $this; - } - - /** - * Gets latestValue - * - * @return \ActivitySmith\Generated\Model\WidgetMetricLatestValue - */ - public function getLatestValue() - { - return $this->container['latestValue']; - } - - /** - * Sets latestValue - * - * @param \ActivitySmith\Generated\Model\WidgetMetricLatestValue $latestValue latestValue - * - * @return self - */ - public function setLatestValue($latestValue) - { - if (is_null($latestValue)) { - array_push($this->openAPINullablesSetToNull, 'latestValue'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('latestValue', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['latestValue'] = $latestValue; - - return $this; - } - - /** - * Gets latestValueAt - * - * @return \DateTime - */ - public function getLatestValueAt() - { - return $this->container['latestValueAt']; - } - - /** - * Sets latestValueAt - * - * @param \DateTime $latestValueAt latestValueAt - * - * @return self - */ - public function setLatestValueAt($latestValueAt) - { - if (is_null($latestValueAt)) { - array_push($this->openAPINullablesSetToNull, 'latestValueAt'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('latestValueAt', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['latestValueAt'] = $latestValueAt; - - return $this; - } - - /** - * Gets createdAt - * - * @return \DateTime - */ - public function getCreatedAt() - { - return $this->container['createdAt']; - } - - /** - * Sets createdAt - * - * @param \DateTime $createdAt createdAt - * - * @return self - */ - public function setCreatedAt($createdAt) - { - if (is_null($createdAt)) { - throw new \InvalidArgumentException('non-nullable createdAt cannot be null'); - } - $this->container['createdAt'] = $createdAt; - - return $this; - } - - /** - * Gets updatedAt - * - * @return \DateTime - */ - public function getUpdatedAt() - { - return $this->container['updatedAt']; - } - - /** - * Sets updatedAt - * - * @param \DateTime $updatedAt updatedAt - * - * @return self - */ - public function setUpdatedAt($updatedAt) - { - if (is_null($updatedAt)) { - throw new \InvalidArgumentException('non-nullable updatedAt cannot be null'); - } - $this->container['updatedAt'] = $updatedAt; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/generated/Model/WidgetMetricLatestValue.php b/generated/Model/WidgetMetricLatestValue.php deleted file mode 100644 index fae9c56..0000000 --- a/generated/Model/WidgetMetricLatestValue.php +++ /dev/null @@ -1,382 +0,0 @@ - - */ -class WidgetMetricLatestValue implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'WidgetMetric_latest_value'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - - ]; - - /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ - protected static array $openAPINullables = [ - - ]; - - /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ - protected array $openAPINullablesSetToNull = []; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of nullable properties - * - * @return array - */ - protected static function openAPINullables(): array - { - return self::$openAPINullables; - } - - /** - * Array of nullable field names deliberately set to null - * - * @return boolean[] - */ - private function getOpenAPINullablesSetToNull(): array - { - return $this->openAPINullablesSetToNull; - } - - /** - * Setter - Array of nullable field names deliberately set to null - * - * @param boolean[] $openAPINullablesSetToNull - */ - private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void - { - $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; - } - - /** - * Checks if a property is nullable - * - * @param string $property - * @return bool - */ - public static function isNullable(string $property): bool - { - return self::openAPINullables()[$property] ?? false; - } - - /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool - */ - public function isNullableSetToNull(string $property): bool - { - return in_array($property, $this->getOpenAPINullablesSetToNull(), true); - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - } - - /** - * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName - * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the - * $this->openAPINullablesSetToNull array - * - * @param string $variableName - * @param array $fields - * @param mixed $defaultValue - */ - private function setIfExists(string $variableName, array $fields, $defaultValue): void - { - if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { - $this->openAPINullablesSetToNull[] = $variableName; - } - - $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - -