From 782533ca3a8a14a0aff55d3769ddd124ad35a58b Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 23 Jun 2023 14:14:01 +0000 Subject: [PATCH] Generated v2.2.2 --- CHANGELOG.md | 6 + ...md => HistoricalFieldResponseDataField.md} | 2 +- ...llOf.md => HistoricalResponseDataField.md} | 2 +- docs/Model/HistoricalService.md | 10 + docs/Model/HistoricalUsageMonthResponse.md | 2 +- .../HistoricalUsageMonthResponseAllOf.md | 2 +- ...md => HistoricalUsageMonthResponseData.md} | 4 +- lib/Configuration.php | 4 +- ...p => HistoricalFieldResponseDataField.php} | 8 +- ...Of.php => HistoricalResponseDataField.php} | 8 +- lib/Model/HistoricalService.php | 314 ++++++++++++++++++ lib/Model/HistoricalUsageMonthResponse.php | 6 +- .../HistoricalUsageMonthResponseAllOf.php | 6 +- ...p => HistoricalUsageMonthResponseData.php} | 14 +- sig.json | 2 +- 15 files changed, 360 insertions(+), 30 deletions(-) rename docs/Model/{HistoricalFieldResponseAllOf.md => HistoricalFieldResponseDataField.md} (87%) rename docs/Model/{HistoricalResponseAllOf.md => HistoricalResponseDataField.md} (92%) create mode 100644 docs/Model/HistoricalService.md rename docs/Model/{HistoricalUsageMonthResponseAllOfData.md => HistoricalUsageMonthResponseData.md} (69%) rename lib/Model/{HistoricalFieldResponseAllOf.php => HistoricalFieldResponseDataField.php} (96%) rename lib/Model/{HistoricalResponseAllOf.php => HistoricalResponseDataField.php} (96%) create mode 100644 lib/Model/HistoricalService.php rename lib/Model/{HistoricalUsageMonthResponseAllOfData.php => HistoricalUsageMonthResponseData.php} (93%) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb6bf79e..826c5409 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [v2.2.2](https://github.com/fastly/fastly-php/releases/tag/release/v2.2.2) (2023-06-23) + +**Bug fixes:** + +- fix(historical_stats): generate missing models. + ## [v2.2.1](https://github.com/fastly/fastly-php/releases/tag/release/v2.2.1) (2023-06-21) **Bug fixes:** diff --git a/docs/Model/HistoricalFieldResponseAllOf.md b/docs/Model/HistoricalFieldResponseDataField.md similarity index 87% rename from docs/Model/HistoricalFieldResponseAllOf.md rename to docs/Model/HistoricalFieldResponseDataField.md index 8a3ef709..0c3e04af 100644 --- a/docs/Model/HistoricalFieldResponseAllOf.md +++ b/docs/Model/HistoricalFieldResponseDataField.md @@ -1,4 +1,4 @@ -# # HistoricalFieldResponseAllOf +# # HistoricalFieldResponseDataField ## Properties diff --git a/docs/Model/HistoricalResponseAllOf.md b/docs/Model/HistoricalResponseDataField.md similarity index 92% rename from docs/Model/HistoricalResponseAllOf.md rename to docs/Model/HistoricalResponseDataField.md index 5000fc67..5d3c89c8 100644 --- a/docs/Model/HistoricalResponseAllOf.md +++ b/docs/Model/HistoricalResponseDataField.md @@ -1,4 +1,4 @@ -# # HistoricalResponseAllOf +# # HistoricalResponseDataField ## Properties diff --git a/docs/Model/HistoricalService.md b/docs/Model/HistoricalService.md new file mode 100644 index 00000000..624b4a6b --- /dev/null +++ b/docs/Model/HistoricalService.md @@ -0,0 +1,10 @@ +# # HistoricalService + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | The name of the service. | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/HistoricalUsageMonthResponse.md b/docs/Model/HistoricalUsageMonthResponse.md index fd9dbd1d..eeb3bfc3 100644 --- a/docs/Model/HistoricalUsageMonthResponse.md +++ b/docs/Model/HistoricalUsageMonthResponse.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **status** | **string** | Whether or not we were able to successfully execute the query. | [optional] **meta** | [**\Fastly\Model\HistoricalMeta**](HistoricalMeta.md) | | [optional] **msg** | **string** | If the query was not successful, this will provide a string that explains why. | [optional] -**data** | [**\Fastly\Model\HistoricalUsageMonthResponseAllOfData**](HistoricalUsageMonthResponseAllOfData.md) | | [optional] +**data** | [**\Fastly\Model\HistoricalUsageMonthResponseData**](HistoricalUsageMonthResponseData.md) | | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/HistoricalUsageMonthResponseAllOf.md b/docs/Model/HistoricalUsageMonthResponseAllOf.md index 08e980a8..be8f085c 100644 --- a/docs/Model/HistoricalUsageMonthResponseAllOf.md +++ b/docs/Model/HistoricalUsageMonthResponseAllOf.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [**\Fastly\Model\HistoricalUsageMonthResponseAllOfData**](HistoricalUsageMonthResponseAllOfData.md) | | [optional] +**data** | [**\Fastly\Model\HistoricalUsageMonthResponseData**](HistoricalUsageMonthResponseData.md) | | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/HistoricalUsageMonthResponseAllOfData.md b/docs/Model/HistoricalUsageMonthResponseData.md similarity index 69% rename from docs/Model/HistoricalUsageMonthResponseAllOfData.md rename to docs/Model/HistoricalUsageMonthResponseData.md index c7047a17..902b953f 100644 --- a/docs/Model/HistoricalUsageMonthResponseAllOfData.md +++ b/docs/Model/HistoricalUsageMonthResponseData.md @@ -1,11 +1,11 @@ -# # HistoricalUsageMonthResponseAllOfData +# # HistoricalUsageMonthResponseData ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **customer_id** | **string** | | [optional] [readonly] -**services** | **array<string,array<string,\Fastly\Model\HistoricalUsageResults>>** | | [optional] +**services** | [**array<string,\Fastly\Model\HistoricalService>**](HistoricalService.md) | | [optional] **total** | [**\Fastly\Model\HistoricalUsageResults**](HistoricalUsageResults.md) | | [optional] diff --git a/lib/Configuration.php b/lib/Configuration.php index 4a13161d..74034299 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -89,7 +89,7 @@ class Configuration * * @var string */ - protected $userAgent = 'fastly-php/2.2.1'; + protected $userAgent = 'fastly-php/2.2.2'; /** * Debug switch (default set to false) @@ -453,7 +453,7 @@ public static function toDebugReport() $report .= ' OS: ' . php_uname() . PHP_EOL; $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; $report .= ' The version of the schema document: 1.0.0' . PHP_EOL; - $report .= ' SDK Package Version: 2.2.1' . PHP_EOL; + $report .= ' SDK Package Version: 2.2.2' . PHP_EOL; $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; return $report; diff --git a/lib/Model/HistoricalFieldResponseAllOf.php b/lib/Model/HistoricalFieldResponseDataField.php similarity index 96% rename from lib/Model/HistoricalFieldResponseAllOf.php rename to lib/Model/HistoricalFieldResponseDataField.php index b878f759..03e38372 100644 --- a/lib/Model/HistoricalFieldResponseAllOf.php +++ b/lib/Model/HistoricalFieldResponseDataField.php @@ -1,6 +1,6 @@ + * @template TKey int|null + * @template TValue mixed|null + */ +class HistoricalService implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'historical_service'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'name' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName' + ]; + + /** + * 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::$fastlyModelName; + } + + + /** + * 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->container['name'] = $data['name'] ?? null; + } + + /** + * 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; + } + + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name The name of the service. + * + * @return self + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + 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) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + 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. + */ + 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/lib/Model/HistoricalUsageMonthResponse.php b/lib/Model/HistoricalUsageMonthResponse.php index 6e90901e..7a026b87 100644 --- a/lib/Model/HistoricalUsageMonthResponse.php +++ b/lib/Model/HistoricalUsageMonthResponse.php @@ -56,7 +56,7 @@ class HistoricalUsageMonthResponse implements ModelInterface, ArrayAccess, \Json 'status' => 'string', 'meta' => '\Fastly\Model\HistoricalMeta', 'msg' => 'string', - 'data' => '\Fastly\Model\HistoricalUsageMonthResponseAllOfData' + 'data' => '\Fastly\Model\HistoricalUsageMonthResponseData' ]; /** @@ -292,7 +292,7 @@ public function setMsg($msg) /** * Gets data * - * @return \Fastly\Model\HistoricalUsageMonthResponseAllOfData|null + * @return \Fastly\Model\HistoricalUsageMonthResponseData|null */ public function getData() { @@ -302,7 +302,7 @@ public function getData() /** * Sets data * - * @param \Fastly\Model\HistoricalUsageMonthResponseAllOfData|null $data data + * @param \Fastly\Model\HistoricalUsageMonthResponseData|null $data data * * @return self */ diff --git a/lib/Model/HistoricalUsageMonthResponseAllOf.php b/lib/Model/HistoricalUsageMonthResponseAllOf.php index acc0c985..921d9889 100644 --- a/lib/Model/HistoricalUsageMonthResponseAllOf.php +++ b/lib/Model/HistoricalUsageMonthResponseAllOf.php @@ -53,7 +53,7 @@ class HistoricalUsageMonthResponseAllOf implements ModelInterface, ArrayAccess, * @var string[] */ protected static $fastlyTypes = [ - 'data' => '\Fastly\Model\HistoricalUsageMonthResponseAllOfData' + 'data' => '\Fastly\Model\HistoricalUsageMonthResponseData' ]; /** @@ -202,7 +202,7 @@ public function valid() /** * Gets data * - * @return \Fastly\Model\HistoricalUsageMonthResponseAllOfData|null + * @return \Fastly\Model\HistoricalUsageMonthResponseData|null */ public function getData() { @@ -212,7 +212,7 @@ public function getData() /** * Sets data * - * @param \Fastly\Model\HistoricalUsageMonthResponseAllOfData|null $data data + * @param \Fastly\Model\HistoricalUsageMonthResponseData|null $data data * * @return self */ diff --git a/lib/Model/HistoricalUsageMonthResponseAllOfData.php b/lib/Model/HistoricalUsageMonthResponseData.php similarity index 93% rename from lib/Model/HistoricalUsageMonthResponseAllOfData.php rename to lib/Model/HistoricalUsageMonthResponseData.php index a975fa03..fa7ffad8 100644 --- a/lib/Model/HistoricalUsageMonthResponseAllOfData.php +++ b/lib/Model/HistoricalUsageMonthResponseData.php @@ -1,6 +1,6 @@ 'string', - 'services' => 'array>', + 'services' => 'array', 'total' => '\Fastly\Model\HistoricalUsageResults' ]; @@ -238,7 +238,7 @@ public function setCustomerId($customer_id) /** * Gets services * - * @return array>|null + * @return array|null */ public function getServices() { @@ -248,7 +248,7 @@ public function getServices() /** * Sets services * - * @param array>|null $services services + * @param array|null $services services * * @return self */ diff --git a/sig.json b/sig.json index 68fdbf8e..2d6064ce 100644 --- a/sig.json +++ b/sig.json @@ -1 +1 @@ -{"G": "7a7ec0a2", "D": "a64b7e5f"} +{"G": "70bf90be", "D": "bd27032c"}