From b8ff99e235c662a23d270b30c2c80a575caf7180 Mon Sep 17 00:00:00 2001 From: Paul Vogel Date: Wed, 16 Sep 2026 15:24:58 +0200 Subject: [PATCH 1/4] update openapi.yaml spec from 09-2026 --- openapi.yaml | 117 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) diff --git a/openapi.yaml b/openapi.yaml index 19dbebc..076d92a 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -361,6 +361,24 @@ paths: required: false schema: $ref: '#/components/schemas/PremiumType' + - name: clientCompatible + in: query + description: >- + When set to true, will filter out any mod that doesn't have a + default file that is compatible with the client. This is usually + due to a bad file structure of the file (which might cause + unexpected behaviours on the user's machine - such as overriding + other mods installed). + required: false + schema: + type: boolean + - name: modsSearchEnhancedFeatures + in: query + description: Bitwise number with values from ModsSearchEnhancedFeatures + required: false + schema: + type: integer + format: int64 responses: '200': description: OK @@ -485,6 +503,11 @@ paths: in: query schema: type: boolean + - name: lang + in: query + schema: + type: string + default: en responses: '200': description: OK @@ -611,6 +634,14 @@ paths: required: false schema: $ref: '#/components/schemas/PlatformType' + - name: clientCompatible + in: query + description: >- + When set to true, filter OUT any file that isn't client + compatible. + required: false + schema: + type: boolean responses: '200': description: OK @@ -674,6 +705,20 @@ paths: schema: type: integer format: int32 + - name: raw + in: query + description: Get raw changelog without things like external link redirects + schema: + type: boolean + - name: stripped + in: query + description: Get the changelog with all HTML tags removed + schema: + type: boolean + - name: markup + in: query + schema: + type: boolean responses: '200': description: OK @@ -1043,6 +1088,34 @@ components: format: int32 nullable: true description: The display index for this category + ClientFeaturedProjectTag: + description: | + ClientFeaturedProjectTag + Possible enum values: + * 0 = None + * 1 = Sponsored + * 2 = HiddenGem + * 3 = Popular + type: integer + enum: + - 0 + - 1 + - 2 + - 3 + x-enum-varnames: + - None + - Sponsored + - HiddenGem + - Popular + CookerInfo: + type: object + properties: + cookerVersion: + type: string + description: The version of the cooker that processed this file + cookerRevision: + type: string + description: The revision of the cooker that processed this file CoreApiStatus: description: | CoreApiStatus @@ -1197,6 +1270,8 @@ components: type: array items: $ref: '#/components/schemas/FileModule' + cookingInfo: + $ref: '#/components/schemas/CookerInfo' FileDependency: type: object properties: @@ -1453,6 +1528,8 @@ components: $ref: '#/components/schemas/CoreStatus' apiStatus: $ref: '#/components/schemas/CoreApiStatus' + supportedFeatures: + $ref: '#/components/schemas/GameSupportedFeatures' GameAssets: type: object properties: @@ -1465,6 +1542,12 @@ components: coverUrl: type: string format: uri + GameSupportedFeatures: + type: object + properties: + supportModSubscriptions: + type: boolean + description: Whether mod subscriptions are supported for this game GameVersionsByType: type: object properties: @@ -1660,6 +1743,8 @@ components: type: integer format: int32 nullable: true + clientCompatible: + type: boolean GetFingerprintMatchesRequestBody: type: object properties: @@ -1695,6 +1780,14 @@ components: items: type: integer format: int64 + devModIds: + type: array + items: + type: integer + format: int32 + filterPcOnly: + type: boolean + nullable: true HashAlgo: description: | Hash algorithems @@ -1889,6 +1982,10 @@ components: items: $ref: '#/components/schemas/File' description: List of latest files of the mod + supportsCrossPlatform: + type: boolean + nullable: true + description: Whether the mod supports cross-platform play latestFilesIndexes: type: array items: @@ -1941,6 +2038,8 @@ components: description: The mod's social links items: $ref: '#/components/schemas/SocialLink' + featuredProjectTag: + $ref: '#/components/schemas/ClientFeaturedProjectTag' ModAsset: type: object properties: @@ -2058,6 +2157,7 @@ components: * 10 = Featured Release * 11 = Release Date * 12 = Rating + * 13 = Relevancy type: integer enum: - 1 @@ -2072,6 +2172,7 @@ components: - 10 - 11 - 12 + - 13 x-enum-varnames: - Featured - Popularity @@ -2085,6 +2186,7 @@ components: - Featured Release - Release Date - Rating + - Relevancy ModStatus: description: | Current mod status @@ -2312,6 +2414,11 @@ components: * 12 = Pinterest * 13 = Github * 14 = Bluesky + * 15 = Paypal + * 16 = PaypalHosted + * 17 = GithubSponsors + * 18 = Kofi + * 19 = BuyMeACoffee enum: - 1 - 2 @@ -2327,6 +2434,11 @@ components: - 12 - 13 - 14 + - 15 + - 16 + - 17 + - 18 + - 19 x-enum-varnames: - Mastodon - Discord @@ -2342,6 +2454,11 @@ components: - Pinterest - Github - Bluesky + - Paypal + - PaypalHosted + - GithubSponsors + - Kofi + - BuyMeACoffee SortableGameVersion: type: object properties: From 62763959b0b4eebf571f88a0a00d3f67fdf91a5e Mon Sep 17 00:00:00 2001 From: Paul Vogel Date: Wed, 16 Sep 2026 15:28:30 +0200 Subject: [PATCH 2/4] rerun generator with version 7.25.0 --- docs/Api/FilesApi.md | 16 +- docs/Api/ModsApi.md | 14 +- docs/Model/AffiliationServiceType.md | 2 +- ...ApiResponseOfListOfMinecraftGameVersion.md | 2 +- ...ResponseOfListOfMinecraftModLoaderIndex.md | 2 +- .../ApiResponseOfMinecraftGameVersion.md | 2 +- .../ApiResponseOfMinecraftModLoaderVersion.md | 2 +- docs/Model/Category.md | 2 +- docs/Model/ClientFeaturedProjectTag.md | 8 + docs/Model/CookerInfo.md | 10 + docs/Model/CoreApiStatus.md | 2 +- docs/Model/CoreStatus.md | 2 +- docs/Model/FeaturedModsResponse.md | 2 +- docs/Model/File.md | 3 +- docs/Model/FileDependency.md | 2 +- docs/Model/FileHash.md | 2 +- docs/Model/FileIndex.md | 2 +- docs/Model/FileModule.md | 2 +- docs/Model/FileRelationType.md | 2 +- docs/Model/FileReleaseType.md | 2 +- docs/Model/FileStatus.md | 2 +- docs/Model/FingerprintFuzzyMatch.md | 2 +- docs/Model/FingerprintFuzzyMatchResult.md | 2 +- docs/Model/FingerprintMatch.md | 2 +- docs/Model/FingerprintMatchesResult.md | 2 +- docs/Model/FolderFingerprint.md | 2 +- docs/Model/Game.md | 3 +- docs/Model/GameAssets.md | 2 +- docs/Model/GameSupportedFeatures.md | 9 + docs/Model/GameVersion.md | 2 +- docs/Model/GameVersionStatus.md | 2 +- docs/Model/GameVersionType.md | 2 +- docs/Model/GameVersionTypeStatus.md | 2 +- docs/Model/GameVersionsByType.md | 2 +- docs/Model/GameVersionsByTypeV2.md | 2 +- docs/Model/GetCategoriesResponse.md | 2 +- docs/Model/GetFeaturedModsRequestBody.md | 3 +- docs/Model/GetFeaturedModsResponse.md | 2 +- docs/Model/GetFilesResponse.md | 2 +- .../GetFingerprintFuzzyMatchesResponse.md | 2 +- .../Model/GetFingerprintMatchesRequestBody.md | 2 +- docs/Model/GetFingerprintMatchesResponse.md | 2 +- docs/Model/GetFuzzyMatchesRequestBody.md | 2 +- docs/Model/GetGameResponse.md | 2 +- docs/Model/GetGamesResponse.md | 2 +- docs/Model/GetModFileChangelogResponse.md | 2 +- docs/Model/GetModFileDownloadURLResponse.md | 2 +- docs/Model/GetModFileResponse.md | 2 +- docs/Model/GetModFilesRequestBody.md | 2 +- docs/Model/GetModFilesResponse.md | 2 +- docs/Model/GetModResponse.md | 2 +- docs/Model/GetModsByIdsListRequestBody.md | 4 +- docs/Model/GetModsResponse.md | 2 +- docs/Model/GetVersionTypesResponse.md | 2 +- docs/Model/GetVersionsResponse.md | 2 +- docs/Model/GetVersionsV2Response.md | 2 +- docs/Model/HashAlgo.md | 2 +- docs/Model/MinecraftGameVersion.md | 2 +- docs/Model/MinecraftModLoaderIndex.md | 2 +- docs/Model/MinecraftModLoaderVersion.md | 2 +- docs/Model/Mod.md | 4 +- docs/Model/ModAsset.md | 2 +- docs/Model/ModAuthor.md | 2 +- docs/Model/ModDescriptionResponse.md | 2 +- docs/Model/ModLinks.md | 2 +- docs/Model/ModLoaderInstallMethod.md | 2 +- docs/Model/ModLoaderType.md | 2 +- docs/Model/ModSearchSortField.md | 2 +- docs/Model/ModStatus.md | 2 +- docs/Model/Pagination.md | 2 +- docs/Model/PlatformType.md | 2 +- docs/Model/PremiumType.md | 2 +- docs/Model/RatingDetails.md | 2 +- docs/Model/RatingScore.md | 2 +- docs/Model/SearchModsResponse.md | 2 +- docs/Model/ServerAffiliation.md | 2 +- docs/Model/SocialLink.md | 2 +- docs/Model/SocialLinkType.md | 2 +- docs/Model/SortOrder.md | 2 +- docs/Model/SortableGameVersion.md | 2 +- src/Api/CategoriesApi.php | 38 +- src/Api/FilesApi.php | 262 +++++------ src/Api/FingerprintsApi.php | 88 ++-- src/Api/GamesApi.php | 165 +------ src/Api/MinecraftApi.php | 131 +----- src/Api/ModsApi.php | 231 ++++------ src/ApiException.php | 2 +- src/Configuration.php | 46 +- src/FormDataProcessor.php | 2 +- src/HeaderSelector.php | 16 +- src/Model/AffiliationServiceType.php | 2 +- src/Model/AnyOfInterface.php | 65 +++ ...piResponseOfListOfMinecraftGameVersion.php | 110 ++--- ...esponseOfListOfMinecraftModLoaderIndex.php | 110 ++--- .../ApiResponseOfMinecraftGameVersion.php | 110 ++--- ...ApiResponseOfMinecraftModLoaderVersion.php | 110 ++--- src/Model/Category.php | 110 ++--- src/Model/ClientFeaturedProjectTag.php | 49 ++ src/Model/CookerInfo.php | 417 ++++++++++++++++++ src/Model/CoreApiStatus.php | 2 +- src/Model/CoreStatus.php | 2 +- src/Model/FeaturedModsResponse.php | 110 ++--- src/Model/File.php | 156 ++++--- src/Model/FileDependency.php | 110 ++--- src/Model/FileHash.php | 110 ++--- src/Model/FileIndex.php | 110 ++--- src/Model/FileModule.php | 110 ++--- src/Model/FileRelationType.php | 2 +- src/Model/FileReleaseType.php | 2 +- src/Model/FileStatus.php | 2 +- src/Model/FingerprintFuzzyMatch.php | 110 ++--- src/Model/FingerprintFuzzyMatchResult.php | 110 ++--- src/Model/FingerprintMatch.php | 110 ++--- src/Model/FingerprintMatchesResult.php | 110 ++--- src/Model/FolderFingerprint.php | 110 ++--- src/Model/Game.php | 156 ++++--- src/Model/GameAssets.php | 110 ++--- src/Model/GameSupportedFeatures.php | 383 ++++++++++++++++ src/Model/GameVersion.php | 110 ++--- src/Model/GameVersionStatus.php | 2 +- src/Model/GameVersionType.php | 110 ++--- src/Model/GameVersionTypeStatus.php | 2 +- src/Model/GameVersionsByType.php | 110 ++--- src/Model/GameVersionsByTypeV2.php | 110 ++--- src/Model/GetCategoriesResponse.php | 110 ++--- src/Model/GetFeaturedModsRequestBody.php | 156 ++++--- src/Model/GetFeaturedModsResponse.php | 110 ++--- src/Model/GetFilesResponse.php | 110 ++--- .../GetFingerprintFuzzyMatchesResponse.php | 110 ++--- .../GetFingerprintMatchesRequestBody.php | 110 ++--- src/Model/GetFingerprintMatchesResponse.php | 110 ++--- src/Model/GetFuzzyMatchesRequestBody.php | 110 ++--- src/Model/GetGameResponse.php | 110 ++--- src/Model/GetGamesResponse.php | 110 ++--- src/Model/GetModFileChangelogResponse.php | 110 ++--- src/Model/GetModFileDownloadURLResponse.php | 110 ++--- src/Model/GetModFileResponse.php | 110 ++--- src/Model/GetModFilesRequestBody.php | 110 ++--- src/Model/GetModFilesResponse.php | 110 ++--- src/Model/GetModResponse.php | 110 ++--- src/Model/GetModsByIdsListRequestBody.php | 197 ++++++--- src/Model/GetModsResponse.php | 110 ++--- src/Model/GetVersionTypesResponse.php | 110 ++--- src/Model/GetVersionsResponse.php | 110 ++--- src/Model/GetVersionsV2Response.php | 110 ++--- src/Model/HashAlgo.php | 2 +- src/Model/MinecraftGameVersion.php | 110 ++--- src/Model/MinecraftModLoaderIndex.php | 110 ++--- src/Model/MinecraftModLoaderVersion.php | 110 ++--- src/Model/Mod.php | 197 ++++++--- src/Model/ModAsset.php | 110 ++--- src/Model/ModAuthor.php | 110 ++--- src/Model/ModDescriptionResponse.php | 110 ++--- src/Model/ModLinks.php | 110 ++--- src/Model/ModLoaderInstallMethod.php | 2 +- src/Model/ModLoaderType.php | 2 +- src/Model/ModSearchSortField.php | 6 +- src/Model/ModStatus.php | 2 +- src/Model/ModelInterface.php | 19 +- src/Model/OneOfInterface.php | 65 +++ src/Model/Pagination.php | 110 ++--- src/Model/PlatformType.php | 2 +- src/Model/PremiumType.php | 2 +- src/Model/RatingDetails.php | 110 ++--- src/Model/RatingScore.php | 2 +- src/Model/SearchModsResponse.php | 110 ++--- src/Model/ServerAffiliation.php | 110 ++--- src/Model/SocialLink.php | 110 ++--- src/Model/SocialLinkType.php | 14 +- src/Model/SortOrder.php | 2 +- src/Model/SortableGameVersion.php | 110 ++--- src/ObjectSerializer.php | 246 +++++++++-- 172 files changed, 4426 insertions(+), 4647 deletions(-) create mode 100644 docs/Model/ClientFeaturedProjectTag.md create mode 100644 docs/Model/CookerInfo.md create mode 100644 docs/Model/GameSupportedFeatures.md create mode 100644 src/Model/AnyOfInterface.php create mode 100644 src/Model/ClientFeaturedProjectTag.php create mode 100644 src/Model/CookerInfo.php create mode 100644 src/Model/GameSupportedFeatures.php create mode 100644 src/Model/OneOfInterface.php diff --git a/docs/Api/FilesApi.md b/docs/Api/FilesApi.md index 2f937ac..88c5bd4 100644 --- a/docs/Api/FilesApi.md +++ b/docs/Api/FilesApi.md @@ -140,7 +140,7 @@ try { ## `getModFileChangelog()` ```php -getModFileChangelog($mod_id, $file_id): \Aternos\CurseForgeApi\Model\GetModFileChangelogResponse +getModFileChangelog($mod_id, $file_id, $raw, $stripped, $markup): \Aternos\CurseForgeApi\Model\GetModFileChangelogResponse ``` Get mod file changelog @@ -168,9 +168,12 @@ $apiInstance = new Aternos\CurseForgeApi\Api\FilesApi( ); $mod_id = 56; // int | The mod id the file belongs to $file_id = 56; // int | The file id. +$raw = True; // bool | Get raw changelog without things like external link redirects +$stripped = True; // bool | Get the changelog with all HTML tags removed +$markup = True; // bool try { - $result = $apiInstance->getModFileChangelog($mod_id, $file_id); + $result = $apiInstance->getModFileChangelog($mod_id, $file_id, $raw, $stripped, $markup); print_r($result); } catch (Exception $e) { echo 'Exception when calling FilesApi->getModFileChangelog: ', $e->getMessage(), PHP_EOL; @@ -183,6 +186,9 @@ try { | ------------- | ------------- | ------------- | ------------- | | **mod_id** | **int**| The mod id the file belongs to | | | **file_id** | **int**| The file id. | | +| **raw** | **bool**| Get raw changelog without things like external link redirects | [optional] | +| **stripped** | **bool**| Get the changelog with all HTML tags removed | [optional] | +| **markup** | **bool**| | [optional] | ### Return type @@ -268,7 +274,7 @@ try { ## `getModFiles()` ```php -getModFiles($mod_id, $index, $page_size, $game_version, $mod_loader_type, $game_version_type_id, $older_than_project_file_id, $release_types, $platform_type): \Aternos\CurseForgeApi\Model\GetModFilesResponse +getModFiles($mod_id, $index, $page_size, $game_version, $mod_loader_type, $game_version_type_id, $older_than_project_file_id, $release_types, $platform_type, $client_compatible): \Aternos\CurseForgeApi\Model\GetModFilesResponse ``` Get mod files. @@ -303,9 +309,10 @@ $game_version_type_id = 56; // int | Filter only files that are tagged with vers $older_than_project_file_id = 56; // int | Filter only files older than the given file ID $release_types = array(new \Aternos\CurseForgeApi\Model\\Aternos\CurseForgeApi\Model\FileReleaseType()); // \Aternos\CurseForgeApi\Model\FileReleaseType[] | Filter only files that are of the given release types $platform_type = new \Aternos\CurseForgeApi\Model\\Aternos\CurseForgeApi\Model\PlatformType(); // \Aternos\CurseForgeApi\Model\PlatformType | Filter only files supporting the given platform type +$client_compatible = True; // bool | When set to true, filter OUT any file that isn't client compatible. try { - $result = $apiInstance->getModFiles($mod_id, $index, $page_size, $game_version, $mod_loader_type, $game_version_type_id, $older_than_project_file_id, $release_types, $platform_type); + $result = $apiInstance->getModFiles($mod_id, $index, $page_size, $game_version, $mod_loader_type, $game_version_type_id, $older_than_project_file_id, $release_types, $platform_type, $client_compatible); print_r($result); } catch (Exception $e) { echo 'Exception when calling FilesApi->getModFiles: ', $e->getMessage(), PHP_EOL; @@ -325,6 +332,7 @@ try { | **older_than_project_file_id** | **int**| Filter only files older than the given file ID | [optional] | | **release_types** | [**\Aternos\CurseForgeApi\Model\FileReleaseType[]**](../Model/\Aternos\CurseForgeApi\Model\FileReleaseType.md)| Filter only files that are of the given release types | [optional] | | **platform_type** | [**\Aternos\CurseForgeApi\Model\PlatformType**](../Model/.md)| Filter only files supporting the given platform type | [optional] | +| **client_compatible** | **bool**| When set to true, filter OUT any file that isn't client compatible. | [optional] | ### Return type diff --git a/docs/Api/ModsApi.md b/docs/Api/ModsApi.md index 11cbe87..8cfccad 100644 --- a/docs/Api/ModsApi.md +++ b/docs/Api/ModsApi.md @@ -138,7 +138,7 @@ try { ## `getModDescription()` ```php -getModDescription($mod_id, $raw, $stripped, $markup): \Aternos\CurseForgeApi\Model\ModDescriptionResponse +getModDescription($mod_id, $raw, $stripped, $markup, $lang): \Aternos\CurseForgeApi\Model\ModDescriptionResponse ``` Get mod description. @@ -168,9 +168,10 @@ $mod_id = 56; // int | The mod id. $raw = True; // bool | Get raw description without things like external link redirects $stripped = True; // bool | Get the description with all HTML tags removed $markup = True; // bool +$lang = 'en'; // string try { - $result = $apiInstance->getModDescription($mod_id, $raw, $stripped, $markup); + $result = $apiInstance->getModDescription($mod_id, $raw, $stripped, $markup, $lang); print_r($result); } catch (Exception $e) { echo 'Exception when calling ModsApi->getModDescription: ', $e->getMessage(), PHP_EOL; @@ -185,6 +186,7 @@ try { | **raw** | **bool**| Get raw description without things like external link redirects | [optional] | | **stripped** | **bool**| Get the description with all HTML tags removed | [optional] | | **markup** | **bool**| | [optional] | +| **lang** | **string**| | [optional] [default to 'en'] | ### Return type @@ -268,7 +270,7 @@ try { ## `searchMods()` ```php -searchMods($game_id, $index, $page_size, $class_id, $category_id, $game_version, $search_filter, $sort_field, $sort_order, $mod_loader_type, $game_version_type_id, $author_id, $slug, $category_ids, $game_versions, $mod_loader_types, $primary_author_id, $premium_type): \Aternos\CurseForgeApi\Model\SearchModsResponse +searchMods($game_id, $index, $page_size, $class_id, $category_id, $game_version, $search_filter, $sort_field, $sort_order, $mod_loader_type, $game_version_type_id, $author_id, $slug, $category_ids, $game_versions, $mod_loader_types, $primary_author_id, $premium_type, $client_compatible, $mods_search_enhanced_features): \Aternos\CurseForgeApi\Model\SearchModsResponse ``` Get all mods that match the search criteria. @@ -312,9 +314,11 @@ $game_versions = 'game_versions_example'; // string | Filter by a list of game v $mod_loader_types = 'mod_loader_types_example'; // string | Filter by a list of modloader types. This will override modLoaderType. Limited to 5 items. $primary_author_id = 56; // int | Filter only mods that the given primaryAuthorId is the owner of. $premium_type = new \Aternos\CurseForgeApi\Model\\Aternos\CurseForgeApi\Model\PremiumType(); // \Aternos\CurseForgeApi\Model\PremiumType | Filter only mods that are Premium or not. +$client_compatible = True; // bool | When set to true, will filter out any mod that doesn't have a default file that is compatible with the client. This is usually due to a bad file structure of the file (which might cause unexpected behaviours on the user's machine - such as overriding other mods installed). +$mods_search_enhanced_features = 56; // int | Bitwise number with values from ModsSearchEnhancedFeatures try { - $result = $apiInstance->searchMods($game_id, $index, $page_size, $class_id, $category_id, $game_version, $search_filter, $sort_field, $sort_order, $mod_loader_type, $game_version_type_id, $author_id, $slug, $category_ids, $game_versions, $mod_loader_types, $primary_author_id, $premium_type); + $result = $apiInstance->searchMods($game_id, $index, $page_size, $class_id, $category_id, $game_version, $search_filter, $sort_field, $sort_order, $mod_loader_type, $game_version_type_id, $author_id, $slug, $category_ids, $game_versions, $mod_loader_types, $primary_author_id, $premium_type, $client_compatible, $mods_search_enhanced_features); print_r($result); } catch (Exception $e) { echo 'Exception when calling ModsApi->searchMods: ', $e->getMessage(), PHP_EOL; @@ -343,6 +347,8 @@ try { | **mod_loader_types** | **string**| Filter by a list of modloader types. This will override modLoaderType. Limited to 5 items. | [optional] | | **primary_author_id** | **int**| Filter only mods that the given primaryAuthorId is the owner of. | [optional] | | **premium_type** | [**\Aternos\CurseForgeApi\Model\PremiumType**](../Model/.md)| Filter only mods that are Premium or not. | [optional] | +| **client_compatible** | **bool**| When set to true, will filter out any mod that doesn't have a default file that is compatible with the client. This is usually due to a bad file structure of the file (which might cause unexpected behaviours on the user's machine - such as overriding other mods installed). | [optional] | +| **mods_search_enhanced_features** | **int**| Bitwise number with values from ModsSearchEnhancedFeatures | [optional] | ### Return type diff --git a/docs/Model/AffiliationServiceType.md b/docs/Model/AffiliationServiceType.md index 5012559..7af997f 100644 --- a/docs/Model/AffiliationServiceType.md +++ b/docs/Model/AffiliationServiceType.md @@ -1,4 +1,4 @@ -# # AffiliationServiceType +# AffiliationServiceType ## Properties diff --git a/docs/Model/ApiResponseOfListOfMinecraftGameVersion.md b/docs/Model/ApiResponseOfListOfMinecraftGameVersion.md index d6d5ce9..c322e7f 100644 --- a/docs/Model/ApiResponseOfListOfMinecraftGameVersion.md +++ b/docs/Model/ApiResponseOfListOfMinecraftGameVersion.md @@ -1,4 +1,4 @@ -# # ApiResponseOfListOfMinecraftGameVersion +# ApiResponseOfListOfMinecraftGameVersion ## Properties diff --git a/docs/Model/ApiResponseOfListOfMinecraftModLoaderIndex.md b/docs/Model/ApiResponseOfListOfMinecraftModLoaderIndex.md index c9f6c73..9acf5f6 100644 --- a/docs/Model/ApiResponseOfListOfMinecraftModLoaderIndex.md +++ b/docs/Model/ApiResponseOfListOfMinecraftModLoaderIndex.md @@ -1,4 +1,4 @@ -# # ApiResponseOfListOfMinecraftModLoaderIndex +# ApiResponseOfListOfMinecraftModLoaderIndex ## Properties diff --git a/docs/Model/ApiResponseOfMinecraftGameVersion.md b/docs/Model/ApiResponseOfMinecraftGameVersion.md index 603316d..dcd13b8 100644 --- a/docs/Model/ApiResponseOfMinecraftGameVersion.md +++ b/docs/Model/ApiResponseOfMinecraftGameVersion.md @@ -1,4 +1,4 @@ -# # ApiResponseOfMinecraftGameVersion +# ApiResponseOfMinecraftGameVersion ## Properties diff --git a/docs/Model/ApiResponseOfMinecraftModLoaderVersion.md b/docs/Model/ApiResponseOfMinecraftModLoaderVersion.md index 59a3b1a..efee104 100644 --- a/docs/Model/ApiResponseOfMinecraftModLoaderVersion.md +++ b/docs/Model/ApiResponseOfMinecraftModLoaderVersion.md @@ -1,4 +1,4 @@ -# # ApiResponseOfMinecraftModLoaderVersion +# ApiResponseOfMinecraftModLoaderVersion ## Properties diff --git a/docs/Model/Category.md b/docs/Model/Category.md index b0ba1b6..b79c08a 100644 --- a/docs/Model/Category.md +++ b/docs/Model/Category.md @@ -1,4 +1,4 @@ -# # Category +# Category ## Properties diff --git a/docs/Model/ClientFeaturedProjectTag.md b/docs/Model/ClientFeaturedProjectTag.md new file mode 100644 index 0000000..f063ad0 --- /dev/null +++ b/docs/Model/ClientFeaturedProjectTag.md @@ -0,0 +1,8 @@ +# ClientFeaturedProjectTag + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CookerInfo.md b/docs/Model/CookerInfo.md new file mode 100644 index 0000000..dc22327 --- /dev/null +++ b/docs/Model/CookerInfo.md @@ -0,0 +1,10 @@ +# CookerInfo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cooker_version** | **string** | The version of the cooker that processed this file | [optional] +**cooker_revision** | **string** | The revision of the cooker that processed this file | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CoreApiStatus.md b/docs/Model/CoreApiStatus.md index 2fd65a9..7279fd2 100644 --- a/docs/Model/CoreApiStatus.md +++ b/docs/Model/CoreApiStatus.md @@ -1,4 +1,4 @@ -# # CoreApiStatus +# CoreApiStatus ## Properties diff --git a/docs/Model/CoreStatus.md b/docs/Model/CoreStatus.md index 359d579..48f0a56 100644 --- a/docs/Model/CoreStatus.md +++ b/docs/Model/CoreStatus.md @@ -1,4 +1,4 @@ -# # CoreStatus +# CoreStatus ## Properties diff --git a/docs/Model/FeaturedModsResponse.md b/docs/Model/FeaturedModsResponse.md index 225a0c7..3e41f9f 100644 --- a/docs/Model/FeaturedModsResponse.md +++ b/docs/Model/FeaturedModsResponse.md @@ -1,4 +1,4 @@ -# # FeaturedModsResponse +# FeaturedModsResponse ## Properties diff --git a/docs/Model/File.md b/docs/Model/File.md index 70d3337..3bd40d2 100644 --- a/docs/Model/File.md +++ b/docs/Model/File.md @@ -1,4 +1,4 @@ -# # File +# File ## Properties @@ -30,5 +30,6 @@ Name | Type | Description | Notes **early_access_end_date** | **\DateTime** | | [optional] **file_fingerprint** | **int** | | [optional] **modules** | [**\Aternos\CurseForgeApi\Model\FileModule[]**](FileModule.md) | | [optional] +**cooking_info** | [**\Aternos\CurseForgeApi\Model\CookerInfo**](CookerInfo.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/FileDependency.md b/docs/Model/FileDependency.md index 23ccd5b..271b471 100644 --- a/docs/Model/FileDependency.md +++ b/docs/Model/FileDependency.md @@ -1,4 +1,4 @@ -# # FileDependency +# FileDependency ## Properties diff --git a/docs/Model/FileHash.md b/docs/Model/FileHash.md index 0391a22..9f2d442 100644 --- a/docs/Model/FileHash.md +++ b/docs/Model/FileHash.md @@ -1,4 +1,4 @@ -# # FileHash +# FileHash ## Properties diff --git a/docs/Model/FileIndex.md b/docs/Model/FileIndex.md index 4af0204..a917026 100644 --- a/docs/Model/FileIndex.md +++ b/docs/Model/FileIndex.md @@ -1,4 +1,4 @@ -# # FileIndex +# FileIndex ## Properties diff --git a/docs/Model/FileModule.md b/docs/Model/FileModule.md index 40e0646..f379b19 100644 --- a/docs/Model/FileModule.md +++ b/docs/Model/FileModule.md @@ -1,4 +1,4 @@ -# # FileModule +# FileModule ## Properties diff --git a/docs/Model/FileRelationType.md b/docs/Model/FileRelationType.md index fb9884f..eec1a13 100644 --- a/docs/Model/FileRelationType.md +++ b/docs/Model/FileRelationType.md @@ -1,4 +1,4 @@ -# # FileRelationType +# FileRelationType ## Properties diff --git a/docs/Model/FileReleaseType.md b/docs/Model/FileReleaseType.md index 3ac23d8..ddba42a 100644 --- a/docs/Model/FileReleaseType.md +++ b/docs/Model/FileReleaseType.md @@ -1,4 +1,4 @@ -# # FileReleaseType +# FileReleaseType ## Properties diff --git a/docs/Model/FileStatus.md b/docs/Model/FileStatus.md index 276d4ac..49cad26 100644 --- a/docs/Model/FileStatus.md +++ b/docs/Model/FileStatus.md @@ -1,4 +1,4 @@ -# # FileStatus +# FileStatus ## Properties diff --git a/docs/Model/FingerprintFuzzyMatch.md b/docs/Model/FingerprintFuzzyMatch.md index 5e0cbfb..12d7dee 100644 --- a/docs/Model/FingerprintFuzzyMatch.md +++ b/docs/Model/FingerprintFuzzyMatch.md @@ -1,4 +1,4 @@ -# # FingerprintFuzzyMatch +# FingerprintFuzzyMatch ## Properties diff --git a/docs/Model/FingerprintFuzzyMatchResult.md b/docs/Model/FingerprintFuzzyMatchResult.md index 888e89c..f4c12d0 100644 --- a/docs/Model/FingerprintFuzzyMatchResult.md +++ b/docs/Model/FingerprintFuzzyMatchResult.md @@ -1,4 +1,4 @@ -# # FingerprintFuzzyMatchResult +# FingerprintFuzzyMatchResult ## Properties diff --git a/docs/Model/FingerprintMatch.md b/docs/Model/FingerprintMatch.md index af88840..7da0957 100644 --- a/docs/Model/FingerprintMatch.md +++ b/docs/Model/FingerprintMatch.md @@ -1,4 +1,4 @@ -# # FingerprintMatch +# FingerprintMatch ## Properties diff --git a/docs/Model/FingerprintMatchesResult.md b/docs/Model/FingerprintMatchesResult.md index 0e1a697..385d872 100644 --- a/docs/Model/FingerprintMatchesResult.md +++ b/docs/Model/FingerprintMatchesResult.md @@ -1,4 +1,4 @@ -# # FingerprintMatchesResult +# FingerprintMatchesResult ## Properties diff --git a/docs/Model/FolderFingerprint.md b/docs/Model/FolderFingerprint.md index bcda7fd..c349dc3 100644 --- a/docs/Model/FolderFingerprint.md +++ b/docs/Model/FolderFingerprint.md @@ -1,4 +1,4 @@ -# # FolderFingerprint +# FolderFingerprint ## Properties diff --git a/docs/Model/Game.md b/docs/Model/Game.md index 67ffb37..0b6778b 100644 --- a/docs/Model/Game.md +++ b/docs/Model/Game.md @@ -1,4 +1,4 @@ -# # Game +# Game ## Properties @@ -11,5 +11,6 @@ Name | Type | Description | Notes **assets** | [**\Aternos\CurseForgeApi\Model\GameAssets**](GameAssets.md) | | [optional] **status** | [**\Aternos\CurseForgeApi\Model\CoreStatus**](CoreStatus.md) | | [optional] **api_status** | [**\Aternos\CurseForgeApi\Model\CoreApiStatus**](CoreApiStatus.md) | | [optional] +**supported_features** | [**\Aternos\CurseForgeApi\Model\GameSupportedFeatures**](GameSupportedFeatures.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/GameAssets.md b/docs/Model/GameAssets.md index cfdb70f..177766e 100644 --- a/docs/Model/GameAssets.md +++ b/docs/Model/GameAssets.md @@ -1,4 +1,4 @@ -# # GameAssets +# GameAssets ## Properties diff --git a/docs/Model/GameSupportedFeatures.md b/docs/Model/GameSupportedFeatures.md new file mode 100644 index 0000000..612e868 --- /dev/null +++ b/docs/Model/GameSupportedFeatures.md @@ -0,0 +1,9 @@ +# GameSupportedFeatures + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**support_mod_subscriptions** | **bool** | Whether mod subscriptions are supported for this game | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/GameVersion.md b/docs/Model/GameVersion.md index 4d1399b..dfe211a 100644 --- a/docs/Model/GameVersion.md +++ b/docs/Model/GameVersion.md @@ -1,4 +1,4 @@ -# # GameVersion +# GameVersion ## Properties diff --git a/docs/Model/GameVersionStatus.md b/docs/Model/GameVersionStatus.md index 40ce2c7..2b7c412 100644 --- a/docs/Model/GameVersionStatus.md +++ b/docs/Model/GameVersionStatus.md @@ -1,4 +1,4 @@ -# # GameVersionStatus +# GameVersionStatus ## Properties diff --git a/docs/Model/GameVersionType.md b/docs/Model/GameVersionType.md index 2e37650..a77a783 100644 --- a/docs/Model/GameVersionType.md +++ b/docs/Model/GameVersionType.md @@ -1,4 +1,4 @@ -# # GameVersionType +# GameVersionType ## Properties diff --git a/docs/Model/GameVersionTypeStatus.md b/docs/Model/GameVersionTypeStatus.md index bd12cd9..5688281 100644 --- a/docs/Model/GameVersionTypeStatus.md +++ b/docs/Model/GameVersionTypeStatus.md @@ -1,4 +1,4 @@ -# # GameVersionTypeStatus +# GameVersionTypeStatus ## Properties diff --git a/docs/Model/GameVersionsByType.md b/docs/Model/GameVersionsByType.md index 687fe9c..f353648 100644 --- a/docs/Model/GameVersionsByType.md +++ b/docs/Model/GameVersionsByType.md @@ -1,4 +1,4 @@ -# # GameVersionsByType +# GameVersionsByType ## Properties diff --git a/docs/Model/GameVersionsByTypeV2.md b/docs/Model/GameVersionsByTypeV2.md index 789df1e..829f0e7 100644 --- a/docs/Model/GameVersionsByTypeV2.md +++ b/docs/Model/GameVersionsByTypeV2.md @@ -1,4 +1,4 @@ -# # GameVersionsByTypeV2 +# GameVersionsByTypeV2 ## Properties diff --git a/docs/Model/GetCategoriesResponse.md b/docs/Model/GetCategoriesResponse.md index 9c222d9..58eeee1 100644 --- a/docs/Model/GetCategoriesResponse.md +++ b/docs/Model/GetCategoriesResponse.md @@ -1,4 +1,4 @@ -# # GetCategoriesResponse +# GetCategoriesResponse ## Properties diff --git a/docs/Model/GetFeaturedModsRequestBody.md b/docs/Model/GetFeaturedModsRequestBody.md index 7a4a26a..a037b69 100644 --- a/docs/Model/GetFeaturedModsRequestBody.md +++ b/docs/Model/GetFeaturedModsRequestBody.md @@ -1,4 +1,4 @@ -# # GetFeaturedModsRequestBody +# GetFeaturedModsRequestBody ## Properties @@ -7,5 +7,6 @@ Name | Type | Description | Notes **game_id** | **int** | | [optional] **excluded_mod_ids** | **int[]** | | [optional] **game_version_type_id** | **int** | | [optional] +**client_compatible** | **bool** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/GetFeaturedModsResponse.md b/docs/Model/GetFeaturedModsResponse.md index 9ff9b47..88817ec 100644 --- a/docs/Model/GetFeaturedModsResponse.md +++ b/docs/Model/GetFeaturedModsResponse.md @@ -1,4 +1,4 @@ -# # GetFeaturedModsResponse +# GetFeaturedModsResponse ## Properties diff --git a/docs/Model/GetFilesResponse.md b/docs/Model/GetFilesResponse.md index d856e72..f82fee5 100644 --- a/docs/Model/GetFilesResponse.md +++ b/docs/Model/GetFilesResponse.md @@ -1,4 +1,4 @@ -# # GetFilesResponse +# GetFilesResponse ## Properties diff --git a/docs/Model/GetFingerprintFuzzyMatchesResponse.md b/docs/Model/GetFingerprintFuzzyMatchesResponse.md index eddbb9f..708b1d2 100644 --- a/docs/Model/GetFingerprintFuzzyMatchesResponse.md +++ b/docs/Model/GetFingerprintFuzzyMatchesResponse.md @@ -1,4 +1,4 @@ -# # GetFingerprintFuzzyMatchesResponse +# GetFingerprintFuzzyMatchesResponse ## Properties diff --git a/docs/Model/GetFingerprintMatchesRequestBody.md b/docs/Model/GetFingerprintMatchesRequestBody.md index 246aca4..2a35098 100644 --- a/docs/Model/GetFingerprintMatchesRequestBody.md +++ b/docs/Model/GetFingerprintMatchesRequestBody.md @@ -1,4 +1,4 @@ -# # GetFingerprintMatchesRequestBody +# GetFingerprintMatchesRequestBody ## Properties diff --git a/docs/Model/GetFingerprintMatchesResponse.md b/docs/Model/GetFingerprintMatchesResponse.md index f0c08be..600181b 100644 --- a/docs/Model/GetFingerprintMatchesResponse.md +++ b/docs/Model/GetFingerprintMatchesResponse.md @@ -1,4 +1,4 @@ -# # GetFingerprintMatchesResponse +# GetFingerprintMatchesResponse ## Properties diff --git a/docs/Model/GetFuzzyMatchesRequestBody.md b/docs/Model/GetFuzzyMatchesRequestBody.md index 2c2ebb0..57d48a0 100644 --- a/docs/Model/GetFuzzyMatchesRequestBody.md +++ b/docs/Model/GetFuzzyMatchesRequestBody.md @@ -1,4 +1,4 @@ -# # GetFuzzyMatchesRequestBody +# GetFuzzyMatchesRequestBody ## Properties diff --git a/docs/Model/GetGameResponse.md b/docs/Model/GetGameResponse.md index 4e404f8..126d433 100644 --- a/docs/Model/GetGameResponse.md +++ b/docs/Model/GetGameResponse.md @@ -1,4 +1,4 @@ -# # GetGameResponse +# GetGameResponse ## Properties diff --git a/docs/Model/GetGamesResponse.md b/docs/Model/GetGamesResponse.md index ea4c2d5..703553e 100644 --- a/docs/Model/GetGamesResponse.md +++ b/docs/Model/GetGamesResponse.md @@ -1,4 +1,4 @@ -# # GetGamesResponse +# GetGamesResponse ## Properties diff --git a/docs/Model/GetModFileChangelogResponse.md b/docs/Model/GetModFileChangelogResponse.md index 3379f56..03cd8e0 100644 --- a/docs/Model/GetModFileChangelogResponse.md +++ b/docs/Model/GetModFileChangelogResponse.md @@ -1,4 +1,4 @@ -# # GetModFileChangelogResponse +# GetModFileChangelogResponse ## Properties diff --git a/docs/Model/GetModFileDownloadURLResponse.md b/docs/Model/GetModFileDownloadURLResponse.md index 068f082..4f847cb 100644 --- a/docs/Model/GetModFileDownloadURLResponse.md +++ b/docs/Model/GetModFileDownloadURLResponse.md @@ -1,4 +1,4 @@ -# # GetModFileDownloadURLResponse +# GetModFileDownloadURLResponse ## Properties diff --git a/docs/Model/GetModFileResponse.md b/docs/Model/GetModFileResponse.md index 7153a91..4a2a047 100644 --- a/docs/Model/GetModFileResponse.md +++ b/docs/Model/GetModFileResponse.md @@ -1,4 +1,4 @@ -# # GetModFileResponse +# GetModFileResponse ## Properties diff --git a/docs/Model/GetModFilesRequestBody.md b/docs/Model/GetModFilesRequestBody.md index 71a562e..351d9cd 100644 --- a/docs/Model/GetModFilesRequestBody.md +++ b/docs/Model/GetModFilesRequestBody.md @@ -1,4 +1,4 @@ -# # GetModFilesRequestBody +# GetModFilesRequestBody ## Properties diff --git a/docs/Model/GetModFilesResponse.md b/docs/Model/GetModFilesResponse.md index 3e252e5..db4955d 100644 --- a/docs/Model/GetModFilesResponse.md +++ b/docs/Model/GetModFilesResponse.md @@ -1,4 +1,4 @@ -# # GetModFilesResponse +# GetModFilesResponse ## Properties diff --git a/docs/Model/GetModResponse.md b/docs/Model/GetModResponse.md index 7bc3376..e152f11 100644 --- a/docs/Model/GetModResponse.md +++ b/docs/Model/GetModResponse.md @@ -1,4 +1,4 @@ -# # GetModResponse +# GetModResponse ## Properties diff --git a/docs/Model/GetModsByIdsListRequestBody.md b/docs/Model/GetModsByIdsListRequestBody.md index b98dfa0..7cdf045 100644 --- a/docs/Model/GetModsByIdsListRequestBody.md +++ b/docs/Model/GetModsByIdsListRequestBody.md @@ -1,9 +1,11 @@ -# # GetModsByIdsListRequestBody +# GetModsByIdsListRequestBody ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **mod_ids** | **int[]** | | [optional] +**dev_mod_ids** | **int[]** | | [optional] +**filter_pc_only** | **bool** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/GetModsResponse.md b/docs/Model/GetModsResponse.md index 6bb22f5..5e910ec 100644 --- a/docs/Model/GetModsResponse.md +++ b/docs/Model/GetModsResponse.md @@ -1,4 +1,4 @@ -# # GetModsResponse +# GetModsResponse ## Properties diff --git a/docs/Model/GetVersionTypesResponse.md b/docs/Model/GetVersionTypesResponse.md index 86f8e63..921fbdb 100644 --- a/docs/Model/GetVersionTypesResponse.md +++ b/docs/Model/GetVersionTypesResponse.md @@ -1,4 +1,4 @@ -# # GetVersionTypesResponse +# GetVersionTypesResponse ## Properties diff --git a/docs/Model/GetVersionsResponse.md b/docs/Model/GetVersionsResponse.md index 2b12aee..e67f1e9 100644 --- a/docs/Model/GetVersionsResponse.md +++ b/docs/Model/GetVersionsResponse.md @@ -1,4 +1,4 @@ -# # GetVersionsResponse +# GetVersionsResponse ## Properties diff --git a/docs/Model/GetVersionsV2Response.md b/docs/Model/GetVersionsV2Response.md index 1f2fd17..bd46bd4 100644 --- a/docs/Model/GetVersionsV2Response.md +++ b/docs/Model/GetVersionsV2Response.md @@ -1,4 +1,4 @@ -# # GetVersionsV2Response +# GetVersionsV2Response ## Properties diff --git a/docs/Model/HashAlgo.md b/docs/Model/HashAlgo.md index 661f177..10da443 100644 --- a/docs/Model/HashAlgo.md +++ b/docs/Model/HashAlgo.md @@ -1,4 +1,4 @@ -# # HashAlgo +# HashAlgo ## Properties diff --git a/docs/Model/MinecraftGameVersion.md b/docs/Model/MinecraftGameVersion.md index 0549e21..a7bcbfe 100644 --- a/docs/Model/MinecraftGameVersion.md +++ b/docs/Model/MinecraftGameVersion.md @@ -1,4 +1,4 @@ -# # MinecraftGameVersion +# MinecraftGameVersion ## Properties diff --git a/docs/Model/MinecraftModLoaderIndex.md b/docs/Model/MinecraftModLoaderIndex.md index c4ff6d7..7ec2f5b 100644 --- a/docs/Model/MinecraftModLoaderIndex.md +++ b/docs/Model/MinecraftModLoaderIndex.md @@ -1,4 +1,4 @@ -# # MinecraftModLoaderIndex +# MinecraftModLoaderIndex ## Properties diff --git a/docs/Model/MinecraftModLoaderVersion.md b/docs/Model/MinecraftModLoaderVersion.md index e246cdf..4a7624d 100644 --- a/docs/Model/MinecraftModLoaderVersion.md +++ b/docs/Model/MinecraftModLoaderVersion.md @@ -1,4 +1,4 @@ -# # MinecraftModLoaderVersion +# MinecraftModLoaderVersion ## Properties diff --git a/docs/Model/Mod.md b/docs/Model/Mod.md index bb4570d..728b66e 100644 --- a/docs/Model/Mod.md +++ b/docs/Model/Mod.md @@ -1,4 +1,4 @@ -# # Mod +# Mod ## Properties @@ -22,6 +22,7 @@ Name | Type | Description | Notes **videos** | [**\Aternos\CurseForgeApi\Model\ModAsset[]**](ModAsset.md) | | [optional] **main_file_id** | **int** | The id of the main file of the mod | [optional] **latest_files** | [**\Aternos\CurseForgeApi\Model\File[]**](File.md) | List of latest files of the mod | [optional] +**supports_cross_platform** | **bool** | Whether the mod supports cross-platform play | [optional] **latest_files_indexes** | [**\Aternos\CurseForgeApi\Model\FileIndex[]**](FileIndex.md) | List of file related details for the latest files of the mod | [optional] **latest_early_access_files_indexes** | [**\Aternos\CurseForgeApi\Model\FileIndex[]**](FileIndex.md) | List of file related details for the latest early access files of the mod | [optional] **date_created** | **\DateTime** | The creation date of the mod | [optional] @@ -35,5 +36,6 @@ Name | Type | Description | Notes **rating_details** | [**\Aternos\CurseForgeApi\Model\RatingDetails**](RatingDetails.md) | | [optional] **server_affiliation** | [**\Aternos\CurseForgeApi\Model\ServerAffiliation**](ServerAffiliation.md) | | [optional] **social_links** | [**\Aternos\CurseForgeApi\Model\SocialLink[]**](SocialLink.md) | The mod's social links | [optional] +**featured_project_tag** | [**\Aternos\CurseForgeApi\Model\ClientFeaturedProjectTag**](ClientFeaturedProjectTag.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ModAsset.md b/docs/Model/ModAsset.md index b5ead97..07694f5 100644 --- a/docs/Model/ModAsset.md +++ b/docs/Model/ModAsset.md @@ -1,4 +1,4 @@ -# # ModAsset +# ModAsset ## Properties diff --git a/docs/Model/ModAuthor.md b/docs/Model/ModAuthor.md index 27ba11d..1ef8b17 100644 --- a/docs/Model/ModAuthor.md +++ b/docs/Model/ModAuthor.md @@ -1,4 +1,4 @@ -# # ModAuthor +# ModAuthor ## Properties diff --git a/docs/Model/ModDescriptionResponse.md b/docs/Model/ModDescriptionResponse.md index 53aa223..e2e12fc 100644 --- a/docs/Model/ModDescriptionResponse.md +++ b/docs/Model/ModDescriptionResponse.md @@ -1,4 +1,4 @@ -# # ModDescriptionResponse +# ModDescriptionResponse ## Properties diff --git a/docs/Model/ModLinks.md b/docs/Model/ModLinks.md index 847eae8..1f5d93c 100644 --- a/docs/Model/ModLinks.md +++ b/docs/Model/ModLinks.md @@ -1,4 +1,4 @@ -# # ModLinks +# ModLinks ## Properties diff --git a/docs/Model/ModLoaderInstallMethod.md b/docs/Model/ModLoaderInstallMethod.md index 629d473..cdafcf8 100644 --- a/docs/Model/ModLoaderInstallMethod.md +++ b/docs/Model/ModLoaderInstallMethod.md @@ -1,4 +1,4 @@ -# # ModLoaderInstallMethod +# ModLoaderInstallMethod ## Properties diff --git a/docs/Model/ModLoaderType.md b/docs/Model/ModLoaderType.md index 4953e73..906cfe7 100644 --- a/docs/Model/ModLoaderType.md +++ b/docs/Model/ModLoaderType.md @@ -1,4 +1,4 @@ -# # ModLoaderType +# ModLoaderType ## Properties diff --git a/docs/Model/ModSearchSortField.md b/docs/Model/ModSearchSortField.md index 8879cd7..38ec0f7 100644 --- a/docs/Model/ModSearchSortField.md +++ b/docs/Model/ModSearchSortField.md @@ -1,4 +1,4 @@ -# # ModSearchSortField +# ModSearchSortField ## Properties diff --git a/docs/Model/ModStatus.md b/docs/Model/ModStatus.md index 5bcb2bf..cdd3998 100644 --- a/docs/Model/ModStatus.md +++ b/docs/Model/ModStatus.md @@ -1,4 +1,4 @@ -# # ModStatus +# ModStatus ## Properties diff --git a/docs/Model/Pagination.md b/docs/Model/Pagination.md index 0cc8fb4..2c78e5d 100644 --- a/docs/Model/Pagination.md +++ b/docs/Model/Pagination.md @@ -1,4 +1,4 @@ -# # Pagination +# Pagination ## Properties diff --git a/docs/Model/PlatformType.md b/docs/Model/PlatformType.md index e6d73c4..03d1d09 100644 --- a/docs/Model/PlatformType.md +++ b/docs/Model/PlatformType.md @@ -1,4 +1,4 @@ -# # PlatformType +# PlatformType ## Properties diff --git a/docs/Model/PremiumType.md b/docs/Model/PremiumType.md index 766949b..7f7f65b 100644 --- a/docs/Model/PremiumType.md +++ b/docs/Model/PremiumType.md @@ -1,4 +1,4 @@ -# # PremiumType +# PremiumType ## Properties diff --git a/docs/Model/RatingDetails.md b/docs/Model/RatingDetails.md index 165523b..a81f84b 100644 --- a/docs/Model/RatingDetails.md +++ b/docs/Model/RatingDetails.md @@ -1,4 +1,4 @@ -# # RatingDetails +# RatingDetails ## Properties diff --git a/docs/Model/RatingScore.md b/docs/Model/RatingScore.md index 454dc07..479b954 100644 --- a/docs/Model/RatingScore.md +++ b/docs/Model/RatingScore.md @@ -1,4 +1,4 @@ -# # RatingScore +# RatingScore ## Properties diff --git a/docs/Model/SearchModsResponse.md b/docs/Model/SearchModsResponse.md index d2f5680..aefb4ab 100644 --- a/docs/Model/SearchModsResponse.md +++ b/docs/Model/SearchModsResponse.md @@ -1,4 +1,4 @@ -# # SearchModsResponse +# SearchModsResponse ## Properties diff --git a/docs/Model/ServerAffiliation.md b/docs/Model/ServerAffiliation.md index d6adb67..a716ee8 100644 --- a/docs/Model/ServerAffiliation.md +++ b/docs/Model/ServerAffiliation.md @@ -1,4 +1,4 @@ -# # ServerAffiliation +# ServerAffiliation ## Properties diff --git a/docs/Model/SocialLink.md b/docs/Model/SocialLink.md index 7ab3b8a..ac993b5 100644 --- a/docs/Model/SocialLink.md +++ b/docs/Model/SocialLink.md @@ -1,4 +1,4 @@ -# # SocialLink +# SocialLink ## Properties diff --git a/docs/Model/SocialLinkType.md b/docs/Model/SocialLinkType.md index ce14c0f..8ae21cd 100644 --- a/docs/Model/SocialLinkType.md +++ b/docs/Model/SocialLinkType.md @@ -1,4 +1,4 @@ -# # SocialLinkType +# SocialLinkType ## Properties diff --git a/docs/Model/SortOrder.md b/docs/Model/SortOrder.md index b67965e..88f71e3 100644 --- a/docs/Model/SortOrder.md +++ b/docs/Model/SortOrder.md @@ -1,4 +1,4 @@ -# # SortOrder +# SortOrder ## Properties diff --git a/docs/Model/SortableGameVersion.md b/docs/Model/SortableGameVersion.md index 337451b..138ac76 100644 --- a/docs/Model/SortableGameVersion.md +++ b/docs/Model/SortableGameVersion.md @@ -1,4 +1,4 @@ -# # SortableGameVersion +# SortableGameVersion ## Properties diff --git a/src/Api/CategoriesApi.php b/src/Api/CategoriesApi.php index c2417c7..45b9447 100644 --- a/src/Api/CategoriesApi.php +++ b/src/Api/CategoriesApi.php @@ -15,7 +15,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -31,7 +31,6 @@ use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; @@ -40,7 +39,6 @@ use Aternos\CurseForgeApi\ApiException; use Aternos\CurseForgeApi\Configuration; use Aternos\CurseForgeApi\HeaderSelector; -use Aternos\CurseForgeApi\FormDataProcessor; use Aternos\CurseForgeApi\ObjectSerializer; /** @@ -72,7 +70,7 @@ class CategoriesApi */ protected int $hostIndex; - /** @var string[] $contentTypes **/ + /** @var array $contentTypes **/ public const contentTypes = [ 'getCategories' => [ 'application/json', @@ -162,7 +160,7 @@ public function getCategories( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Aternos\CurseForgeApi\Model\GetCategoriesResponse, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Aternos\CurseForgeApi\Model\GetCategoriesResponse, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function getCategoriesWithHttpInfo( int $game_id, @@ -203,7 +201,6 @@ public function getCategoriesWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -344,7 +341,6 @@ public function getCategoriesRequest( string $contentType = self::contentTypes['getCategories'][0] ): Request { - // verify the required parameter 'game_id' is set if ($game_id === null || (is_array($game_id) && count($game_id) === 0)) { throw new InvalidArgumentException( @@ -352,11 +348,7 @@ public function getCategoriesRequest( ); } - - - $resourcePath = '/v1/categories'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -399,30 +391,6 @@ public function getCategoriesRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('x-api-key'); diff --git a/src/Api/FilesApi.php b/src/Api/FilesApi.php index 3895164..a89de3d 100644 --- a/src/Api/FilesApi.php +++ b/src/Api/FilesApi.php @@ -15,7 +15,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -31,7 +31,6 @@ use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; @@ -40,7 +39,6 @@ use Aternos\CurseForgeApi\ApiException; use Aternos\CurseForgeApi\Configuration; use Aternos\CurseForgeApi\HeaderSelector; -use Aternos\CurseForgeApi\FormDataProcessor; use Aternos\CurseForgeApi\ObjectSerializer; /** @@ -72,7 +70,7 @@ class FilesApi */ protected int $hostIndex; - /** @var string[] $contentTypes **/ + /** @var array $contentTypes **/ public const contentTypes = [ 'getFiles' => [ 'application/json', @@ -168,7 +166,7 @@ public function getFiles( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Aternos\CurseForgeApi\Model\GetFilesResponse, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Aternos\CurseForgeApi\Model\GetFilesResponse, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function getFilesWithHttpInfo( \Aternos\CurseForgeApi\Model\GetModFilesRequestBody $get_mod_files_request_body, @@ -207,7 +205,6 @@ public function getFilesWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -336,7 +333,6 @@ public function getFilesRequest( string $contentType = self::contentTypes['getFiles'][0] ): Request { - // verify the required parameter 'get_mod_files_request_body' is set if ($get_mod_files_request_body === null || (is_array($get_mod_files_request_body) && count($get_mod_files_request_body) === 0)) { throw new InvalidArgumentException( @@ -344,7 +340,6 @@ public function getFilesRequest( ); } - $resourcePath = '/v1/mods/files'; $formParams = []; $queryParams = []; @@ -366,7 +361,11 @@ public function getFilesRequest( if (isset($get_mod_files_request_body)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($get_mod_files_request_body)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($get_mod_files_request_body), JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $get_mod_files_request_body; } @@ -383,11 +382,15 @@ public function getFilesRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -455,7 +458,7 @@ public function getModFile( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Aternos\CurseForgeApi\Model\GetModFileResponse, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Aternos\CurseForgeApi\Model\GetModFileResponse, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function getModFileWithHttpInfo( int $mod_id, @@ -495,7 +498,6 @@ public function getModFileWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -630,14 +632,12 @@ public function getModFileRequest( string $contentType = self::contentTypes['getModFile'][0] ): Request { - // verify the required parameter 'mod_id' is set if ($mod_id === null || (is_array($mod_id) && count($mod_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $mod_id when calling getModFile' ); } - // verify the required parameter 'file_id' is set if ($file_id === null || (is_array($file_id) && count($file_id) === 0)) { throw new InvalidArgumentException( @@ -645,9 +645,7 @@ public function getModFileRequest( ); } - $resourcePath = '/v1/mods/{modId}/files/{fileId}'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -658,7 +656,7 @@ public function getModFileRequest( // path params if ($mod_id !== null) { $resourcePath = str_replace( - '{' . 'modId' . '}', + '{modId}', ObjectSerializer::toPathValue($mod_id), $resourcePath ); @@ -666,7 +664,7 @@ public function getModFileRequest( // path params if ($file_id !== null) { $resourcePath = str_replace( - '{' . 'fileId' . '}', + '{fileId}', ObjectSerializer::toPathValue($file_id), $resourcePath ); @@ -679,30 +677,6 @@ public function getModFileRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('x-api-key'); @@ -738,6 +712,9 @@ public function getModFileRequest( * * @param int $mod_id The mod id the file belongs to (required) * @param int $file_id The file id. (required) + * @param bool|null $raw Get raw changelog without things like external link redirects (optional) + * @param bool|null $stripped Get the changelog with all HTML tags removed (optional) + * @param bool|null $markup markup (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getModFileChangelog'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format @@ -747,10 +724,13 @@ public function getModFileRequest( public function getModFileChangelog( int $mod_id, int $file_id, + ?bool $raw = null, + ?bool $stripped = null, + ?bool $markup = null, string $contentType = self::contentTypes['getModFileChangelog'][0] ): \Aternos\CurseForgeApi\Model\GetModFileChangelogResponse { - list($response) = $this->getModFileChangelogWithHttpInfo($mod_id, $file_id, $contentType); + list($response) = $this->getModFileChangelogWithHttpInfo($mod_id, $file_id, $raw, $stripped, $markup, $contentType); return $response; } @@ -761,19 +741,25 @@ public function getModFileChangelog( * * @param int $mod_id The mod id the file belongs to (required) * @param int $file_id The file id. (required) + * @param bool|null $raw Get raw changelog without things like external link redirects (optional) + * @param bool|null $stripped Get the changelog with all HTML tags removed (optional) + * @param bool|null $markup (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getModFileChangelog'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Aternos\CurseForgeApi\Model\GetModFileChangelogResponse, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Aternos\CurseForgeApi\Model\GetModFileChangelogResponse, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function getModFileChangelogWithHttpInfo( int $mod_id, int $file_id, + ?bool $raw = null, + ?bool $stripped = null, + ?bool $markup = null, string $contentType = self::contentTypes['getModFileChangelog'][0] ): array { - $request = $this->getModFileChangelogRequest($mod_id, $file_id, $contentType); + $request = $this->getModFileChangelogRequest($mod_id, $file_id, $raw, $stripped, $markup, $contentType); try { $options = $this->createHttpClientOption(); @@ -805,7 +791,6 @@ public function getModFileChangelogWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -848,6 +833,9 @@ public function getModFileChangelogWithHttpInfo( * * @param int $mod_id The mod id the file belongs to (required) * @param int $file_id The file id. (required) + * @param bool|null $raw Get raw changelog without things like external link redirects (optional) + * @param bool|null $stripped Get the changelog with all HTML tags removed (optional) + * @param bool|null $markup (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getModFileChangelog'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -856,10 +844,13 @@ public function getModFileChangelogWithHttpInfo( public function getModFileChangelogAsync( int $mod_id, int $file_id, + ?bool $raw = null, + ?bool $stripped = null, + ?bool $markup = null, string $contentType = self::contentTypes['getModFileChangelog'][0] ): PromiseInterface { - return $this->getModFileChangelogAsyncWithHttpInfo($mod_id, $file_id, $contentType) + return $this->getModFileChangelogAsyncWithHttpInfo($mod_id, $file_id, $raw, $stripped, $markup, $contentType) ->then( function ($response) { return $response[0]; @@ -874,6 +865,9 @@ function ($response) { * * @param int $mod_id The mod id the file belongs to (required) * @param int $file_id The file id. (required) + * @param bool|null $raw Get raw changelog without things like external link redirects (optional) + * @param bool|null $stripped Get the changelog with all HTML tags removed (optional) + * @param bool|null $markup (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getModFileChangelog'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -882,11 +876,14 @@ function ($response) { public function getModFileChangelogAsyncWithHttpInfo( int $mod_id, int $file_id, + ?bool $raw = null, + ?bool $stripped = null, + ?bool $markup = null, string $contentType = self::contentTypes['getModFileChangelog'][0] ): PromiseInterface { $returnType = '\Aternos\CurseForgeApi\Model\GetModFileChangelogResponse'; - $request = $this->getModFileChangelogRequest($mod_id, $file_id, $contentType); + $request = $this->getModFileChangelogRequest($mod_id, $file_id, $raw, $stripped, $markup, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -929,6 +926,9 @@ function ($exception) { * * @param int $mod_id The mod id the file belongs to (required) * @param int $file_id The file id. (required) + * @param bool|null $raw Get raw changelog without things like external link redirects (optional) + * @param bool|null $stripped Get the changelog with all HTML tags removed (optional) + * @param bool|null $markup (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getModFileChangelog'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -937,17 +937,18 @@ function ($exception) { public function getModFileChangelogRequest( int $mod_id, int $file_id, + ?bool $raw = null, + ?bool $stripped = null, + ?bool $markup = null, string $contentType = self::contentTypes['getModFileChangelog'][0] ): Request { - // verify the required parameter 'mod_id' is set if ($mod_id === null || (is_array($mod_id) && count($mod_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $mod_id when calling getModFileChangelog' ); } - // verify the required parameter 'file_id' is set if ($file_id === null || (is_array($file_id) && count($file_id) === 0)) { throw new InvalidArgumentException( @@ -955,20 +956,45 @@ public function getModFileChangelogRequest( ); } - $resourcePath = '/v1/mods/{modId}/files/{fileId}/changelog'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $raw, + 'raw', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $stripped, + 'stripped', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $markup, + 'markup', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // path params if ($mod_id !== null) { $resourcePath = str_replace( - '{' . 'modId' . '}', + '{modId}', ObjectSerializer::toPathValue($mod_id), $resourcePath ); @@ -976,7 +1002,7 @@ public function getModFileChangelogRequest( // path params if ($file_id !== null) { $resourcePath = str_replace( - '{' . 'fileId' . '}', + '{fileId}', ObjectSerializer::toPathValue($file_id), $resourcePath ); @@ -989,30 +1015,6 @@ public function getModFileChangelogRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('x-api-key'); @@ -1075,7 +1077,7 @@ public function getModFileDownloadURL( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Aternos\CurseForgeApi\Model\GetModFileDownloadURLResponse, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Aternos\CurseForgeApi\Model\GetModFileDownloadURLResponse, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function getModFileDownloadURLWithHttpInfo( int $mod_id, @@ -1115,7 +1117,6 @@ public function getModFileDownloadURLWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1250,14 +1251,12 @@ public function getModFileDownloadURLRequest( string $contentType = self::contentTypes['getModFileDownloadURL'][0] ): Request { - // verify the required parameter 'mod_id' is set if ($mod_id === null || (is_array($mod_id) && count($mod_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $mod_id when calling getModFileDownloadURL' ); } - // verify the required parameter 'file_id' is set if ($file_id === null || (is_array($file_id) && count($file_id) === 0)) { throw new InvalidArgumentException( @@ -1265,9 +1264,7 @@ public function getModFileDownloadURLRequest( ); } - $resourcePath = '/v1/mods/{modId}/files/{fileId}/download-url'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -1278,7 +1275,7 @@ public function getModFileDownloadURLRequest( // path params if ($mod_id !== null) { $resourcePath = str_replace( - '{' . 'modId' . '}', + '{modId}', ObjectSerializer::toPathValue($mod_id), $resourcePath ); @@ -1286,7 +1283,7 @@ public function getModFileDownloadURLRequest( // path params if ($file_id !== null) { $resourcePath = str_replace( - '{' . 'fileId' . '}', + '{fileId}', ObjectSerializer::toPathValue($file_id), $resourcePath ); @@ -1299,30 +1296,6 @@ public function getModFileDownloadURLRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('x-api-key'); @@ -1365,6 +1338,7 @@ public function getModFileDownloadURLRequest( * @param int|null $older_than_project_file_id Filter only files older than the given file ID (optional) * @param \Aternos\CurseForgeApi\Model\FileReleaseType[]|null $release_types Filter only files that are of the given release types (optional) * @param \Aternos\CurseForgeApi\Model\PlatformType|null $platform_type Filter only files supporting the given platform type (optional) + * @param bool|null $client_compatible When set to true, filter OUT any file that isn't client compatible. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getModFiles'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format @@ -1381,10 +1355,11 @@ public function getModFiles( ?int $older_than_project_file_id = null, ?array $release_types = null, ?\Aternos\CurseForgeApi\Model\PlatformType $platform_type = null, + ?bool $client_compatible = null, string $contentType = self::contentTypes['getModFiles'][0] ): \Aternos\CurseForgeApi\Model\GetModFilesResponse { - list($response) = $this->getModFilesWithHttpInfo($mod_id, $index, $page_size, $game_version, $mod_loader_type, $game_version_type_id, $older_than_project_file_id, $release_types, $platform_type, $contentType); + list($response) = $this->getModFilesWithHttpInfo($mod_id, $index, $page_size, $game_version, $mod_loader_type, $game_version_type_id, $older_than_project_file_id, $release_types, $platform_type, $client_compatible, $contentType); return $response; } @@ -1402,11 +1377,12 @@ public function getModFiles( * @param int|null $older_than_project_file_id Filter only files older than the given file ID (optional) * @param \Aternos\CurseForgeApi\Model\FileReleaseType[]|null $release_types Filter only files that are of the given release types (optional) * @param \Aternos\CurseForgeApi\Model\PlatformType|null $platform_type Filter only files supporting the given platform type (optional) + * @param bool|null $client_compatible When set to true, filter OUT any file that isn't client compatible. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getModFiles'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Aternos\CurseForgeApi\Model\GetModFilesResponse, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Aternos\CurseForgeApi\Model\GetModFilesResponse, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function getModFilesWithHttpInfo( int $mod_id, @@ -1418,10 +1394,11 @@ public function getModFilesWithHttpInfo( ?int $older_than_project_file_id = null, ?array $release_types = null, ?\Aternos\CurseForgeApi\Model\PlatformType $platform_type = null, + ?bool $client_compatible = null, string $contentType = self::contentTypes['getModFiles'][0] ): array { - $request = $this->getModFilesRequest($mod_id, $index, $page_size, $game_version, $mod_loader_type, $game_version_type_id, $older_than_project_file_id, $release_types, $platform_type, $contentType); + $request = $this->getModFilesRequest($mod_id, $index, $page_size, $game_version, $mod_loader_type, $game_version_type_id, $older_than_project_file_id, $release_types, $platform_type, $client_compatible, $contentType); try { $options = $this->createHttpClientOption(); @@ -1453,7 +1430,6 @@ public function getModFilesWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1503,6 +1479,7 @@ public function getModFilesWithHttpInfo( * @param int|null $older_than_project_file_id Filter only files older than the given file ID (optional) * @param \Aternos\CurseForgeApi\Model\FileReleaseType[]|null $release_types Filter only files that are of the given release types (optional) * @param \Aternos\CurseForgeApi\Model\PlatformType|null $platform_type Filter only files supporting the given platform type (optional) + * @param bool|null $client_compatible When set to true, filter OUT any file that isn't client compatible. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getModFiles'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -1518,10 +1495,11 @@ public function getModFilesAsync( ?int $older_than_project_file_id = null, ?array $release_types = null, ?\Aternos\CurseForgeApi\Model\PlatformType $platform_type = null, + ?bool $client_compatible = null, string $contentType = self::contentTypes['getModFiles'][0] ): PromiseInterface { - return $this->getModFilesAsyncWithHttpInfo($mod_id, $index, $page_size, $game_version, $mod_loader_type, $game_version_type_id, $older_than_project_file_id, $release_types, $platform_type, $contentType) + return $this->getModFilesAsyncWithHttpInfo($mod_id, $index, $page_size, $game_version, $mod_loader_type, $game_version_type_id, $older_than_project_file_id, $release_types, $platform_type, $client_compatible, $contentType) ->then( function ($response) { return $response[0]; @@ -1543,6 +1521,7 @@ function ($response) { * @param int|null $older_than_project_file_id Filter only files older than the given file ID (optional) * @param \Aternos\CurseForgeApi\Model\FileReleaseType[]|null $release_types Filter only files that are of the given release types (optional) * @param \Aternos\CurseForgeApi\Model\PlatformType|null $platform_type Filter only files supporting the given platform type (optional) + * @param bool|null $client_compatible When set to true, filter OUT any file that isn't client compatible. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getModFiles'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -1558,11 +1537,12 @@ public function getModFilesAsyncWithHttpInfo( ?int $older_than_project_file_id = null, ?array $release_types = null, ?\Aternos\CurseForgeApi\Model\PlatformType $platform_type = null, + ?bool $client_compatible = null, string $contentType = self::contentTypes['getModFiles'][0] ): PromiseInterface { $returnType = '\Aternos\CurseForgeApi\Model\GetModFilesResponse'; - $request = $this->getModFilesRequest($mod_id, $index, $page_size, $game_version, $mod_loader_type, $game_version_type_id, $older_than_project_file_id, $release_types, $platform_type, $contentType); + $request = $this->getModFilesRequest($mod_id, $index, $page_size, $game_version, $mod_loader_type, $game_version_type_id, $older_than_project_file_id, $release_types, $platform_type, $client_compatible, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1612,6 +1592,7 @@ function ($exception) { * @param int|null $older_than_project_file_id Filter only files older than the given file ID (optional) * @param \Aternos\CurseForgeApi\Model\FileReleaseType[]|null $release_types Filter only files that are of the given release types (optional) * @param \Aternos\CurseForgeApi\Model\PlatformType|null $platform_type Filter only files supporting the given platform type (optional) + * @param bool|null $client_compatible When set to true, filter OUT any file that isn't client compatible. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getModFiles'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -1627,10 +1608,10 @@ public function getModFilesRequest( ?int $older_than_project_file_id = null, ?array $release_types = null, ?\Aternos\CurseForgeApi\Model\PlatformType $platform_type = null, + ?bool $client_compatible = null, string $contentType = self::contentTypes['getModFiles'][0] ): Request { - // verify the required parameter 'mod_id' is set if ($mod_id === null || (is_array($mod_id) && count($mod_id) === 0)) { throw new InvalidArgumentException( @@ -1638,17 +1619,7 @@ public function getModFilesRequest( ); } - - - - - - - - - $resourcePath = '/v1/mods/{modId}/files'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -1726,12 +1697,21 @@ public function getModFilesRequest( true, // explode false // required ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $client_compatible, + 'clientCompatible', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // path params if ($mod_id !== null) { $resourcePath = str_replace( - '{' . 'modId' . '}', + '{modId}', ObjectSerializer::toPathValue($mod_id), $resourcePath ); @@ -1744,30 +1724,6 @@ public function getModFilesRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('x-api-key'); diff --git a/src/Api/FingerprintsApi.php b/src/Api/FingerprintsApi.php index 29095e5..27d4513 100644 --- a/src/Api/FingerprintsApi.php +++ b/src/Api/FingerprintsApi.php @@ -15,7 +15,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -31,7 +31,6 @@ use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; @@ -40,7 +39,6 @@ use Aternos\CurseForgeApi\ApiException; use Aternos\CurseForgeApi\Configuration; use Aternos\CurseForgeApi\HeaderSelector; -use Aternos\CurseForgeApi\FormDataProcessor; use Aternos\CurseForgeApi\ObjectSerializer; /** @@ -72,7 +70,7 @@ class FingerprintsApi */ protected int $hostIndex; - /** @var string[] $contentTypes **/ + /** @var array $contentTypes **/ public const contentTypes = [ 'getFingerprintFuzzyMatches' => [ 'application/json', @@ -165,7 +163,7 @@ public function getFingerprintFuzzyMatches( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Aternos\CurseForgeApi\Model\GetFingerprintFuzzyMatchesResponse, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Aternos\CurseForgeApi\Model\GetFingerprintFuzzyMatchesResponse, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function getFingerprintFuzzyMatchesWithHttpInfo( \Aternos\CurseForgeApi\Model\GetFuzzyMatchesRequestBody $get_fuzzy_matches_request_body, @@ -204,7 +202,6 @@ public function getFingerprintFuzzyMatchesWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -333,7 +330,6 @@ public function getFingerprintFuzzyMatchesRequest( string $contentType = self::contentTypes['getFingerprintFuzzyMatches'][0] ): Request { - // verify the required parameter 'get_fuzzy_matches_request_body' is set if ($get_fuzzy_matches_request_body === null || (is_array($get_fuzzy_matches_request_body) && count($get_fuzzy_matches_request_body) === 0)) { throw new InvalidArgumentException( @@ -341,7 +337,6 @@ public function getFingerprintFuzzyMatchesRequest( ); } - $resourcePath = '/v1/fingerprints/fuzzy'; $formParams = []; $queryParams = []; @@ -363,7 +358,11 @@ public function getFingerprintFuzzyMatchesRequest( if (isset($get_fuzzy_matches_request_body)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($get_fuzzy_matches_request_body)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($get_fuzzy_matches_request_body), JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $get_fuzzy_matches_request_body; } @@ -380,11 +379,15 @@ public function getFingerprintFuzzyMatchesRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -452,7 +455,7 @@ public function getFingerprintFuzzyMatchesByGame( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Aternos\CurseForgeApi\Model\GetFingerprintFuzzyMatchesResponse, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Aternos\CurseForgeApi\Model\GetFingerprintFuzzyMatchesResponse, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function getFingerprintFuzzyMatchesByGameWithHttpInfo( int $game_id, @@ -492,7 +495,6 @@ public function getFingerprintFuzzyMatchesByGameWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -627,14 +629,12 @@ public function getFingerprintFuzzyMatchesByGameRequest( string $contentType = self::contentTypes['getFingerprintFuzzyMatchesByGame'][0] ): Request { - // verify the required parameter 'game_id' is set if ($game_id === null || (is_array($game_id) && count($game_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $game_id when calling getFingerprintFuzzyMatchesByGame' ); } - // verify the required parameter 'get_fuzzy_matches_request_body' is set if ($get_fuzzy_matches_request_body === null || (is_array($get_fuzzy_matches_request_body) && count($get_fuzzy_matches_request_body) === 0)) { throw new InvalidArgumentException( @@ -642,7 +642,6 @@ public function getFingerprintFuzzyMatchesByGameRequest( ); } - $resourcePath = '/v1/fingerprints/fuzzy/{gameId}'; $formParams = []; $queryParams = []; @@ -655,7 +654,7 @@ public function getFingerprintFuzzyMatchesByGameRequest( // path params if ($game_id !== null) { $resourcePath = str_replace( - '{' . 'gameId' . '}', + '{gameId}', ObjectSerializer::toPathValue($game_id), $resourcePath ); @@ -672,7 +671,11 @@ public function getFingerprintFuzzyMatchesByGameRequest( if (isset($get_fuzzy_matches_request_body)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($get_fuzzy_matches_request_body)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($get_fuzzy_matches_request_body), JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $get_fuzzy_matches_request_body; } @@ -689,11 +692,15 @@ public function getFingerprintFuzzyMatchesByGameRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -758,7 +765,7 @@ public function getFingerprintMatches( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Aternos\CurseForgeApi\Model\GetFingerprintMatchesResponse, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Aternos\CurseForgeApi\Model\GetFingerprintMatchesResponse, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function getFingerprintMatchesWithHttpInfo( \Aternos\CurseForgeApi\Model\GetFingerprintMatchesRequestBody $get_fingerprint_matches_request_body, @@ -797,7 +804,6 @@ public function getFingerprintMatchesWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -926,7 +932,6 @@ public function getFingerprintMatchesRequest( string $contentType = self::contentTypes['getFingerprintMatches'][0] ): Request { - // verify the required parameter 'get_fingerprint_matches_request_body' is set if ($get_fingerprint_matches_request_body === null || (is_array($get_fingerprint_matches_request_body) && count($get_fingerprint_matches_request_body) === 0)) { throw new InvalidArgumentException( @@ -934,7 +939,6 @@ public function getFingerprintMatchesRequest( ); } - $resourcePath = '/v1/fingerprints'; $formParams = []; $queryParams = []; @@ -956,7 +960,11 @@ public function getFingerprintMatchesRequest( if (isset($get_fingerprint_matches_request_body)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($get_fingerprint_matches_request_body)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($get_fingerprint_matches_request_body), JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $get_fingerprint_matches_request_body; } @@ -973,11 +981,15 @@ public function getFingerprintMatchesRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -1045,7 +1057,7 @@ public function getFingerprintMatchesByGame( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Aternos\CurseForgeApi\Model\GetFingerprintMatchesResponse, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Aternos\CurseForgeApi\Model\GetFingerprintMatchesResponse, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function getFingerprintMatchesByGameWithHttpInfo( int $game_id, @@ -1085,7 +1097,6 @@ public function getFingerprintMatchesByGameWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1220,14 +1231,12 @@ public function getFingerprintMatchesByGameRequest( string $contentType = self::contentTypes['getFingerprintMatchesByGame'][0] ): Request { - // verify the required parameter 'game_id' is set if ($game_id === null || (is_array($game_id) && count($game_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $game_id when calling getFingerprintMatchesByGame' ); } - // verify the required parameter 'get_fingerprint_matches_request_body' is set if ($get_fingerprint_matches_request_body === null || (is_array($get_fingerprint_matches_request_body) && count($get_fingerprint_matches_request_body) === 0)) { throw new InvalidArgumentException( @@ -1235,7 +1244,6 @@ public function getFingerprintMatchesByGameRequest( ); } - $resourcePath = '/v1/fingerprints/{gameId}'; $formParams = []; $queryParams = []; @@ -1248,7 +1256,7 @@ public function getFingerprintMatchesByGameRequest( // path params if ($game_id !== null) { $resourcePath = str_replace( - '{' . 'gameId' . '}', + '{gameId}', ObjectSerializer::toPathValue($game_id), $resourcePath ); @@ -1265,7 +1273,11 @@ public function getFingerprintMatchesByGameRequest( if (isset($get_fingerprint_matches_request_body)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($get_fingerprint_matches_request_body)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($get_fingerprint_matches_request_body), JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $get_fingerprint_matches_request_body; } @@ -1282,11 +1294,15 @@ public function getFingerprintMatchesByGameRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); diff --git a/src/Api/GamesApi.php b/src/Api/GamesApi.php index 46d301e..5cf4d64 100644 --- a/src/Api/GamesApi.php +++ b/src/Api/GamesApi.php @@ -15,7 +15,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -31,7 +31,6 @@ use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; @@ -40,7 +39,6 @@ use Aternos\CurseForgeApi\ApiException; use Aternos\CurseForgeApi\Configuration; use Aternos\CurseForgeApi\HeaderSelector; -use Aternos\CurseForgeApi\FormDataProcessor; use Aternos\CurseForgeApi\ObjectSerializer; /** @@ -72,7 +70,7 @@ class GamesApi */ protected int $hostIndex; - /** @var string[] $contentTypes **/ + /** @var array $contentTypes **/ public const contentTypes = [ 'getGame' => [ 'application/json', @@ -168,7 +166,7 @@ public function getGame( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Aternos\CurseForgeApi\Model\GetGameResponse, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Aternos\CurseForgeApi\Model\GetGameResponse, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function getGameWithHttpInfo( int $game_id, @@ -207,7 +205,6 @@ public function getGameWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -336,7 +333,6 @@ public function getGameRequest( string $contentType = self::contentTypes['getGame'][0] ): Request { - // verify the required parameter 'game_id' is set if ($game_id === null || (is_array($game_id) && count($game_id) === 0)) { throw new InvalidArgumentException( @@ -344,9 +340,7 @@ public function getGameRequest( ); } - $resourcePath = '/v1/games/{gameId}'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -357,7 +351,7 @@ public function getGameRequest( // path params if ($game_id !== null) { $resourcePath = str_replace( - '{' . 'gameId' . '}', + '{gameId}', ObjectSerializer::toPathValue($game_id), $resourcePath ); @@ -370,30 +364,6 @@ public function getGameRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('x-api-key'); @@ -456,7 +426,7 @@ public function getGames( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Aternos\CurseForgeApi\Model\GetGamesResponse, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Aternos\CurseForgeApi\Model\GetGamesResponse, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function getGamesWithHttpInfo( ?int $index = null, @@ -496,7 +466,6 @@ public function getGamesWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -632,11 +601,7 @@ public function getGamesRequest( ): Request { - - - $resourcePath = '/v1/games'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -670,30 +635,6 @@ public function getGamesRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('x-api-key'); @@ -753,7 +694,7 @@ public function getVersionTypes( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Aternos\CurseForgeApi\Model\GetVersionTypesResponse, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Aternos\CurseForgeApi\Model\GetVersionTypesResponse, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function getVersionTypesWithHttpInfo( int $game_id, @@ -792,7 +733,6 @@ public function getVersionTypesWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -921,7 +861,6 @@ public function getVersionTypesRequest( string $contentType = self::contentTypes['getVersionTypes'][0] ): Request { - // verify the required parameter 'game_id' is set if ($game_id === null || (is_array($game_id) && count($game_id) === 0)) { throw new InvalidArgumentException( @@ -929,9 +868,7 @@ public function getVersionTypesRequest( ); } - $resourcePath = '/v1/games/{gameId}/version-types'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -942,7 +879,7 @@ public function getVersionTypesRequest( // path params if ($game_id !== null) { $resourcePath = str_replace( - '{' . 'gameId' . '}', + '{gameId}', ObjectSerializer::toPathValue($game_id), $resourcePath ); @@ -955,30 +892,6 @@ public function getVersionTypesRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('x-api-key'); @@ -1038,7 +951,7 @@ public function getVersions( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Aternos\CurseForgeApi\Model\GetVersionsResponse, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Aternos\CurseForgeApi\Model\GetVersionsResponse, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function getVersionsWithHttpInfo( int $game_id, @@ -1077,7 +990,6 @@ public function getVersionsWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1206,7 +1118,6 @@ public function getVersionsRequest( string $contentType = self::contentTypes['getVersions'][0] ): Request { - // verify the required parameter 'game_id' is set if ($game_id === null || (is_array($game_id) && count($game_id) === 0)) { throw new InvalidArgumentException( @@ -1214,9 +1125,7 @@ public function getVersionsRequest( ); } - $resourcePath = '/v1/games/{gameId}/versions'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -1227,7 +1136,7 @@ public function getVersionsRequest( // path params if ($game_id !== null) { $resourcePath = str_replace( - '{' . 'gameId' . '}', + '{gameId}', ObjectSerializer::toPathValue($game_id), $resourcePath ); @@ -1240,30 +1149,6 @@ public function getVersionsRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('x-api-key'); @@ -1323,7 +1208,7 @@ public function getVersionsV2( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Aternos\CurseForgeApi\Model\GetVersionsV2Response, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Aternos\CurseForgeApi\Model\GetVersionsV2Response, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function getVersionsV2WithHttpInfo( int $game_id, @@ -1362,7 +1247,6 @@ public function getVersionsV2WithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1491,7 +1375,6 @@ public function getVersionsV2Request( string $contentType = self::contentTypes['getVersionsV2'][0] ): Request { - // verify the required parameter 'game_id' is set if ($game_id === null || (is_array($game_id) && count($game_id) === 0)) { throw new InvalidArgumentException( @@ -1499,9 +1382,7 @@ public function getVersionsV2Request( ); } - $resourcePath = '/v2/games/{gameId}/versions'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -1512,7 +1393,7 @@ public function getVersionsV2Request( // path params if ($game_id !== null) { $resourcePath = str_replace( - '{' . 'gameId' . '}', + '{gameId}', ObjectSerializer::toPathValue($game_id), $resourcePath ); @@ -1525,30 +1406,6 @@ public function getVersionsV2Request( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('x-api-key'); diff --git a/src/Api/MinecraftApi.php b/src/Api/MinecraftApi.php index 4dcd99c..b4a080c 100644 --- a/src/Api/MinecraftApi.php +++ b/src/Api/MinecraftApi.php @@ -15,7 +15,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -31,7 +31,6 @@ use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; @@ -40,7 +39,6 @@ use Aternos\CurseForgeApi\ApiException; use Aternos\CurseForgeApi\Configuration; use Aternos\CurseForgeApi\HeaderSelector; -use Aternos\CurseForgeApi\FormDataProcessor; use Aternos\CurseForgeApi\ObjectSerializer; /** @@ -72,7 +70,7 @@ class MinecraftApi */ protected int $hostIndex; - /** @var string[] $contentTypes **/ + /** @var array $contentTypes **/ public const contentTypes = [ 'getMinecraftModLoaders' => [ 'application/json', @@ -168,7 +166,7 @@ public function getMinecraftModLoaders( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Aternos\CurseForgeApi\Model\ApiResponseOfListOfMinecraftModLoaderIndex, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Aternos\CurseForgeApi\Model\ApiResponseOfListOfMinecraftModLoaderIndex, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function getMinecraftModLoadersWithHttpInfo( ?string $version = null, @@ -208,7 +206,6 @@ public function getMinecraftModLoadersWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -344,11 +341,7 @@ public function getMinecraftModLoadersRequest( ): Request { - - - $resourcePath = '/v1/minecraft/modloader'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -382,30 +375,6 @@ public function getMinecraftModLoadersRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('x-api-key'); @@ -465,7 +434,7 @@ public function getMinecraftVersions( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Aternos\CurseForgeApi\Model\ApiResponseOfListOfMinecraftGameVersion, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Aternos\CurseForgeApi\Model\ApiResponseOfListOfMinecraftGameVersion, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function getMinecraftVersionsWithHttpInfo( ?bool $sort_descending = null, @@ -504,7 +473,6 @@ public function getMinecraftVersionsWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -634,10 +602,7 @@ public function getMinecraftVersionsRequest( ): Request { - - $resourcePath = '/v1/minecraft/version'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -662,30 +627,6 @@ public function getMinecraftVersionsRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('x-api-key'); @@ -745,7 +686,7 @@ public function getSpecificMinecraftModLoader( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Aternos\CurseForgeApi\Model\ApiResponseOfMinecraftModLoaderVersion, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Aternos\CurseForgeApi\Model\ApiResponseOfMinecraftModLoaderVersion, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function getSpecificMinecraftModLoaderWithHttpInfo( string $mod_loader_name, @@ -784,7 +725,6 @@ public function getSpecificMinecraftModLoaderWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -913,7 +853,6 @@ public function getSpecificMinecraftModLoaderRequest( string $contentType = self::contentTypes['getSpecificMinecraftModLoader'][0] ): Request { - // verify the required parameter 'mod_loader_name' is set if ($mod_loader_name === null || (is_array($mod_loader_name) && count($mod_loader_name) === 0)) { throw new InvalidArgumentException( @@ -921,9 +860,7 @@ public function getSpecificMinecraftModLoaderRequest( ); } - $resourcePath = '/v1/minecraft/modloader/{modLoaderName}'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -934,7 +871,7 @@ public function getSpecificMinecraftModLoaderRequest( // path params if ($mod_loader_name !== null) { $resourcePath = str_replace( - '{' . 'modLoaderName' . '}', + '{modLoaderName}', ObjectSerializer::toPathValue($mod_loader_name), $resourcePath ); @@ -947,30 +884,6 @@ public function getSpecificMinecraftModLoaderRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('x-api-key'); @@ -1030,7 +943,7 @@ public function getSpecificMinecraftVersion( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Aternos\CurseForgeApi\Model\ApiResponseOfMinecraftGameVersion, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Aternos\CurseForgeApi\Model\ApiResponseOfMinecraftGameVersion, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function getSpecificMinecraftVersionWithHttpInfo( string $game_version_string, @@ -1069,7 +982,6 @@ public function getSpecificMinecraftVersionWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1198,7 +1110,6 @@ public function getSpecificMinecraftVersionRequest( string $contentType = self::contentTypes['getSpecificMinecraftVersion'][0] ): Request { - // verify the required parameter 'game_version_string' is set if ($game_version_string === null || (is_array($game_version_string) && count($game_version_string) === 0)) { throw new InvalidArgumentException( @@ -1206,9 +1117,7 @@ public function getSpecificMinecraftVersionRequest( ); } - $resourcePath = '/v1/minecraft/version/{gameVersionString}'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -1219,7 +1128,7 @@ public function getSpecificMinecraftVersionRequest( // path params if ($game_version_string !== null) { $resourcePath = str_replace( - '{' . 'gameVersionString' . '}', + '{gameVersionString}', ObjectSerializer::toPathValue($game_version_string), $resourcePath ); @@ -1232,30 +1141,6 @@ public function getSpecificMinecraftVersionRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('x-api-key'); diff --git a/src/Api/ModsApi.php b/src/Api/ModsApi.php index 06455c9..539cd0c 100644 --- a/src/Api/ModsApi.php +++ b/src/Api/ModsApi.php @@ -15,7 +15,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -31,7 +31,6 @@ use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; @@ -40,7 +39,6 @@ use Aternos\CurseForgeApi\ApiException; use Aternos\CurseForgeApi\Configuration; use Aternos\CurseForgeApi\HeaderSelector; -use Aternos\CurseForgeApi\FormDataProcessor; use Aternos\CurseForgeApi\ObjectSerializer; /** @@ -72,7 +70,7 @@ class ModsApi */ protected int $hostIndex; - /** @var string[] $contentTypes **/ + /** @var array $contentTypes **/ public const contentTypes = [ 'getFeaturedMods' => [ 'application/json', @@ -168,7 +166,7 @@ public function getFeaturedMods( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Aternos\CurseForgeApi\Model\GetFeaturedModsResponse, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Aternos\CurseForgeApi\Model\GetFeaturedModsResponse, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function getFeaturedModsWithHttpInfo( \Aternos\CurseForgeApi\Model\GetFeaturedModsRequestBody $get_featured_mods_request_body, @@ -207,7 +205,6 @@ public function getFeaturedModsWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -336,7 +333,6 @@ public function getFeaturedModsRequest( string $contentType = self::contentTypes['getFeaturedMods'][0] ): Request { - // verify the required parameter 'get_featured_mods_request_body' is set if ($get_featured_mods_request_body === null || (is_array($get_featured_mods_request_body) && count($get_featured_mods_request_body) === 0)) { throw new InvalidArgumentException( @@ -344,7 +340,6 @@ public function getFeaturedModsRequest( ); } - $resourcePath = '/v1/mods/featured'; $formParams = []; $queryParams = []; @@ -366,7 +361,11 @@ public function getFeaturedModsRequest( if (isset($get_featured_mods_request_body)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($get_featured_mods_request_body)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($get_featured_mods_request_body), JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $get_featured_mods_request_body; } @@ -383,11 +382,15 @@ public function getFeaturedModsRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -452,7 +455,7 @@ public function getMod( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Aternos\CurseForgeApi\Model\GetModResponse, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Aternos\CurseForgeApi\Model\GetModResponse, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function getModWithHttpInfo( int $mod_id, @@ -491,7 +494,6 @@ public function getModWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -620,7 +622,6 @@ public function getModRequest( string $contentType = self::contentTypes['getMod'][0] ): Request { - // verify the required parameter 'mod_id' is set if ($mod_id === null || (is_array($mod_id) && count($mod_id) === 0)) { throw new InvalidArgumentException( @@ -628,9 +629,7 @@ public function getModRequest( ); } - $resourcePath = '/v1/mods/{modId}'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -641,7 +640,7 @@ public function getModRequest( // path params if ($mod_id !== null) { $resourcePath = str_replace( - '{' . 'modId' . '}', + '{modId}', ObjectSerializer::toPathValue($mod_id), $resourcePath ); @@ -654,30 +653,6 @@ public function getModRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('x-api-key'); @@ -715,6 +690,7 @@ public function getModRequest( * @param bool|null $raw Get raw description without things like external link redirects (optional) * @param bool|null $stripped Get the description with all HTML tags removed (optional) * @param bool|null $markup markup (optional) + * @param string|null $lang lang (optional, default to 'en') * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getModDescription'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format @@ -726,10 +702,11 @@ public function getModDescription( ?bool $raw = null, ?bool $stripped = null, ?bool $markup = null, + ?string $lang = 'en', string $contentType = self::contentTypes['getModDescription'][0] ): \Aternos\CurseForgeApi\Model\ModDescriptionResponse { - list($response) = $this->getModDescriptionWithHttpInfo($mod_id, $raw, $stripped, $markup, $contentType); + list($response) = $this->getModDescriptionWithHttpInfo($mod_id, $raw, $stripped, $markup, $lang, $contentType); return $response; } @@ -742,21 +719,23 @@ public function getModDescription( * @param bool|null $raw Get raw description without things like external link redirects (optional) * @param bool|null $stripped Get the description with all HTML tags removed (optional) * @param bool|null $markup (optional) + * @param string|null $lang (optional, default to 'en') * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getModDescription'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Aternos\CurseForgeApi\Model\ModDescriptionResponse, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Aternos\CurseForgeApi\Model\ModDescriptionResponse, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function getModDescriptionWithHttpInfo( int $mod_id, ?bool $raw = null, ?bool $stripped = null, ?bool $markup = null, + ?string $lang = 'en', string $contentType = self::contentTypes['getModDescription'][0] ): array { - $request = $this->getModDescriptionRequest($mod_id, $raw, $stripped, $markup, $contentType); + $request = $this->getModDescriptionRequest($mod_id, $raw, $stripped, $markup, $lang, $contentType); try { $options = $this->createHttpClientOption(); @@ -788,7 +767,6 @@ public function getModDescriptionWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -833,6 +811,7 @@ public function getModDescriptionWithHttpInfo( * @param bool|null $raw Get raw description without things like external link redirects (optional) * @param bool|null $stripped Get the description with all HTML tags removed (optional) * @param bool|null $markup (optional) + * @param string|null $lang (optional, default to 'en') * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getModDescription'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -843,10 +822,11 @@ public function getModDescriptionAsync( ?bool $raw = null, ?bool $stripped = null, ?bool $markup = null, + ?string $lang = 'en', string $contentType = self::contentTypes['getModDescription'][0] ): PromiseInterface { - return $this->getModDescriptionAsyncWithHttpInfo($mod_id, $raw, $stripped, $markup, $contentType) + return $this->getModDescriptionAsyncWithHttpInfo($mod_id, $raw, $stripped, $markup, $lang, $contentType) ->then( function ($response) { return $response[0]; @@ -863,6 +843,7 @@ function ($response) { * @param bool|null $raw Get raw description without things like external link redirects (optional) * @param bool|null $stripped Get the description with all HTML tags removed (optional) * @param bool|null $markup (optional) + * @param string|null $lang (optional, default to 'en') * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getModDescription'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -873,11 +854,12 @@ public function getModDescriptionAsyncWithHttpInfo( ?bool $raw = null, ?bool $stripped = null, ?bool $markup = null, + ?string $lang = 'en', string $contentType = self::contentTypes['getModDescription'][0] ): PromiseInterface { $returnType = '\Aternos\CurseForgeApi\Model\ModDescriptionResponse'; - $request = $this->getModDescriptionRequest($mod_id, $raw, $stripped, $markup, $contentType); + $request = $this->getModDescriptionRequest($mod_id, $raw, $stripped, $markup, $lang, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -922,6 +904,7 @@ function ($exception) { * @param bool|null $raw Get raw description without things like external link redirects (optional) * @param bool|null $stripped Get the description with all HTML tags removed (optional) * @param bool|null $markup (optional) + * @param string|null $lang (optional, default to 'en') * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getModDescription'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -932,10 +915,10 @@ public function getModDescriptionRequest( ?bool $raw = null, ?bool $stripped = null, ?bool $markup = null, + ?string $lang = 'en', string $contentType = self::contentTypes['getModDescription'][0] ): Request { - // verify the required parameter 'mod_id' is set if ($mod_id === null || (is_array($mod_id) && count($mod_id) === 0)) { throw new InvalidArgumentException( @@ -943,12 +926,7 @@ public function getModDescriptionRequest( ); } - - - - $resourcePath = '/v1/mods/{modId}/description'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -981,12 +959,21 @@ public function getModDescriptionRequest( true, // explode false // required ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $lang, + 'lang', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // path params if ($mod_id !== null) { $resourcePath = str_replace( - '{' . 'modId' . '}', + '{modId}', ObjectSerializer::toPathValue($mod_id), $resourcePath ); @@ -999,30 +986,6 @@ public function getModDescriptionRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('x-api-key'); @@ -1082,7 +1045,7 @@ public function getMods( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Aternos\CurseForgeApi\Model\GetModsResponse, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Aternos\CurseForgeApi\Model\GetModsResponse, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function getModsWithHttpInfo( \Aternos\CurseForgeApi\Model\GetModsByIdsListRequestBody $get_mods_by_ids_list_request_body, @@ -1121,7 +1084,6 @@ public function getModsWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1250,7 +1212,6 @@ public function getModsRequest( string $contentType = self::contentTypes['getMods'][0] ): Request { - // verify the required parameter 'get_mods_by_ids_list_request_body' is set if ($get_mods_by_ids_list_request_body === null || (is_array($get_mods_by_ids_list_request_body) && count($get_mods_by_ids_list_request_body) === 0)) { throw new InvalidArgumentException( @@ -1258,7 +1219,6 @@ public function getModsRequest( ); } - $resourcePath = '/v1/mods'; $formParams = []; $queryParams = []; @@ -1280,7 +1240,11 @@ public function getModsRequest( if (isset($get_mods_by_ids_list_request_body)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($get_mods_by_ids_list_request_body)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($get_mods_by_ids_list_request_body), JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $get_mods_by_ids_list_request_body; } @@ -1297,11 +1261,15 @@ public function getModsRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -1358,6 +1326,8 @@ public function getModsRequest( * @param string|null $mod_loader_types Filter by a list of modloader types. This will override modLoaderType. Limited to 5 items. (optional) * @param int|null $primary_author_id Filter only mods that the given primaryAuthorId is the owner of. (optional) * @param \Aternos\CurseForgeApi\Model\PremiumType|null $premium_type Filter only mods that are Premium or not. (optional) + * @param bool|null $client_compatible When set to true, will filter out any mod that doesn't have a default file that is compatible with the client. This is usually due to a bad file structure of the file (which might cause unexpected behaviours on the user's machine - such as overriding other mods installed). (optional) + * @param int|null $mods_search_enhanced_features Bitwise number with values from ModsSearchEnhancedFeatures (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchMods'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format @@ -1383,10 +1353,12 @@ public function searchMods( ?string $mod_loader_types = null, ?int $primary_author_id = null, ?\Aternos\CurseForgeApi\Model\PremiumType $premium_type = null, + ?bool $client_compatible = null, + ?int $mods_search_enhanced_features = null, string $contentType = self::contentTypes['searchMods'][0] ): \Aternos\CurseForgeApi\Model\SearchModsResponse { - list($response) = $this->searchModsWithHttpInfo($game_id, $index, $page_size, $class_id, $category_id, $game_version, $search_filter, $sort_field, $sort_order, $mod_loader_type, $game_version_type_id, $author_id, $slug, $category_ids, $game_versions, $mod_loader_types, $primary_author_id, $premium_type, $contentType); + list($response) = $this->searchModsWithHttpInfo($game_id, $index, $page_size, $class_id, $category_id, $game_version, $search_filter, $sort_field, $sort_order, $mod_loader_type, $game_version_type_id, $author_id, $slug, $category_ids, $game_versions, $mod_loader_types, $primary_author_id, $premium_type, $client_compatible, $mods_search_enhanced_features, $contentType); return $response; } @@ -1413,11 +1385,13 @@ public function searchMods( * @param string|null $mod_loader_types Filter by a list of modloader types. This will override modLoaderType. Limited to 5 items. (optional) * @param int|null $primary_author_id Filter only mods that the given primaryAuthorId is the owner of. (optional) * @param \Aternos\CurseForgeApi\Model\PremiumType|null $premium_type Filter only mods that are Premium or not. (optional) + * @param bool|null $client_compatible When set to true, will filter out any mod that doesn't have a default file that is compatible with the client. This is usually due to a bad file structure of the file (which might cause unexpected behaviours on the user's machine - such as overriding other mods installed). (optional) + * @param int|null $mods_search_enhanced_features Bitwise number with values from ModsSearchEnhancedFeatures (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchMods'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Aternos\CurseForgeApi\Model\SearchModsResponse, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Aternos\CurseForgeApi\Model\SearchModsResponse, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function searchModsWithHttpInfo( int $game_id, @@ -1438,10 +1412,12 @@ public function searchModsWithHttpInfo( ?string $mod_loader_types = null, ?int $primary_author_id = null, ?\Aternos\CurseForgeApi\Model\PremiumType $premium_type = null, + ?bool $client_compatible = null, + ?int $mods_search_enhanced_features = null, string $contentType = self::contentTypes['searchMods'][0] ): array { - $request = $this->searchModsRequest($game_id, $index, $page_size, $class_id, $category_id, $game_version, $search_filter, $sort_field, $sort_order, $mod_loader_type, $game_version_type_id, $author_id, $slug, $category_ids, $game_versions, $mod_loader_types, $primary_author_id, $premium_type, $contentType); + $request = $this->searchModsRequest($game_id, $index, $page_size, $class_id, $category_id, $game_version, $search_filter, $sort_field, $sort_order, $mod_loader_type, $game_version_type_id, $author_id, $slug, $category_ids, $game_versions, $mod_loader_types, $primary_author_id, $premium_type, $client_compatible, $mods_search_enhanced_features, $contentType); try { $options = $this->createHttpClientOption(); @@ -1473,7 +1449,6 @@ public function searchModsWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1532,6 +1507,8 @@ public function searchModsWithHttpInfo( * @param string|null $mod_loader_types Filter by a list of modloader types. This will override modLoaderType. Limited to 5 items. (optional) * @param int|null $primary_author_id Filter only mods that the given primaryAuthorId is the owner of. (optional) * @param \Aternos\CurseForgeApi\Model\PremiumType|null $premium_type Filter only mods that are Premium or not. (optional) + * @param bool|null $client_compatible When set to true, will filter out any mod that doesn't have a default file that is compatible with the client. This is usually due to a bad file structure of the file (which might cause unexpected behaviours on the user's machine - such as overriding other mods installed). (optional) + * @param int|null $mods_search_enhanced_features Bitwise number with values from ModsSearchEnhancedFeatures (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchMods'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -1556,10 +1533,12 @@ public function searchModsAsync( ?string $mod_loader_types = null, ?int $primary_author_id = null, ?\Aternos\CurseForgeApi\Model\PremiumType $premium_type = null, + ?bool $client_compatible = null, + ?int $mods_search_enhanced_features = null, string $contentType = self::contentTypes['searchMods'][0] ): PromiseInterface { - return $this->searchModsAsyncWithHttpInfo($game_id, $index, $page_size, $class_id, $category_id, $game_version, $search_filter, $sort_field, $sort_order, $mod_loader_type, $game_version_type_id, $author_id, $slug, $category_ids, $game_versions, $mod_loader_types, $primary_author_id, $premium_type, $contentType) + return $this->searchModsAsyncWithHttpInfo($game_id, $index, $page_size, $class_id, $category_id, $game_version, $search_filter, $sort_field, $sort_order, $mod_loader_type, $game_version_type_id, $author_id, $slug, $category_ids, $game_versions, $mod_loader_types, $primary_author_id, $premium_type, $client_compatible, $mods_search_enhanced_features, $contentType) ->then( function ($response) { return $response[0]; @@ -1590,6 +1569,8 @@ function ($response) { * @param string|null $mod_loader_types Filter by a list of modloader types. This will override modLoaderType. Limited to 5 items. (optional) * @param int|null $primary_author_id Filter only mods that the given primaryAuthorId is the owner of. (optional) * @param \Aternos\CurseForgeApi\Model\PremiumType|null $premium_type Filter only mods that are Premium or not. (optional) + * @param bool|null $client_compatible When set to true, will filter out any mod that doesn't have a default file that is compatible with the client. This is usually due to a bad file structure of the file (which might cause unexpected behaviours on the user's machine - such as overriding other mods installed). (optional) + * @param int|null $mods_search_enhanced_features Bitwise number with values from ModsSearchEnhancedFeatures (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchMods'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -1614,11 +1595,13 @@ public function searchModsAsyncWithHttpInfo( ?string $mod_loader_types = null, ?int $primary_author_id = null, ?\Aternos\CurseForgeApi\Model\PremiumType $premium_type = null, + ?bool $client_compatible = null, + ?int $mods_search_enhanced_features = null, string $contentType = self::contentTypes['searchMods'][0] ): PromiseInterface { $returnType = '\Aternos\CurseForgeApi\Model\SearchModsResponse'; - $request = $this->searchModsRequest($game_id, $index, $page_size, $class_id, $category_id, $game_version, $search_filter, $sort_field, $sort_order, $mod_loader_type, $game_version_type_id, $author_id, $slug, $category_ids, $game_versions, $mod_loader_types, $primary_author_id, $premium_type, $contentType); + $request = $this->searchModsRequest($game_id, $index, $page_size, $class_id, $category_id, $game_version, $search_filter, $sort_field, $sort_order, $mod_loader_type, $game_version_type_id, $author_id, $slug, $category_ids, $game_versions, $mod_loader_types, $primary_author_id, $premium_type, $client_compatible, $mods_search_enhanced_features, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1677,6 +1660,8 @@ function ($exception) { * @param string|null $mod_loader_types Filter by a list of modloader types. This will override modLoaderType. Limited to 5 items. (optional) * @param int|null $primary_author_id Filter only mods that the given primaryAuthorId is the owner of. (optional) * @param \Aternos\CurseForgeApi\Model\PremiumType|null $premium_type Filter only mods that are Premium or not. (optional) + * @param bool|null $client_compatible When set to true, will filter out any mod that doesn't have a default file that is compatible with the client. This is usually due to a bad file structure of the file (which might cause unexpected behaviours on the user's machine - such as overriding other mods installed). (optional) + * @param int|null $mods_search_enhanced_features Bitwise number with values from ModsSearchEnhancedFeatures (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchMods'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -1701,10 +1686,11 @@ public function searchModsRequest( ?string $mod_loader_types = null, ?int $primary_author_id = null, ?\Aternos\CurseForgeApi\Model\PremiumType $premium_type = null, + ?bool $client_compatible = null, + ?int $mods_search_enhanced_features = null, string $contentType = self::contentTypes['searchMods'][0] ): Request { - // verify the required parameter 'game_id' is set if ($game_id === null || (is_array($game_id) && count($game_id) === 0)) { throw new InvalidArgumentException( @@ -1712,26 +1698,7 @@ public function searchModsRequest( ); } - - - - - - - - - - - - - - - - - - $resourcePath = '/v1/mods/search'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -1899,6 +1866,24 @@ public function searchModsRequest( true, // explode false // required ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $client_compatible, + 'clientCompatible', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $mods_search_enhanced_features, + 'modsSearchEnhancedFeatures', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); @@ -1909,30 +1894,6 @@ public function searchModsRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('x-api-key'); diff --git a/src/ApiException.php b/src/ApiException.php index 3a284fe..3cc14fd 100644 --- a/src/ApiException.php +++ b/src/ApiException.php @@ -15,7 +15,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** diff --git a/src/Configuration.php b/src/Configuration.php index 0c3fdbc..7da67dc 100644 --- a/src/Configuration.php +++ b/src/Configuration.php @@ -15,7 +15,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -122,6 +122,13 @@ class Configuration */ protected string $tempFolderPath; + /** + * Ignore operation specific hosts + * + * @var bool + */ + protected bool $ignoreOperationHosts = false; + /** * Constructor */ @@ -391,6 +398,29 @@ public function getTempFolderPath(): string return $this->tempFolderPath; } + /** + * Sets the ignore operation specific hosts flag + * + * @param bool $ignoreOperationHosts Ignore operation specific hosts flag + * + * @return $this + */ + public function setIgnoreOperationHosts(bool $ignoreOperationHosts): static + { + $this->ignoreOperationHosts = $ignoreOperationHosts; + return $this; + } + + /** + * Gets the ignore operation specific hosts flag + * + * @return bool Ignore operation specific hosts flag + */ + public function getIgnoreOperationHosts(): bool + { + return $this->ignoreOperationHosts; + } + /** * Gets the default configuration instance * @@ -475,13 +505,13 @@ public function getHostSettings(): array } /** - * Returns URL based on host settings, index and variables - * - * @param array $hostSettings array of host settings, generated from getHostSettings() or equivalent from the API clients - * @param int $hostIndex index of the host settings - * @param array|null $variables hash of variable and the corresponding value (optional) - * @return string URL based on host settings - */ + * Returns URL based on host settings, index and variables + * + * @param array $hostSettings array of host settings, generated from getHostSettings() or equivalent from the API clients + * @param int $hostIndex index of the host settings + * @param array|null $variables hash of variable and the corresponding value (optional) + * @return string URL based on host settings + */ public static function getHostString(array $hostSettings, int $hostIndex, ?array $variables = null): string { if (null === $variables) { diff --git a/src/FormDataProcessor.php b/src/FormDataProcessor.php index 9421a30..5497f54 100644 --- a/src/FormDataProcessor.php +++ b/src/FormDataProcessor.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** diff --git a/src/HeaderSelector.php b/src/HeaderSelector.php index 3cc4921..a65e47c 100644 --- a/src/HeaderSelector.php +++ b/src/HeaderSelector.php @@ -15,7 +15,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -94,13 +94,13 @@ private function selectAcceptHeader(array $accept): ?string } /** - * Create an Accept header string from the given "Accept" headers array, recalculating all weights - * - * @param string[] $accept Array of Accept Headers - * @param string[] $headersWithJson Array of Accept Headers of type "json" - * - * @return string "Accept" Header (e.g. "application/json, text/html; q=0.9") - */ + * Create an Accept header string from the given "Accept" headers array, recalculating all weights + * + * @param string[] $accept Array of Accept Headers + * @param string[] $headersWithJson Array of Accept Headers of type "json" + * + * @return string "Accept" Header (e.g. "application/json, text/html; q=0.9") + */ private function getAcceptHeaderWithAdjustedWeight(array $accept, array $headersWithJson): string { $processedHeaders = [ diff --git a/src/Model/AffiliationServiceType.php b/src/Model/AffiliationServiceType.php index 236346a..0e33c94 100644 --- a/src/Model/AffiliationServiceType.php +++ b/src/Model/AffiliationServiceType.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** diff --git a/src/Model/AnyOfInterface.php b/src/Model/AnyOfInterface.php new file mode 100644 index 0000000..3b66833 --- /dev/null +++ b/src/Model/AnyOfInterface.php @@ -0,0 +1,65 @@ + + */ + public static function getAnyOfDiscriminatorMappings(): array; +} diff --git a/src/Model/ApiResponseOfListOfMinecraftGameVersion.php b/src/Model/ApiResponseOfListOfMinecraftGameVersion.php index 0624ab3..45b91b0 100644 --- a/src/Model/ApiResponseOfListOfMinecraftGameVersion.php +++ b/src/Model/ApiResponseOfListOfMinecraftGameVersion.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,50 +46,48 @@ class ApiResponseOfListOfMinecraftGameVersion implements ModelInterface, ArrayAc public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'ApiResponseOfListOfMinecraftGameVersion'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'data' => '\Aternos\CurseForgeApi\Model\MinecraftGameVersion[]' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'data' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'data' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -97,9 +95,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -137,10 +133,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -148,10 +141,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -187,10 +177,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -198,9 +185,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -208,9 +193,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -218,9 +201,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -246,14 +227,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -264,9 +245,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -276,10 +255,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -316,7 +292,7 @@ public function setData(?array $data): static /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -328,7 +304,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -341,7 +317,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -358,7 +334,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/ApiResponseOfListOfMinecraftModLoaderIndex.php b/src/Model/ApiResponseOfListOfMinecraftModLoaderIndex.php index 9dd3a6a..cc1d371 100644 --- a/src/Model/ApiResponseOfListOfMinecraftModLoaderIndex.php +++ b/src/Model/ApiResponseOfListOfMinecraftModLoaderIndex.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,50 +46,48 @@ class ApiResponseOfListOfMinecraftModLoaderIndex implements ModelInterface, Arra public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'ApiResponseOfListOfMinecraftModLoaderIndex'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'data' => '\Aternos\CurseForgeApi\Model\MinecraftModLoaderIndex[]' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'data' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'data' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -97,9 +95,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -137,10 +133,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -148,10 +141,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -187,10 +177,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -198,9 +185,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -208,9 +193,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -218,9 +201,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -246,14 +227,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -264,9 +245,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -276,10 +255,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -316,7 +292,7 @@ public function setData(?array $data): static /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -328,7 +304,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -341,7 +317,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -358,7 +334,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/ApiResponseOfMinecraftGameVersion.php b/src/Model/ApiResponseOfMinecraftGameVersion.php index d46fffb..079eedd 100644 --- a/src/Model/ApiResponseOfMinecraftGameVersion.php +++ b/src/Model/ApiResponseOfMinecraftGameVersion.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,50 +46,48 @@ class ApiResponseOfMinecraftGameVersion implements ModelInterface, ArrayAccess, public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'ApiResponseOfMinecraftGameVersion'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'data' => '\Aternos\CurseForgeApi\Model\MinecraftGameVersion' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'data' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'data' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -97,9 +95,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -137,10 +133,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -148,10 +141,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -187,10 +177,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -198,9 +185,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -208,9 +193,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -218,9 +201,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -246,14 +227,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -264,9 +245,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -276,10 +255,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -316,7 +292,7 @@ public function setData(?\Aternos\CurseForgeApi\Model\MinecraftGameVersion $data /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -328,7 +304,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -341,7 +317,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -358,7 +334,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/ApiResponseOfMinecraftModLoaderVersion.php b/src/Model/ApiResponseOfMinecraftModLoaderVersion.php index 74e0288..6d08781 100644 --- a/src/Model/ApiResponseOfMinecraftModLoaderVersion.php +++ b/src/Model/ApiResponseOfMinecraftModLoaderVersion.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,50 +46,48 @@ class ApiResponseOfMinecraftModLoaderVersion implements ModelInterface, ArrayAcc public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'ApiResponseOfMinecraftModLoaderVersion'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'data' => '\Aternos\CurseForgeApi\Model\MinecraftModLoaderVersion' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'data' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'data' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -97,9 +95,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -137,10 +133,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -148,10 +141,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -187,10 +177,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -198,9 +185,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -208,9 +193,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -218,9 +201,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -246,14 +227,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -264,9 +245,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -276,10 +255,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -316,7 +292,7 @@ public function setData(?\Aternos\CurseForgeApi\Model\MinecraftModLoaderVersion /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -328,7 +304,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -341,7 +317,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -358,7 +334,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/Category.php b/src/Model/Category.php index 86db178..de38392 100644 --- a/src/Model/Category.php +++ b/src/Model/Category.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,17 +46,17 @@ class Category implements ModelInterface, ArrayAccess, JsonSerializable public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'Category'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'id' => 'int', 'game_id' => 'int', @@ -72,10 +72,10 @@ class Category implements ModelInterface, ArrayAccess, JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'id' => 'int32', 'game_id' => 'int32', @@ -91,10 +91,10 @@ class Category implements ModelInterface, ArrayAccess, JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'id' => false, 'game_id' => false, @@ -110,16 +110,14 @@ class Category implements ModelInterface, ArrayAccess, JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -127,9 +125,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -167,10 +163,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -178,10 +171,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -247,10 +237,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -258,9 +245,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -268,9 +253,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -278,9 +261,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -316,14 +297,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -334,9 +315,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -346,10 +325,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -684,7 +660,7 @@ public function setDisplayIndex(?int $display_index): static /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -696,7 +672,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -709,7 +685,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -726,7 +702,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/ClientFeaturedProjectTag.php b/src/Model/ClientFeaturedProjectTag.php new file mode 100644 index 0000000..daf9c15 --- /dev/null +++ b/src/Model/ClientFeaturedProjectTag.php @@ -0,0 +1,49 @@ + + */ +class CookerInfo implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'CookerInfo'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'cooker_version' => 'string', + 'cooker_revision' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'cooker_version' => null, + 'cooker_revision' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'cooker_version' => false, + 'cooker_revision' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + 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 array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + 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 array + */ + protected static array $attributeMap = [ + 'cooker_version' => 'cookerVersion', + 'cooker_revision' => 'cookerRevision' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'cooker_version' => 'setCookerVersion', + 'cooker_revision' => 'setCookerRevision' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'cooker_version' => 'getCookerVersion', + 'cooker_revision' => 'getCookerRevision' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('cooker_version', $data ?? [], null); + $this->setIfExists('cooker_revision', $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, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets cooker_version + * + * @return string|null + */ + public function getCookerVersion(): ?string + { + return $this->container['cooker_version']; + } + + /** + * Sets cooker_version + * + * @param string|null $cooker_version The version of the cooker that processed this file + * + * @return $this + */ + public function setCookerVersion(?string $cooker_version): static + { + if (is_null($cooker_version)) { + throw new InvalidArgumentException('non-nullable cooker_version cannot be null'); + } + $this->container['cooker_version'] = $cooker_version; + + return $this; + } + + /** + * Gets cooker_revision + * + * @return string|null + */ + public function getCookerRevision(): ?string + { + return $this->container['cooker_revision']; + } + + /** + * Sets cooker_revision + * + * @param string|null $cooker_revision The revision of the cooker that processed this file + * + * @return $this + */ + public function setCookerRevision(?string $cooker_revision): static + { + if (is_null($cooker_revision)) { + throw new InvalidArgumentException('non-nullable cooker_revision cannot be null'); + } + $this->container['cooker_revision'] = $cooker_revision; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $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(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/CoreApiStatus.php b/src/Model/CoreApiStatus.php index 630a3f4..f4dd472 100644 --- a/src/Model/CoreApiStatus.php +++ b/src/Model/CoreApiStatus.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** diff --git a/src/Model/CoreStatus.php b/src/Model/CoreStatus.php index a4839af..40231a1 100644 --- a/src/Model/CoreStatus.php +++ b/src/Model/CoreStatus.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** diff --git a/src/Model/FeaturedModsResponse.php b/src/Model/FeaturedModsResponse.php index 7418117..68512d2 100644 --- a/src/Model/FeaturedModsResponse.php +++ b/src/Model/FeaturedModsResponse.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,17 +46,17 @@ class FeaturedModsResponse implements ModelInterface, ArrayAccess, JsonSerializa public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'FeaturedModsResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'featured' => '\Aternos\CurseForgeApi\Model\Mod[]', 'popular' => '\Aternos\CurseForgeApi\Model\Mod[]', @@ -64,10 +64,10 @@ class FeaturedModsResponse implements ModelInterface, ArrayAccess, JsonSerializa ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'featured' => null, 'popular' => null, @@ -75,10 +75,10 @@ class FeaturedModsResponse implements ModelInterface, ArrayAccess, JsonSerializa ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'featured' => false, 'popular' => false, @@ -86,16 +86,14 @@ class FeaturedModsResponse implements ModelInterface, ArrayAccess, JsonSerializa ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -103,9 +101,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -143,10 +139,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -154,10 +147,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -199,10 +189,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -210,9 +197,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -220,9 +205,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -230,9 +213,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -260,14 +241,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -278,9 +259,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -290,10 +269,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -384,7 +360,7 @@ public function setRecentlyUpdated(?array $recently_updated): static /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -396,7 +372,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -409,7 +385,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -426,7 +402,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/File.php b/src/Model/File.php index 3161902..f5d120b 100644 --- a/src/Model/File.php +++ b/src/Model/File.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,17 +46,17 @@ class File implements ModelInterface, ArrayAccess, JsonSerializable public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'File'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'id' => 'int', 'game_id' => 'int', @@ -83,14 +83,15 @@ class File implements ModelInterface, ArrayAccess, JsonSerializable 'is_early_access_content' => 'bool', 'early_access_end_date' => '\DateTime', 'file_fingerprint' => 'int', - 'modules' => '\Aternos\CurseForgeApi\Model\FileModule[]' + 'modules' => '\Aternos\CurseForgeApi\Model\FileModule[]', + 'cooking_info' => '\Aternos\CurseForgeApi\Model\CookerInfo' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'id' => 'int32', 'game_id' => 'int32', @@ -117,14 +118,15 @@ class File implements ModelInterface, ArrayAccess, JsonSerializable 'is_early_access_content' => null, 'early_access_end_date' => 'date-time', 'file_fingerprint' => 'int64', - 'modules' => null + 'modules' => null, + 'cooking_info' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'id' => false, 'game_id' => false, @@ -151,20 +153,19 @@ class File implements ModelInterface, ArrayAccess, JsonSerializable 'is_early_access_content' => true, 'early_access_end_date' => true, 'file_fingerprint' => false, - 'modules' => false + 'modules' => false, + 'cooking_info' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -172,9 +173,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -212,10 +211,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -223,10 +219,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -265,7 +258,8 @@ public function isNullableSetToNull(string $property): bool 'is_early_access_content' => 'isEarlyAccessContent', 'early_access_end_date' => 'earlyAccessEndDate', 'file_fingerprint' => 'fileFingerprint', - 'modules' => 'modules' + 'modules' => 'modules', + 'cooking_info' => 'cookingInfo' ]; /** @@ -299,7 +293,8 @@ public function isNullableSetToNull(string $property): bool 'is_early_access_content' => 'setIsEarlyAccessContent', 'early_access_end_date' => 'setEarlyAccessEndDate', 'file_fingerprint' => 'setFileFingerprint', - 'modules' => 'setModules' + 'modules' => 'setModules', + 'cooking_info' => 'setCookingInfo' ]; /** @@ -333,14 +328,12 @@ public function isNullableSetToNull(string $property): bool 'is_early_access_content' => 'getIsEarlyAccessContent', 'early_access_end_date' => 'getEarlyAccessEndDate', 'file_fingerprint' => 'getFileFingerprint', - 'modules' => 'getModules' + 'modules' => 'getModules', + 'cooking_info' => 'getCookingInfo' ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -348,9 +341,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -358,9 +349,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -368,9 +357,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -418,17 +405,18 @@ public function __construct(?array $data = null) $this->setIfExists('early_access_end_date', $data ?? [], null); $this->setIfExists('file_fingerprint', $data ?? [], null); $this->setIfExists('modules', $data ?? [], null); + $this->setIfExists('cooking_info', $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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -439,9 +427,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -451,10 +437,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -1226,10 +1209,37 @@ public function setModules(?array $modules): static return $this; } + + /** + * Gets cooking_info + * + * @return \Aternos\CurseForgeApi\Model\CookerInfo|null + */ + public function getCookingInfo(): ?\Aternos\CurseForgeApi\Model\CookerInfo + { + return $this->container['cooking_info']; + } + + /** + * Sets cooking_info + * + * @param \Aternos\CurseForgeApi\Model\CookerInfo|null $cooking_info cooking_info + * + * @return $this + */ + public function setCookingInfo(?\Aternos\CurseForgeApi\Model\CookerInfo $cooking_info): static + { + if (is_null($cooking_info)) { + throw new InvalidArgumentException('non-nullable cooking_info cannot be null'); + } + $this->container['cooking_info'] = $cooking_info; + + return $this; + } /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -1241,7 +1251,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -1254,7 +1264,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -1271,7 +1281,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/FileDependency.php b/src/Model/FileDependency.php index bc6b1f6..fbefe8b 100644 --- a/src/Model/FileDependency.php +++ b/src/Model/FileDependency.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,53 +46,51 @@ class FileDependency implements ModelInterface, ArrayAccess, JsonSerializable public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'FileDependency'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'mod_id' => 'int', 'relation_type' => '\Aternos\CurseForgeApi\Model\FileRelationType' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'mod_id' => 'int32', 'relation_type' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'mod_id' => false, 'relation_type' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -100,9 +98,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -140,10 +136,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -151,10 +144,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -193,10 +183,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -204,9 +191,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -214,9 +199,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -224,9 +207,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -253,14 +234,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -271,9 +252,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -283,10 +262,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -350,7 +326,7 @@ public function setRelationType(?\Aternos\CurseForgeApi\Model\FileRelationType $ /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -362,7 +338,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -375,7 +351,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -392,7 +368,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/FileHash.php b/src/Model/FileHash.php index 5cf90ab..847c921 100644 --- a/src/Model/FileHash.php +++ b/src/Model/FileHash.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,53 +46,51 @@ class FileHash implements ModelInterface, ArrayAccess, JsonSerializable public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'FileHash'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'value' => 'string', 'algo' => '\Aternos\CurseForgeApi\Model\HashAlgo' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'value' => null, 'algo' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'value' => false, 'algo' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -100,9 +98,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -140,10 +136,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -151,10 +144,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -193,10 +183,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -204,9 +191,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -214,9 +199,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -224,9 +207,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -253,14 +234,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -271,9 +252,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -283,10 +262,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -350,7 +326,7 @@ public function setAlgo(?\Aternos\CurseForgeApi\Model\HashAlgo $algo): static /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -362,7 +338,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -375,7 +351,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -392,7 +368,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/FileIndex.php b/src/Model/FileIndex.php index 41fb81f..25646b5 100644 --- a/src/Model/FileIndex.php +++ b/src/Model/FileIndex.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,17 +46,17 @@ class FileIndex implements ModelInterface, ArrayAccess, JsonSerializable public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'FileIndex'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'game_version' => 'string', 'file_id' => 'int', @@ -67,10 +67,10 @@ class FileIndex implements ModelInterface, ArrayAccess, JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'game_version' => null, 'file_id' => 'int32', @@ -81,10 +81,10 @@ class FileIndex implements ModelInterface, ArrayAccess, JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'game_version' => false, 'file_id' => false, @@ -95,16 +95,14 @@ class FileIndex implements ModelInterface, ArrayAccess, JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -112,9 +110,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -152,10 +148,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -163,10 +156,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -217,10 +207,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -228,9 +215,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -238,9 +223,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -248,9 +231,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -281,14 +262,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -299,9 +280,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -311,10 +290,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -493,7 +469,7 @@ public function setModLoader(?\Aternos\CurseForgeApi\Model\ModLoaderType $mod_lo /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -505,7 +481,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -518,7 +494,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -535,7 +511,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/FileModule.php b/src/Model/FileModule.php index fb042c5..39308ab 100644 --- a/src/Model/FileModule.php +++ b/src/Model/FileModule.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,53 +46,51 @@ class FileModule implements ModelInterface, ArrayAccess, JsonSerializable public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'FileModule'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'name' => 'string', 'fingerprint' => 'int' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'name' => null, 'fingerprint' => 'int64' ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'name' => false, 'fingerprint' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -100,9 +98,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -140,10 +136,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -151,10 +144,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -193,10 +183,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -204,9 +191,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -214,9 +199,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -224,9 +207,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -253,14 +234,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -271,9 +252,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -283,10 +262,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -350,7 +326,7 @@ public function setFingerprint(?int $fingerprint): static /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -362,7 +338,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -375,7 +351,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -392,7 +368,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/FileRelationType.php b/src/Model/FileRelationType.php index 93c102f..c5ffe08 100644 --- a/src/Model/FileRelationType.php +++ b/src/Model/FileRelationType.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** diff --git a/src/Model/FileReleaseType.php b/src/Model/FileReleaseType.php index f72ff1d..05fa99f 100644 --- a/src/Model/FileReleaseType.php +++ b/src/Model/FileReleaseType.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** diff --git a/src/Model/FileStatus.php b/src/Model/FileStatus.php index cb4316f..a018340 100644 --- a/src/Model/FileStatus.php +++ b/src/Model/FileStatus.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** diff --git a/src/Model/FingerprintFuzzyMatch.php b/src/Model/FingerprintFuzzyMatch.php index 6738cb8..525fbc3 100644 --- a/src/Model/FingerprintFuzzyMatch.php +++ b/src/Model/FingerprintFuzzyMatch.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,17 +46,17 @@ class FingerprintFuzzyMatch implements ModelInterface, ArrayAccess, JsonSerializ public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'FingerprintFuzzyMatch'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'id' => 'int', 'file' => '\Aternos\CurseForgeApi\Model\File', @@ -65,10 +65,10 @@ class FingerprintFuzzyMatch implements ModelInterface, ArrayAccess, JsonSerializ ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'id' => 'int32', 'file' => null, @@ -77,10 +77,10 @@ class FingerprintFuzzyMatch implements ModelInterface, ArrayAccess, JsonSerializ ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'id' => false, 'file' => false, @@ -89,16 +89,14 @@ class FingerprintFuzzyMatch implements ModelInterface, ArrayAccess, JsonSerializ ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -106,9 +104,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -146,10 +142,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -157,10 +150,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -205,10 +195,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -216,9 +203,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -226,9 +211,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -236,9 +219,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -267,14 +248,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -285,9 +266,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -297,10 +276,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -418,7 +394,7 @@ public function setFingerprints(?array $fingerprints): static /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -430,7 +406,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -443,7 +419,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -460,7 +436,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/FingerprintFuzzyMatchResult.php b/src/Model/FingerprintFuzzyMatchResult.php index 3fc1e77..8e7ca9d 100644 --- a/src/Model/FingerprintFuzzyMatchResult.php +++ b/src/Model/FingerprintFuzzyMatchResult.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,50 +46,48 @@ class FingerprintFuzzyMatchResult implements ModelInterface, ArrayAccess, JsonSe public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'FingerprintFuzzyMatchResult'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'fuzzy_matches' => '\Aternos\CurseForgeApi\Model\FingerprintFuzzyMatch[]' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'fuzzy_matches' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'fuzzy_matches' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -97,9 +95,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -137,10 +133,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -148,10 +141,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -187,10 +177,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -198,9 +185,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -208,9 +193,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -218,9 +201,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -246,14 +227,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -264,9 +245,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -276,10 +255,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -316,7 +292,7 @@ public function setFuzzyMatches(?array $fuzzy_matches): static /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -328,7 +304,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -341,7 +317,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -358,7 +334,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/FingerprintMatch.php b/src/Model/FingerprintMatch.php index d456e2e..2e4c1ea 100644 --- a/src/Model/FingerprintMatch.php +++ b/src/Model/FingerprintMatch.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,17 +46,17 @@ class FingerprintMatch implements ModelInterface, ArrayAccess, JsonSerializable public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'FingerprintMatch'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'id' => 'int', 'file' => '\Aternos\CurseForgeApi\Model\File', @@ -64,10 +64,10 @@ class FingerprintMatch implements ModelInterface, ArrayAccess, JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'id' => 'int32', 'file' => null, @@ -75,10 +75,10 @@ class FingerprintMatch implements ModelInterface, ArrayAccess, JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'id' => false, 'file' => false, @@ -86,16 +86,14 @@ class FingerprintMatch implements ModelInterface, ArrayAccess, JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -103,9 +101,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -143,10 +139,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -154,10 +147,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -199,10 +189,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -210,9 +197,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -220,9 +205,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -230,9 +213,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -260,14 +241,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -278,9 +259,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -290,10 +269,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -384,7 +360,7 @@ public function setLatestFiles(?array $latest_files): static /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -396,7 +372,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -409,7 +385,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -426,7 +402,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/FingerprintMatchesResult.php b/src/Model/FingerprintMatchesResult.php index 194d836..cedb21f 100644 --- a/src/Model/FingerprintMatchesResult.php +++ b/src/Model/FingerprintMatchesResult.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,17 +46,17 @@ class FingerprintMatchesResult implements ModelInterface, ArrayAccess, JsonSeria public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'FingerprintMatchesResult'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'is_cache_built' => 'bool', 'exact_matches' => '\Aternos\CurseForgeApi\Model\FingerprintMatch[]', @@ -68,10 +68,10 @@ class FingerprintMatchesResult implements ModelInterface, ArrayAccess, JsonSeria ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'is_cache_built' => null, 'exact_matches' => null, @@ -83,10 +83,10 @@ class FingerprintMatchesResult implements ModelInterface, ArrayAccess, JsonSeria ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'is_cache_built' => false, 'exact_matches' => false, @@ -98,16 +98,14 @@ class FingerprintMatchesResult implements ModelInterface, ArrayAccess, JsonSeria ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -115,9 +113,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -155,10 +151,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -166,10 +159,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -223,10 +213,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -234,9 +221,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -244,9 +229,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -254,9 +237,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -288,14 +269,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -306,9 +287,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -318,10 +297,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -520,7 +496,7 @@ public function setUnmatchedFingerprints(?array $unmatched_fingerprints): static /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -532,7 +508,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -545,7 +521,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -562,7 +538,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/FolderFingerprint.php b/src/Model/FolderFingerprint.php index 7c5ce36..cc5956a 100644 --- a/src/Model/FolderFingerprint.php +++ b/src/Model/FolderFingerprint.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,53 +46,51 @@ class FolderFingerprint implements ModelInterface, ArrayAccess, JsonSerializable public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'FolderFingerprint'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'foldername' => 'string', 'fingerprints' => 'int[]' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'foldername' => null, 'fingerprints' => 'int64' ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'foldername' => false, 'fingerprints' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -100,9 +98,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -140,10 +136,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -151,10 +144,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -193,10 +183,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -204,9 +191,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -214,9 +199,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -224,9 +207,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -253,14 +234,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -271,9 +252,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -283,10 +262,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -350,7 +326,7 @@ public function setFingerprints(?array $fingerprints): static /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -362,7 +338,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -375,7 +351,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -392,7 +368,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/Game.php b/src/Model/Game.php index 22282c6..ef76289 100644 --- a/src/Model/Game.php +++ b/src/Model/Game.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,17 +46,17 @@ class Game implements ModelInterface, ArrayAccess, JsonSerializable public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'Game'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'id' => 'int', 'name' => 'string', @@ -64,14 +64,15 @@ class Game implements ModelInterface, ArrayAccess, JsonSerializable 'date_modified' => '\DateTime', 'assets' => '\Aternos\CurseForgeApi\Model\GameAssets', 'status' => '\Aternos\CurseForgeApi\Model\CoreStatus', - 'api_status' => '\Aternos\CurseForgeApi\Model\CoreApiStatus' + 'api_status' => '\Aternos\CurseForgeApi\Model\CoreApiStatus', + 'supported_features' => '\Aternos\CurseForgeApi\Model\GameSupportedFeatures' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'id' => 'int32', 'name' => null, @@ -79,14 +80,15 @@ class Game implements ModelInterface, ArrayAccess, JsonSerializable 'date_modified' => 'date-time', 'assets' => null, 'status' => null, - 'api_status' => null + 'api_status' => null, + 'supported_features' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'id' => false, 'name' => false, @@ -94,20 +96,19 @@ class Game implements ModelInterface, ArrayAccess, JsonSerializable 'date_modified' => false, 'assets' => false, 'status' => false, - 'api_status' => false + 'api_status' => false, + 'supported_features' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -115,9 +116,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -155,10 +154,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -166,10 +162,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -189,7 +182,8 @@ public function isNullableSetToNull(string $property): bool 'date_modified' => 'dateModified', 'assets' => 'assets', 'status' => 'status', - 'api_status' => 'apiStatus' + 'api_status' => 'apiStatus', + 'supported_features' => 'supportedFeatures' ]; /** @@ -204,7 +198,8 @@ public function isNullableSetToNull(string $property): bool 'date_modified' => 'setDateModified', 'assets' => 'setAssets', 'status' => 'setStatus', - 'api_status' => 'setApiStatus' + 'api_status' => 'setApiStatus', + 'supported_features' => 'setSupportedFeatures' ]; /** @@ -219,14 +214,12 @@ public function isNullableSetToNull(string $property): bool 'date_modified' => 'getDateModified', 'assets' => 'getAssets', 'status' => 'getStatus', - 'api_status' => 'getApiStatus' + 'api_status' => 'getApiStatus', + 'supported_features' => 'getSupportedFeatures' ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -234,9 +227,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -244,9 +235,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -254,9 +243,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -285,17 +272,18 @@ public function __construct(?array $data = null) $this->setIfExists('assets', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); $this->setIfExists('api_status', $data ?? [], null); + $this->setIfExists('supported_features', $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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -306,9 +294,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -318,10 +304,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -517,10 +500,37 @@ public function setApiStatus(?\Aternos\CurseForgeApi\Model\CoreApiStatus $api_st return $this; } + + /** + * Gets supported_features + * + * @return \Aternos\CurseForgeApi\Model\GameSupportedFeatures|null + */ + public function getSupportedFeatures(): ?\Aternos\CurseForgeApi\Model\GameSupportedFeatures + { + return $this->container['supported_features']; + } + + /** + * Sets supported_features + * + * @param \Aternos\CurseForgeApi\Model\GameSupportedFeatures|null $supported_features supported_features + * + * @return $this + */ + public function setSupportedFeatures(?\Aternos\CurseForgeApi\Model\GameSupportedFeatures $supported_features): static + { + if (is_null($supported_features)) { + throw new InvalidArgumentException('non-nullable supported_features cannot be null'); + } + $this->container['supported_features'] = $supported_features; + + return $this; + } /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -532,7 +542,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -545,7 +555,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -562,7 +572,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/GameAssets.php b/src/Model/GameAssets.php index 6697494..6111d60 100644 --- a/src/Model/GameAssets.php +++ b/src/Model/GameAssets.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,17 +46,17 @@ class GameAssets implements ModelInterface, ArrayAccess, JsonSerializable public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'GameAssets'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'icon_url' => 'string', 'tile_url' => 'string', @@ -64,10 +64,10 @@ class GameAssets implements ModelInterface, ArrayAccess, JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'icon_url' => 'uri', 'tile_url' => 'uri', @@ -75,10 +75,10 @@ class GameAssets implements ModelInterface, ArrayAccess, JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'icon_url' => false, 'tile_url' => false, @@ -86,16 +86,14 @@ class GameAssets implements ModelInterface, ArrayAccess, JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -103,9 +101,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -143,10 +139,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -154,10 +147,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -199,10 +189,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -210,9 +197,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -220,9 +205,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -230,9 +213,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -260,14 +241,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -278,9 +259,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -290,10 +269,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -384,7 +360,7 @@ public function setCoverUrl(?string $cover_url): static /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -396,7 +372,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -409,7 +385,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -426,7 +402,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/GameSupportedFeatures.php b/src/Model/GameSupportedFeatures.php new file mode 100644 index 0000000..98ba72f --- /dev/null +++ b/src/Model/GameSupportedFeatures.php @@ -0,0 +1,383 @@ + + */ +class GameSupportedFeatures implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'GameSupportedFeatures'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'support_mod_subscriptions' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'support_mod_subscriptions' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'support_mod_subscriptions' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + 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 array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + 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 array + */ + protected static array $attributeMap = [ + 'support_mod_subscriptions' => 'supportModSubscriptions' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'support_mod_subscriptions' => 'setSupportModSubscriptions' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'support_mod_subscriptions' => 'getSupportModSubscriptions' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('support_mod_subscriptions', $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, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets support_mod_subscriptions + * + * @return bool|null + */ + public function getSupportModSubscriptions(): ?bool + { + return $this->container['support_mod_subscriptions']; + } + + /** + * Sets support_mod_subscriptions + * + * @param bool|null $support_mod_subscriptions Whether mod subscriptions are supported for this game + * + * @return $this + */ + public function setSupportModSubscriptions(?bool $support_mod_subscriptions): static + { + if (is_null($support_mod_subscriptions)) { + throw new InvalidArgumentException('non-nullable support_mod_subscriptions cannot be null'); + } + $this->container['support_mod_subscriptions'] = $support_mod_subscriptions; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $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(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/GameVersion.php b/src/Model/GameVersion.php index f9b131b..e84a1c7 100644 --- a/src/Model/GameVersion.php +++ b/src/Model/GameVersion.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,17 +46,17 @@ class GameVersion implements ModelInterface, ArrayAccess, JsonSerializable public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'GameVersion'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'id' => 'int', 'name' => 'string', @@ -64,10 +64,10 @@ class GameVersion implements ModelInterface, ArrayAccess, JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'id' => 'int32', 'name' => null, @@ -75,10 +75,10 @@ class GameVersion implements ModelInterface, ArrayAccess, JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'id' => false, 'name' => false, @@ -86,16 +86,14 @@ class GameVersion implements ModelInterface, ArrayAccess, JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -103,9 +101,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -143,10 +139,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -154,10 +147,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -199,10 +189,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -210,9 +197,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -220,9 +205,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -230,9 +213,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -260,14 +241,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -278,9 +259,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -290,10 +269,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -384,7 +360,7 @@ public function setSlug(?string $slug): static /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -396,7 +372,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -409,7 +385,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -426,7 +402,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/GameVersionStatus.php b/src/Model/GameVersionStatus.php index 8ba44f2..1153999 100644 --- a/src/Model/GameVersionStatus.php +++ b/src/Model/GameVersionStatus.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** diff --git a/src/Model/GameVersionType.php b/src/Model/GameVersionType.php index 83db0e4..b7f0efc 100644 --- a/src/Model/GameVersionType.php +++ b/src/Model/GameVersionType.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,17 +46,17 @@ class GameVersionType implements ModelInterface, ArrayAccess, JsonSerializable public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'GameVersionType'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'id' => 'int', 'game_id' => 'int', @@ -67,10 +67,10 @@ class GameVersionType implements ModelInterface, ArrayAccess, JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'id' => 'int32', 'game_id' => 'int32', @@ -81,10 +81,10 @@ class GameVersionType implements ModelInterface, ArrayAccess, JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'id' => false, 'game_id' => false, @@ -95,16 +95,14 @@ class GameVersionType implements ModelInterface, ArrayAccess, JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -112,9 +110,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -152,10 +148,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -163,10 +156,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -217,10 +207,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -228,9 +215,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -238,9 +223,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -248,9 +231,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -281,14 +262,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -299,9 +280,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -311,10 +290,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -486,7 +462,7 @@ public function setStatus(?\Aternos\CurseForgeApi\Model\GameVersionTypeStatus $s /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -498,7 +474,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -511,7 +487,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -528,7 +504,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/GameVersionTypeStatus.php b/src/Model/GameVersionTypeStatus.php index a7ed561..cbe9310 100644 --- a/src/Model/GameVersionTypeStatus.php +++ b/src/Model/GameVersionTypeStatus.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** diff --git a/src/Model/GameVersionsByType.php b/src/Model/GameVersionsByType.php index 574b309..d646a16 100644 --- a/src/Model/GameVersionsByType.php +++ b/src/Model/GameVersionsByType.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,53 +46,51 @@ class GameVersionsByType implements ModelInterface, ArrayAccess, JsonSerializabl public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'GameVersionsByType'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'type' => 'int', 'versions' => 'string[]' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'type' => 'int32', 'versions' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'type' => false, 'versions' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -100,9 +98,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -140,10 +136,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -151,10 +144,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -193,10 +183,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -204,9 +191,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -214,9 +199,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -224,9 +207,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -253,14 +234,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -271,9 +252,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -283,10 +262,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -350,7 +326,7 @@ public function setVersions(?array $versions): static /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -362,7 +338,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -375,7 +351,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -392,7 +368,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/GameVersionsByTypeV2.php b/src/Model/GameVersionsByTypeV2.php index a3bb957..1fe9586 100644 --- a/src/Model/GameVersionsByTypeV2.php +++ b/src/Model/GameVersionsByTypeV2.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,53 +46,51 @@ class GameVersionsByTypeV2 implements ModelInterface, ArrayAccess, JsonSerializa public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'GameVersionsByTypeV2'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'type' => 'int', 'versions' => '\Aternos\CurseForgeApi\Model\GameVersion[]' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'type' => 'int32', 'versions' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'type' => false, 'versions' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -100,9 +98,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -140,10 +136,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -151,10 +144,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -193,10 +183,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -204,9 +191,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -214,9 +199,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -224,9 +207,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -253,14 +234,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -271,9 +252,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -283,10 +262,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -350,7 +326,7 @@ public function setVersions(?array $versions): static /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -362,7 +338,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -375,7 +351,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -392,7 +368,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/GetCategoriesResponse.php b/src/Model/GetCategoriesResponse.php index 4a2d6b3..2d7e262 100644 --- a/src/Model/GetCategoriesResponse.php +++ b/src/Model/GetCategoriesResponse.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,50 +46,48 @@ class GetCategoriesResponse implements ModelInterface, ArrayAccess, JsonSerializ public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'GetCategoriesResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'data' => '\Aternos\CurseForgeApi\Model\Category[]' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'data' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'data' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -97,9 +95,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -137,10 +133,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -148,10 +141,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -187,10 +177,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -198,9 +185,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -208,9 +193,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -218,9 +201,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -246,14 +227,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -264,9 +245,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -276,10 +255,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -316,7 +292,7 @@ public function setData(?array $data): static /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -328,7 +304,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -341,7 +317,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -358,7 +334,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/GetFeaturedModsRequestBody.php b/src/Model/GetFeaturedModsRequestBody.php index aa7ef27..bd7e0c6 100644 --- a/src/Model/GetFeaturedModsRequestBody.php +++ b/src/Model/GetFeaturedModsRequestBody.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,56 +46,57 @@ class GetFeaturedModsRequestBody implements ModelInterface, ArrayAccess, JsonSer public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'GetFeaturedModsRequestBody'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'game_id' => 'int', 'excluded_mod_ids' => 'int[]', - 'game_version_type_id' => 'int' + 'game_version_type_id' => 'int', + 'client_compatible' => 'bool' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'game_id' => 'int32', 'excluded_mod_ids' => 'int64', - 'game_version_type_id' => 'int32' + 'game_version_type_id' => 'int32', + 'client_compatible' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'game_id' => false, 'excluded_mod_ids' => false, - 'game_version_type_id' => true + 'game_version_type_id' => true, + 'client_compatible' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -103,9 +104,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -143,10 +142,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -154,10 +150,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -173,7 +166,8 @@ public function isNullableSetToNull(string $property): bool protected static array $attributeMap = [ 'game_id' => 'gameId', 'excluded_mod_ids' => 'excludedModIds', - 'game_version_type_id' => 'gameVersionTypeId' + 'game_version_type_id' => 'gameVersionTypeId', + 'client_compatible' => 'clientCompatible' ]; /** @@ -184,7 +178,8 @@ public function isNullableSetToNull(string $property): bool protected static array $setters = [ 'game_id' => 'setGameId', 'excluded_mod_ids' => 'setExcludedModIds', - 'game_version_type_id' => 'setGameVersionTypeId' + 'game_version_type_id' => 'setGameVersionTypeId', + 'client_compatible' => 'setClientCompatible' ]; /** @@ -195,14 +190,12 @@ public function isNullableSetToNull(string $property): bool protected static array $getters = [ 'game_id' => 'getGameId', 'excluded_mod_ids' => 'getExcludedModIds', - 'game_version_type_id' => 'getGameVersionTypeId' + 'game_version_type_id' => 'getGameVersionTypeId', + 'client_compatible' => 'getClientCompatible' ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -210,9 +203,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -220,9 +211,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -230,9 +219,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -257,17 +244,18 @@ public function __construct(?array $data = null) $this->setIfExists('game_id', $data ?? [], null); $this->setIfExists('excluded_mod_ids', $data ?? [], null); $this->setIfExists('game_version_type_id', $data ?? [], null); + $this->setIfExists('client_compatible', $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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -278,9 +266,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -290,10 +276,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -388,10 +371,37 @@ public function setGameVersionTypeId(?int $game_version_type_id): static return $this; } + + /** + * Gets client_compatible + * + * @return bool|null + */ + public function getClientCompatible(): ?bool + { + return $this->container['client_compatible']; + } + + /** + * Sets client_compatible + * + * @param bool|null $client_compatible client_compatible + * + * @return $this + */ + public function setClientCompatible(?bool $client_compatible): static + { + if (is_null($client_compatible)) { + throw new InvalidArgumentException('non-nullable client_compatible cannot be null'); + } + $this->container['client_compatible'] = $client_compatible; + + return $this; + } /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -403,7 +413,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -416,7 +426,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -433,7 +443,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/GetFeaturedModsResponse.php b/src/Model/GetFeaturedModsResponse.php index 69df96c..bb70a13 100644 --- a/src/Model/GetFeaturedModsResponse.php +++ b/src/Model/GetFeaturedModsResponse.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,50 +46,48 @@ class GetFeaturedModsResponse implements ModelInterface, ArrayAccess, JsonSerial public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'GetFeaturedModsResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'data' => '\Aternos\CurseForgeApi\Model\FeaturedModsResponse' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'data' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'data' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -97,9 +95,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -137,10 +133,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -148,10 +141,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -187,10 +177,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -198,9 +185,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -208,9 +193,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -218,9 +201,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -246,14 +227,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -264,9 +245,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -276,10 +255,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -316,7 +292,7 @@ public function setData(?\Aternos\CurseForgeApi\Model\FeaturedModsResponse $data /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -328,7 +304,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -341,7 +317,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -358,7 +334,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/GetFilesResponse.php b/src/Model/GetFilesResponse.php index f74abcd..232f669 100644 --- a/src/Model/GetFilesResponse.php +++ b/src/Model/GetFilesResponse.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,50 +46,48 @@ class GetFilesResponse implements ModelInterface, ArrayAccess, JsonSerializable public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'GetFilesResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'data' => '\Aternos\CurseForgeApi\Model\File[]' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'data' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'data' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -97,9 +95,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -137,10 +133,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -148,10 +141,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -187,10 +177,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -198,9 +185,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -208,9 +193,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -218,9 +201,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -246,14 +227,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -264,9 +245,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -276,10 +255,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -316,7 +292,7 @@ public function setData(?array $data): static /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -328,7 +304,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -341,7 +317,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -358,7 +334,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/GetFingerprintFuzzyMatchesResponse.php b/src/Model/GetFingerprintFuzzyMatchesResponse.php index 6d017c0..8315b2a 100644 --- a/src/Model/GetFingerprintFuzzyMatchesResponse.php +++ b/src/Model/GetFingerprintFuzzyMatchesResponse.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,50 +46,48 @@ class GetFingerprintFuzzyMatchesResponse implements ModelInterface, ArrayAccess, public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'GetFingerprintFuzzyMatchesResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'data' => '\Aternos\CurseForgeApi\Model\FingerprintFuzzyMatchResult' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'data' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'data' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -97,9 +95,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -137,10 +133,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -148,10 +141,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -187,10 +177,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -198,9 +185,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -208,9 +193,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -218,9 +201,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -246,14 +227,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -264,9 +245,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -276,10 +255,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -316,7 +292,7 @@ public function setData(?\Aternos\CurseForgeApi\Model\FingerprintFuzzyMatchResul /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -328,7 +304,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -341,7 +317,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -358,7 +334,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/GetFingerprintMatchesRequestBody.php b/src/Model/GetFingerprintMatchesRequestBody.php index 03d4314..c0c971a 100644 --- a/src/Model/GetFingerprintMatchesRequestBody.php +++ b/src/Model/GetFingerprintMatchesRequestBody.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,50 +46,48 @@ class GetFingerprintMatchesRequestBody implements ModelInterface, ArrayAccess, J public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'GetFingerprintMatchesRequestBody'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'fingerprints' => 'int[]' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'fingerprints' => 'int64' ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'fingerprints' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -97,9 +95,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -137,10 +133,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -148,10 +141,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -187,10 +177,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -198,9 +185,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -208,9 +193,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -218,9 +201,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -246,14 +227,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -264,9 +245,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -276,10 +255,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -316,7 +292,7 @@ public function setFingerprints(?array $fingerprints): static /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -328,7 +304,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -341,7 +317,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -358,7 +334,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/GetFingerprintMatchesResponse.php b/src/Model/GetFingerprintMatchesResponse.php index bd51317..5332f7e 100644 --- a/src/Model/GetFingerprintMatchesResponse.php +++ b/src/Model/GetFingerprintMatchesResponse.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,50 +46,48 @@ class GetFingerprintMatchesResponse implements ModelInterface, ArrayAccess, Json public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'GetFingerprintMatchesResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'data' => '\Aternos\CurseForgeApi\Model\FingerprintMatchesResult' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'data' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'data' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -97,9 +95,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -137,10 +133,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -148,10 +141,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -187,10 +177,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -198,9 +185,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -208,9 +193,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -218,9 +201,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -246,14 +227,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -264,9 +245,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -276,10 +255,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -316,7 +292,7 @@ public function setData(?\Aternos\CurseForgeApi\Model\FingerprintMatchesResult $ /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -328,7 +304,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -341,7 +317,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -358,7 +334,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/GetFuzzyMatchesRequestBody.php b/src/Model/GetFuzzyMatchesRequestBody.php index 982019d..d4668c6 100644 --- a/src/Model/GetFuzzyMatchesRequestBody.php +++ b/src/Model/GetFuzzyMatchesRequestBody.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,53 +46,51 @@ class GetFuzzyMatchesRequestBody implements ModelInterface, ArrayAccess, JsonSer public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'GetFuzzyMatchesRequestBody'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'game_id' => 'int', 'fingerprints' => '\Aternos\CurseForgeApi\Model\FolderFingerprint[]' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'game_id' => 'int32', 'fingerprints' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'game_id' => false, 'fingerprints' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -100,9 +98,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -140,10 +136,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -151,10 +144,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -193,10 +183,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -204,9 +191,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -214,9 +199,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -224,9 +207,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -253,14 +234,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -271,9 +252,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -283,10 +262,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -350,7 +326,7 @@ public function setFingerprints(?array $fingerprints): static /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -362,7 +338,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -375,7 +351,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -392,7 +368,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/GetGameResponse.php b/src/Model/GetGameResponse.php index 1599c4c..d138e34 100644 --- a/src/Model/GetGameResponse.php +++ b/src/Model/GetGameResponse.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,50 +46,48 @@ class GetGameResponse implements ModelInterface, ArrayAccess, JsonSerializable public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'GetGameResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'data' => '\Aternos\CurseForgeApi\Model\Game' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'data' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'data' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -97,9 +95,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -137,10 +133,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -148,10 +141,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -187,10 +177,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -198,9 +185,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -208,9 +193,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -218,9 +201,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -246,14 +227,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -264,9 +245,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -276,10 +255,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -316,7 +292,7 @@ public function setData(?\Aternos\CurseForgeApi\Model\Game $data): static /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -328,7 +304,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -341,7 +317,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -358,7 +334,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/GetGamesResponse.php b/src/Model/GetGamesResponse.php index 5788275..9e24043 100644 --- a/src/Model/GetGamesResponse.php +++ b/src/Model/GetGamesResponse.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,53 +46,51 @@ class GetGamesResponse implements ModelInterface, ArrayAccess, JsonSerializable public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'GetGamesResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'data' => '\Aternos\CurseForgeApi\Model\Game[]', 'pagination' => '\Aternos\CurseForgeApi\Model\Pagination' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'data' => null, 'pagination' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'data' => false, 'pagination' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -100,9 +98,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -140,10 +136,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -151,10 +144,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -193,10 +183,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -204,9 +191,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -214,9 +199,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -224,9 +207,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -253,14 +234,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -271,9 +252,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -283,10 +262,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -350,7 +326,7 @@ public function setPagination(?\Aternos\CurseForgeApi\Model\Pagination $paginati /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -362,7 +338,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -375,7 +351,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -392,7 +368,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/GetModFileChangelogResponse.php b/src/Model/GetModFileChangelogResponse.php index 1713afc..661e143 100644 --- a/src/Model/GetModFileChangelogResponse.php +++ b/src/Model/GetModFileChangelogResponse.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,50 +46,48 @@ class GetModFileChangelogResponse implements ModelInterface, ArrayAccess, JsonSe public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'GetModFileChangelogResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'data' => 'string' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'data' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'data' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -97,9 +95,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -137,10 +133,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -148,10 +141,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -187,10 +177,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -198,9 +185,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -208,9 +193,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -218,9 +201,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -246,14 +227,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -264,9 +245,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -276,10 +255,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -316,7 +292,7 @@ public function setData(?string $data): static /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -328,7 +304,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -341,7 +317,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -358,7 +334,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/GetModFileDownloadURLResponse.php b/src/Model/GetModFileDownloadURLResponse.php index d855ee0..e487695 100644 --- a/src/Model/GetModFileDownloadURLResponse.php +++ b/src/Model/GetModFileDownloadURLResponse.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,50 +46,48 @@ class GetModFileDownloadURLResponse implements ModelInterface, ArrayAccess, Json public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'GetModFileDownloadURLResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'data' => 'string' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'data' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'data' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -97,9 +95,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -137,10 +133,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -148,10 +141,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -187,10 +177,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -198,9 +185,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -208,9 +193,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -218,9 +201,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -246,14 +227,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -264,9 +245,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -276,10 +255,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -316,7 +292,7 @@ public function setData(?string $data): static /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -328,7 +304,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -341,7 +317,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -358,7 +334,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/GetModFileResponse.php b/src/Model/GetModFileResponse.php index 1caada0..04fa806 100644 --- a/src/Model/GetModFileResponse.php +++ b/src/Model/GetModFileResponse.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,50 +46,48 @@ class GetModFileResponse implements ModelInterface, ArrayAccess, JsonSerializabl public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'GetModFileResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'data' => '\Aternos\CurseForgeApi\Model\File' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'data' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'data' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -97,9 +95,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -137,10 +133,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -148,10 +141,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -187,10 +177,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -198,9 +185,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -208,9 +193,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -218,9 +201,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -246,14 +227,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -264,9 +245,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -276,10 +255,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -316,7 +292,7 @@ public function setData(?\Aternos\CurseForgeApi\Model\File $data): static /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -328,7 +304,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -341,7 +317,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -358,7 +334,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/GetModFilesRequestBody.php b/src/Model/GetModFilesRequestBody.php index bd10734..5b43933 100644 --- a/src/Model/GetModFilesRequestBody.php +++ b/src/Model/GetModFilesRequestBody.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,50 +46,48 @@ class GetModFilesRequestBody implements ModelInterface, ArrayAccess, JsonSeriali public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'GetModFilesRequestBody'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'file_ids' => 'int[]' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'file_ids' => 'int32' ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'file_ids' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -97,9 +95,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -137,10 +133,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -148,10 +141,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -187,10 +177,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -198,9 +185,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -208,9 +193,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -218,9 +201,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -246,14 +227,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -264,9 +245,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -276,10 +255,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -316,7 +292,7 @@ public function setFileIds(?array $file_ids): static /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -328,7 +304,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -341,7 +317,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -358,7 +334,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/GetModFilesResponse.php b/src/Model/GetModFilesResponse.php index cb4c427..cbe8bbe 100644 --- a/src/Model/GetModFilesResponse.php +++ b/src/Model/GetModFilesResponse.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,53 +46,51 @@ class GetModFilesResponse implements ModelInterface, ArrayAccess, JsonSerializab public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'GetModFilesResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'data' => '\Aternos\CurseForgeApi\Model\File[]', 'pagination' => '\Aternos\CurseForgeApi\Model\Pagination' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'data' => null, 'pagination' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'data' => false, 'pagination' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -100,9 +98,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -140,10 +136,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -151,10 +144,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -193,10 +183,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -204,9 +191,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -214,9 +199,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -224,9 +207,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -253,14 +234,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -271,9 +252,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -283,10 +262,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -350,7 +326,7 @@ public function setPagination(?\Aternos\CurseForgeApi\Model\Pagination $paginati /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -362,7 +338,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -375,7 +351,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -392,7 +368,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/GetModResponse.php b/src/Model/GetModResponse.php index f89b772..1520892 100644 --- a/src/Model/GetModResponse.php +++ b/src/Model/GetModResponse.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,50 +46,48 @@ class GetModResponse implements ModelInterface, ArrayAccess, JsonSerializable public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'GetModResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'data' => '\Aternos\CurseForgeApi\Model\Mod' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'data' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'data' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -97,9 +95,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -137,10 +133,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -148,10 +141,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -187,10 +177,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -198,9 +185,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -208,9 +193,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -218,9 +201,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -246,14 +227,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -264,9 +245,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -276,10 +255,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -316,7 +292,7 @@ public function setData(?\Aternos\CurseForgeApi\Model\Mod $data): static /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -328,7 +304,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -341,7 +317,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -358,7 +334,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/GetModsByIdsListRequestBody.php b/src/Model/GetModsByIdsListRequestBody.php index 4296df9..75025b1 100644 --- a/src/Model/GetModsByIdsListRequestBody.php +++ b/src/Model/GetModsByIdsListRequestBody.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,50 +46,54 @@ class GetModsByIdsListRequestBody implements ModelInterface, ArrayAccess, JsonSe public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'GetModsByIdsListRequestBody'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ - 'mod_ids' => 'int[]' + 'mod_ids' => 'int[]', + 'dev_mod_ids' => 'int[]', + 'filter_pc_only' => 'bool' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ - 'mod_ids' => 'int64' + 'mod_ids' => 'int64', + 'dev_mod_ids' => 'int32', + 'filter_pc_only' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ - 'mod_ids' => false + 'mod_ids' => false, + 'dev_mod_ids' => false, + 'filter_pc_only' => true ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -97,9 +101,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -137,10 +139,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -148,10 +147,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -165,7 +161,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'mod_ids' => 'modIds' + 'mod_ids' => 'modIds', + 'dev_mod_ids' => 'devModIds', + 'filter_pc_only' => 'filterPcOnly' ]; /** @@ -174,7 +172,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'mod_ids' => 'setModIds' + 'mod_ids' => 'setModIds', + 'dev_mod_ids' => 'setDevModIds', + 'filter_pc_only' => 'setFilterPcOnly' ]; /** @@ -183,14 +183,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'mod_ids' => 'getModIds' + 'mod_ids' => 'getModIds', + 'dev_mod_ids' => 'getDevModIds', + 'filter_pc_only' => 'getFilterPcOnly' ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -198,9 +197,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -208,9 +205,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -218,9 +213,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -243,17 +236,19 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('mod_ids', $data ?? [], null); + $this->setIfExists('dev_mod_ids', $data ?? [], null); + $this->setIfExists('filter_pc_only', $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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -264,9 +259,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -276,10 +269,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -313,10 +303,71 @@ public function setModIds(?array $mod_ids): static return $this; } + + /** + * Gets dev_mod_ids + * + * @return int[]|null + */ + public function getDevModIds(): ?array + { + return $this->container['dev_mod_ids']; + } + + /** + * Sets dev_mod_ids + * + * @param int[]|null $dev_mod_ids dev_mod_ids + * + * @return $this + */ + public function setDevModIds(?array $dev_mod_ids): static + { + if (is_null($dev_mod_ids)) { + throw new InvalidArgumentException('non-nullable dev_mod_ids cannot be null'); + } + $this->container['dev_mod_ids'] = $dev_mod_ids; + + return $this; + } + + /** + * Gets filter_pc_only + * + * @return bool|null + */ + public function getFilterPcOnly(): ?bool + { + return $this->container['filter_pc_only']; + } + + /** + * Sets filter_pc_only + * + * @param bool|null $filter_pc_only filter_pc_only + * + * @return $this + */ + public function setFilterPcOnly(?bool $filter_pc_only): static + { + if (is_null($filter_pc_only)) { + array_push($this->openAPINullablesSetToNull, 'filter_pc_only'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('filter_pc_only', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['filter_pc_only'] = $filter_pc_only; + + return $this; + } /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -328,7 +379,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -341,7 +392,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -358,7 +409,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/GetModsResponse.php b/src/Model/GetModsResponse.php index da39431..c0a947e 100644 --- a/src/Model/GetModsResponse.php +++ b/src/Model/GetModsResponse.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,50 +46,48 @@ class GetModsResponse implements ModelInterface, ArrayAccess, JsonSerializable public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'GetModsResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'data' => '\Aternos\CurseForgeApi\Model\Mod[]' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'data' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'data' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -97,9 +95,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -137,10 +133,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -148,10 +141,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -187,10 +177,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -198,9 +185,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -208,9 +193,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -218,9 +201,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -246,14 +227,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -264,9 +245,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -276,10 +255,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -316,7 +292,7 @@ public function setData(?array $data): static /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -328,7 +304,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -341,7 +317,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -358,7 +334,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/GetVersionTypesResponse.php b/src/Model/GetVersionTypesResponse.php index c9a22dd..fd7d9a2 100644 --- a/src/Model/GetVersionTypesResponse.php +++ b/src/Model/GetVersionTypesResponse.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,50 +46,48 @@ class GetVersionTypesResponse implements ModelInterface, ArrayAccess, JsonSerial public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'GetVersionTypesResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'data' => '\Aternos\CurseForgeApi\Model\GameVersionType[]' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'data' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'data' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -97,9 +95,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -137,10 +133,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -148,10 +141,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -187,10 +177,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -198,9 +185,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -208,9 +193,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -218,9 +201,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -246,14 +227,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -264,9 +245,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -276,10 +255,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -316,7 +292,7 @@ public function setData(?array $data): static /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -328,7 +304,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -341,7 +317,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -358,7 +334,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/GetVersionsResponse.php b/src/Model/GetVersionsResponse.php index b2ec052..ac3a7ef 100644 --- a/src/Model/GetVersionsResponse.php +++ b/src/Model/GetVersionsResponse.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,50 +46,48 @@ class GetVersionsResponse implements ModelInterface, ArrayAccess, JsonSerializab public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'GetVersionsResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'data' => '\Aternos\CurseForgeApi\Model\GameVersionsByType[]' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'data' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'data' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -97,9 +95,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -137,10 +133,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -148,10 +141,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -187,10 +177,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -198,9 +185,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -208,9 +193,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -218,9 +201,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -246,14 +227,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -264,9 +245,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -276,10 +255,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -316,7 +292,7 @@ public function setData(?array $data): static /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -328,7 +304,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -341,7 +317,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -358,7 +334,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/GetVersionsV2Response.php b/src/Model/GetVersionsV2Response.php index 41e8536..b5a9229 100644 --- a/src/Model/GetVersionsV2Response.php +++ b/src/Model/GetVersionsV2Response.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,50 +46,48 @@ class GetVersionsV2Response implements ModelInterface, ArrayAccess, JsonSerializ public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'GetVersionsV2Response'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'data' => '\Aternos\CurseForgeApi\Model\GameVersionsByTypeV2[]' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'data' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'data' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -97,9 +95,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -137,10 +133,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -148,10 +141,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -187,10 +177,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -198,9 +185,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -208,9 +193,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -218,9 +201,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -246,14 +227,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -264,9 +245,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -276,10 +255,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -316,7 +292,7 @@ public function setData(?array $data): static /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -328,7 +304,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -341,7 +317,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -358,7 +334,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/HashAlgo.php b/src/Model/HashAlgo.php index a21d2a3..ab2e668 100644 --- a/src/Model/HashAlgo.php +++ b/src/Model/HashAlgo.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** diff --git a/src/Model/MinecraftGameVersion.php b/src/Model/MinecraftGameVersion.php index b52f78b..837ca28 100644 --- a/src/Model/MinecraftGameVersion.php +++ b/src/Model/MinecraftGameVersion.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,17 +46,17 @@ class MinecraftGameVersion implements ModelInterface, ArrayAccess, JsonSerializa public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'MinecraftGameVersion'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'id' => 'int', 'game_version_id' => 'int', @@ -71,10 +71,10 @@ class MinecraftGameVersion implements ModelInterface, ArrayAccess, JsonSerializa ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'id' => 'int32', 'game_version_id' => 'int32', @@ -89,10 +89,10 @@ class MinecraftGameVersion implements ModelInterface, ArrayAccess, JsonSerializa ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'id' => false, 'game_version_id' => false, @@ -107,16 +107,14 @@ class MinecraftGameVersion implements ModelInterface, ArrayAccess, JsonSerializa ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -124,9 +122,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -164,10 +160,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -175,10 +168,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -241,10 +231,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -252,9 +239,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -262,9 +247,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -272,9 +255,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -309,14 +290,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -327,9 +308,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -339,10 +318,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -622,7 +598,7 @@ public function setGameVersionTypeStatus(?\Aternos\CurseForgeApi\Model\GameVersi /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -634,7 +610,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -647,7 +623,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -664,7 +640,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/MinecraftModLoaderIndex.php b/src/Model/MinecraftModLoaderIndex.php index bd2bb70..c1e9401 100644 --- a/src/Model/MinecraftModLoaderIndex.php +++ b/src/Model/MinecraftModLoaderIndex.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,17 +46,17 @@ class MinecraftModLoaderIndex implements ModelInterface, ArrayAccess, JsonSerial public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'MinecraftModLoaderIndex'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'name' => 'string', 'game_version' => 'string', @@ -67,10 +67,10 @@ class MinecraftModLoaderIndex implements ModelInterface, ArrayAccess, JsonSerial ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'name' => null, 'game_version' => null, @@ -81,10 +81,10 @@ class MinecraftModLoaderIndex implements ModelInterface, ArrayAccess, JsonSerial ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'name' => false, 'game_version' => false, @@ -95,16 +95,14 @@ class MinecraftModLoaderIndex implements ModelInterface, ArrayAccess, JsonSerial ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -112,9 +110,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -152,10 +148,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -163,10 +156,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -217,10 +207,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -228,9 +215,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -238,9 +223,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -248,9 +231,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -281,14 +262,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -299,9 +280,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -311,10 +290,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -486,7 +462,7 @@ public function setType(?\Aternos\CurseForgeApi\Model\ModLoaderType $type): stat /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -498,7 +474,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -511,7 +487,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -528,7 +504,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/MinecraftModLoaderVersion.php b/src/Model/MinecraftModLoaderVersion.php index d2451c6..9f55ed2 100644 --- a/src/Model/MinecraftModLoaderVersion.php +++ b/src/Model/MinecraftModLoaderVersion.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,17 +46,17 @@ class MinecraftModLoaderVersion implements ModelInterface, ArrayAccess, JsonSeri public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'MinecraftModLoaderVersion'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'id' => 'int', 'game_version_id' => 'int', @@ -88,10 +88,10 @@ class MinecraftModLoaderVersion implements ModelInterface, ArrayAccess, JsonSeri ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'id' => 'int32', 'game_version_id' => 'int32', @@ -123,10 +123,10 @@ class MinecraftModLoaderVersion implements ModelInterface, ArrayAccess, JsonSeri ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'id' => false, 'game_version_id' => false, @@ -158,16 +158,14 @@ class MinecraftModLoaderVersion implements ModelInterface, ArrayAccess, JsonSeri ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -175,9 +173,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -215,10 +211,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -226,10 +219,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -343,10 +333,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -354,9 +341,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -364,9 +349,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -374,9 +357,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -428,14 +409,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -446,9 +427,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -458,10 +437,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -1200,7 +1176,7 @@ public function setInstallProfileJson(?string $install_profile_json): static /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -1212,7 +1188,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -1225,7 +1201,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -1242,7 +1218,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/Mod.php b/src/Model/Mod.php index f0918c0..8aa2a91 100644 --- a/src/Model/Mod.php +++ b/src/Model/Mod.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,17 +46,17 @@ class Mod implements ModelInterface, ArrayAccess, JsonSerializable public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'Mod'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'id' => 'int', 'game_id' => 'int', @@ -76,6 +76,7 @@ class Mod implements ModelInterface, ArrayAccess, JsonSerializable 'videos' => '\Aternos\CurseForgeApi\Model\ModAsset[]', 'main_file_id' => 'int', 'latest_files' => '\Aternos\CurseForgeApi\Model\File[]', + 'supports_cross_platform' => 'bool', 'latest_files_indexes' => '\Aternos\CurseForgeApi\Model\FileIndex[]', 'latest_early_access_files_indexes' => '\Aternos\CurseForgeApi\Model\FileIndex[]', 'date_created' => '\DateTime', @@ -88,14 +89,15 @@ class Mod implements ModelInterface, ArrayAccess, JsonSerializable 'has_comments_enabled' => 'bool', 'rating_details' => '\Aternos\CurseForgeApi\Model\RatingDetails', 'server_affiliation' => '\Aternos\CurseForgeApi\Model\ServerAffiliation', - 'social_links' => '\Aternos\CurseForgeApi\Model\SocialLink[]' + 'social_links' => '\Aternos\CurseForgeApi\Model\SocialLink[]', + 'featured_project_tag' => '\Aternos\CurseForgeApi\Model\ClientFeaturedProjectTag' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'id' => 'int64', 'game_id' => 'int64', @@ -115,6 +117,7 @@ class Mod implements ModelInterface, ArrayAccess, JsonSerializable 'videos' => null, 'main_file_id' => 'int32', 'latest_files' => null, + 'supports_cross_platform' => null, 'latest_files_indexes' => null, 'latest_early_access_files_indexes' => null, 'date_created' => 'date-time', @@ -127,14 +130,15 @@ class Mod implements ModelInterface, ArrayAccess, JsonSerializable 'has_comments_enabled' => null, 'rating_details' => null, 'server_affiliation' => null, - 'social_links' => null + 'social_links' => null, + 'featured_project_tag' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'id' => false, 'game_id' => false, @@ -154,6 +158,7 @@ class Mod implements ModelInterface, ArrayAccess, JsonSerializable 'videos' => false, 'main_file_id' => false, 'latest_files' => false, + 'supports_cross_platform' => true, 'latest_files_indexes' => false, 'latest_early_access_files_indexes' => false, 'date_created' => false, @@ -166,20 +171,19 @@ class Mod implements ModelInterface, ArrayAccess, JsonSerializable 'has_comments_enabled' => true, 'rating_details' => false, 'server_affiliation' => false, - 'social_links' => false + 'social_links' => false, + 'featured_project_tag' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -187,9 +191,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -227,10 +229,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -238,10 +237,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -273,6 +269,7 @@ public function isNullableSetToNull(string $property): bool 'videos' => 'videos', 'main_file_id' => 'mainFileId', 'latest_files' => 'latestFiles', + 'supports_cross_platform' => 'supportsCrossPlatform', 'latest_files_indexes' => 'latestFilesIndexes', 'latest_early_access_files_indexes' => 'latestEarlyAccessFilesIndexes', 'date_created' => 'dateCreated', @@ -285,7 +282,8 @@ public function isNullableSetToNull(string $property): bool 'has_comments_enabled' => 'hasCommentsEnabled', 'rating_details' => 'ratingDetails', 'server_affiliation' => 'serverAffiliation', - 'social_links' => 'socialLinks' + 'social_links' => 'socialLinks', + 'featured_project_tag' => 'featuredProjectTag' ]; /** @@ -312,6 +310,7 @@ public function isNullableSetToNull(string $property): bool 'videos' => 'setVideos', 'main_file_id' => 'setMainFileId', 'latest_files' => 'setLatestFiles', + 'supports_cross_platform' => 'setSupportsCrossPlatform', 'latest_files_indexes' => 'setLatestFilesIndexes', 'latest_early_access_files_indexes' => 'setLatestEarlyAccessFilesIndexes', 'date_created' => 'setDateCreated', @@ -324,7 +323,8 @@ public function isNullableSetToNull(string $property): bool 'has_comments_enabled' => 'setHasCommentsEnabled', 'rating_details' => 'setRatingDetails', 'server_affiliation' => 'setServerAffiliation', - 'social_links' => 'setSocialLinks' + 'social_links' => 'setSocialLinks', + 'featured_project_tag' => 'setFeaturedProjectTag' ]; /** @@ -351,6 +351,7 @@ public function isNullableSetToNull(string $property): bool 'videos' => 'getVideos', 'main_file_id' => 'getMainFileId', 'latest_files' => 'getLatestFiles', + 'supports_cross_platform' => 'getSupportsCrossPlatform', 'latest_files_indexes' => 'getLatestFilesIndexes', 'latest_early_access_files_indexes' => 'getLatestEarlyAccessFilesIndexes', 'date_created' => 'getDateCreated', @@ -363,14 +364,12 @@ public function isNullableSetToNull(string $property): bool 'has_comments_enabled' => 'getHasCommentsEnabled', 'rating_details' => 'getRatingDetails', 'server_affiliation' => 'getServerAffiliation', - 'social_links' => 'getSocialLinks' + 'social_links' => 'getSocialLinks', + 'featured_project_tag' => 'getFeaturedProjectTag' ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -378,9 +377,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -388,9 +385,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -398,9 +393,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -440,6 +433,7 @@ public function __construct(?array $data = null) $this->setIfExists('videos', $data ?? [], null); $this->setIfExists('main_file_id', $data ?? [], null); $this->setIfExists('latest_files', $data ?? [], null); + $this->setIfExists('supports_cross_platform', $data ?? [], null); $this->setIfExists('latest_files_indexes', $data ?? [], null); $this->setIfExists('latest_early_access_files_indexes', $data ?? [], null); $this->setIfExists('date_created', $data ?? [], null); @@ -453,17 +447,18 @@ public function __construct(?array $data = null) $this->setIfExists('rating_details', $data ?? [], null); $this->setIfExists('server_affiliation', $data ?? [], null); $this->setIfExists('social_links', $data ?? [], null); + $this->setIfExists('featured_project_tag', $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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -474,9 +469,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -486,10 +479,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -997,6 +987,40 @@ public function setLatestFiles(?array $latest_files): static return $this; } + /** + * Gets supports_cross_platform + * + * @return bool|null + */ + public function getSupportsCrossPlatform(): ?bool + { + return $this->container['supports_cross_platform']; + } + + /** + * Sets supports_cross_platform + * + * @param bool|null $supports_cross_platform Whether the mod supports cross-platform play + * + * @return $this + */ + public function setSupportsCrossPlatform(?bool $supports_cross_platform): static + { + if (is_null($supports_cross_platform)) { + array_push($this->openAPINullablesSetToNull, 'supports_cross_platform'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('supports_cross_platform', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['supports_cross_platform'] = $supports_cross_platform; + + return $this; + } + /** * Gets latest_files_indexes * @@ -1361,10 +1385,37 @@ public function setSocialLinks(?array $social_links): static return $this; } + + /** + * Gets featured_project_tag + * + * @return \Aternos\CurseForgeApi\Model\ClientFeaturedProjectTag|null + */ + public function getFeaturedProjectTag(): ?\Aternos\CurseForgeApi\Model\ClientFeaturedProjectTag + { + return $this->container['featured_project_tag']; + } + + /** + * Sets featured_project_tag + * + * @param \Aternos\CurseForgeApi\Model\ClientFeaturedProjectTag|null $featured_project_tag featured_project_tag + * + * @return $this + */ + public function setFeaturedProjectTag(?\Aternos\CurseForgeApi\Model\ClientFeaturedProjectTag $featured_project_tag): static + { + if (is_null($featured_project_tag)) { + throw new InvalidArgumentException('non-nullable featured_project_tag cannot be null'); + } + $this->container['featured_project_tag'] = $featured_project_tag; + + return $this; + } /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -1376,7 +1427,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -1389,7 +1440,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -1406,7 +1457,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/ModAsset.php b/src/Model/ModAsset.php index 6061a15..0784def 100644 --- a/src/Model/ModAsset.php +++ b/src/Model/ModAsset.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,17 +46,17 @@ class ModAsset implements ModelInterface, ArrayAccess, JsonSerializable public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'ModAsset'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'id' => 'int', 'mod_id' => 'int', @@ -67,10 +67,10 @@ class ModAsset implements ModelInterface, ArrayAccess, JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'id' => 'int64', 'mod_id' => 'int64', @@ -81,10 +81,10 @@ class ModAsset implements ModelInterface, ArrayAccess, JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'id' => false, 'mod_id' => false, @@ -95,16 +95,14 @@ class ModAsset implements ModelInterface, ArrayAccess, JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -112,9 +110,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -152,10 +148,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -163,10 +156,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -217,10 +207,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -228,9 +215,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -238,9 +223,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -248,9 +231,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -281,14 +262,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -299,9 +280,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -311,10 +290,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -486,7 +462,7 @@ public function setUrl(?string $url): static /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -498,7 +474,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -511,7 +487,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -528,7 +504,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/ModAuthor.php b/src/Model/ModAuthor.php index bf571a2..82da2e5 100644 --- a/src/Model/ModAuthor.php +++ b/src/Model/ModAuthor.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,17 +46,17 @@ class ModAuthor implements ModelInterface, ArrayAccess, JsonSerializable public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'ModAuthor'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'id' => 'int', 'name' => 'string', @@ -65,10 +65,10 @@ class ModAuthor implements ModelInterface, ArrayAccess, JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'id' => 'int32', 'name' => null, @@ -77,10 +77,10 @@ class ModAuthor implements ModelInterface, ArrayAccess, JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'id' => false, 'name' => false, @@ -89,16 +89,14 @@ class ModAuthor implements ModelInterface, ArrayAccess, JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -106,9 +104,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -146,10 +142,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -157,10 +150,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -205,10 +195,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -216,9 +203,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -226,9 +211,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -236,9 +219,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -267,14 +248,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -285,9 +266,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -297,10 +276,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -418,7 +394,7 @@ public function setAvatarUrl(?string $avatar_url): static /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -430,7 +406,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -443,7 +419,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -460,7 +436,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/ModDescriptionResponse.php b/src/Model/ModDescriptionResponse.php index a4c0134..b2e9d55 100644 --- a/src/Model/ModDescriptionResponse.php +++ b/src/Model/ModDescriptionResponse.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,50 +46,48 @@ class ModDescriptionResponse implements ModelInterface, ArrayAccess, JsonSeriali public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'ModDescriptionResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'data' => 'string' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'data' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'data' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -97,9 +95,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -137,10 +133,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -148,10 +141,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -187,10 +177,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -198,9 +185,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -208,9 +193,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -218,9 +201,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -246,14 +227,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -264,9 +245,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -276,10 +255,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -316,7 +292,7 @@ public function setData(?string $data): static /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -328,7 +304,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -341,7 +317,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -358,7 +334,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/ModLinks.php b/src/Model/ModLinks.php index 99d29fc..1e2725d 100644 --- a/src/Model/ModLinks.php +++ b/src/Model/ModLinks.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -47,17 +47,17 @@ class ModLinks implements ModelInterface, ArrayAccess, JsonSerializable public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'ModLinks'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'website_url' => 'string', 'wiki_url' => 'string', @@ -66,10 +66,10 @@ class ModLinks implements ModelInterface, ArrayAccess, JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'website_url' => 'uri', 'wiki_url' => 'uri', @@ -78,10 +78,10 @@ class ModLinks implements ModelInterface, ArrayAccess, JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'website_url' => false, 'wiki_url' => false, @@ -90,16 +90,14 @@ class ModLinks implements ModelInterface, ArrayAccess, JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -107,9 +105,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -147,10 +143,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -158,10 +151,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -206,10 +196,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -217,9 +204,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -227,9 +212,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -237,9 +220,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -268,14 +249,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -286,9 +267,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -298,10 +277,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -419,7 +395,7 @@ public function setSourceUrl(?string $source_url): static /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -431,7 +407,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -444,7 +420,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -461,7 +437,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/ModLoaderInstallMethod.php b/src/Model/ModLoaderInstallMethod.php index 0d8e78e..6fa6af0 100644 --- a/src/Model/ModLoaderInstallMethod.php +++ b/src/Model/ModLoaderInstallMethod.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** diff --git a/src/Model/ModLoaderType.php b/src/Model/ModLoaderType.php index 4c2b637..352e9c6 100644 --- a/src/Model/ModLoaderType.php +++ b/src/Model/ModLoaderType.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** diff --git a/src/Model/ModSearchSortField.php b/src/Model/ModSearchSortField.php index 181cdaa..7a233f3 100644 --- a/src/Model/ModSearchSortField.php +++ b/src/Model/ModSearchSortField.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -30,7 +30,7 @@ /** * ModSearchSortField Class Doc Comment * - * @description Possible enum values: * 1 = Featured * 2 = Popularity * 3 = LastUpdated * 4 = Name * 5 = Author * 6 = TotalDownloads * 7 = Category * 8 = GameVersion * 9 = Early Access * 10 = Featured Release * 11 = Release Date * 12 = Rating + * @description Possible enum values: * 1 = Featured * 2 = Popularity * 3 = LastUpdated * 4 = Name * 5 = Author * 6 = TotalDownloads * 7 = Category * 8 = GameVersion * 9 = Early Access * 10 = Featured Release * 11 = Release Date * 12 = Rating * 13 = Relevancy * @package Aternos\CurseForgeApi * @author OpenAPI Generator team * @link https://openapi-generator.tech @@ -60,6 +60,8 @@ enum ModSearchSortField: int case RELEASE_DATE = 11; case RATING = 12; + + case RELEVANCY = 13; } diff --git a/src/Model/ModStatus.php b/src/Model/ModStatus.php index 232cef7..afba049 100644 --- a/src/Model/ModStatus.php +++ b/src/Model/ModStatus.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** diff --git a/src/Model/ModelInterface.php b/src/Model/ModelInterface.php index d8aec1d..c6a9f22 100644 --- a/src/Model/ModelInterface.php +++ b/src/Model/ModelInterface.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -45,42 +45,43 @@ public function getModelName(): string; /** * Array of property to type mappings. Used for (de)serialization * - * @return array + * @return array */ public static function openAPITypes(): array; /** * Array of property to format mappings. Used for (de)serialization * - * @return array + * @return array */ public static function openAPIFormats(): array; /** - * Array of attributes where the key is the local name, and the value is the original name + * Array of attributes where the key is the local name, + * and the value is the original name * - * @return array + * @return array */ public static function attributeMap(): array; /** * Array of attributes to setter functions (for deserialization of responses) * - * @return array + * @return array */ public static function setters(): array; /** * Array of attributes to getter functions (for serialization of requests) * - * @return array + * @return array */ public static function getters(): array; /** * Show all the invalid properties with reasons. * - * @return array + * @return string[] invalid properties with reasons */ public function listInvalidProperties(): array; @@ -88,7 +89,7 @@ public function listInvalidProperties(): array; * Validate all the properties in the model * return true if all passed * - * @return bool + * @return bool True if all properties are valid */ public function valid(): bool; diff --git a/src/Model/OneOfInterface.php b/src/Model/OneOfInterface.php new file mode 100644 index 0000000..6d017d4 --- /dev/null +++ b/src/Model/OneOfInterface.php @@ -0,0 +1,65 @@ + + */ + public static function getOneOfDiscriminatorMappings(): array; +} diff --git a/src/Model/Pagination.php b/src/Model/Pagination.php index 1c77d00..4886dc2 100644 --- a/src/Model/Pagination.php +++ b/src/Model/Pagination.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -47,17 +47,17 @@ class Pagination implements ModelInterface, ArrayAccess, JsonSerializable public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'Pagination'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'index' => 'int', 'page_size' => 'int', @@ -66,10 +66,10 @@ class Pagination implements ModelInterface, ArrayAccess, JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'index' => 'int32', 'page_size' => 'int32', @@ -78,10 +78,10 @@ class Pagination implements ModelInterface, ArrayAccess, JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'index' => false, 'page_size' => false, @@ -90,16 +90,14 @@ class Pagination implements ModelInterface, ArrayAccess, JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -107,9 +105,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -147,10 +143,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -158,10 +151,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -206,10 +196,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -217,9 +204,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -227,9 +212,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -237,9 +220,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -268,14 +249,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -286,9 +267,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -298,10 +277,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -419,7 +395,7 @@ public function setTotalCount(?int $total_count): static /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -431,7 +407,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -444,7 +420,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -461,7 +437,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/PlatformType.php b/src/Model/PlatformType.php index ecc6484..5fc1d67 100644 --- a/src/Model/PlatformType.php +++ b/src/Model/PlatformType.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** diff --git a/src/Model/PremiumType.php b/src/Model/PremiumType.php index d055dce..beade28 100644 --- a/src/Model/PremiumType.php +++ b/src/Model/PremiumType.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** diff --git a/src/Model/RatingDetails.php b/src/Model/RatingDetails.php index e6f0d9f..ef1e05a 100644 --- a/src/Model/RatingDetails.php +++ b/src/Model/RatingDetails.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,17 +46,17 @@ class RatingDetails implements ModelInterface, ArrayAccess, JsonSerializable public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'RatingDetails'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'rating' => 'float', 'total_ratings' => 'int', @@ -65,10 +65,10 @@ class RatingDetails implements ModelInterface, ArrayAccess, JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'rating' => 'decimal', 'total_ratings' => 'int32', @@ -77,10 +77,10 @@ class RatingDetails implements ModelInterface, ArrayAccess, JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'rating' => true, 'total_ratings' => true, @@ -89,16 +89,14 @@ class RatingDetails implements ModelInterface, ArrayAccess, JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -106,9 +104,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -146,10 +142,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -157,10 +150,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -205,10 +195,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -216,9 +203,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -226,9 +211,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -236,9 +219,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -267,14 +248,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -285,9 +266,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -297,10 +276,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -439,7 +415,7 @@ public function setScore(?\Aternos\CurseForgeApi\Model\RatingScore $score): stat /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -451,7 +427,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -464,7 +440,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -481,7 +457,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/RatingScore.php b/src/Model/RatingScore.php index e60eeb9..28886c7 100644 --- a/src/Model/RatingScore.php +++ b/src/Model/RatingScore.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** diff --git a/src/Model/SearchModsResponse.php b/src/Model/SearchModsResponse.php index e3c5447..84b5dd4 100644 --- a/src/Model/SearchModsResponse.php +++ b/src/Model/SearchModsResponse.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,53 +46,51 @@ class SearchModsResponse implements ModelInterface, ArrayAccess, JsonSerializabl public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'SearchModsResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'data' => '\Aternos\CurseForgeApi\Model\Mod[]', 'pagination' => '\Aternos\CurseForgeApi\Model\Pagination' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'data' => null, 'pagination' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'data' => false, 'pagination' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -100,9 +98,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -140,10 +136,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -151,10 +144,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -193,10 +183,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -204,9 +191,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -214,9 +199,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -224,9 +207,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -253,14 +234,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -271,9 +252,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -283,10 +262,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -350,7 +326,7 @@ public function setPagination(?\Aternos\CurseForgeApi\Model\Pagination $paginati /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -362,7 +338,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -375,7 +351,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -392,7 +368,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/ServerAffiliation.php b/src/Model/ServerAffiliation.php index c17e96a..1f800da 100644 --- a/src/Model/ServerAffiliation.php +++ b/src/Model/ServerAffiliation.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,17 +46,17 @@ class ServerAffiliation implements ModelInterface, ArrayAccess, JsonSerializable public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'ServerAffiliation'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'is_enabled' => 'bool', 'is_default_banner' => 'bool', @@ -68,10 +68,10 @@ class ServerAffiliation implements ModelInterface, ArrayAccess, JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'is_enabled' => null, 'is_default_banner' => null, @@ -83,10 +83,10 @@ class ServerAffiliation implements ModelInterface, ArrayAccess, JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'is_enabled' => false, 'is_default_banner' => false, @@ -98,16 +98,14 @@ class ServerAffiliation implements ModelInterface, ArrayAccess, JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -115,9 +113,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -155,10 +151,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -166,10 +159,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -223,10 +213,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -234,9 +221,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -244,9 +229,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -254,9 +237,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -288,14 +269,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -306,9 +287,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -318,10 +297,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -520,7 +496,7 @@ public function setAffiliationLink(?string $affiliation_link): static /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -532,7 +508,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -545,7 +521,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -562,7 +538,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/SocialLink.php b/src/Model/SocialLink.php index c101437..2f7a010 100644 --- a/src/Model/SocialLink.php +++ b/src/Model/SocialLink.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,53 +46,51 @@ class SocialLink implements ModelInterface, ArrayAccess, JsonSerializable public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'SocialLink'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'type' => '\Aternos\CurseForgeApi\Model\SocialLinkType', 'url' => 'string' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'type' => null, 'url' => 'uri' ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'type' => false, 'url' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -100,9 +98,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -140,10 +136,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -151,10 +144,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -193,10 +183,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -204,9 +191,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -214,9 +199,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -224,9 +207,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -253,14 +234,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -271,9 +252,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -283,10 +262,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -350,7 +326,7 @@ public function setUrl(?string $url): static /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -362,7 +338,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -375,7 +351,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -392,7 +368,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/Model/SocialLinkType.php b/src/Model/SocialLinkType.php index 1ab770b..29d45c2 100644 --- a/src/Model/SocialLinkType.php +++ b/src/Model/SocialLinkType.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -30,7 +30,7 @@ /** * SocialLinkType Class Doc Comment * - * @description * 1 = Mastodon * 2 = Discord * 3 = Website * 4 = Facebook * 5 = Twitter * 6 = Instagram * 7 = Patreon * 8 = Twitch * 9 = Reddit * 10 = Youtube * 11 = TikTok * 12 = Pinterest * 13 = Github * 14 = Bluesky + * @description * 1 = Mastodon * 2 = Discord * 3 = Website * 4 = Facebook * 5 = Twitter * 6 = Instagram * 7 = Patreon * 8 = Twitch * 9 = Reddit * 10 = Youtube * 11 = TikTok * 12 = Pinterest * 13 = Github * 14 = Bluesky * 15 = Paypal * 16 = PaypalHosted * 17 = GithubSponsors * 18 = Kofi * 19 = BuyMeACoffee * @package Aternos\CurseForgeApi * @author OpenAPI Generator team * @link https://openapi-generator.tech @@ -64,6 +64,16 @@ enum SocialLinkType: int case GITHUB = 13; case BLUESKY = 14; + + case PAYPAL = 15; + + case PAYPAL_HOSTED = 16; + + case GITHUB_SPONSORS = 17; + + case KOFI = 18; + + case BUY_ME_A_COFFEE = 19; } diff --git a/src/Model/SortOrder.php b/src/Model/SortOrder.php index ef991a1..13d23a4 100644 --- a/src/Model/SortOrder.php +++ b/src/Model/SortOrder.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** diff --git a/src/Model/SortableGameVersion.php b/src/Model/SortableGameVersion.php index b8451f7..ebb1073 100644 --- a/src/Model/SortableGameVersion.php +++ b/src/Model/SortableGameVersion.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -46,17 +46,17 @@ class SortableGameVersion implements ModelInterface, ArrayAccess, JsonSerializab public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static string $openAPIModelName = 'SortableGameVersion'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPITypes = [ 'game_version_name' => 'string', 'game_version_padded' => 'string', @@ -66,10 +66,10 @@ class SortableGameVersion implements ModelInterface, ArrayAccess, JsonSerializab ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ protected static array $openAPIFormats = [ 'game_version_name' => null, 'game_version_padded' => null, @@ -79,10 +79,10 @@ class SortableGameVersion implements ModelInterface, ArrayAccess, JsonSerializab ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ protected static array $openAPINullables = [ 'game_version_name' => false, 'game_version_padded' => false, @@ -92,16 +92,14 @@ class SortableGameVersion implements ModelInterface, ArrayAccess, JsonSerializab ]; /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ + * If a nullable field gets set to null, insert it here + * + * @var array + */ protected array $openAPINullablesSetToNull = []; /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPITypes(): array { @@ -109,9 +107,7 @@ public static function openAPITypes(): array } /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array + * {@inheritdoc} */ public static function openAPIFormats(): array { @@ -149,10 +145,7 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): } /** - * Checks if a property is nullable - * - * @param string $property - * @return bool + * {@inheritdoc} */ public static function isNullable(string $property): bool { @@ -160,10 +153,7 @@ public static function isNullable(string $property): bool } /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool + * {@inheritdoc} */ public function isNullableSetToNull(string $property): bool { @@ -211,10 +201,7 @@ public function isNullableSetToNull(string $property): bool ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array + * {@inheritdoc} */ public static function attributeMap(): array { @@ -222,9 +209,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array + * {@inheritdoc} */ public static function setters(): array { @@ -232,9 +217,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array + * {@inheritdoc} */ public static function getters(): array { @@ -242,9 +225,7 @@ public static function getters(): array } /** - * The original name of the model. - * - * @return string + * {@inheritdoc} */ public function getModelName(): string { @@ -274,14 +255,14 @@ 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 - */ + * 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, mixed $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -292,9 +273,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default } /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons + * {@inheritdoc} */ public function listInvalidProperties(): array { @@ -304,10 +283,7 @@ public function listInvalidProperties(): array } /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid + * {@inheritdoc} */ public function valid(): bool { @@ -459,7 +435,7 @@ public function setGameVersionTypeId(?int $game_version_type_id): static /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return boolean */ @@ -471,7 +447,7 @@ public function offsetExists(mixed $offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ @@ -484,7 +460,7 @@ public function offsetGet(mixed $offset): mixed /** * Sets value based on offset. * - * @param int|null $offset Offset + * @param int|string|null $offset Offset * @param mixed $value Value to be set * * @return void @@ -501,7 +477,7 @@ public function offsetSet(mixed $offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int|string $offset Offset * * @return void */ diff --git a/src/ObjectSerializer.php b/src/ObjectSerializer.php index 613fcad..8391430 100644 --- a/src/ObjectSerializer.php +++ b/src/ObjectSerializer.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.25.0 */ /** @@ -27,6 +27,7 @@ namespace Aternos\CurseForgeApi; +use BackedEnum; use DateTimeInterface; use DateTime; use GuzzleHttp\Psr7\Utils; @@ -115,11 +116,11 @@ public static function sanitizeForSerialization(mixed $data, ?string $type = nul } } } else { - foreach($data as $property => $value) { + foreach ($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } - return (object)$values; + return (object) $values; } else { return (string)$data; } @@ -177,34 +178,59 @@ public static function toPathValue(string $value): string */ private static function isEmptyValue(mixed $value, string $openApiType): bool { - # If empty() returns false, it is not empty regardless of its type. + // If empty() returns false, it is not empty regardless of its type. if (!empty($value)) { return false; } - # Null is always empty, as we cannot send a real "null" value in a query parameter. + // Null is always empty, as we cannot send a real "null" value in a query parameter. if ($value === null) { return true; } return match ($openApiType) { - # For numeric values, false and '' are considered empty. - # This comparison is safe for floating point values, since the previous call to empty() will - # filter out values that don't match 0. + // For numeric values, false and '' are considered empty. + // This comparison is safe for floating point values, since the previous call to empty() will + // filter out values that don't match 0. 'int','integer' => $value !== 0, 'number'|'float' => $value !== 0 && $value !== 0.0, - # For boolean values, '' is considered empty + // For boolean values, '' is considered empty 'bool','boolean' => !in_array($value, [false, 0], true), - # For string values, '' is considered empty. + // For string values, '' is considered empty. 'string' => $value === '', - # For all the other types, any value at this point can be considered empty. + // For all the other types, any value at this point can be considered empty. default => true }; } + /** + * Convert objects into arrays, recursively. + * + * sanitizeForSerialization() returns an object per model, but query parameters + * are flattened from arrays. + * + * @param mixed $data + * + * @return mixed the data with every object converted to an array + */ + private static function toArrayRecursive(mixed $data): mixed + { + if (is_array($data) || is_object($data)) { + $result = []; + + foreach ($data as $key => $value) { + $result[$key] = self::toArrayRecursive($value); + } + + return $result; + } + + return $data; + } + /** * Take query parameter properties and turn it into an array suitable for * native http_build_query or GuzzleHttp\Psr7\Query::build. @@ -227,10 +253,10 @@ public static function toQueryValue( bool $required = true ): array { - # Check if we should omit this parameter from the query. This should only happen when: - # - Parameter is NOT required; AND - # - its value is set to a value that is equivalent to "empty", depending on its OpenAPI type. For - # example, 0 as "int" or "boolean" is NOT an empty value. + // Check if we should omit this parameter from the query. This should only happen when: + // - Parameter is NOT required; AND + // - its value is set to a value that is equivalent to "empty", depending on its OpenAPI type. For + // example, 0 as "int" or "boolean" is NOT an empty value. if (self::isEmptyValue($value, $openApiType)) { if ($required) { return ["{$paramName}" => '']; @@ -239,18 +265,31 @@ public static function toQueryValue( } } - # Handle DateTime objects in query - if($openApiType === "\DateTime" && $value instanceof DateTime) { + // Handle DateTime objects in query + if ($openApiType === "string" && $value instanceof DateTime) { return ["{$paramName}" => $value->format(self::$dateTimeFormat)]; } + // A model is typed with its class name rather than "object", but serializes as one. + if ($value instanceof ModelInterface) { + $openApiType = 'object'; + } + $query = []; - $value = (in_array($openApiType, ['object', 'array'], true)) ? (array)$value : $value; + if ($openApiType === 'object' && is_object($value)) { + // Read the model's values through its getters; a plain (array) cast + // would expose only the protected $container holding them. + $value = self::toArrayRecursive(self::sanitizeForSerialization($value)); + } elseif (in_array($openApiType, ['object', 'array'], true)) { + $value = (array) $value; + } // since \GuzzleHttp\Psr7\Query::build fails with nested arrays // need to flatten array first $flattenArray = function ($arr, $name, &$result = []) use (&$flattenArray, $style, $explode) { - if (!is_array($arr)) return $arr; + if (!is_array($arr)) { + return $arr; + } foreach ($arr as $k => $v) { $prop = ($style === 'deepObject') ? "{$name}[{$k}]" : $k; @@ -262,6 +301,11 @@ public static function toQueryValue( // push key itself $result[] = $prop; } + + if ($v instanceof BackedEnum) { + $v = $v->value; + } + $result[$prop] = $v; } } @@ -490,10 +534,23 @@ public static function deserialize(mixed $data, string $class, ?array $httpHeade } return $data; } else { - $data = is_string($data) ? json_decode($data) : $data; + if (is_string($data)) { + $decoded = json_decode($data); + // Keep the original string if decode fails (nested values are already PHP strings). + $data = ($decoded !== null || $data === 'null') ? $decoded : $data; + } + + // A oneOf/anyOf schema is not a value object: dispatch here, after json_decode (so + // members get the decoded value) but before the array-to-object cast (which breaks arrays). + if (is_subclass_of($class, '\Aternos\CurseForgeApi\Model\OneOfInterface')) { + return self::deserializeOneOf($data, $class, $httpHeaders); + } + if (is_subclass_of($class, '\Aternos\CurseForgeApi\Model\AnyOfInterface')) { + return self::deserializeAnyOf($data, $class, $httpHeaders); + } if (is_array($data)) { - $data = (object)$data; + $data = (object) $data; } // If a discriminator is defined and points to a valid subclass, use it. @@ -532,17 +589,142 @@ public static function deserialize(mixed $data, string $class, ?array $httpHeade } /** - * Build a query string from an array of key value pairs. - * - * This function can use the return value of `parse()` to build a query - * string. This function does not modify the provided keys when an array is - * encountered (like `http_build_query()` would). - * - * @param array $params Query string parameters. - * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986 - * to encode using RFC3986, or PHP_QUERY_RFC1738 - * to encode using RFC1738. - */ + * Returns true when $data's PHP type is compatible with the OpenAPI primitive $type. + * Prevents settype() coercion (e.g. "abc" → 0 for integer) from producing a false match + * when iterating over oneOf/anyOf candidate types. + * Non-primitive types always return true and are validated downstream by ModelInterface::valid(). + */ + private static function isPrimitiveTypeCompatible(mixed $data, string $type): bool + { + return match($type) { + 'int', 'integer' => is_int($data), + 'float', 'double', 'number' => is_int($data) || is_float($data), + 'bool', 'boolean' => is_bool($data), + 'string' => is_string($data), + 'array' => is_array($data), + 'object' => is_object($data), + default => true, + }; + } + + /** + * Deserialize data into one of the member types of a `oneOf` schema. + * + * When the schema declares a discriminator, its value selects the member type directly. + * Otherwise each member type is tried in turn and the first one that yields a valid model + * (or a non-null primitive) is returned. + * + * @param mixed $data the decoded data to resolve to a member type + * @param string $class a class name implementing OneOfInterface + * @param string[]|null $httpHeaders HTTP headers + * + * @return mixed an instance of one of the `oneOf` member types + */ + private static function deserializeOneOf(mixed $data, string $class, ?array $httpHeaders): mixed + { + // $data is already decoded (see deserialize()). Read the discriminator from an object view + // of it, but deserialize each member from the original $data so array and scalar members + // keep their own type handling instead of being coerced to an object here. + $probe = is_array($data) ? (object) $data : $data; + + $discriminator = $class::getOneOfDiscriminator(); + if ($discriminator !== null && is_object($probe) && isset($probe->{$discriminator}) && is_string($probe->{$discriminator})) { + $mappings = $class::getOneOfDiscriminatorMappings(); + if (isset($mappings[$probe->{$discriminator}])) { + return self::deserialize($data, $mappings[$probe->{$discriminator}], $httpHeaders); + } + } + + foreach ($class::getOneOfTypes() as $type) { + if (!self::isPrimitiveTypeCompatible($data, $type)) { + continue; + } + try { + $instance = self::deserialize($data, $type, $httpHeaders); + } catch (\Throwable $e) { + // Any failure means the data does not match this member type; try the next one. + // The broad catch is intentional: a real failure is not hidden, since the loop + // throws below when no member type matches. + continue; + } + + if ($instance instanceof ModelInterface) { + if ($instance->valid()) { + return $instance; + } + } elseif ($instance !== null) { + return $instance; + } + } + + throw new \InvalidArgumentException(sprintf('No matching schema in oneOf %s for the given data', $class)); + } + + /** + * Deserialize data into one of the member types of an `anyOf` schema. + * + * When the schema declares a discriminator, its value selects the member type directly. + * Otherwise each member type is tried in turn and the first one that yields a valid model + * (or a non-null primitive) is returned. + * + * @param mixed $data the decoded data to resolve to a member type + * @param string $class a class name implementing AnyOfInterface + * @param string[]|null $httpHeaders HTTP headers + * + * @return mixed an instance of one of the `anyOf` member types + */ + private static function deserializeAnyOf(mixed $data, string $class, ?array $httpHeaders): mixed + { + // $data is already decoded (see deserialize()). Read the discriminator from an object view + // of it, but deserialize each member from the original $data so array and scalar members + // keep their own type handling instead of being coerced to an object here. + $probe = is_array($data) ? (object) $data : $data; + + $discriminator = $class::getAnyOfDiscriminator(); + if ($discriminator !== null && is_object($probe) && isset($probe->{$discriminator}) && is_string($probe->{$discriminator})) { + $mappings = $class::getAnyOfDiscriminatorMappings(); + if (isset($mappings[$probe->{$discriminator}])) { + return self::deserialize($data, $mappings[$probe->{$discriminator}], $httpHeaders); + } + } + + foreach ($class::getAnyOfTypes() as $type) { + if (!self::isPrimitiveTypeCompatible($data, $type)) { + continue; + } + try { + $instance = self::deserialize($data, $type, $httpHeaders); + } catch (\Throwable $e) { + // Any failure means the data does not match this member type; try the next one. + // The broad catch is intentional: a real failure is not hidden, since the loop + // throws below when no member type matches. + continue; + } + + if ($instance instanceof ModelInterface) { + if ($instance->valid()) { + return $instance; + } + } elseif ($instance !== null) { + return $instance; + } + } + + throw new \InvalidArgumentException(sprintf('No matching schema in anyOf %s for the given data', $class)); + } + + /** + * Build a query string from an array of key value pairs. + * + * This function can use the return value of `parse()` to build a query + * string. This function does not modify the provided keys when an array is + * encountered (like `http_build_query()` would). + * + * @param array $params Query string parameters. + * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986 + * to encode using RFC3986, or PHP_QUERY_RFC1738 + * to encode using RFC1738. + */ public static function buildQuery(array $params, $encoding = PHP_QUERY_RFC3986): string { if (!$params) { From fd9add5575f35822d502ba82b677d19f3eb6bab6 Mon Sep 17 00:00:00 2001 From: Paul Vogel Date: Wed, 16 Sep 2026 15:42:54 +0200 Subject: [PATCH 3/4] Add clientCompatible, lang and other new options to client wrappers --- src/Client/CurseForgeAPIClient.php | 30 ++++++++++++++----- src/Client/File.php | 7 +++-- src/Client/Game.php | 5 ++-- src/Client/Mod.php | 5 ++-- src/Client/Options/ModFilesOptions.php | 20 +++++++++++++ src/Client/Options/ModSearchOptions.php | 40 +++++++++++++++++++++++++ 6 files changed, 93 insertions(+), 14 deletions(-) diff --git a/src/Client/CurseForgeAPIClient.php b/src/Client/CurseForgeAPIClient.php index 18656d2..b1ad669 100644 --- a/src/Client/CurseForgeAPIClient.php +++ b/src/Client/CurseForgeAPIClient.php @@ -252,6 +252,8 @@ public function searchMods(ModSearchOptions $options): PaginatedModList $options->getEncodedModLoaderTypes(), $options->getPrimaryAuthorId(), $options->getPremiumType(), + $options->getClientCompatible(), + $options->getModsSearchEnhancedFeatures(), ), $options); } @@ -269,12 +271,17 @@ public function getMod(int $modId): Mod /** * Fetch multiple mods at once * @param int[] $modIds + * @param int[] $devModIds + * @param bool|null $filterPcOnly * @return Mod[] * @throws ApiException */ - public function getMods(array $modIds): array + public function getMods(array $modIds, array $devModIds = [], ?bool $filterPcOnly = null): array { - $body = (new GetModsByIdsListRequestBody())->setModIds($modIds); + $body = (new GetModsByIdsListRequestBody()) + ->setModIds($modIds) + ->setDevModIds($devModIds) + ->setFilterPcOnly($filterPcOnly); return array_map(fn($mod) => new Mod($this, $mod), $this->mods->getMods($body)->getData()); } @@ -283,15 +290,17 @@ public function getMods(array $modIds): array * @param int $gameId * @param int[] $excludedModIds * @param int|null $gameVersionTypeId + * @param bool|null $clientCompatible * @return FeaturedMods * @throws ApiException */ - public function getFeaturedMods(int $gameId, array $excludedModIds = [], ?int $gameVersionTypeId = null): FeaturedMods + public function getFeaturedMods(int $gameId, array $excludedModIds = [], ?int $gameVersionTypeId = null, ?bool $clientCompatible = null): FeaturedMods { $body = (new GetFeaturedModsRequestBody()) ->setGameId($gameId) ->setExcludedModIds($excludedModIds) - ->setGameVersionTypeId($gameVersionTypeId); + ->setGameVersionTypeId($gameVersionTypeId) + ->setClientCompatible($clientCompatible); return new FeaturedMods($this, $this->mods->getFeaturedMods($body)->getData()); } @@ -299,12 +308,13 @@ public function getFeaturedMods(int $gameId, array $excludedModIds = [], ?int $g /** * Get the description of a mod as html * @param int $modId + * @param string|null $lang * @return string|null * @throws ApiException */ - public function getModDescription(int $modId): ?string + public function getModDescription(int $modId, ?string $lang = null): ?string { - return $this->mods->getModDescription($modId)->getData(); + return $this->mods->getModDescription($modId, lang: $lang)->getData(); } /** @@ -325,6 +335,7 @@ public function getModFiles(ModFilesOptions $options): PaginatedFilesList $options->getOlderThanProjectFileId(), $options->getReleaseTypes(), $options->getPlatformType(), + $options->getClientCompatible(), ), $options); } @@ -356,12 +367,15 @@ public function getFiles(array $fileIds): array * Get the changelog of a mod file as html * @param int $modId * @param int $fileId + * @param bool|null $raw Get raw changelog without things like external link redirects + * @param bool|null $stripped Get the changelog with all HTML tags removed + * @param bool|null $markup * @return string * @throws ApiException */ - public function getModFileChangelog(int $modId, int $fileId): string + public function getModFileChangelog(int $modId, int $fileId, ?bool $raw = null, ?bool $stripped = null, ?bool $markup = null): string { - return $this->files->getModFileChangelog($modId, $fileId)->getData(); + return $this->files->getModFileChangelog($modId, $fileId, $raw, $stripped, $markup)->getData(); } /** diff --git a/src/Client/File.php b/src/Client/File.php index fda30db..f716f2b 100644 --- a/src/Client/File.php +++ b/src/Client/File.php @@ -38,12 +38,15 @@ public function getServerPack(): ?File /** * Get the changelog of this file + * @param bool|null $raw Get raw changelog without things like external link redirects + * @param bool|null $stripped Get the changelog with all HTML tags removed + * @param bool|null $markup * @return string * @throws ApiException */ - public function getChangelog(): string + public function getChangelog(?bool $raw = null, ?bool $stripped = null, ?bool $markup = null): string { - return $this->client->getModFileChangelog($this->file->getModId(), $this->file->getId()); + return $this->client->getModFileChangelog($this->file->getModId(), $this->file->getId(), $raw, $stripped, $markup); } /** diff --git a/src/Client/Game.php b/src/Client/Game.php index fa52d33..d064c85 100644 --- a/src/Client/Game.php +++ b/src/Client/Game.php @@ -87,11 +87,12 @@ public function searchMods(?ModSearchOptions $options = null): PaginatedModList * Get all featured mods for this game * @param int[] $excludedModIds * @param int|null $gameVersionTypeId + * @param bool|null $clientCompatible * @return FeaturedMods * @throws ApiException */ - public function getFeaturedMods(array $excludedModIds = [], ?int $gameVersionTypeId = null): FeaturedMods + public function getFeaturedMods(array $excludedModIds = [], ?int $gameVersionTypeId = null, ?bool $clientCompatible = null): FeaturedMods { - return $this->client->getFeaturedMods($this->game->getId(), $excludedModIds, $gameVersionTypeId); + return $this->client->getFeaturedMods($this->game->getId(), $excludedModIds, $gameVersionTypeId, $clientCompatible); } } diff --git a/src/Client/Mod.php b/src/Client/Mod.php index 219ac3d..34e17da 100644 --- a/src/Client/Mod.php +++ b/src/Client/Mod.php @@ -36,12 +36,13 @@ public function getData(): ModModel /** * Fetch the description of this mod as html + * @param string|null $lang * @return string|null * @throws ApiException */ - public function getDescription(): ?string + public function getDescription(?string $lang = null): ?string { - return $this->client->getModDescription($this->mod->getId()); + return $this->client->getModDescription($this->mod->getId(), $lang); } /** diff --git a/src/Client/Options/ModFilesOptions.php b/src/Client/Options/ModFilesOptions.php index 04336a5..7a97c7d 100644 --- a/src/Client/Options/ModFilesOptions.php +++ b/src/Client/Options/ModFilesOptions.php @@ -20,6 +20,7 @@ class ModFilesOptions * @param int|null $olderThanProjectFileId show only files that are older than the given projectFileId * @param FileReleaseType[]|null $releaseTypes array of release types to filter files by * @param PlatformType|null $platformType platform type to filter files by + * @param bool|null $clientCompatible when set to true, filter out any file that isn't client compatible */ public function __construct( protected int $modId, @@ -31,6 +32,7 @@ public function __construct( protected ?int $olderThanProjectFileId = null, protected ?array $releaseTypes = null, protected ?PlatformType $platformType = null, + protected ?bool $clientCompatible = null, ) { } @@ -217,4 +219,22 @@ public function setPlatformType(?PlatformType $platformType): static $this->platformType = $platformType; return $this; } + + /** + * @return bool|null + */ + public function getClientCompatible(): ?bool + { + return $this->clientCompatible; + } + + /** + * @param bool|null $clientCompatible + * @return $this + */ + public function setClientCompatible(?bool $clientCompatible): static + { + $this->clientCompatible = $clientCompatible; + return $this; + } } diff --git a/src/Client/Options/ModSearchOptions.php b/src/Client/Options/ModSearchOptions.php index 294c5aa..7aa7b4b 100644 --- a/src/Client/Options/ModSearchOptions.php +++ b/src/Client/Options/ModSearchOptions.php @@ -24,6 +24,8 @@ class ModSearchOptions * @param int|null $primaryAuthorId Filter only mods that have the given author as primary author * @param PremiumType|null $premiumType Filter only mods that are Premium or not * @param string|null $slug Filter by slug (coupled with classId will result in a unique result). + * @param bool|null $clientCompatible When set to true, will filter out any mod that doesn't have a default file that is compatible with the client + * @param int|null $modsSearchEnhancedFeatures Bitwise number with values from ModsSearchEnhancedFeatures * @param int $offset * @param int $pageSize */ @@ -43,6 +45,8 @@ public function __construct( protected ?int $primaryAuthorId = null, protected ?PremiumType $premiumType = null, protected ?string $slug = null, + protected ?bool $clientCompatible = null, + protected ?int $modsSearchEnhancedFeatures = null, ) { } @@ -431,4 +435,40 @@ public function setSlug(?string $slug): static $this->slug = $slug; return $this; } + + /** + * @return bool|null + */ + public function getClientCompatible(): ?bool + { + return $this->clientCompatible; + } + + /** + * @param bool|null $clientCompatible + * @return $this + */ + public function setClientCompatible(?bool $clientCompatible): static + { + $this->clientCompatible = $clientCompatible; + return $this; + } + + /** + * @return int|null + */ + public function getModsSearchEnhancedFeatures(): ?int + { + return $this->modsSearchEnhancedFeatures; + } + + /** + * @param int|null $modsSearchEnhancedFeatures + * @return $this + */ + public function setModsSearchEnhancedFeatures(?int $modsSearchEnhancedFeatures): static + { + $this->modsSearchEnhancedFeatures = $modsSearchEnhancedFeatures; + return $this; + } } From c2ac59facb489a4062421ea0e2f1391b84f039b2 Mon Sep 17 00:00:00 2001 From: Paul Vogel Date: Wed, 16 Sep 2026 15:46:51 +0200 Subject: [PATCH 4/4] only use setClientCompatible on GetFeaturedModsRequestBody when $clientCompatible is not null --- src/Client/CurseForgeAPIClient.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Client/CurseForgeAPIClient.php b/src/Client/CurseForgeAPIClient.php index b1ad669..b828faa 100644 --- a/src/Client/CurseForgeAPIClient.php +++ b/src/Client/CurseForgeAPIClient.php @@ -299,8 +299,11 @@ public function getFeaturedMods(int $gameId, array $excludedModIds = [], ?int $g $body = (new GetFeaturedModsRequestBody()) ->setGameId($gameId) ->setExcludedModIds($excludedModIds) - ->setGameVersionTypeId($gameVersionTypeId) - ->setClientCompatible($clientCompatible); + ->setGameVersionTypeId($gameVersionTypeId); + + if ($clientCompatible !== null) { + $body->setClientCompatible($clientCompatible); + } return new FeaturedMods($this, $this->mods->getFeaturedMods($body)->getData()); }