Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/Model/ResourceUpdate.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
10 changes: 1 addition & 9 deletions src/Api/DefaultApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/

/**
Expand Down Expand Up @@ -405,7 +405,6 @@ public function findAuthorRequest(
}
}


$defaultHeaders = [];
if ($this->config->getUserAgent()) {
$defaultHeaders['User-Agent'] = $this->config->getUserAgent();
Expand Down Expand Up @@ -686,7 +685,6 @@ public function getAuthorRequest(
}
}


$defaultHeaders = [];
if ($this->config->getUserAgent()) {
$defaultHeaders['User-Agent'] = $this->config->getUserAgent();
Expand Down Expand Up @@ -967,7 +965,6 @@ public function getResourceRequest(
}
}


$defaultHeaders = [];
if ($this->config->getUserAgent()) {
$defaultHeaders['User-Agent'] = $this->config->getUserAgent();
Expand Down Expand Up @@ -1248,7 +1245,6 @@ public function getResourceUpdateRequest(
}
}


$defaultHeaders = [];
if ($this->config->getUserAgent()) {
$defaultHeaders['User-Agent'] = $this->config->getUserAgent();
Expand Down Expand Up @@ -1549,7 +1545,6 @@ public function getResourceUpdatesRequest(
}
}


$defaultHeaders = [];
if ($this->config->getUserAgent()) {
$defaultHeaders['User-Agent'] = $this->config->getUserAgent();
Expand Down Expand Up @@ -1850,7 +1845,6 @@ public function getResourcesByAuthorRequest(
}
}


$defaultHeaders = [];
if ($this->config->getUserAgent()) {
$defaultHeaders['User-Agent'] = $this->config->getUserAgent();
Expand Down Expand Up @@ -2105,7 +2099,6 @@ public function listResourceCategoriesRequest(
}
}


$defaultHeaders = [];
if ($this->config->getUserAgent()) {
$defaultHeaders['User-Agent'] = $this->config->getUserAgent();
Expand Down Expand Up @@ -2400,7 +2393,6 @@ public function listResourcesRequest(
}
}


$defaultHeaders = [];
if ($this->config->getUserAgent()) {
$defaultHeaders['User-Agent'] = $this->config->getUserAgent();
Expand Down
2 changes: 1 addition & 1 deletion src/ApiException.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion src/FormDataProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion src/HeaderSelector.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Model/Author.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Model/AuthorIdentities.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Model/ModelInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Model/Resource.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Model/ResourceAuthor.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Model/ResourceCategory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Model/ResourcePremium.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Model/ResourceStats.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Model/ResourceStatsReviews.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/

/**
Expand Down
36 changes: 35 additions & 1 deletion src/Model/ResourceUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/

/**
Expand Down Expand Up @@ -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',
Expand All @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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
*
Expand Down
10 changes: 8 additions & 2 deletions src/ObjectSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/

/**
Expand All @@ -27,6 +27,7 @@

namespace Aternos\SpigotApi;

use BackedEnum;
use DateTimeInterface;
use DateTime;
use GuzzleHttp\Psr7\Utils;
Expand Down Expand Up @@ -262,6 +263,11 @@ public static function toQueryValue(
// push key itself
$result[] = $prop;
}

if ($v instanceof BackedEnum) {
$v = $v->value;
}

$result[$prop] = $v;
}
}
Expand Down Expand Up @@ -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) : '';
}
}
Loading