diff --git a/docs/Model/ResourceUpdate.md b/docs/Model/ResourceUpdate.md index 9431056..d526235 100644 --- a/docs/Model/ResourceUpdate.md +++ b/docs/Model/ResourceUpdate.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | | [optional] **resource_id** | **int** | | [optional] +**version_id** | **int** | | [optional] **resource_version** | **string** | | [optional] **download_count** | **int** | | [optional] **post_date** | **int** | post date as timestamp (in seconds) | [optional] diff --git a/src/Api/DefaultApi.php b/src/Api/DefaultApi.php index 8d19e0e..06da8d6 100644 --- a/src/Api/DefaultApi.php +++ b/src/Api/DefaultApi.php @@ -15,7 +15,7 @@ * * The version of the OpenAPI document: 0.2 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.16.0 + * Generator version: 7.20.0 */ /** @@ -405,7 +405,6 @@ public function findAuthorRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -686,7 +685,6 @@ public function getAuthorRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -967,7 +965,6 @@ public function getResourceRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1248,7 +1245,6 @@ public function getResourceUpdateRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1549,7 +1545,6 @@ public function getResourceUpdatesRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1850,7 +1845,6 @@ public function getResourcesByAuthorRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -2105,7 +2099,6 @@ public function listResourceCategoriesRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -2400,7 +2393,6 @@ public function listResourcesRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); diff --git a/src/ApiException.php b/src/ApiException.php index 371c0d2..516993c 100644 --- a/src/ApiException.php +++ b/src/ApiException.php @@ -15,7 +15,7 @@ * * The version of the OpenAPI document: 0.2 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.16.0 + * Generator version: 7.20.0 */ /** diff --git a/src/Configuration.php b/src/Configuration.php index 02368ae..f96927b 100644 --- a/src/Configuration.php +++ b/src/Configuration.php @@ -15,7 +15,7 @@ * * The version of the OpenAPI document: 0.2 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.16.0 + * Generator version: 7.20.0 */ /** diff --git a/src/FormDataProcessor.php b/src/FormDataProcessor.php index 4782a7d..4001231 100644 --- a/src/FormDataProcessor.php +++ b/src/FormDataProcessor.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 0.2 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.16.0 + * Generator version: 7.20.0 */ /** diff --git a/src/HeaderSelector.php b/src/HeaderSelector.php index 62b9f56..6b1bd83 100644 --- a/src/HeaderSelector.php +++ b/src/HeaderSelector.php @@ -15,7 +15,7 @@ * * The version of the OpenAPI document: 0.2 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.16.0 + * Generator version: 7.20.0 */ /** diff --git a/src/Model/Author.php b/src/Model/Author.php index d65b31b..77bc9f2 100644 --- a/src/Model/Author.php +++ b/src/Model/Author.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 0.2 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.16.0 + * Generator version: 7.20.0 */ /** diff --git a/src/Model/AuthorIdentities.php b/src/Model/AuthorIdentities.php index 2d0c4cf..12834a1 100644 --- a/src/Model/AuthorIdentities.php +++ b/src/Model/AuthorIdentities.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 0.2 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.16.0 + * Generator version: 7.20.0 */ /** diff --git a/src/Model/ModelInterface.php b/src/Model/ModelInterface.php index 1b1b45b..9130480 100644 --- a/src/Model/ModelInterface.php +++ b/src/Model/ModelInterface.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 0.2 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.16.0 + * Generator version: 7.20.0 */ /** diff --git a/src/Model/Resource.php b/src/Model/Resource.php index 6f90afd..478a020 100644 --- a/src/Model/Resource.php +++ b/src/Model/Resource.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 0.2 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.16.0 + * Generator version: 7.20.0 */ /** diff --git a/src/Model/ResourceAuthor.php b/src/Model/ResourceAuthor.php index 78ddeb0..39751d2 100644 --- a/src/Model/ResourceAuthor.php +++ b/src/Model/ResourceAuthor.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 0.2 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.16.0 + * Generator version: 7.20.0 */ /** diff --git a/src/Model/ResourceCategory.php b/src/Model/ResourceCategory.php index 6f41916..a7f5e0a 100644 --- a/src/Model/ResourceCategory.php +++ b/src/Model/ResourceCategory.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 0.2 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.16.0 + * Generator version: 7.20.0 */ /** diff --git a/src/Model/ResourcePremium.php b/src/Model/ResourcePremium.php index 0266d31..d040f26 100644 --- a/src/Model/ResourcePremium.php +++ b/src/Model/ResourcePremium.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 0.2 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.16.0 + * Generator version: 7.20.0 */ /** diff --git a/src/Model/ResourceStats.php b/src/Model/ResourceStats.php index 5a34e50..6864304 100644 --- a/src/Model/ResourceStats.php +++ b/src/Model/ResourceStats.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 0.2 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.16.0 + * Generator version: 7.20.0 */ /** diff --git a/src/Model/ResourceStatsReviews.php b/src/Model/ResourceStatsReviews.php index a8c8a0d..7e79886 100644 --- a/src/Model/ResourceStatsReviews.php +++ b/src/Model/ResourceStatsReviews.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 0.2 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.16.0 + * Generator version: 7.20.0 */ /** diff --git a/src/Model/ResourceUpdate.php b/src/Model/ResourceUpdate.php index 7825f50..1996488 100644 --- a/src/Model/ResourceUpdate.php +++ b/src/Model/ResourceUpdate.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 0.2 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.16.0 + * Generator version: 7.20.0 */ /** @@ -60,6 +60,7 @@ class ResourceUpdate implements ModelInterface, ArrayAccess, JsonSerializable protected static array $openAPITypes = [ 'id' => 'int', 'resource_id' => 'int', + 'version_id' => 'int', 'resource_version' => 'string', 'download_count' => 'int', 'post_date' => 'int', @@ -75,6 +76,7 @@ class ResourceUpdate implements ModelInterface, ArrayAccess, JsonSerializable protected static array $openAPIFormats = [ 'id' => null, 'resource_id' => null, + 'version_id' => null, 'resource_version' => null, 'download_count' => null, 'post_date' => null, @@ -90,6 +92,7 @@ class ResourceUpdate implements ModelInterface, ArrayAccess, JsonSerializable protected static array $openAPINullables = [ 'id' => false, 'resource_id' => false, + 'version_id' => false, 'resource_version' => false, 'download_count' => false, 'post_date' => false, @@ -185,6 +188,7 @@ public function isNullableSetToNull(string $property): bool protected static array $attributeMap = [ 'id' => 'id', 'resource_id' => 'resource_id', + 'version_id' => 'version_id', 'resource_version' => 'resource_version', 'download_count' => 'download_count', 'post_date' => 'post_date', @@ -200,6 +204,7 @@ public function isNullableSetToNull(string $property): bool protected static array $setters = [ 'id' => 'setId', 'resource_id' => 'setResourceId', + 'version_id' => 'setVersionId', 'resource_version' => 'setResourceVersion', 'download_count' => 'setDownloadCount', 'post_date' => 'setPostDate', @@ -215,6 +220,7 @@ public function isNullableSetToNull(string $property): bool protected static array $getters = [ 'id' => 'getId', 'resource_id' => 'getResourceId', + 'version_id' => 'getVersionId', 'resource_version' => 'getResourceVersion', 'download_count' => 'getDownloadCount', 'post_date' => 'getPostDate', @@ -280,6 +286,7 @@ public function __construct(?array $data = null) { $this->setIfExists('id', $data ?? [], null); $this->setIfExists('resource_id', $data ?? [], null); + $this->setIfExists('version_id', $data ?? [], null); $this->setIfExists('resource_version', $data ?? [], null); $this->setIfExists('download_count', $data ?? [], null); $this->setIfExists('post_date', $data ?? [], null); @@ -383,6 +390,33 @@ public function setResourceId(?int $resource_id): static return $this; } + /** + * Gets version_id + * + * @return int|null + */ + public function getVersionId(): ?int + { + return $this->container['version_id']; + } + + /** + * Sets version_id + * + * @param int|null $version_id version_id + * + * @return $this + */ + public function setVersionId(?int $version_id): static + { + if (is_null($version_id)) { + throw new InvalidArgumentException('non-nullable version_id cannot be null'); + } + $this->container['version_id'] = $version_id; + + return $this; + } + /** * Gets resource_version * diff --git a/src/ObjectSerializer.php b/src/ObjectSerializer.php index a8dfc1b..5885c73 100644 --- a/src/ObjectSerializer.php +++ b/src/ObjectSerializer.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 0.2 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.16.0 + * Generator version: 7.20.0 */ /** @@ -27,6 +27,7 @@ namespace Aternos\SpigotApi; +use BackedEnum; use DateTimeInterface; use DateTime; use GuzzleHttp\Psr7\Utils; @@ -262,6 +263,11 @@ public static function toQueryValue( // push key itself $result[] = $prop; } + + if ($v instanceof BackedEnum) { + $v = $v->value; + } + $result[$prop] = $v; } } @@ -587,6 +593,6 @@ public static function buildQuery(array $params, $encoding = PHP_QUERY_RFC3986): } } - return $qs ? (string) substr($qs, 0, -1) : ''; + return $qs ? substr($qs, 0, -1) : ''; } }