diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore index 7484ee5..63888ca 100644 --- a/.openapi-generator-ignore +++ b/.openapi-generator-ignore @@ -21,3 +21,8 @@ #docs/*.md # Then explicitly reverse the ignore rule for a single file: #!docs/README.md + +# Preserve the hand-written "API Clients / Using PublicApi / Using ModerationApi" prose +# in README.md. update.sh does not delete this ignore file or README.md, so the generator +# honors this and leaves README.md untouched on regen. +README.md diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 06b27f7..f010e66 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -1,7 +1,6 @@ .gitignore .php-cs-fixer.dist.php .travis.yml -README.md composer.json docs/Api/DefaultApi.md docs/Api/ModerationApi.md @@ -265,7 +264,7 @@ docs/Model/PatchDomainConfigResponse.md docs/Model/PatchPageAPIResponse.md docs/Model/PatchSSOUserAPIResponse.md docs/Model/PendingCommentToSyncOutbound.md -docs/Model/PostRemoveCommentResponse.md +docs/Model/PostRemoveCommentApiResponse.md docs/Model/PreBanSummary.md docs/Model/PubSubComment.md docs/Model/PubSubCommentBase.md @@ -364,7 +363,6 @@ docs/Model/UsersListLocation.md docs/Model/VoteBodyParams.md docs/Model/VoteDeleteResponse.md docs/Model/VoteResponse.md -docs/Model/VoteResponseStatus.md docs/Model/VoteResponseUser.md docs/Model/VoteStyle.md git_push.sh @@ -373,6 +371,7 @@ lib/Api/ModerationApi.php lib/Api/PublicApi.php lib/ApiException.php lib/Configuration.php +lib/FormDataProcessor.php lib/HeaderSelector.php lib/Model/APIAuditLog.php lib/Model/APIBanUserChangeLog.php @@ -634,7 +633,7 @@ lib/Model/PatchDomainConfigResponse.php lib/Model/PatchPageAPIResponse.php lib/Model/PatchSSOUserAPIResponse.php lib/Model/PendingCommentToSyncOutbound.php -lib/Model/PostRemoveCommentResponse.php +lib/Model/PostRemoveCommentApiResponse.php lib/Model/PreBanSummary.php lib/Model/PubSubComment.php lib/Model/PubSubCommentBase.php @@ -733,7 +732,6 @@ lib/Model/UsersListLocation.php lib/Model/VoteBodyParams.php lib/Model/VoteDeleteResponse.php lib/Model/VoteResponse.php -lib/Model/VoteResponseStatus.php lib/Model/VoteResponseUser.php lib/Model/VoteStyle.php lib/ObjectSerializer.php @@ -1000,7 +998,7 @@ test/Model/PatchDomainConfigResponseTest.php test/Model/PatchPageAPIResponseTest.php test/Model/PatchSSOUserAPIResponseTest.php test/Model/PendingCommentToSyncOutboundTest.php -test/Model/PostRemoveCommentResponseTest.php +test/Model/PostRemoveCommentApiResponseTest.php test/Model/PreBanSummaryTest.php test/Model/PubSubCommentBaseTest.php test/Model/PubSubCommentTest.php @@ -1098,7 +1096,6 @@ test/Model/UserTest.php test/Model/UsersListLocationTest.php test/Model/VoteBodyParamsTest.php test/Model/VoteDeleteResponseTest.php -test/Model/VoteResponseStatusTest.php test/Model/VoteResponseTest.php test/Model/VoteResponseUserTest.php test/Model/VoteStyleTest.php diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 5f84a81..ca7bf6e 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -7.12.0 +7.23.0-SNAPSHOT diff --git a/README.md b/README.md index 2035d1c..37e1856 100644 --- a/README.md +++ b/README.md @@ -77,9 +77,9 @@ try { The SDK exposes three API client classes: -- **`DefaultApi`** — API-key-authenticated methods for server-side use. Configure an API key as shown in [Getting Started](#getting-started). -- **`PublicApi`** — public methods that do not require an API key, safe to call from browsers and mobile apps. -- **`ModerationApi`** — methods for the moderator dashboard: listing, counting, searching, logging and exporting comments; moderation actions (remove/restore, flag, set review/spam/approval status, votes, reopen/close thread); bans (ban from comment, undo, pre-ban summaries, ban status and preferences, banned-user counts); and badges & trust (award/remove badge, manual badges, get/set trust factor, user internal profile). Every `ModerationApi` method accepts an `$sso` parameter to authenticate the acting moderator via SSO. +- **`DefaultApi`** - API-key-authenticated methods for server-side use. Configure an API key as shown in [Getting Started](#getting-started). +- **`PublicApi`** - public methods that do not require an API key, safe to call from browsers and mobile apps. +- **`ModerationApi`** - an extensive suite of live and fast moderation APIs. Every `ModerationApi` method accepts an `$sso` parameter and can authenticate via SSO or a FastComments.com session cookie. ### Using PublicApi @@ -114,7 +114,9 @@ $apiInstance = new FastComments\Client\Api\ModerationApi( $sso = 'sso_example'; // string - SSO payload authenticating the moderator try { - $result = $apiInstance->getCount(null, null, null, null, null, $sso); + $result = $apiInstance->getCount([ + 'sso' => $sso, + ]); print_r($result); } catch (Exception $e) { echo 'Exception when calling ModerationApi->getCount: ', $e->getMessage(), PHP_EOL; diff --git a/composer.json b/composer.json index dadd5fe..c749496 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ } ], "require": { - "php": "^7.4 || ^8.0", + "php": "^8.1", "ext-curl": "*", "ext-json": "*", "ext-mbstring": "*", diff --git a/docs/Api/DefaultApi.md b/docs/Api/DefaultApi.md index e6b06e3..36d58e0 100644 --- a/docs/Api/DefaultApi.md +++ b/docs/Api/DefaultApi.md @@ -1,6 +1,6 @@ # FastComments\Client\DefaultApi -FastComments PHP API Client - A SDK for interacting with the FastComments API + All URIs are relative to https://fastcomments.com, except if the operation defines another base path. @@ -149,9 +149,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $add_domain_config_params = new \FastComments\Client\Model\AddDomainConfigParams(); // \FastComments\Client\Model\AddDomainConfigParams + try { $result = $apiInstance->addDomainConfig($tenant_id, $add_domain_config_params); print_r($result); @@ -211,9 +213,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $create_hash_tag_body = new \FastComments\Client\Model\CreateHashTagBody(); // \FastComments\Client\Model\CreateHashTagBody + try { $result = $apiInstance->addHashTag($tenant_id, $create_hash_tag_body); print_r($result); @@ -226,7 +230,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **tenant_id** | **string**| | [optional] | +| **tenant_id** | **string**| | | | **create_hash_tag_body** | [**\FastComments\Client\Model\CreateHashTagBody**](../Model/CreateHashTagBody.md)| | [optional] | ### Return type @@ -273,9 +277,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $bulk_create_hash_tags_body = new \FastComments\Client\Model\BulkCreateHashTagsBody(); // \FastComments\Client\Model\BulkCreateHashTagsBody + try { $result = $apiInstance->addHashTagsBulk($tenant_id, $bulk_create_hash_tags_body); print_r($result); @@ -288,7 +294,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **tenant_id** | **string**| | [optional] | +| **tenant_id** | **string**| | | | **bulk_create_hash_tags_body** | [**\FastComments\Client\Model\BulkCreateHashTagsBody**](../Model/BulkCreateHashTagsBody.md)| | [optional] | ### Return type @@ -335,9 +341,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $create_api_page_data = new \FastComments\Client\Model\CreateAPIPageData(); // \FastComments\Client\Model\CreateAPIPageData + try { $result = $apiInstance->addPage($tenant_id, $create_api_page_data); print_r($result); @@ -397,9 +405,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $create_apisso_user_data = new \FastComments\Client\Model\CreateAPISSOUserData(); // \FastComments\Client\Model\CreateAPISSOUserData + try { $result = $apiInstance->addSSOUser($tenant_id, $create_apisso_user_data); print_r($result); @@ -435,7 +445,7 @@ try { ## `aggregate()` ```php -aggregate($tenant_id, $aggregation_request, $parent_tenant_id, $include_stats): \FastComments\Client\Model\AggregateResponse +aggregate($tenant_id, $aggregation_request, $options): \FastComments\Client\Model\AggregateResponse ``` @@ -461,13 +471,17 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $aggregation_request = new \FastComments\Client\Model\AggregationRequest(); // \FastComments\Client\Model\AggregationRequest -$parent_tenant_id = 'parent_tenant_id_example'; // string -$include_stats = True; // bool +$options = [ + 'parent_tenant_id' => 'parent_tenant_id_example', // string + 'include_stats' => True, // bool +]; + try { - $result = $apiInstance->aggregate($tenant_id, $aggregation_request, $parent_tenant_id, $include_stats); + $result = $apiInstance->aggregate($tenant_id, $aggregation_request, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->aggregate: ', $e->getMessage(), PHP_EOL; @@ -476,6 +490,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -503,7 +519,7 @@ try { ## `aggregateQuestionResults()` ```php -aggregateQuestionResults($tenant_id, $question_id, $question_ids, $url_id, $time_bucket, $start_date, $force_recalculate): \FastComments\Client\Model\AggregateQuestionResultsResponse +aggregateQuestionResults($tenant_id, $options): \FastComments\Client\Model\AggregateQuestionResultsResponse ``` @@ -527,16 +543,20 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string -$question_id = 'question_id_example'; // string -$question_ids = array('question_ids_example'); // string[] -$url_id = 'url_id_example'; // string -$time_bucket = new \FastComments\Client\Model\\FastComments\Client\Model\AggregateTimeBucket(); // \FastComments\Client\Model\AggregateTimeBucket -$start_date = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime -$force_recalculate = True; // bool +$options = [ + 'question_id' => 'question_id_example', // string + 'question_ids' => array('question_ids_example'), // string[] + 'url_id' => 'url_id_example', // string + 'time_bucket' => new \FastComments\Client\Model\\FastComments\Client\Model\AggregateTimeBucket(), // \FastComments\Client\Model\AggregateTimeBucket + 'start_date' => new \DateTime('2013-10-20T19:20:30+01:00'), // \DateTime + 'force_recalculate' => True, // bool +]; + try { - $result = $apiInstance->aggregateQuestionResults($tenant_id, $question_id, $question_ids, $url_id, $time_bucket, $start_date, $force_recalculate); + $result = $apiInstance->aggregateQuestionResults($tenant_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->aggregateQuestionResults: ', $e->getMessage(), PHP_EOL; @@ -545,6 +565,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -575,7 +597,7 @@ try { ## `blockUserFromComment()` ```php -blockUserFromComment($tenant_id, $id, $block_from_comment_params, $user_id, $anon_user_id): \FastComments\Client\Model\BlockSuccess +blockUserFromComment($tenant_id, $id, $block_from_comment_params, $options): \FastComments\Client\Model\BlockSuccess ``` @@ -599,14 +621,18 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string $block_from_comment_params = new \FastComments\Client\Model\BlockFromCommentParams(); // \FastComments\Client\Model\BlockFromCommentParams -$user_id = 'user_id_example'; // string -$anon_user_id = 'anon_user_id_example'; // string +$options = [ + 'user_id' => 'user_id_example', // string + 'anon_user_id' => 'anon_user_id_example', // string +]; + try { - $result = $apiInstance->blockUserFromComment($tenant_id, $id, $block_from_comment_params, $user_id, $anon_user_id); + $result = $apiInstance->blockUserFromComment($tenant_id, $id, $block_from_comment_params, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->blockUserFromComment: ', $e->getMessage(), PHP_EOL; @@ -615,6 +641,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -667,10 +695,12 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $bulk_aggregate_question_results_request = new \FastComments\Client\Model\BulkAggregateQuestionResultsRequest(); // \FastComments\Client\Model\BulkAggregateQuestionResultsRequest $force_recalculate = True; // bool + try { $result = $apiInstance->bulkAggregateQuestionResults($tenant_id, $bulk_aggregate_question_results_request, $force_recalculate); print_r($result); @@ -731,11 +761,13 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $user_id = 'user_id_example'; // string $id = 'id_example'; // string $change_ticket_state_body = new \FastComments\Client\Model\ChangeTicketStateBody(); // \FastComments\Client\Model\ChangeTicketStateBody + try { $result = $apiInstance->changeTicketState($tenant_id, $user_id, $id, $change_ticket_state_body); print_r($result); @@ -773,7 +805,7 @@ try { ## `combineCommentsWithQuestionResults()` ```php -combineCommentsWithQuestionResults($tenant_id, $question_id, $question_ids, $url_id, $start_date, $force_recalculate, $min_value, $max_value, $limit): \FastComments\Client\Model\CombineQuestionResultsWithCommentsResponse +combineCommentsWithQuestionResults($tenant_id, $options): \FastComments\Client\Model\CombineQuestionResultsWithCommentsResponse ``` @@ -797,18 +829,22 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string -$question_id = 'question_id_example'; // string -$question_ids = array('question_ids_example'); // string[] -$url_id = 'url_id_example'; // string -$start_date = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime -$force_recalculate = True; // bool -$min_value = 3.4; // float -$max_value = 3.4; // float -$limit = 3.4; // float +$options = [ + 'question_id' => 'question_id_example', // string + 'question_ids' => array('question_ids_example'), // string[] + 'url_id' => 'url_id_example', // string + 'start_date' => new \DateTime('2013-10-20T19:20:30+01:00'), // \DateTime + 'force_recalculate' => True, // bool + 'min_value' => 3.4, // float + 'max_value' => 3.4, // float + 'limit' => 3.4, // float +]; + try { - $result = $apiInstance->combineCommentsWithQuestionResults($tenant_id, $question_id, $question_ids, $url_id, $start_date, $force_recalculate, $min_value, $max_value, $limit); + $result = $apiInstance->combineCommentsWithQuestionResults($tenant_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->combineCommentsWithQuestionResults: ', $e->getMessage(), PHP_EOL; @@ -817,6 +853,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -873,9 +911,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $create_email_template_body = new \FastComments\Client\Model\CreateEmailTemplateBody(); // \FastComments\Client\Model\CreateEmailTemplateBody + try { $result = $apiInstance->createEmailTemplate($tenant_id, $create_email_template_body); print_r($result); @@ -911,7 +951,7 @@ try { ## `createFeedPost()` ```php -createFeedPost($tenant_id, $create_feed_post_params, $broadcast_id, $is_live, $do_spam_check, $skip_dup_check): \FastComments\Client\Model\CreateFeedPostsResponse +createFeedPost($tenant_id, $create_feed_post_params, $options): \FastComments\Client\Model\CreateFeedPostsResponse ``` @@ -935,15 +975,19 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $create_feed_post_params = new \FastComments\Client\Model\CreateFeedPostParams(); // \FastComments\Client\Model\CreateFeedPostParams -$broadcast_id = 'broadcast_id_example'; // string -$is_live = True; // bool -$do_spam_check = True; // bool -$skip_dup_check = True; // bool +$options = [ + 'broadcast_id' => 'broadcast_id_example', // string + 'is_live' => True, // bool + 'do_spam_check' => True, // bool + 'skip_dup_check' => True, // bool +]; + try { - $result = $apiInstance->createFeedPost($tenant_id, $create_feed_post_params, $broadcast_id, $is_live, $do_spam_check, $skip_dup_check); + $result = $apiInstance->createFeedPost($tenant_id, $create_feed_post_params, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->createFeedPost: ', $e->getMessage(), PHP_EOL; @@ -952,6 +996,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -1005,9 +1051,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $create_moderator_body = new \FastComments\Client\Model\CreateModeratorBody(); // \FastComments\Client\Model\CreateModeratorBody + try { $result = $apiInstance->createModerator($tenant_id, $create_moderator_body); print_r($result); @@ -1067,9 +1115,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $create_question_config_body = new \FastComments\Client\Model\CreateQuestionConfigBody(); // \FastComments\Client\Model\CreateQuestionConfigBody + try { $result = $apiInstance->createQuestionConfig($tenant_id, $create_question_config_body); print_r($result); @@ -1129,9 +1179,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $create_question_result_body = new \FastComments\Client\Model\CreateQuestionResultBody(); // \FastComments\Client\Model\CreateQuestionResultBody + try { $result = $apiInstance->createQuestionResult($tenant_id, $create_question_result_body); print_r($result); @@ -1191,9 +1243,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $create_api_user_subscription_data = new \FastComments\Client\Model\CreateAPIUserSubscriptionData(); // \FastComments\Client\Model\CreateAPIUserSubscriptionData + try { $result = $apiInstance->createSubscription($tenant_id, $create_api_user_subscription_data); print_r($result); @@ -1253,9 +1307,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $create_tenant_body = new \FastComments\Client\Model\CreateTenantBody(); // \FastComments\Client\Model\CreateTenantBody + try { $result = $apiInstance->createTenant($tenant_id, $create_tenant_body); print_r($result); @@ -1315,9 +1371,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $create_tenant_package_body = new \FastComments\Client\Model\CreateTenantPackageBody(); // \FastComments\Client\Model\CreateTenantPackageBody + try { $result = $apiInstance->createTenantPackage($tenant_id, $create_tenant_package_body); print_r($result); @@ -1377,9 +1435,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $create_tenant_user_body = new \FastComments\Client\Model\CreateTenantUserBody(); // \FastComments\Client\Model\CreateTenantUserBody + try { $result = $apiInstance->createTenantUser($tenant_id, $create_tenant_user_body); print_r($result); @@ -1439,10 +1499,12 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $user_id = 'user_id_example'; // string $create_ticket_body = new \FastComments\Client\Model\CreateTicketBody(); // \FastComments\Client\Model\CreateTicketBody + try { $result = $apiInstance->createTicket($tenant_id, $user_id, $create_ticket_body); print_r($result); @@ -1503,9 +1565,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $create_user_badge_params = new \FastComments\Client\Model\CreateUserBadgeParams(); // \FastComments\Client\Model\CreateUserBadgeParams + try { $result = $apiInstance->createUserBadge($tenant_id, $create_user_badge_params); print_r($result); @@ -1541,7 +1605,7 @@ try { ## `createVote()` ```php -createVote($tenant_id, $comment_id, $direction, $user_id, $anon_user_id): \FastComments\Client\Model\VoteResponse +createVote($tenant_id, $comment_id, $direction, $options): \FastComments\Client\Model\VoteResponse ``` @@ -1565,14 +1629,18 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $comment_id = 'comment_id_example'; // string $direction = 'direction_example'; // string -$user_id = 'user_id_example'; // string -$anon_user_id = 'anon_user_id_example'; // string +$options = [ + 'user_id' => 'user_id_example', // string + 'anon_user_id' => 'anon_user_id_example', // string +]; + try { - $result = $apiInstance->createVote($tenant_id, $comment_id, $direction, $user_id, $anon_user_id); + $result = $apiInstance->createVote($tenant_id, $comment_id, $direction, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->createVote: ', $e->getMessage(), PHP_EOL; @@ -1581,6 +1649,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -1609,7 +1679,7 @@ try { ## `deleteComment()` ```php -deleteComment($tenant_id, $id, $context_user_id, $is_live): \FastComments\Client\Model\DeleteCommentResult +deleteComment($tenant_id, $id, $options): \FastComments\Client\Model\DeleteCommentResult ``` @@ -1633,13 +1703,17 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string -$context_user_id = 'context_user_id_example'; // string -$is_live = True; // bool +$options = [ + 'context_user_id' => 'context_user_id_example', // string + 'is_live' => True, // bool +]; + try { - $result = $apiInstance->deleteComment($tenant_id, $id, $context_user_id, $is_live); + $result = $apiInstance->deleteComment($tenant_id, $id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->deleteComment: ', $e->getMessage(), PHP_EOL; @@ -1648,6 +1722,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -1699,9 +1775,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $domain = 'domain_example'; // string + try { $result = $apiInstance->deleteDomainConfig($tenant_id, $domain); print_r($result); @@ -1761,9 +1839,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string + try { $result = $apiInstance->deleteEmailTemplate($tenant_id, $id); print_r($result); @@ -1823,10 +1903,12 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string $error_id = 'error_id_example'; // string + try { $result = $apiInstance->deleteEmailTemplateRenderError($tenant_id, $id, $error_id); print_r($result); @@ -1863,7 +1945,7 @@ try { ## `deleteHashTag()` ```php -deleteHashTag($tag, $tenant_id, $delete_hash_tag_request_body): \FastComments\Client\Model\APIEmptyResponse +deleteHashTag($tenant_id, $tag, $delete_hash_tag_request_body): \FastComments\Client\Model\APIEmptyResponse ``` @@ -1887,12 +1969,14 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); -$tag = 'tag_example'; // string + $tenant_id = 'tenant_id_example'; // string +$tag = 'tag_example'; // string $delete_hash_tag_request_body = new \FastComments\Client\Model\DeleteHashTagRequestBody(); // \FastComments\Client\Model\DeleteHashTagRequestBody + try { - $result = $apiInstance->deleteHashTag($tag, $tenant_id, $delete_hash_tag_request_body); + $result = $apiInstance->deleteHashTag($tenant_id, $tag, $delete_hash_tag_request_body); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->deleteHashTag: ', $e->getMessage(), PHP_EOL; @@ -1903,8 +1987,8 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | +| **tenant_id** | **string**| | | | **tag** | **string**| | | -| **tenant_id** | **string**| | [optional] | | **delete_hash_tag_request_body** | [**\FastComments\Client\Model\DeleteHashTagRequestBody**](../Model/DeleteHashTagRequestBody.md)| | [optional] | ### Return type @@ -1951,10 +2035,12 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string $send_email = 'send_email_example'; // string + try { $result = $apiInstance->deleteModerator($tenant_id, $id, $send_email); print_r($result); @@ -2015,9 +2101,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string + try { $result = $apiInstance->deleteNotificationCount($tenant_id, $id); print_r($result); @@ -2077,9 +2165,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string + try { $result = $apiInstance->deletePage($tenant_id, $id); print_r($result); @@ -2139,9 +2229,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string + try { $result = $apiInstance->deletePendingWebhookEvent($tenant_id, $id); print_r($result); @@ -2201,9 +2293,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string + try { $result = $apiInstance->deleteQuestionConfig($tenant_id, $id); print_r($result); @@ -2263,9 +2357,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string + try { $result = $apiInstance->deleteQuestionResult($tenant_id, $id); print_r($result); @@ -2301,7 +2397,7 @@ try { ## `deleteSSOUser()` ```php -deleteSSOUser($tenant_id, $id, $delete_comments, $comment_delete_mode): \FastComments\Client\Model\DeleteSSOUserAPIResponse +deleteSSOUser($tenant_id, $id, $options): \FastComments\Client\Model\DeleteSSOUserAPIResponse ``` @@ -2325,13 +2421,17 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string -$delete_comments = True; // bool -$comment_delete_mode = 'comment_delete_mode_example'; // string +$options = [ + 'delete_comments' => True, // bool + 'comment_delete_mode' => 'comment_delete_mode_example', // string +]; + try { - $result = $apiInstance->deleteSSOUser($tenant_id, $id, $delete_comments, $comment_delete_mode); + $result = $apiInstance->deleteSSOUser($tenant_id, $id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->deleteSSOUser: ', $e->getMessage(), PHP_EOL; @@ -2340,6 +2440,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -2391,10 +2493,12 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string $user_id = 'user_id_example'; // string + try { $result = $apiInstance->deleteSubscription($tenant_id, $id, $user_id); print_r($result); @@ -2455,10 +2559,12 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string $sure = 'sure_example'; // string + try { $result = $apiInstance->deleteTenant($tenant_id, $id, $sure); print_r($result); @@ -2519,9 +2625,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string + try { $result = $apiInstance->deleteTenantPackage($tenant_id, $id); print_r($result); @@ -2557,7 +2665,7 @@ try { ## `deleteTenantUser()` ```php -deleteTenantUser($tenant_id, $id, $delete_comments, $comment_delete_mode): \FastComments\Client\Model\APIEmptyResponse +deleteTenantUser($tenant_id, $id, $options): \FastComments\Client\Model\APIEmptyResponse ``` @@ -2581,13 +2689,17 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string -$delete_comments = 'delete_comments_example'; // string -$comment_delete_mode = 'comment_delete_mode_example'; // string +$options = [ + 'delete_comments' => 'delete_comments_example', // string + 'comment_delete_mode' => 'comment_delete_mode_example', // string +]; + try { - $result = $apiInstance->deleteTenantUser($tenant_id, $id, $delete_comments, $comment_delete_mode); + $result = $apiInstance->deleteTenantUser($tenant_id, $id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->deleteTenantUser: ', $e->getMessage(), PHP_EOL; @@ -2596,6 +2708,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -2647,9 +2761,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string + try { $result = $apiInstance->deleteUserBadge($tenant_id, $id); print_r($result); @@ -2709,10 +2825,12 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string $edit_key = 'edit_key_example'; // string + try { $result = $apiInstance->deleteVote($tenant_id, $id, $edit_key); print_r($result); @@ -2749,7 +2867,7 @@ try { ## `flagComment()` ```php -flagComment($tenant_id, $id, $user_id, $anon_user_id): \FastComments\Client\Model\FlagCommentResponse +flagComment($tenant_id, $id, $options): \FastComments\Client\Model\FlagCommentResponse ``` @@ -2773,13 +2891,17 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string -$user_id = 'user_id_example'; // string -$anon_user_id = 'anon_user_id_example'; // string +$options = [ + 'user_id' => 'user_id_example', // string + 'anon_user_id' => 'anon_user_id_example', // string +]; + try { - $result = $apiInstance->flagComment($tenant_id, $id, $user_id, $anon_user_id); + $result = $apiInstance->flagComment($tenant_id, $id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->flagComment: ', $e->getMessage(), PHP_EOL; @@ -2788,6 +2910,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -2815,7 +2939,7 @@ try { ## `getAuditLogs()` ```php -getAuditLogs($tenant_id, $limit, $skip, $order, $after, $before): \FastComments\Client\Model\GetAuditLogsResponse +getAuditLogs($tenant_id, $options): \FastComments\Client\Model\GetAuditLogsResponse ``` @@ -2839,15 +2963,19 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string -$limit = 3.4; // float -$skip = 3.4; // float -$order = new \FastComments\Client\Model\\FastComments\Client\Model\SORTDIR(); // \FastComments\Client\Model\SORTDIR -$after = 3.4; // float -$before = 3.4; // float +$options = [ + 'limit' => 3.4, // float + 'skip' => 3.4, // float + 'order' => new \FastComments\Client\Model\\FastComments\Client\Model\SORTDIR(), // \FastComments\Client\Model\SORTDIR + 'after' => 3.4, // float + 'before' => 3.4, // float +]; + try { - $result = $apiInstance->getAuditLogs($tenant_id, $limit, $skip, $order, $after, $before); + $result = $apiInstance->getAuditLogs($tenant_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->getAuditLogs: ', $e->getMessage(), PHP_EOL; @@ -2856,6 +2984,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -2909,9 +3039,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string + try { $result = $apiInstance->getCachedNotificationCount($tenant_id, $id); print_r($result); @@ -2971,9 +3103,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string + try { $result = $apiInstance->getComment($tenant_id, $id); print_r($result); @@ -3009,7 +3143,7 @@ try { ## `getComments()` ```php -getComments($tenant_id, $page, $limit, $skip, $as_tree, $skip_children, $limit_children, $max_tree_depth, $url_id, $user_id, $anon_user_id, $context_user_id, $hash_tag, $parent_id, $direction, $from_date, $to_date): \FastComments\Client\Model\APIGetCommentsResponse +getComments($tenant_id, $options): \FastComments\Client\Model\APIGetCommentsResponse ``` @@ -3033,26 +3167,30 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string -$page = 56; // int -$limit = 56; // int -$skip = 56; // int -$as_tree = True; // bool -$skip_children = 56; // int -$limit_children = 56; // int -$max_tree_depth = 56; // int -$url_id = 'url_id_example'; // string -$user_id = 'user_id_example'; // string -$anon_user_id = 'anon_user_id_example'; // string -$context_user_id = 'context_user_id_example'; // string -$hash_tag = 'hash_tag_example'; // string -$parent_id = 'parent_id_example'; // string -$direction = new \FastComments\Client\Model\\FastComments\Client\Model\SortDirections(); // \FastComments\Client\Model\SortDirections -$from_date = 56; // int -$to_date = 56; // int +$options = [ + 'page' => 56, // int + 'limit' => 56, // int + 'skip' => 56, // int + 'as_tree' => True, // bool + 'skip_children' => 56, // int + 'limit_children' => 56, // int + 'max_tree_depth' => 56, // int + 'url_id' => 'url_id_example', // string + 'user_id' => 'user_id_example', // string + 'anon_user_id' => 'anon_user_id_example', // string + 'context_user_id' => 'context_user_id_example', // string + 'hash_tag' => 'hash_tag_example', // string + 'parent_id' => 'parent_id_example', // string + 'direction' => new \FastComments\Client\Model\\FastComments\Client\Model\SortDirections(), // \FastComments\Client\Model\SortDirections + 'from_date' => 56, // int + 'to_date' => 56, // int +]; + try { - $result = $apiInstance->getComments($tenant_id, $page, $limit, $skip, $as_tree, $skip_children, $limit_children, $max_tree_depth, $url_id, $user_id, $anon_user_id, $context_user_id, $hash_tag, $parent_id, $direction, $from_date, $to_date); + $result = $apiInstance->getComments($tenant_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->getComments: ', $e->getMessage(), PHP_EOL; @@ -3061,6 +3199,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -3125,9 +3265,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $domain = 'domain_example'; // string + try { $result = $apiInstance->getDomainConfig($tenant_id, $domain); print_r($result); @@ -3187,8 +3329,10 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string + try { $result = $apiInstance->getDomainConfigs($tenant_id); print_r($result); @@ -3247,9 +3391,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string + try { $result = $apiInstance->getEmailTemplate($tenant_id, $id); print_r($result); @@ -3309,8 +3455,10 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string + try { $result = $apiInstance->getEmailTemplateDefinitions($tenant_id); print_r($result); @@ -3369,10 +3517,12 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string $skip = 3.4; // float + try { $result = $apiInstance->getEmailTemplateRenderErrors($tenant_id, $id, $skip); print_r($result); @@ -3433,9 +3583,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $skip = 3.4; // float + try { $result = $apiInstance->getEmailTemplates($tenant_id, $skip); print_r($result); @@ -3471,7 +3623,7 @@ try { ## `getFeedPosts()` ```php -getFeedPosts($tenant_id, $after_id, $limit, $tags): \FastComments\Client\Model\GetFeedPostsResponse +getFeedPosts($tenant_id, $options): \FastComments\Client\Model\GetFeedPostsResponse ``` @@ -3497,13 +3649,17 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string -$after_id = 'after_id_example'; // string -$limit = 56; // int -$tags = array('tags_example'); // string[] +$options = [ + 'after_id' => 'after_id_example', // string + 'limit' => 56, // int + 'tags' => array('tags_example'), // string[] +]; + try { - $result = $apiInstance->getFeedPosts($tenant_id, $after_id, $limit, $tags); + $result = $apiInstance->getFeedPosts($tenant_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->getFeedPosts: ', $e->getMessage(), PHP_EOL; @@ -3512,6 +3668,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -3563,9 +3721,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $page = 3.4; // float + try { $result = $apiInstance->getHashTags($tenant_id, $page); print_r($result); @@ -3625,9 +3785,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string + try { $result = $apiInstance->getModerator($tenant_id, $id); print_r($result); @@ -3687,9 +3849,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $skip = 3.4; // float + try { $result = $apiInstance->getModerators($tenant_id, $skip); print_r($result); @@ -3725,7 +3889,7 @@ try { ## `getNotificationCount()` ```php -getNotificationCount($tenant_id, $user_id, $url_id, $from_comment_id, $viewed, $type): \FastComments\Client\Model\GetNotificationCountResponse +getNotificationCount($tenant_id, $options): \FastComments\Client\Model\GetNotificationCountResponse ``` @@ -3749,15 +3913,19 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string -$user_id = 'user_id_example'; // string -$url_id = 'url_id_example'; // string -$from_comment_id = 'from_comment_id_example'; // string -$viewed = True; // bool -$type = 'type_example'; // string +$options = [ + 'user_id' => 'user_id_example', // string + 'url_id' => 'url_id_example', // string + 'from_comment_id' => 'from_comment_id_example', // string + 'viewed' => True, // bool + 'type' => 'type_example', // string +]; + try { - $result = $apiInstance->getNotificationCount($tenant_id, $user_id, $url_id, $from_comment_id, $viewed, $type); + $result = $apiInstance->getNotificationCount($tenant_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->getNotificationCount: ', $e->getMessage(), PHP_EOL; @@ -3766,6 +3934,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -3795,7 +3965,7 @@ try { ## `getNotifications()` ```php -getNotifications($tenant_id, $user_id, $url_id, $from_comment_id, $viewed, $type, $skip): \FastComments\Client\Model\GetNotificationsResponse +getNotifications($tenant_id, $options): \FastComments\Client\Model\GetNotificationsResponse ``` @@ -3819,16 +3989,20 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string -$user_id = 'user_id_example'; // string -$url_id = 'url_id_example'; // string -$from_comment_id = 'from_comment_id_example'; // string -$viewed = True; // bool -$type = 'type_example'; // string -$skip = 3.4; // float +$options = [ + 'user_id' => 'user_id_example', // string + 'url_id' => 'url_id_example', // string + 'from_comment_id' => 'from_comment_id_example', // string + 'viewed' => True, // bool + 'type' => 'type_example', // string + 'skip' => 3.4, // float +]; + try { - $result = $apiInstance->getNotifications($tenant_id, $user_id, $url_id, $from_comment_id, $viewed, $type, $skip); + $result = $apiInstance->getNotifications($tenant_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->getNotifications: ', $e->getMessage(), PHP_EOL; @@ -3837,6 +4011,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -3891,9 +4067,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $url_id = 'url_id_example'; // string + try { $result = $apiInstance->getPageByURLId($tenant_id, $url_id); print_r($result); @@ -3953,8 +4131,10 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string + try { $result = $apiInstance->getPages($tenant_id); print_r($result); @@ -3989,7 +4169,7 @@ try { ## `getPendingWebhookEventCount()` ```php -getPendingWebhookEventCount($tenant_id, $comment_id, $external_id, $event_type, $type, $domain, $attempt_count_gt): \FastComments\Client\Model\GetPendingWebhookEventCountResponse +getPendingWebhookEventCount($tenant_id, $options): \FastComments\Client\Model\GetPendingWebhookEventCountResponse ``` @@ -4013,16 +4193,20 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string -$comment_id = 'comment_id_example'; // string -$external_id = 'external_id_example'; // string -$event_type = 'event_type_example'; // string -$type = 'type_example'; // string -$domain = 'domain_example'; // string -$attempt_count_gt = 3.4; // float +$options = [ + 'comment_id' => 'comment_id_example', // string + 'external_id' => 'external_id_example', // string + 'event_type' => 'event_type_example', // string + 'type' => 'type_example', // string + 'domain' => 'domain_example', // string + 'attempt_count_gt' => 3.4, // float +]; + try { - $result = $apiInstance->getPendingWebhookEventCount($tenant_id, $comment_id, $external_id, $event_type, $type, $domain, $attempt_count_gt); + $result = $apiInstance->getPendingWebhookEventCount($tenant_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->getPendingWebhookEventCount: ', $e->getMessage(), PHP_EOL; @@ -4031,6 +4215,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -4061,7 +4247,7 @@ try { ## `getPendingWebhookEvents()` ```php -getPendingWebhookEvents($tenant_id, $comment_id, $external_id, $event_type, $type, $domain, $attempt_count_gt, $skip): \FastComments\Client\Model\GetPendingWebhookEventsResponse +getPendingWebhookEvents($tenant_id, $options): \FastComments\Client\Model\GetPendingWebhookEventsResponse ``` @@ -4085,17 +4271,21 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string -$comment_id = 'comment_id_example'; // string -$external_id = 'external_id_example'; // string -$event_type = 'event_type_example'; // string -$type = 'type_example'; // string -$domain = 'domain_example'; // string -$attempt_count_gt = 3.4; // float -$skip = 3.4; // float +$options = [ + 'comment_id' => 'comment_id_example', // string + 'external_id' => 'external_id_example', // string + 'event_type' => 'event_type_example', // string + 'type' => 'type_example', // string + 'domain' => 'domain_example', // string + 'attempt_count_gt' => 3.4, // float + 'skip' => 3.4, // float +]; + try { - $result = $apiInstance->getPendingWebhookEvents($tenant_id, $comment_id, $external_id, $event_type, $type, $domain, $attempt_count_gt, $skip); + $result = $apiInstance->getPendingWebhookEvents($tenant_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->getPendingWebhookEvents: ', $e->getMessage(), PHP_EOL; @@ -4104,6 +4294,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -4159,9 +4351,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string + try { $result = $apiInstance->getQuestionConfig($tenant_id, $id); print_r($result); @@ -4221,9 +4415,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $skip = 3.4; // float + try { $result = $apiInstance->getQuestionConfigs($tenant_id, $skip); print_r($result); @@ -4283,9 +4479,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string + try { $result = $apiInstance->getQuestionResult($tenant_id, $id); print_r($result); @@ -4321,7 +4519,7 @@ try { ## `getQuestionResults()` ```php -getQuestionResults($tenant_id, $url_id, $user_id, $start_date, $question_id, $question_ids, $skip): \FastComments\Client\Model\GetQuestionResultsResponse +getQuestionResults($tenant_id, $options): \FastComments\Client\Model\GetQuestionResultsResponse ``` @@ -4345,16 +4543,20 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string -$url_id = 'url_id_example'; // string -$user_id = 'user_id_example'; // string -$start_date = 'start_date_example'; // string -$question_id = 'question_id_example'; // string -$question_ids = 'question_ids_example'; // string -$skip = 3.4; // float +$options = [ + 'url_id' => 'url_id_example', // string + 'user_id' => 'user_id_example', // string + 'start_date' => 'start_date_example', // string + 'question_id' => 'question_id_example', // string + 'question_ids' => 'question_ids_example', // string + 'skip' => 3.4, // float +]; + try { - $result = $apiInstance->getQuestionResults($tenant_id, $url_id, $user_id, $start_date, $question_id, $question_ids, $skip); + $result = $apiInstance->getQuestionResults($tenant_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->getQuestionResults: ', $e->getMessage(), PHP_EOL; @@ -4363,6 +4565,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -4417,9 +4621,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $email = 'email_example'; // string + try { $result = $apiInstance->getSSOUserByEmail($tenant_id, $email); print_r($result); @@ -4479,9 +4685,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string + try { $result = $apiInstance->getSSOUserById($tenant_id, $id); print_r($result); @@ -4541,9 +4749,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $skip = 56; // int + try { $result = $apiInstance->getSSOUsers($tenant_id, $skip); print_r($result); @@ -4603,9 +4813,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $user_id = 'user_id_example'; // string + try { $result = $apiInstance->getSubscriptions($tenant_id, $user_id); print_r($result); @@ -4665,9 +4877,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string + try { $result = $apiInstance->getTenant($tenant_id, $id); print_r($result); @@ -4703,7 +4917,7 @@ try { ## `getTenantDailyUsages()` ```php -getTenantDailyUsages($tenant_id, $year_number, $month_number, $day_number, $skip): \FastComments\Client\Model\GetTenantDailyUsagesResponse +getTenantDailyUsages($tenant_id, $options): \FastComments\Client\Model\GetTenantDailyUsagesResponse ``` @@ -4727,14 +4941,18 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string -$year_number = 3.4; // float -$month_number = 3.4; // float -$day_number = 3.4; // float -$skip = 3.4; // float +$options = [ + 'year_number' => 3.4, // float + 'month_number' => 3.4, // float + 'day_number' => 3.4, // float + 'skip' => 3.4, // float +]; + try { - $result = $apiInstance->getTenantDailyUsages($tenant_id, $year_number, $month_number, $day_number, $skip); + $result = $apiInstance->getTenantDailyUsages($tenant_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->getTenantDailyUsages: ', $e->getMessage(), PHP_EOL; @@ -4743,6 +4961,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -4795,9 +5015,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string + try { $result = $apiInstance->getTenantPackage($tenant_id, $id); print_r($result); @@ -4857,9 +5079,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $skip = 3.4; // float + try { $result = $apiInstance->getTenantPackages($tenant_id, $skip); print_r($result); @@ -4919,9 +5143,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string + try { $result = $apiInstance->getTenantUser($tenant_id, $id); print_r($result); @@ -4981,9 +5207,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $skip = 3.4; // float + try { $result = $apiInstance->getTenantUsers($tenant_id, $skip); print_r($result); @@ -5019,7 +5247,7 @@ try { ## `getTenants()` ```php -getTenants($tenant_id, $meta, $skip): \FastComments\Client\Model\GetTenantsResponse +getTenants($tenant_id, $options): \FastComments\Client\Model\GetTenantsResponse ``` @@ -5043,12 +5271,16 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string -$meta = 'meta_example'; // string -$skip = 3.4; // float +$options = [ + 'meta' => 'meta_example', // string + 'skip' => 3.4, // float +]; + try { - $result = $apiInstance->getTenants($tenant_id, $meta, $skip); + $result = $apiInstance->getTenants($tenant_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->getTenants: ', $e->getMessage(), PHP_EOL; @@ -5057,6 +5289,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -5107,10 +5341,12 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string $user_id = 'user_id_example'; // string + try { $result = $apiInstance->getTicket($tenant_id, $id, $user_id); print_r($result); @@ -5147,7 +5383,7 @@ try { ## `getTickets()` ```php -getTickets($tenant_id, $user_id, $state, $skip, $limit): \FastComments\Client\Model\GetTicketsResponse +getTickets($tenant_id, $options): \FastComments\Client\Model\GetTicketsResponse ``` @@ -5171,14 +5407,18 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string -$user_id = 'user_id_example'; // string -$state = 3.4; // float -$skip = 3.4; // float -$limit = 3.4; // float +$options = [ + 'user_id' => 'user_id_example', // string + 'state' => 3.4, // float + 'skip' => 3.4, // float + 'limit' => 3.4, // float +]; + try { - $result = $apiInstance->getTickets($tenant_id, $user_id, $state, $skip, $limit); + $result = $apiInstance->getTickets($tenant_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->getTickets: ', $e->getMessage(), PHP_EOL; @@ -5187,6 +5427,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -5239,9 +5481,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string + try { $result = $apiInstance->getUser($tenant_id, $id); print_r($result); @@ -5301,9 +5545,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string + try { $result = $apiInstance->getUserBadge($tenant_id, $id); print_r($result); @@ -5363,9 +5609,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string + try { $result = $apiInstance->getUserBadgeProgressById($tenant_id, $id); print_r($result); @@ -5425,9 +5673,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $user_id = 'user_id_example'; // string + try { $result = $apiInstance->getUserBadgeProgressByUserId($tenant_id, $user_id); print_r($result); @@ -5463,7 +5713,7 @@ try { ## `getUserBadgeProgressList()` ```php -getUserBadgeProgressList($tenant_id, $user_id, $limit, $skip): \FastComments\Client\Model\APIGetUserBadgeProgressListResponse +getUserBadgeProgressList($tenant_id, $options): \FastComments\Client\Model\APIGetUserBadgeProgressListResponse ``` @@ -5487,13 +5737,17 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string -$user_id = 'user_id_example'; // string -$limit = 3.4; // float -$skip = 3.4; // float +$options = [ + 'user_id' => 'user_id_example', // string + 'limit' => 3.4, // float + 'skip' => 3.4, // float +]; + try { - $result = $apiInstance->getUserBadgeProgressList($tenant_id, $user_id, $limit, $skip); + $result = $apiInstance->getUserBadgeProgressList($tenant_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->getUserBadgeProgressList: ', $e->getMessage(), PHP_EOL; @@ -5502,6 +5756,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -5529,7 +5785,7 @@ try { ## `getUserBadges()` ```php -getUserBadges($tenant_id, $user_id, $badge_id, $type, $displayed_on_comments, $limit, $skip): \FastComments\Client\Model\APIGetUserBadgesResponse +getUserBadges($tenant_id, $options): \FastComments\Client\Model\APIGetUserBadgesResponse ``` @@ -5553,16 +5809,20 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string -$user_id = 'user_id_example'; // string -$badge_id = 'badge_id_example'; // string -$type = 3.4; // float -$displayed_on_comments = True; // bool -$limit = 3.4; // float -$skip = 3.4; // float +$options = [ + 'user_id' => 'user_id_example', // string + 'badge_id' => 'badge_id_example', // string + 'type' => 3.4, // float + 'displayed_on_comments' => True, // bool + 'limit' => 3.4, // float + 'skip' => 3.4, // float +]; + try { - $result = $apiInstance->getUserBadges($tenant_id, $user_id, $badge_id, $type, $displayed_on_comments, $limit, $skip); + $result = $apiInstance->getUserBadges($tenant_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->getUserBadges: ', $e->getMessage(), PHP_EOL; @@ -5571,6 +5831,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -5625,9 +5887,11 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $url_id = 'url_id_example'; // string + try { $result = $apiInstance->getVotes($tenant_id, $url_id); print_r($result); @@ -5663,7 +5927,7 @@ try { ## `getVotesForUser()` ```php -getVotesForUser($tenant_id, $url_id, $user_id, $anon_user_id): \FastComments\Client\Model\GetVotesForUserResponse +getVotesForUser($tenant_id, $url_id, $options): \FastComments\Client\Model\GetVotesForUserResponse ``` @@ -5687,13 +5951,17 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $url_id = 'url_id_example'; // string -$user_id = 'user_id_example'; // string -$anon_user_id = 'anon_user_id_example'; // string +$options = [ + 'user_id' => 'user_id_example', // string + 'anon_user_id' => 'anon_user_id_example', // string +]; + try { - $result = $apiInstance->getVotesForUser($tenant_id, $url_id, $user_id, $anon_user_id); + $result = $apiInstance->getVotesForUser($tenant_id, $url_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->getVotesForUser: ', $e->getMessage(), PHP_EOL; @@ -5702,6 +5970,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -5753,10 +6023,12 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $domain_to_update = 'domain_to_update_example'; // string $patch_domain_config_params = new \FastComments\Client\Model\PatchDomainConfigParams(); // \FastComments\Client\Model\PatchDomainConfigParams + try { $result = $apiInstance->patchDomainConfig($tenant_id, $domain_to_update, $patch_domain_config_params); print_r($result); @@ -5793,7 +6065,7 @@ try { ## `patchHashTag()` ```php -patchHashTag($tag, $tenant_id, $update_hash_tag_body): \FastComments\Client\Model\UpdateHashTagResponse +patchHashTag($tenant_id, $tag, $update_hash_tag_body): \FastComments\Client\Model\UpdateHashTagResponse ``` @@ -5817,12 +6089,14 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); -$tag = 'tag_example'; // string + $tenant_id = 'tenant_id_example'; // string +$tag = 'tag_example'; // string $update_hash_tag_body = new \FastComments\Client\Model\UpdateHashTagBody(); // \FastComments\Client\Model\UpdateHashTagBody + try { - $result = $apiInstance->patchHashTag($tag, $tenant_id, $update_hash_tag_body); + $result = $apiInstance->patchHashTag($tenant_id, $tag, $update_hash_tag_body); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->patchHashTag: ', $e->getMessage(), PHP_EOL; @@ -5833,8 +6107,8 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | +| **tenant_id** | **string**| | | | **tag** | **string**| | | -| **tenant_id** | **string**| | [optional] | | **update_hash_tag_body** | [**\FastComments\Client\Model\UpdateHashTagBody**](../Model/UpdateHashTagBody.md)| | [optional] | ### Return type @@ -5881,10 +6155,12 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string $update_api_page_data = new \FastComments\Client\Model\UpdateAPIPageData(); // \FastComments\Client\Model\UpdateAPIPageData + try { $result = $apiInstance->patchPage($tenant_id, $id, $update_api_page_data); print_r($result); @@ -5945,11 +6221,13 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string $update_apisso_user_data = new \FastComments\Client\Model\UpdateAPISSOUserData(); // \FastComments\Client\Model\UpdateAPISSOUserData $update_comments = True; // bool + try { $result = $apiInstance->patchSSOUser($tenant_id, $id, $update_apisso_user_data, $update_comments); print_r($result); @@ -6011,10 +6289,12 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $domain_to_update = 'domain_to_update_example'; // string $update_domain_config_params = new \FastComments\Client\Model\UpdateDomainConfigParams(); // \FastComments\Client\Model\UpdateDomainConfigParams + try { $result = $apiInstance->putDomainConfig($tenant_id, $domain_to_update, $update_domain_config_params); print_r($result); @@ -6075,11 +6355,13 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string $update_apisso_user_data = new \FastComments\Client\Model\UpdateAPISSOUserData(); // \FastComments\Client\Model\UpdateAPISSOUserData $update_comments = True; // bool + try { $result = $apiInstance->putSSOUser($tenant_id, $id, $update_apisso_user_data, $update_comments); print_r($result); @@ -6141,10 +6423,12 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $render_email_template_body = new \FastComments\Client\Model\RenderEmailTemplateBody(); // \FastComments\Client\Model\RenderEmailTemplateBody $locale = 'locale_example'; // string + try { $result = $apiInstance->renderEmailTemplate($tenant_id, $render_email_template_body, $locale); print_r($result); @@ -6205,10 +6489,12 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string $replace_tenant_package_body = new \FastComments\Client\Model\ReplaceTenantPackageBody(); // \FastComments\Client\Model\ReplaceTenantPackageBody + try { $result = $apiInstance->replaceTenantPackage($tenant_id, $id, $replace_tenant_package_body); print_r($result); @@ -6269,11 +6555,13 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string $replace_tenant_user_body = new \FastComments\Client\Model\ReplaceTenantUserBody(); // \FastComments\Client\Model\ReplaceTenantUserBody $update_comments = 'update_comments_example'; // string + try { $result = $apiInstance->replaceTenantUser($tenant_id, $id, $replace_tenant_user_body, $update_comments); print_r($result); @@ -6311,7 +6599,7 @@ try { ## `saveComment()` ```php -saveComment($tenant_id, $create_comment_params, $is_live, $do_spam_check, $send_emails, $populate_notifications): \FastComments\Client\Model\APISaveCommentResponse +saveComment($tenant_id, $create_comment_params, $options): \FastComments\Client\Model\APISaveCommentResponse ``` @@ -6335,15 +6623,19 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $create_comment_params = new \FastComments\Client\Model\CreateCommentParams(); // \FastComments\Client\Model\CreateCommentParams -$is_live = True; // bool -$do_spam_check = True; // bool -$send_emails = True; // bool -$populate_notifications = True; // bool +$options = [ + 'is_live' => True, // bool + 'do_spam_check' => True, // bool + 'send_emails' => True, // bool + 'populate_notifications' => True, // bool +]; + try { - $result = $apiInstance->saveComment($tenant_id, $create_comment_params, $is_live, $do_spam_check, $send_emails, $populate_notifications); + $result = $apiInstance->saveComment($tenant_id, $create_comment_params, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->saveComment: ', $e->getMessage(), PHP_EOL; @@ -6352,6 +6644,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -6381,7 +6675,7 @@ try { ## `saveCommentsBulk()` ```php -saveCommentsBulk($tenant_id, $create_comment_params, $is_live, $do_spam_check, $send_emails, $populate_notifications): \FastComments\Client\Model\SaveCommentsBulkResponse[] +saveCommentsBulk($tenant_id, $create_comment_params, $options): \FastComments\Client\Model\SaveCommentsBulkResponse[] ``` @@ -6405,15 +6699,19 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $create_comment_params = array(new \FastComments\Client\Model\CreateCommentParams()); // \FastComments\Client\Model\CreateCommentParams[] -$is_live = True; // bool -$do_spam_check = True; // bool -$send_emails = True; // bool -$populate_notifications = True; // bool +$options = [ + 'is_live' => True, // bool + 'do_spam_check' => True, // bool + 'send_emails' => True, // bool + 'populate_notifications' => True, // bool +]; + try { - $result = $apiInstance->saveCommentsBulk($tenant_id, $create_comment_params, $is_live, $do_spam_check, $send_emails, $populate_notifications); + $result = $apiInstance->saveCommentsBulk($tenant_id, $create_comment_params, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->saveCommentsBulk: ', $e->getMessage(), PHP_EOL; @@ -6422,6 +6720,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -6475,10 +6775,12 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string $from_name = 'from_name_example'; // string + try { $result = $apiInstance->sendInvite($tenant_id, $id, $from_name); print_r($result); @@ -6539,10 +6841,12 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string $redirect_url = 'redirect_url_example'; // string + try { $result = $apiInstance->sendLoginLink($tenant_id, $id, $redirect_url); print_r($result); @@ -6579,7 +6883,7 @@ try { ## `unBlockUserFromComment()` ```php -unBlockUserFromComment($tenant_id, $id, $un_block_from_comment_params, $user_id, $anon_user_id): \FastComments\Client\Model\UnblockSuccess +unBlockUserFromComment($tenant_id, $id, $un_block_from_comment_params, $options): \FastComments\Client\Model\UnblockSuccess ``` @@ -6603,14 +6907,18 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string $un_block_from_comment_params = new \FastComments\Client\Model\UnBlockFromCommentParams(); // \FastComments\Client\Model\UnBlockFromCommentParams -$user_id = 'user_id_example'; // string -$anon_user_id = 'anon_user_id_example'; // string +$options = [ + 'user_id' => 'user_id_example', // string + 'anon_user_id' => 'anon_user_id_example', // string +]; + try { - $result = $apiInstance->unBlockUserFromComment($tenant_id, $id, $un_block_from_comment_params, $user_id, $anon_user_id); + $result = $apiInstance->unBlockUserFromComment($tenant_id, $id, $un_block_from_comment_params, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->unBlockUserFromComment: ', $e->getMessage(), PHP_EOL; @@ -6619,6 +6927,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -6647,7 +6957,7 @@ try { ## `unFlagComment()` ```php -unFlagComment($tenant_id, $id, $user_id, $anon_user_id): \FastComments\Client\Model\FlagCommentResponse +unFlagComment($tenant_id, $id, $options): \FastComments\Client\Model\FlagCommentResponse ``` @@ -6671,13 +6981,17 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string -$user_id = 'user_id_example'; // string -$anon_user_id = 'anon_user_id_example'; // string +$options = [ + 'user_id' => 'user_id_example', // string + 'anon_user_id' => 'anon_user_id_example', // string +]; + try { - $result = $apiInstance->unFlagComment($tenant_id, $id, $user_id, $anon_user_id); + $result = $apiInstance->unFlagComment($tenant_id, $id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->unFlagComment: ', $e->getMessage(), PHP_EOL; @@ -6686,6 +7000,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -6713,7 +7029,7 @@ try { ## `updateComment()` ```php -updateComment($tenant_id, $id, $updatable_comment_params, $context_user_id, $do_spam_check, $is_live): \FastComments\Client\Model\APIEmptyResponse +updateComment($tenant_id, $id, $updatable_comment_params, $options): \FastComments\Client\Model\APIEmptyResponse ``` @@ -6737,15 +7053,19 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string $updatable_comment_params = new \FastComments\Client\Model\UpdatableCommentParams(); // \FastComments\Client\Model\UpdatableCommentParams -$context_user_id = 'context_user_id_example'; // string -$do_spam_check = True; // bool -$is_live = True; // bool +$options = [ + 'context_user_id' => 'context_user_id_example', // string + 'do_spam_check' => True, // bool + 'is_live' => True, // bool +]; + try { - $result = $apiInstance->updateComment($tenant_id, $id, $updatable_comment_params, $context_user_id, $do_spam_check, $is_live); + $result = $apiInstance->updateComment($tenant_id, $id, $updatable_comment_params, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->updateComment: ', $e->getMessage(), PHP_EOL; @@ -6754,6 +7074,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -6807,10 +7129,12 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string $update_email_template_body = new \FastComments\Client\Model\UpdateEmailTemplateBody(); // \FastComments\Client\Model\UpdateEmailTemplateBody + try { $result = $apiInstance->updateEmailTemplate($tenant_id, $id, $update_email_template_body); print_r($result); @@ -6871,10 +7195,12 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string $feed_post = new \FastComments\Client\Model\FeedPost(); // \FastComments\Client\Model\FeedPost + try { $result = $apiInstance->updateFeedPost($tenant_id, $id, $feed_post); print_r($result); @@ -6935,10 +7261,12 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string $update_moderator_body = new \FastComments\Client\Model\UpdateModeratorBody(); // \FastComments\Client\Model\UpdateModeratorBody + try { $result = $apiInstance->updateModerator($tenant_id, $id, $update_moderator_body); print_r($result); @@ -6999,11 +7327,13 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string $update_notification_body = new \FastComments\Client\Model\UpdateNotificationBody(); // \FastComments\Client\Model\UpdateNotificationBody $user_id = 'user_id_example'; // string + try { $result = $apiInstance->updateNotification($tenant_id, $id, $update_notification_body, $user_id); print_r($result); @@ -7065,10 +7395,12 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string $update_question_config_body = new \FastComments\Client\Model\UpdateQuestionConfigBody(); // \FastComments\Client\Model\UpdateQuestionConfigBody + try { $result = $apiInstance->updateQuestionConfig($tenant_id, $id, $update_question_config_body); print_r($result); @@ -7129,10 +7461,12 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string $update_question_result_body = new \FastComments\Client\Model\UpdateQuestionResultBody(); // \FastComments\Client\Model\UpdateQuestionResultBody + try { $result = $apiInstance->updateQuestionResult($tenant_id, $id, $update_question_result_body); print_r($result); @@ -7193,11 +7527,13 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string $update_api_user_subscription_data = new \FastComments\Client\Model\UpdateAPIUserSubscriptionData(); // \FastComments\Client\Model\UpdateAPIUserSubscriptionData $user_id = 'user_id_example'; // string + try { $result = $apiInstance->updateSubscription($tenant_id, $id, $update_api_user_subscription_data, $user_id); print_r($result); @@ -7259,10 +7595,12 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string $update_tenant_body = new \FastComments\Client\Model\UpdateTenantBody(); // \FastComments\Client\Model\UpdateTenantBody + try { $result = $apiInstance->updateTenant($tenant_id, $id, $update_tenant_body); print_r($result); @@ -7323,10 +7661,12 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string $update_tenant_package_body = new \FastComments\Client\Model\UpdateTenantPackageBody(); // \FastComments\Client\Model\UpdateTenantPackageBody + try { $result = $apiInstance->updateTenantPackage($tenant_id, $id, $update_tenant_package_body); print_r($result); @@ -7387,11 +7727,13 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string $update_tenant_user_body = new \FastComments\Client\Model\UpdateTenantUserBody(); // \FastComments\Client\Model\UpdateTenantUserBody $update_comments = 'update_comments_example'; // string + try { $result = $apiInstance->updateTenantUser($tenant_id, $id, $update_tenant_user_body, $update_comments); print_r($result); @@ -7453,10 +7795,12 @@ $apiInstance = new FastComments\Client\Api\DefaultApi( new GuzzleHttp\Client(), $config ); + $tenant_id = 'tenant_id_example'; // string $id = 'id_example'; // string $update_user_badge_params = new \FastComments\Client\Model\UpdateUserBadgeParams(); // \FastComments\Client\Model\UpdateUserBadgeParams + try { $result = $apiInstance->updateUserBadge($tenant_id, $id, $update_user_badge_params); print_r($result); diff --git a/docs/Api/ModerationApi.md b/docs/Api/ModerationApi.md index e4e0df7..d5ba8e7 100644 --- a/docs/Api/ModerationApi.md +++ b/docs/Api/ModerationApi.md @@ -1,60 +1,60 @@ # FastComments\Client\ModerationApi -FastComments PHP API Client - A SDK for interacting with the FastComments API + All URIs are relative to https://fastcomments.com, except if the operation defines another base path. | Method | HTTP request | Description | | ------------- | ------------- | ------------- | -| [**deleteModerationVote()**](ModerationApi.md#deleteModerationVote) | **DELETE** /auth/my-account/moderate-comments/vote/{commentId}/{voteId} | | -| [**getApiComments()**](ModerationApi.md#getApiComments) | **GET** /auth/my-account/moderate-comments/api/comments | | -| [**getApiExportStatus()**](ModerationApi.md#getApiExportStatus) | **GET** /auth/my-account/moderate-comments/api/export/status | | -| [**getApiIds()**](ModerationApi.md#getApiIds) | **GET** /auth/my-account/moderate-comments/api/ids | | -| [**getBanUsersFromComment()**](ModerationApi.md#getBanUsersFromComment) | **GET** /auth/my-account/moderate-comments/ban-users/from-comment/{commentId} | | -| [**getCommentBanStatus()**](ModerationApi.md#getCommentBanStatus) | **GET** /auth/my-account/moderate-comments/get-comment-ban-status/{commentId} | | -| [**getCommentChildren()**](ModerationApi.md#getCommentChildren) | **GET** /auth/my-account/moderate-comments/comment-children/{commentId} | | -| [**getCount()**](ModerationApi.md#getCount) | **GET** /auth/my-account/moderate-comments/count | | -| [**getCounts()**](ModerationApi.md#getCounts) | **GET** /auth/my-account/moderate-comments/banned-users/counts | | -| [**getLogs()**](ModerationApi.md#getLogs) | **GET** /auth/my-account/moderate-comments/logs/{commentId} | | -| [**getManualBadges()**](ModerationApi.md#getManualBadges) | **GET** /auth/my-account/moderate-comments/get-manual-badges | | -| [**getManualBadgesForUser()**](ModerationApi.md#getManualBadgesForUser) | **GET** /auth/my-account/moderate-comments/get-manual-badges-for-user | | -| [**getModerationComment()**](ModerationApi.md#getModerationComment) | **GET** /auth/my-account/moderate-comments/comment/{commentId} | | -| [**getModerationCommentText()**](ModerationApi.md#getModerationCommentText) | **GET** /auth/my-account/moderate-comments/get-comment-text/{commentId} | | -| [**getPreBanSummary()**](ModerationApi.md#getPreBanSummary) | **GET** /auth/my-account/moderate-comments/pre-ban-summary/{commentId} | | -| [**getSearchCommentsSummary()**](ModerationApi.md#getSearchCommentsSummary) | **GET** /auth/my-account/moderate-comments/search/comments/summary | | -| [**getSearchPages()**](ModerationApi.md#getSearchPages) | **GET** /auth/my-account/moderate-comments/search/pages | | -| [**getSearchSites()**](ModerationApi.md#getSearchSites) | **GET** /auth/my-account/moderate-comments/search/sites | | -| [**getSearchSuggest()**](ModerationApi.md#getSearchSuggest) | **GET** /auth/my-account/moderate-comments/search/suggest | | -| [**getSearchUsers()**](ModerationApi.md#getSearchUsers) | **GET** /auth/my-account/moderate-comments/search/users | | -| [**getTrustFactor()**](ModerationApi.md#getTrustFactor) | **GET** /auth/my-account/moderate-comments/get-trust-factor | | -| [**getUserBanPreference()**](ModerationApi.md#getUserBanPreference) | **GET** /auth/my-account/moderate-comments/user-ban-preference | | -| [**getUserInternalProfile()**](ModerationApi.md#getUserInternalProfile) | **GET** /auth/my-account/moderate-comments/get-user-internal-profile | | -| [**postAdjustCommentVotes()**](ModerationApi.md#postAdjustCommentVotes) | **POST** /auth/my-account/moderate-comments/adjust-comment-votes/{commentId} | | -| [**postApiExport()**](ModerationApi.md#postApiExport) | **POST** /auth/my-account/moderate-comments/api/export | | -| [**postBanUserFromComment()**](ModerationApi.md#postBanUserFromComment) | **POST** /auth/my-account/moderate-comments/ban-user/from-comment/{commentId} | | -| [**postBanUserUndo()**](ModerationApi.md#postBanUserUndo) | **POST** /auth/my-account/moderate-comments/ban-user/undo | | -| [**postBulkPreBanSummary()**](ModerationApi.md#postBulkPreBanSummary) | **POST** /auth/my-account/moderate-comments/bulk-pre-ban-summary | | -| [**postCommentsByIds()**](ModerationApi.md#postCommentsByIds) | **POST** /auth/my-account/moderate-comments/comments-by-ids | | -| [**postFlagComment()**](ModerationApi.md#postFlagComment) | **POST** /auth/my-account/moderate-comments/flag-comment/{commentId} | | -| [**postRemoveComment()**](ModerationApi.md#postRemoveComment) | **POST** /auth/my-account/moderate-comments/remove-comment/{commentId} | | -| [**postRestoreDeletedComment()**](ModerationApi.md#postRestoreDeletedComment) | **POST** /auth/my-account/moderate-comments/restore-deleted-comment/{commentId} | | -| [**postSetCommentApprovalStatus()**](ModerationApi.md#postSetCommentApprovalStatus) | **POST** /auth/my-account/moderate-comments/set-comment-approval-status/{commentId} | | -| [**postSetCommentReviewStatus()**](ModerationApi.md#postSetCommentReviewStatus) | **POST** /auth/my-account/moderate-comments/set-comment-review-status/{commentId} | | -| [**postSetCommentSpamStatus()**](ModerationApi.md#postSetCommentSpamStatus) | **POST** /auth/my-account/moderate-comments/set-comment-spam-status/{commentId} | | -| [**postSetCommentText()**](ModerationApi.md#postSetCommentText) | **POST** /auth/my-account/moderate-comments/set-comment-text/{commentId} | | -| [**postUnFlagComment()**](ModerationApi.md#postUnFlagComment) | **POST** /auth/my-account/moderate-comments/un-flag-comment/{commentId} | | -| [**postVote()**](ModerationApi.md#postVote) | **POST** /auth/my-account/moderate-comments/vote/{commentId} | | -| [**putAwardBadge()**](ModerationApi.md#putAwardBadge) | **PUT** /auth/my-account/moderate-comments/award-badge | | -| [**putCloseThread()**](ModerationApi.md#putCloseThread) | **PUT** /auth/my-account/moderate-comments/close-thread | | -| [**putRemoveBadge()**](ModerationApi.md#putRemoveBadge) | **PUT** /auth/my-account/moderate-comments/remove-badge | | -| [**putReopenThread()**](ModerationApi.md#putReopenThread) | **PUT** /auth/my-account/moderate-comments/reopen-thread | | -| [**setTrustFactor()**](ModerationApi.md#setTrustFactor) | **PUT** /auth/my-account/moderate-comments/set-trust-factor | | +| [**deleteModerationVote()**](ModerationApi.md#deleteModerationVote) | **DELETE** /auth/my-account/moderate-comments/mod_api/vote/{commentId}/{voteId} | | +| [**getApiComments()**](ModerationApi.md#getApiComments) | **GET** /auth/my-account/moderate-comments/mod_api/api/comments | | +| [**getApiExportStatus()**](ModerationApi.md#getApiExportStatus) | **GET** /auth/my-account/moderate-comments/mod_api/api/export/status | | +| [**getApiIds()**](ModerationApi.md#getApiIds) | **GET** /auth/my-account/moderate-comments/mod_api/api/ids | | +| [**getBanUsersFromComment()**](ModerationApi.md#getBanUsersFromComment) | **GET** /auth/my-account/moderate-comments/mod_api/ban-users/from-comment/{commentId} | | +| [**getCommentBanStatus()**](ModerationApi.md#getCommentBanStatus) | **GET** /auth/my-account/moderate-comments/mod_api/get-comment-ban-status/{commentId} | | +| [**getCommentChildren()**](ModerationApi.md#getCommentChildren) | **GET** /auth/my-account/moderate-comments/mod_api/comment-children/{commentId} | | +| [**getCount()**](ModerationApi.md#getCount) | **GET** /auth/my-account/moderate-comments/mod_api/count | | +| [**getCounts()**](ModerationApi.md#getCounts) | **GET** /auth/my-account/moderate-comments/banned-users/mod_api/counts | | +| [**getLogs()**](ModerationApi.md#getLogs) | **GET** /auth/my-account/moderate-comments/mod_api/logs/{commentId} | | +| [**getManualBadges()**](ModerationApi.md#getManualBadges) | **GET** /auth/my-account/moderate-comments/mod_api/get-manual-badges | | +| [**getManualBadgesForUser()**](ModerationApi.md#getManualBadgesForUser) | **GET** /auth/my-account/moderate-comments/mod_api/get-manual-badges-for-user | | +| [**getModerationComment()**](ModerationApi.md#getModerationComment) | **GET** /auth/my-account/moderate-comments/mod_api/comment/{commentId} | | +| [**getModerationCommentText()**](ModerationApi.md#getModerationCommentText) | **GET** /auth/my-account/moderate-comments/mod_api/get-comment-text/{commentId} | | +| [**getPreBanSummary()**](ModerationApi.md#getPreBanSummary) | **GET** /auth/my-account/moderate-comments/mod_api/pre-ban-summary/{commentId} | | +| [**getSearchCommentsSummary()**](ModerationApi.md#getSearchCommentsSummary) | **GET** /auth/my-account/moderate-comments/mod_api/search/comments/summary | | +| [**getSearchPages()**](ModerationApi.md#getSearchPages) | **GET** /auth/my-account/moderate-comments/mod_api/search/pages | | +| [**getSearchSites()**](ModerationApi.md#getSearchSites) | **GET** /auth/my-account/moderate-comments/mod_api/search/sites | | +| [**getSearchSuggest()**](ModerationApi.md#getSearchSuggest) | **GET** /auth/my-account/moderate-comments/mod_api/search/suggest | | +| [**getSearchUsers()**](ModerationApi.md#getSearchUsers) | **GET** /auth/my-account/moderate-comments/mod_api/search/users | | +| [**getTrustFactor()**](ModerationApi.md#getTrustFactor) | **GET** /auth/my-account/moderate-comments/mod_api/get-trust-factor | | +| [**getUserBanPreference()**](ModerationApi.md#getUserBanPreference) | **GET** /auth/my-account/moderate-comments/mod_api/user-ban-preference | | +| [**getUserInternalProfile()**](ModerationApi.md#getUserInternalProfile) | **GET** /auth/my-account/moderate-comments/mod_api/get-user-internal-profile | | +| [**postAdjustCommentVotes()**](ModerationApi.md#postAdjustCommentVotes) | **POST** /auth/my-account/moderate-comments/mod_api/adjust-comment-votes/{commentId} | | +| [**postApiExport()**](ModerationApi.md#postApiExport) | **POST** /auth/my-account/moderate-comments/mod_api/api/export | | +| [**postBanUserFromComment()**](ModerationApi.md#postBanUserFromComment) | **POST** /auth/my-account/moderate-comments/mod_api/ban-user/from-comment/{commentId} | | +| [**postBanUserUndo()**](ModerationApi.md#postBanUserUndo) | **POST** /auth/my-account/moderate-comments/mod_api/ban-user/undo | | +| [**postBulkPreBanSummary()**](ModerationApi.md#postBulkPreBanSummary) | **POST** /auth/my-account/moderate-comments/mod_api/bulk-pre-ban-summary | | +| [**postCommentsByIds()**](ModerationApi.md#postCommentsByIds) | **POST** /auth/my-account/moderate-comments/mod_api/comments-by-ids | | +| [**postFlagComment()**](ModerationApi.md#postFlagComment) | **POST** /auth/my-account/moderate-comments/mod_api/flag-comment/{commentId} | | +| [**postRemoveComment()**](ModerationApi.md#postRemoveComment) | **POST** /auth/my-account/moderate-comments/mod_api/remove-comment/{commentId} | | +| [**postRestoreDeletedComment()**](ModerationApi.md#postRestoreDeletedComment) | **POST** /auth/my-account/moderate-comments/mod_api/restore-deleted-comment/{commentId} | | +| [**postSetCommentApprovalStatus()**](ModerationApi.md#postSetCommentApprovalStatus) | **POST** /auth/my-account/moderate-comments/mod_api/set-comment-approval-status/{commentId} | | +| [**postSetCommentReviewStatus()**](ModerationApi.md#postSetCommentReviewStatus) | **POST** /auth/my-account/moderate-comments/mod_api/set-comment-review-status/{commentId} | | +| [**postSetCommentSpamStatus()**](ModerationApi.md#postSetCommentSpamStatus) | **POST** /auth/my-account/moderate-comments/mod_api/set-comment-spam-status/{commentId} | | +| [**postSetCommentText()**](ModerationApi.md#postSetCommentText) | **POST** /auth/my-account/moderate-comments/mod_api/set-comment-text/{commentId} | | +| [**postUnFlagComment()**](ModerationApi.md#postUnFlagComment) | **POST** /auth/my-account/moderate-comments/mod_api/un-flag-comment/{commentId} | | +| [**postVote()**](ModerationApi.md#postVote) | **POST** /auth/my-account/moderate-comments/mod_api/vote/{commentId} | | +| [**putAwardBadge()**](ModerationApi.md#putAwardBadge) | **PUT** /auth/my-account/moderate-comments/mod_api/award-badge | | +| [**putCloseThread()**](ModerationApi.md#putCloseThread) | **PUT** /auth/my-account/moderate-comments/mod_api/close-thread | | +| [**putRemoveBadge()**](ModerationApi.md#putRemoveBadge) | **PUT** /auth/my-account/moderate-comments/mod_api/remove-badge | | +| [**putReopenThread()**](ModerationApi.md#putReopenThread) | **PUT** /auth/my-account/moderate-comments/mod_api/reopen-thread | | +| [**setTrustFactor()**](ModerationApi.md#setTrustFactor) | **PUT** /auth/my-account/moderate-comments/mod_api/set-trust-factor | | ## `deleteModerationVote()` ```php -deleteModerationVote($comment_id, $vote_id, $sso): \FastComments\Client\Model\VoteDeleteResponse +deleteModerationVote($tenant_id, $comment_id, $vote_id, $options): \FastComments\Client\Model\VoteDeleteResponse ``` @@ -72,12 +72,18 @@ $apiInstance = new FastComments\Client\Api\ModerationApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + +$tenant_id = 'tenant_id_example'; // string $comment_id = 'comment_id_example'; // string $vote_id = 'vote_id_example'; // string -$sso = 'sso_example'; // string +$options = [ + 'broadcast_id' => 'broadcast_id_example', // string + 'sso' => 'sso_example', // string +]; + try { - $result = $apiInstance->deleteModerationVote($comment_id, $vote_id, $sso); + $result = $apiInstance->deleteModerationVote($tenant_id, $comment_id, $vote_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling ModerationApi->deleteModerationVote: ', $e->getMessage(), PHP_EOL; @@ -86,10 +92,14 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | +| **tenant_id** | **string**| | | | **comment_id** | **string**| | | | **vote_id** | **string**| | | +| **broadcast_id** | **string**| | [optional] | | **sso** | **string**| | [optional] | ### Return type @@ -112,7 +122,7 @@ No authorization required ## `getApiComments()` ```php -getApiComments($page, $count, $text_search, $by_ip_from_comment, $filters, $search_filters, $sorts, $demo, $sso): \FastComments\Client\Model\ModerationAPIGetCommentsResponse +getApiComments($tenant_id, $options): \FastComments\Client\Model\ModerationAPIGetCommentsResponse ``` @@ -130,18 +140,23 @@ $apiInstance = new FastComments\Client\Api\ModerationApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); -$page = 3.4; // float -$count = 3.4; // float -$text_search = 'text_search_example'; // string -$by_ip_from_comment = 'by_ip_from_comment_example'; // string -$filters = 'filters_example'; // string -$search_filters = 'search_filters_example'; // string -$sorts = 'sorts_example'; // string -$demo = True; // bool -$sso = 'sso_example'; // string + +$tenant_id = 'tenant_id_example'; // string +$options = [ + 'page' => 3.4, // float + 'count' => 3.4, // float + 'text_search' => 'text_search_example', // string + 'by_ip_from_comment' => 'by_ip_from_comment_example', // string + 'filters' => 'filters_example', // string + 'search_filters' => 'search_filters_example', // string + 'sorts' => 'sorts_example', // string + 'demo' => True, // bool + 'sso' => 'sso_example', // string +]; + try { - $result = $apiInstance->getApiComments($page, $count, $text_search, $by_ip_from_comment, $filters, $search_filters, $sorts, $demo, $sso); + $result = $apiInstance->getApiComments($tenant_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling ModerationApi->getApiComments: ', $e->getMessage(), PHP_EOL; @@ -150,8 +165,11 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | +| **tenant_id** | **string**| | | | **page** | **float**| | [optional] | | **count** | **float**| | [optional] | | **text_search** | **string**| | [optional] | @@ -182,7 +200,7 @@ No authorization required ## `getApiExportStatus()` ```php -getApiExportStatus($batch_job_id, $sso): \FastComments\Client\Model\ModerationExportStatusResponse +getApiExportStatus($tenant_id, $options): \FastComments\Client\Model\ModerationExportStatusResponse ``` @@ -200,11 +218,16 @@ $apiInstance = new FastComments\Client\Api\ModerationApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); -$batch_job_id = 'batch_job_id_example'; // string -$sso = 'sso_example'; // string + +$tenant_id = 'tenant_id_example'; // string +$options = [ + 'batch_job_id' => 'batch_job_id_example', // string + 'sso' => 'sso_example', // string +]; + try { - $result = $apiInstance->getApiExportStatus($batch_job_id, $sso); + $result = $apiInstance->getApiExportStatus($tenant_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling ModerationApi->getApiExportStatus: ', $e->getMessage(), PHP_EOL; @@ -213,8 +236,11 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | +| **tenant_id** | **string**| | | | **batch_job_id** | **string**| | [optional] | | **sso** | **string**| | [optional] | @@ -238,7 +264,7 @@ No authorization required ## `getApiIds()` ```php -getApiIds($text_search, $by_ip_from_comment, $filters, $search_filters, $after_id, $demo, $sso): \FastComments\Client\Model\ModerationAPIGetCommentIdsResponse +getApiIds($tenant_id, $options): \FastComments\Client\Model\ModerationAPIGetCommentIdsResponse ``` @@ -256,16 +282,21 @@ $apiInstance = new FastComments\Client\Api\ModerationApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); -$text_search = 'text_search_example'; // string -$by_ip_from_comment = 'by_ip_from_comment_example'; // string -$filters = 'filters_example'; // string -$search_filters = 'search_filters_example'; // string -$after_id = 'after_id_example'; // string -$demo = True; // bool -$sso = 'sso_example'; // string + +$tenant_id = 'tenant_id_example'; // string +$options = [ + 'text_search' => 'text_search_example', // string + 'by_ip_from_comment' => 'by_ip_from_comment_example', // string + 'filters' => 'filters_example', // string + 'search_filters' => 'search_filters_example', // string + 'after_id' => 'after_id_example', // string + 'demo' => True, // bool + 'sso' => 'sso_example', // string +]; + try { - $result = $apiInstance->getApiIds($text_search, $by_ip_from_comment, $filters, $search_filters, $after_id, $demo, $sso); + $result = $apiInstance->getApiIds($tenant_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling ModerationApi->getApiIds: ', $e->getMessage(), PHP_EOL; @@ -274,8 +305,11 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | +| **tenant_id** | **string**| | | | **text_search** | **string**| | [optional] | | **by_ip_from_comment** | **string**| | [optional] | | **filters** | **string**| | [optional] | @@ -304,7 +338,7 @@ No authorization required ## `getBanUsersFromComment()` ```php -getBanUsersFromComment($comment_id, $sso): \FastComments\Client\Model\GetBannedUsersFromCommentResponse +getBanUsersFromComment($tenant_id, $comment_id, $sso): \FastComments\Client\Model\GetBannedUsersFromCommentResponse ``` @@ -322,11 +356,14 @@ $apiInstance = new FastComments\Client\Api\ModerationApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + +$tenant_id = 'tenant_id_example'; // string $comment_id = 'comment_id_example'; // string $sso = 'sso_example'; // string + try { - $result = $apiInstance->getBanUsersFromComment($comment_id, $sso); + $result = $apiInstance->getBanUsersFromComment($tenant_id, $comment_id, $sso); print_r($result); } catch (Exception $e) { echo 'Exception when calling ModerationApi->getBanUsersFromComment: ', $e->getMessage(), PHP_EOL; @@ -337,6 +374,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | +| **tenant_id** | **string**| | | | **comment_id** | **string**| | | | **sso** | **string**| | [optional] | @@ -360,7 +398,7 @@ No authorization required ## `getCommentBanStatus()` ```php -getCommentBanStatus($comment_id, $sso): \FastComments\Client\Model\GetCommentBanStatusResponse +getCommentBanStatus($tenant_id, $comment_id, $sso): \FastComments\Client\Model\GetCommentBanStatusResponse ``` @@ -378,11 +416,14 @@ $apiInstance = new FastComments\Client\Api\ModerationApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + +$tenant_id = 'tenant_id_example'; // string $comment_id = 'comment_id_example'; // string $sso = 'sso_example'; // string + try { - $result = $apiInstance->getCommentBanStatus($comment_id, $sso); + $result = $apiInstance->getCommentBanStatus($tenant_id, $comment_id, $sso); print_r($result); } catch (Exception $e) { echo 'Exception when calling ModerationApi->getCommentBanStatus: ', $e->getMessage(), PHP_EOL; @@ -393,6 +434,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | +| **tenant_id** | **string**| | | | **comment_id** | **string**| | | | **sso** | **string**| | [optional] | @@ -416,7 +458,7 @@ No authorization required ## `getCommentChildren()` ```php -getCommentChildren($comment_id, $sso): \FastComments\Client\Model\ModerationAPIChildCommentsResponse +getCommentChildren($tenant_id, $comment_id, $sso): \FastComments\Client\Model\ModerationAPIChildCommentsResponse ``` @@ -434,11 +476,14 @@ $apiInstance = new FastComments\Client\Api\ModerationApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + +$tenant_id = 'tenant_id_example'; // string $comment_id = 'comment_id_example'; // string $sso = 'sso_example'; // string + try { - $result = $apiInstance->getCommentChildren($comment_id, $sso); + $result = $apiInstance->getCommentChildren($tenant_id, $comment_id, $sso); print_r($result); } catch (Exception $e) { echo 'Exception when calling ModerationApi->getCommentChildren: ', $e->getMessage(), PHP_EOL; @@ -449,6 +494,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | +| **tenant_id** | **string**| | | | **comment_id** | **string**| | | | **sso** | **string**| | [optional] | @@ -472,7 +518,7 @@ No authorization required ## `getCount()` ```php -getCount($text_search, $by_ip_from_comment, $filter, $search_filters, $demo, $sso): \FastComments\Client\Model\ModerationAPICountCommentsResponse +getCount($tenant_id, $options): \FastComments\Client\Model\ModerationAPICountCommentsResponse ``` @@ -490,15 +536,20 @@ $apiInstance = new FastComments\Client\Api\ModerationApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); -$text_search = 'text_search_example'; // string -$by_ip_from_comment = 'by_ip_from_comment_example'; // string -$filter = 'filter_example'; // string -$search_filters = 'search_filters_example'; // string -$demo = True; // bool -$sso = 'sso_example'; // string + +$tenant_id = 'tenant_id_example'; // string +$options = [ + 'text_search' => 'text_search_example', // string + 'by_ip_from_comment' => 'by_ip_from_comment_example', // string + 'filter' => 'filter_example', // string + 'search_filters' => 'search_filters_example', // string + 'demo' => True, // bool + 'sso' => 'sso_example', // string +]; + try { - $result = $apiInstance->getCount($text_search, $by_ip_from_comment, $filter, $search_filters, $demo, $sso); + $result = $apiInstance->getCount($tenant_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling ModerationApi->getCount: ', $e->getMessage(), PHP_EOL; @@ -507,8 +558,11 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | +| **tenant_id** | **string**| | | | **text_search** | **string**| | [optional] | | **by_ip_from_comment** | **string**| | [optional] | | **filter** | **string**| | [optional] | @@ -536,7 +590,7 @@ No authorization required ## `getCounts()` ```php -getCounts($sso): \FastComments\Client\Model\GetBannedUsersCountResponse +getCounts($tenant_id, $sso): \FastComments\Client\Model\GetBannedUsersCountResponse ``` @@ -554,10 +608,13 @@ $apiInstance = new FastComments\Client\Api\ModerationApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + +$tenant_id = 'tenant_id_example'; // string $sso = 'sso_example'; // string + try { - $result = $apiInstance->getCounts($sso); + $result = $apiInstance->getCounts($tenant_id, $sso); print_r($result); } catch (Exception $e) { echo 'Exception when calling ModerationApi->getCounts: ', $e->getMessage(), PHP_EOL; @@ -568,6 +625,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | +| **tenant_id** | **string**| | | | **sso** | **string**| | [optional] | ### Return type @@ -590,7 +648,7 @@ No authorization required ## `getLogs()` ```php -getLogs($comment_id, $sso): \FastComments\Client\Model\ModerationAPIGetLogsResponse +getLogs($tenant_id, $comment_id, $sso): \FastComments\Client\Model\ModerationAPIGetLogsResponse ``` @@ -608,11 +666,14 @@ $apiInstance = new FastComments\Client\Api\ModerationApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + +$tenant_id = 'tenant_id_example'; // string $comment_id = 'comment_id_example'; // string $sso = 'sso_example'; // string + try { - $result = $apiInstance->getLogs($comment_id, $sso); + $result = $apiInstance->getLogs($tenant_id, $comment_id, $sso); print_r($result); } catch (Exception $e) { echo 'Exception when calling ModerationApi->getLogs: ', $e->getMessage(), PHP_EOL; @@ -623,6 +684,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | +| **tenant_id** | **string**| | | | **comment_id** | **string**| | | | **sso** | **string**| | [optional] | @@ -646,7 +708,7 @@ No authorization required ## `getManualBadges()` ```php -getManualBadges($sso): \FastComments\Client\Model\GetTenantManualBadgesResponse +getManualBadges($tenant_id, $sso): \FastComments\Client\Model\GetTenantManualBadgesResponse ``` @@ -664,10 +726,13 @@ $apiInstance = new FastComments\Client\Api\ModerationApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + +$tenant_id = 'tenant_id_example'; // string $sso = 'sso_example'; // string + try { - $result = $apiInstance->getManualBadges($sso); + $result = $apiInstance->getManualBadges($tenant_id, $sso); print_r($result); } catch (Exception $e) { echo 'Exception when calling ModerationApi->getManualBadges: ', $e->getMessage(), PHP_EOL; @@ -678,6 +743,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | +| **tenant_id** | **string**| | | | **sso** | **string**| | [optional] | ### Return type @@ -700,7 +766,7 @@ No authorization required ## `getManualBadgesForUser()` ```php -getManualBadgesForUser($badges_user_id, $comment_id, $sso): \FastComments\Client\Model\GetUserManualBadgesResponse +getManualBadgesForUser($tenant_id, $options): \FastComments\Client\Model\GetUserManualBadgesResponse ``` @@ -718,12 +784,17 @@ $apiInstance = new FastComments\Client\Api\ModerationApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); -$badges_user_id = 'badges_user_id_example'; // string -$comment_id = 'comment_id_example'; // string -$sso = 'sso_example'; // string + +$tenant_id = 'tenant_id_example'; // string +$options = [ + 'badges_user_id' => 'badges_user_id_example', // string + 'comment_id' => 'comment_id_example', // string + 'sso' => 'sso_example', // string +]; + try { - $result = $apiInstance->getManualBadgesForUser($badges_user_id, $comment_id, $sso); + $result = $apiInstance->getManualBadgesForUser($tenant_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling ModerationApi->getManualBadgesForUser: ', $e->getMessage(), PHP_EOL; @@ -732,8 +803,11 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | +| **tenant_id** | **string**| | | | **badges_user_id** | **string**| | [optional] | | **comment_id** | **string**| | [optional] | | **sso** | **string**| | [optional] | @@ -758,7 +832,7 @@ No authorization required ## `getModerationComment()` ```php -getModerationComment($comment_id, $include_email, $include_ip, $sso): \FastComments\Client\Model\ModerationAPICommentResponse +getModerationComment($tenant_id, $comment_id, $options): \FastComments\Client\Model\ModerationAPICommentResponse ``` @@ -776,13 +850,18 @@ $apiInstance = new FastComments\Client\Api\ModerationApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + +$tenant_id = 'tenant_id_example'; // string $comment_id = 'comment_id_example'; // string -$include_email = True; // bool -$include_ip = True; // bool -$sso = 'sso_example'; // string +$options = [ + 'include_email' => True, // bool + 'include_ip' => True, // bool + 'sso' => 'sso_example', // string +]; + try { - $result = $apiInstance->getModerationComment($comment_id, $include_email, $include_ip, $sso); + $result = $apiInstance->getModerationComment($tenant_id, $comment_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling ModerationApi->getModerationComment: ', $e->getMessage(), PHP_EOL; @@ -791,8 +870,11 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | +| **tenant_id** | **string**| | | | **comment_id** | **string**| | | | **include_email** | **bool**| | [optional] | | **include_ip** | **bool**| | [optional] | @@ -818,7 +900,7 @@ No authorization required ## `getModerationCommentText()` ```php -getModerationCommentText($comment_id, $sso): \FastComments\Client\Model\GetCommentTextResponse +getModerationCommentText($tenant_id, $comment_id, $sso): \FastComments\Client\Model\GetCommentTextResponse ``` @@ -836,11 +918,14 @@ $apiInstance = new FastComments\Client\Api\ModerationApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + +$tenant_id = 'tenant_id_example'; // string $comment_id = 'comment_id_example'; // string $sso = 'sso_example'; // string + try { - $result = $apiInstance->getModerationCommentText($comment_id, $sso); + $result = $apiInstance->getModerationCommentText($tenant_id, $comment_id, $sso); print_r($result); } catch (Exception $e) { echo 'Exception when calling ModerationApi->getModerationCommentText: ', $e->getMessage(), PHP_EOL; @@ -851,6 +936,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | +| **tenant_id** | **string**| | | | **comment_id** | **string**| | | | **sso** | **string**| | [optional] | @@ -874,7 +960,7 @@ No authorization required ## `getPreBanSummary()` ```php -getPreBanSummary($comment_id, $include_by_user_id_and_email, $include_by_ip, $include_by_email_domain, $sso): \FastComments\Client\Model\PreBanSummary +getPreBanSummary($tenant_id, $comment_id, $options): \FastComments\Client\Model\PreBanSummary ``` @@ -892,14 +978,19 @@ $apiInstance = new FastComments\Client\Api\ModerationApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + +$tenant_id = 'tenant_id_example'; // string $comment_id = 'comment_id_example'; // string -$include_by_user_id_and_email = True; // bool -$include_by_ip = True; // bool -$include_by_email_domain = True; // bool -$sso = 'sso_example'; // string +$options = [ + 'include_by_user_id_and_email' => True, // bool + 'include_by_ip' => True, // bool + 'include_by_email_domain' => True, // bool + 'sso' => 'sso_example', // string +]; + try { - $result = $apiInstance->getPreBanSummary($comment_id, $include_by_user_id_and_email, $include_by_ip, $include_by_email_domain, $sso); + $result = $apiInstance->getPreBanSummary($tenant_id, $comment_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling ModerationApi->getPreBanSummary: ', $e->getMessage(), PHP_EOL; @@ -908,8 +999,11 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | +| **tenant_id** | **string**| | | | **comment_id** | **string**| | | | **include_by_user_id_and_email** | **bool**| | [optional] | | **include_by_ip** | **bool**| | [optional] | @@ -936,7 +1030,7 @@ No authorization required ## `getSearchCommentsSummary()` ```php -getSearchCommentsSummary($value, $filters, $search_filters, $sso): \FastComments\Client\Model\ModerationCommentSearchResponse +getSearchCommentsSummary($tenant_id, $options): \FastComments\Client\Model\ModerationCommentSearchResponse ``` @@ -954,13 +1048,18 @@ $apiInstance = new FastComments\Client\Api\ModerationApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); -$value = 'value_example'; // string -$filters = 'filters_example'; // string -$search_filters = 'search_filters_example'; // string -$sso = 'sso_example'; // string + +$tenant_id = 'tenant_id_example'; // string +$options = [ + 'value' => 'value_example', // string + 'filters' => 'filters_example', // string + 'search_filters' => 'search_filters_example', // string + 'sso' => 'sso_example', // string +]; + try { - $result = $apiInstance->getSearchCommentsSummary($value, $filters, $search_filters, $sso); + $result = $apiInstance->getSearchCommentsSummary($tenant_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling ModerationApi->getSearchCommentsSummary: ', $e->getMessage(), PHP_EOL; @@ -969,8 +1068,11 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | +| **tenant_id** | **string**| | | | **value** | **string**| | [optional] | | **filters** | **string**| | [optional] | | **search_filters** | **string**| | [optional] | @@ -996,7 +1098,7 @@ No authorization required ## `getSearchPages()` ```php -getSearchPages($value, $sso): \FastComments\Client\Model\ModerationPageSearchResponse +getSearchPages($tenant_id, $options): \FastComments\Client\Model\ModerationPageSearchResponse ``` @@ -1014,11 +1116,16 @@ $apiInstance = new FastComments\Client\Api\ModerationApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); -$value = 'value_example'; // string -$sso = 'sso_example'; // string + +$tenant_id = 'tenant_id_example'; // string +$options = [ + 'value' => 'value_example', // string + 'sso' => 'sso_example', // string +]; + try { - $result = $apiInstance->getSearchPages($value, $sso); + $result = $apiInstance->getSearchPages($tenant_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling ModerationApi->getSearchPages: ', $e->getMessage(), PHP_EOL; @@ -1027,8 +1134,11 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | +| **tenant_id** | **string**| | | | **value** | **string**| | [optional] | | **sso** | **string**| | [optional] | @@ -1052,7 +1162,7 @@ No authorization required ## `getSearchSites()` ```php -getSearchSites($value, $sso): \FastComments\Client\Model\ModerationSiteSearchResponse +getSearchSites($tenant_id, $options): \FastComments\Client\Model\ModerationSiteSearchResponse ``` @@ -1070,11 +1180,16 @@ $apiInstance = new FastComments\Client\Api\ModerationApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); -$value = 'value_example'; // string -$sso = 'sso_example'; // string + +$tenant_id = 'tenant_id_example'; // string +$options = [ + 'value' => 'value_example', // string + 'sso' => 'sso_example', // string +]; + try { - $result = $apiInstance->getSearchSites($value, $sso); + $result = $apiInstance->getSearchSites($tenant_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling ModerationApi->getSearchSites: ', $e->getMessage(), PHP_EOL; @@ -1083,8 +1198,11 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | +| **tenant_id** | **string**| | | | **value** | **string**| | [optional] | | **sso** | **string**| | [optional] | @@ -1108,7 +1226,7 @@ No authorization required ## `getSearchSuggest()` ```php -getSearchSuggest($text_search, $sso): \FastComments\Client\Model\ModerationSuggestResponse +getSearchSuggest($tenant_id, $options): \FastComments\Client\Model\ModerationSuggestResponse ``` @@ -1126,11 +1244,16 @@ $apiInstance = new FastComments\Client\Api\ModerationApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); -$text_search = 'text_search_example'; // string -$sso = 'sso_example'; // string + +$tenant_id = 'tenant_id_example'; // string +$options = [ + 'text_search' => 'text_search_example', // string + 'sso' => 'sso_example', // string +]; + try { - $result = $apiInstance->getSearchSuggest($text_search, $sso); + $result = $apiInstance->getSearchSuggest($tenant_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling ModerationApi->getSearchSuggest: ', $e->getMessage(), PHP_EOL; @@ -1139,8 +1262,11 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | +| **tenant_id** | **string**| | | | **text_search** | **string**| | [optional] | | **sso** | **string**| | [optional] | @@ -1164,7 +1290,7 @@ No authorization required ## `getSearchUsers()` ```php -getSearchUsers($value, $sso): \FastComments\Client\Model\ModerationUserSearchResponse +getSearchUsers($tenant_id, $options): \FastComments\Client\Model\ModerationUserSearchResponse ``` @@ -1182,11 +1308,16 @@ $apiInstance = new FastComments\Client\Api\ModerationApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); -$value = 'value_example'; // string -$sso = 'sso_example'; // string + +$tenant_id = 'tenant_id_example'; // string +$options = [ + 'value' => 'value_example', // string + 'sso' => 'sso_example', // string +]; + try { - $result = $apiInstance->getSearchUsers($value, $sso); + $result = $apiInstance->getSearchUsers($tenant_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling ModerationApi->getSearchUsers: ', $e->getMessage(), PHP_EOL; @@ -1195,8 +1326,11 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | +| **tenant_id** | **string**| | | | **value** | **string**| | [optional] | | **sso** | **string**| | [optional] | @@ -1220,7 +1354,7 @@ No authorization required ## `getTrustFactor()` ```php -getTrustFactor($user_id, $sso): \FastComments\Client\Model\GetUserTrustFactorResponse +getTrustFactor($tenant_id, $options): \FastComments\Client\Model\GetUserTrustFactorResponse ``` @@ -1238,11 +1372,16 @@ $apiInstance = new FastComments\Client\Api\ModerationApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); -$user_id = 'user_id_example'; // string -$sso = 'sso_example'; // string + +$tenant_id = 'tenant_id_example'; // string +$options = [ + 'user_id' => 'user_id_example', // string + 'sso' => 'sso_example', // string +]; + try { - $result = $apiInstance->getTrustFactor($user_id, $sso); + $result = $apiInstance->getTrustFactor($tenant_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling ModerationApi->getTrustFactor: ', $e->getMessage(), PHP_EOL; @@ -1251,8 +1390,11 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | +| **tenant_id** | **string**| | | | **user_id** | **string**| | [optional] | | **sso** | **string**| | [optional] | @@ -1276,7 +1418,7 @@ No authorization required ## `getUserBanPreference()` ```php -getUserBanPreference($sso): \FastComments\Client\Model\APIModerateGetUserBanPreferencesResponse +getUserBanPreference($tenant_id, $sso): \FastComments\Client\Model\APIModerateGetUserBanPreferencesResponse ``` @@ -1294,10 +1436,13 @@ $apiInstance = new FastComments\Client\Api\ModerationApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + +$tenant_id = 'tenant_id_example'; // string $sso = 'sso_example'; // string + try { - $result = $apiInstance->getUserBanPreference($sso); + $result = $apiInstance->getUserBanPreference($tenant_id, $sso); print_r($result); } catch (Exception $e) { echo 'Exception when calling ModerationApi->getUserBanPreference: ', $e->getMessage(), PHP_EOL; @@ -1308,6 +1453,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | +| **tenant_id** | **string**| | | | **sso** | **string**| | [optional] | ### Return type @@ -1330,7 +1476,7 @@ No authorization required ## `getUserInternalProfile()` ```php -getUserInternalProfile($comment_id, $sso): \FastComments\Client\Model\GetUserInternalProfileResponse +getUserInternalProfile($tenant_id, $options): \FastComments\Client\Model\GetUserInternalProfileResponse ``` @@ -1348,11 +1494,16 @@ $apiInstance = new FastComments\Client\Api\ModerationApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); -$comment_id = 'comment_id_example'; // string -$sso = 'sso_example'; // string + +$tenant_id = 'tenant_id_example'; // string +$options = [ + 'comment_id' => 'comment_id_example', // string + 'sso' => 'sso_example', // string +]; + try { - $result = $apiInstance->getUserInternalProfile($comment_id, $sso); + $result = $apiInstance->getUserInternalProfile($tenant_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling ModerationApi->getUserInternalProfile: ', $e->getMessage(), PHP_EOL; @@ -1361,8 +1512,11 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | +| **tenant_id** | **string**| | | | **comment_id** | **string**| | [optional] | | **sso** | **string**| | [optional] | @@ -1386,7 +1540,7 @@ No authorization required ## `postAdjustCommentVotes()` ```php -postAdjustCommentVotes($comment_id, $adjust_comment_votes_params, $sso): \FastComments\Client\Model\AdjustVotesResponse +postAdjustCommentVotes($tenant_id, $comment_id, $adjust_comment_votes_params, $options): \FastComments\Client\Model\AdjustVotesResponse ``` @@ -1404,12 +1558,18 @@ $apiInstance = new FastComments\Client\Api\ModerationApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + +$tenant_id = 'tenant_id_example'; // string $comment_id = 'comment_id_example'; // string $adjust_comment_votes_params = new \FastComments\Client\Model\AdjustCommentVotesParams(); // \FastComments\Client\Model\AdjustCommentVotesParams -$sso = 'sso_example'; // string +$options = [ + 'broadcast_id' => 'broadcast_id_example', // string + 'sso' => 'sso_example', // string +]; + try { - $result = $apiInstance->postAdjustCommentVotes($comment_id, $adjust_comment_votes_params, $sso); + $result = $apiInstance->postAdjustCommentVotes($tenant_id, $comment_id, $adjust_comment_votes_params, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling ModerationApi->postAdjustCommentVotes: ', $e->getMessage(), PHP_EOL; @@ -1418,10 +1578,14 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | +| **tenant_id** | **string**| | | | **comment_id** | **string**| | | | **adjust_comment_votes_params** | [**\FastComments\Client\Model\AdjustCommentVotesParams**](../Model/AdjustCommentVotesParams.md)| | | +| **broadcast_id** | **string**| | [optional] | | **sso** | **string**| | [optional] | ### Return type @@ -1444,7 +1608,7 @@ No authorization required ## `postApiExport()` ```php -postApiExport($text_search, $by_ip_from_comment, $filters, $search_filters, $sorts, $sso): \FastComments\Client\Model\ModerationExportResponse +postApiExport($tenant_id, $options): \FastComments\Client\Model\ModerationExportResponse ``` @@ -1462,15 +1626,20 @@ $apiInstance = new FastComments\Client\Api\ModerationApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); -$text_search = 'text_search_example'; // string -$by_ip_from_comment = 'by_ip_from_comment_example'; // string -$filters = 'filters_example'; // string -$search_filters = 'search_filters_example'; // string -$sorts = 'sorts_example'; // string -$sso = 'sso_example'; // string + +$tenant_id = 'tenant_id_example'; // string +$options = [ + 'text_search' => 'text_search_example', // string + 'by_ip_from_comment' => 'by_ip_from_comment_example', // string + 'filters' => 'filters_example', // string + 'search_filters' => 'search_filters_example', // string + 'sorts' => 'sorts_example', // string + 'sso' => 'sso_example', // string +]; + try { - $result = $apiInstance->postApiExport($text_search, $by_ip_from_comment, $filters, $search_filters, $sorts, $sso); + $result = $apiInstance->postApiExport($tenant_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling ModerationApi->postApiExport: ', $e->getMessage(), PHP_EOL; @@ -1479,8 +1648,11 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | +| **tenant_id** | **string**| | | | **text_search** | **string**| | [optional] | | **by_ip_from_comment** | **string**| | [optional] | | **filters** | **string**| | [optional] | @@ -1508,7 +1680,7 @@ No authorization required ## `postBanUserFromComment()` ```php -postBanUserFromComment($comment_id, $ban_email, $ban_email_domain, $ban_ip, $delete_all_users_comments, $banned_until, $is_shadow_ban, $update_id, $ban_reason, $sso): \FastComments\Client\Model\BanUserFromCommentResult +postBanUserFromComment($tenant_id, $comment_id, $options): \FastComments\Client\Model\BanUserFromCommentResult ``` @@ -1526,19 +1698,24 @@ $apiInstance = new FastComments\Client\Api\ModerationApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + +$tenant_id = 'tenant_id_example'; // string $comment_id = 'comment_id_example'; // string -$ban_email = True; // bool -$ban_email_domain = True; // bool -$ban_ip = True; // bool -$delete_all_users_comments = True; // bool -$banned_until = 'banned_until_example'; // string -$is_shadow_ban = True; // bool -$update_id = 'update_id_example'; // string -$ban_reason = 'ban_reason_example'; // string -$sso = 'sso_example'; // string +$options = [ + 'ban_email' => True, // bool + 'ban_email_domain' => True, // bool + 'ban_ip' => True, // bool + 'delete_all_users_comments' => True, // bool + 'banned_until' => 'banned_until_example', // string + 'is_shadow_ban' => True, // bool + 'update_id' => 'update_id_example', // string + 'ban_reason' => 'ban_reason_example', // string + 'sso' => 'sso_example', // string +]; + try { - $result = $apiInstance->postBanUserFromComment($comment_id, $ban_email, $ban_email_domain, $ban_ip, $delete_all_users_comments, $banned_until, $is_shadow_ban, $update_id, $ban_reason, $sso); + $result = $apiInstance->postBanUserFromComment($tenant_id, $comment_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling ModerationApi->postBanUserFromComment: ', $e->getMessage(), PHP_EOL; @@ -1547,8 +1724,11 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | +| **tenant_id** | **string**| | | | **comment_id** | **string**| | | | **ban_email** | **bool**| | [optional] | | **ban_email_domain** | **bool**| | [optional] | @@ -1580,7 +1760,7 @@ No authorization required ## `postBanUserUndo()` ```php -postBanUserUndo($ban_user_undo_params, $sso): \FastComments\Client\Model\APIEmptyResponse +postBanUserUndo($tenant_id, $ban_user_undo_params, $sso): \FastComments\Client\Model\APIEmptyResponse ``` @@ -1598,11 +1778,14 @@ $apiInstance = new FastComments\Client\Api\ModerationApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + +$tenant_id = 'tenant_id_example'; // string $ban_user_undo_params = new \FastComments\Client\Model\BanUserUndoParams(); // \FastComments\Client\Model\BanUserUndoParams $sso = 'sso_example'; // string + try { - $result = $apiInstance->postBanUserUndo($ban_user_undo_params, $sso); + $result = $apiInstance->postBanUserUndo($tenant_id, $ban_user_undo_params, $sso); print_r($result); } catch (Exception $e) { echo 'Exception when calling ModerationApi->postBanUserUndo: ', $e->getMessage(), PHP_EOL; @@ -1613,6 +1796,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | +| **tenant_id** | **string**| | | | **ban_user_undo_params** | [**\FastComments\Client\Model\BanUserUndoParams**](../Model/BanUserUndoParams.md)| | | | **sso** | **string**| | [optional] | @@ -1636,7 +1820,7 @@ No authorization required ## `postBulkPreBanSummary()` ```php -postBulkPreBanSummary($bulk_pre_ban_params, $include_by_user_id_and_email, $include_by_ip, $include_by_email_domain, $sso): \FastComments\Client\Model\BulkPreBanSummary +postBulkPreBanSummary($tenant_id, $bulk_pre_ban_params, $options): \FastComments\Client\Model\BulkPreBanSummary ``` @@ -1654,14 +1838,19 @@ $apiInstance = new FastComments\Client\Api\ModerationApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + +$tenant_id = 'tenant_id_example'; // string $bulk_pre_ban_params = new \FastComments\Client\Model\BulkPreBanParams(); // \FastComments\Client\Model\BulkPreBanParams -$include_by_user_id_and_email = True; // bool -$include_by_ip = True; // bool -$include_by_email_domain = True; // bool -$sso = 'sso_example'; // string +$options = [ + 'include_by_user_id_and_email' => True, // bool + 'include_by_ip' => True, // bool + 'include_by_email_domain' => True, // bool + 'sso' => 'sso_example', // string +]; + try { - $result = $apiInstance->postBulkPreBanSummary($bulk_pre_ban_params, $include_by_user_id_and_email, $include_by_ip, $include_by_email_domain, $sso); + $result = $apiInstance->postBulkPreBanSummary($tenant_id, $bulk_pre_ban_params, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling ModerationApi->postBulkPreBanSummary: ', $e->getMessage(), PHP_EOL; @@ -1670,8 +1859,11 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | +| **tenant_id** | **string**| | | | **bulk_pre_ban_params** | [**\FastComments\Client\Model\BulkPreBanParams**](../Model/BulkPreBanParams.md)| | | | **include_by_user_id_and_email** | **bool**| | [optional] | | **include_by_ip** | **bool**| | [optional] | @@ -1698,7 +1890,7 @@ No authorization required ## `postCommentsByIds()` ```php -postCommentsByIds($comments_by_ids_params, $sso): \FastComments\Client\Model\ModerationAPIChildCommentsResponse +postCommentsByIds($tenant_id, $comments_by_ids_params, $sso): \FastComments\Client\Model\ModerationAPIChildCommentsResponse ``` @@ -1716,11 +1908,14 @@ $apiInstance = new FastComments\Client\Api\ModerationApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + +$tenant_id = 'tenant_id_example'; // string $comments_by_ids_params = new \FastComments\Client\Model\CommentsByIdsParams(); // \FastComments\Client\Model\CommentsByIdsParams $sso = 'sso_example'; // string + try { - $result = $apiInstance->postCommentsByIds($comments_by_ids_params, $sso); + $result = $apiInstance->postCommentsByIds($tenant_id, $comments_by_ids_params, $sso); print_r($result); } catch (Exception $e) { echo 'Exception when calling ModerationApi->postCommentsByIds: ', $e->getMessage(), PHP_EOL; @@ -1731,6 +1926,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | +| **tenant_id** | **string**| | | | **comments_by_ids_params** | [**\FastComments\Client\Model\CommentsByIdsParams**](../Model/CommentsByIdsParams.md)| | | | **sso** | **string**| | [optional] | @@ -1754,7 +1950,7 @@ No authorization required ## `postFlagComment()` ```php -postFlagComment($comment_id, $sso): \FastComments\Client\Model\APIEmptyResponse +postFlagComment($tenant_id, $comment_id, $options): \FastComments\Client\Model\APIEmptyResponse ``` @@ -1772,11 +1968,17 @@ $apiInstance = new FastComments\Client\Api\ModerationApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + +$tenant_id = 'tenant_id_example'; // string $comment_id = 'comment_id_example'; // string -$sso = 'sso_example'; // string +$options = [ + 'broadcast_id' => 'broadcast_id_example', // string + 'sso' => 'sso_example', // string +]; + try { - $result = $apiInstance->postFlagComment($comment_id, $sso); + $result = $apiInstance->postFlagComment($tenant_id, $comment_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling ModerationApi->postFlagComment: ', $e->getMessage(), PHP_EOL; @@ -1785,9 +1987,13 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | +| **tenant_id** | **string**| | | | **comment_id** | **string**| | | +| **broadcast_id** | **string**| | [optional] | | **sso** | **string**| | [optional] | ### Return type @@ -1810,7 +2016,7 @@ No authorization required ## `postRemoveComment()` ```php -postRemoveComment($comment_id, $sso): \FastComments\Client\Model\PostRemoveCommentResponse +postRemoveComment($tenant_id, $comment_id, $options): \FastComments\Client\Model\PostRemoveCommentApiResponse ``` @@ -1828,11 +2034,17 @@ $apiInstance = new FastComments\Client\Api\ModerationApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + +$tenant_id = 'tenant_id_example'; // string $comment_id = 'comment_id_example'; // string -$sso = 'sso_example'; // string +$options = [ + 'broadcast_id' => 'broadcast_id_example', // string + 'sso' => 'sso_example', // string +]; + try { - $result = $apiInstance->postRemoveComment($comment_id, $sso); + $result = $apiInstance->postRemoveComment($tenant_id, $comment_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling ModerationApi->postRemoveComment: ', $e->getMessage(), PHP_EOL; @@ -1841,14 +2053,18 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | +| **tenant_id** | **string**| | | | **comment_id** | **string**| | | +| **broadcast_id** | **string**| | [optional] | | **sso** | **string**| | [optional] | ### Return type -[**\FastComments\Client\Model\PostRemoveCommentResponse**](../Model/PostRemoveCommentResponse.md) +[**\FastComments\Client\Model\PostRemoveCommentApiResponse**](../Model/PostRemoveCommentApiResponse.md) ### Authorization @@ -1866,7 +2082,7 @@ No authorization required ## `postRestoreDeletedComment()` ```php -postRestoreDeletedComment($comment_id, $sso): \FastComments\Client\Model\APIEmptyResponse +postRestoreDeletedComment($tenant_id, $comment_id, $options): \FastComments\Client\Model\APIEmptyResponse ``` @@ -1884,11 +2100,17 @@ $apiInstance = new FastComments\Client\Api\ModerationApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + +$tenant_id = 'tenant_id_example'; // string $comment_id = 'comment_id_example'; // string -$sso = 'sso_example'; // string +$options = [ + 'broadcast_id' => 'broadcast_id_example', // string + 'sso' => 'sso_example', // string +]; + try { - $result = $apiInstance->postRestoreDeletedComment($comment_id, $sso); + $result = $apiInstance->postRestoreDeletedComment($tenant_id, $comment_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling ModerationApi->postRestoreDeletedComment: ', $e->getMessage(), PHP_EOL; @@ -1897,9 +2119,13 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | +| **tenant_id** | **string**| | | | **comment_id** | **string**| | | +| **broadcast_id** | **string**| | [optional] | | **sso** | **string**| | [optional] | ### Return type @@ -1922,7 +2148,7 @@ No authorization required ## `postSetCommentApprovalStatus()` ```php -postSetCommentApprovalStatus($comment_id, $approved, $sso): \FastComments\Client\Model\SetCommentApprovedResponse +postSetCommentApprovalStatus($tenant_id, $comment_id, $options): \FastComments\Client\Model\SetCommentApprovedResponse ``` @@ -1940,12 +2166,18 @@ $apiInstance = new FastComments\Client\Api\ModerationApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + +$tenant_id = 'tenant_id_example'; // string $comment_id = 'comment_id_example'; // string -$approved = True; // bool -$sso = 'sso_example'; // string +$options = [ + 'approved' => True, // bool + 'broadcast_id' => 'broadcast_id_example', // string + 'sso' => 'sso_example', // string +]; + try { - $result = $apiInstance->postSetCommentApprovalStatus($comment_id, $approved, $sso); + $result = $apiInstance->postSetCommentApprovalStatus($tenant_id, $comment_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling ModerationApi->postSetCommentApprovalStatus: ', $e->getMessage(), PHP_EOL; @@ -1954,10 +2186,14 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | +| **tenant_id** | **string**| | | | **comment_id** | **string**| | | | **approved** | **bool**| | [optional] | +| **broadcast_id** | **string**| | [optional] | | **sso** | **string**| | [optional] | ### Return type @@ -1980,7 +2216,7 @@ No authorization required ## `postSetCommentReviewStatus()` ```php -postSetCommentReviewStatus($comment_id, $reviewed, $sso): \FastComments\Client\Model\APIEmptyResponse +postSetCommentReviewStatus($tenant_id, $comment_id, $options): \FastComments\Client\Model\APIEmptyResponse ``` @@ -1998,12 +2234,18 @@ $apiInstance = new FastComments\Client\Api\ModerationApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + +$tenant_id = 'tenant_id_example'; // string $comment_id = 'comment_id_example'; // string -$reviewed = True; // bool -$sso = 'sso_example'; // string +$options = [ + 'reviewed' => True, // bool + 'broadcast_id' => 'broadcast_id_example', // string + 'sso' => 'sso_example', // string +]; + try { - $result = $apiInstance->postSetCommentReviewStatus($comment_id, $reviewed, $sso); + $result = $apiInstance->postSetCommentReviewStatus($tenant_id, $comment_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling ModerationApi->postSetCommentReviewStatus: ', $e->getMessage(), PHP_EOL; @@ -2012,10 +2254,14 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | +| **tenant_id** | **string**| | | | **comment_id** | **string**| | | | **reviewed** | **bool**| | [optional] | +| **broadcast_id** | **string**| | [optional] | | **sso** | **string**| | [optional] | ### Return type @@ -2038,7 +2284,7 @@ No authorization required ## `postSetCommentSpamStatus()` ```php -postSetCommentSpamStatus($comment_id, $spam, $perm_not_spam, $sso): \FastComments\Client\Model\APIEmptyResponse +postSetCommentSpamStatus($tenant_id, $comment_id, $options): \FastComments\Client\Model\APIEmptyResponse ``` @@ -2056,13 +2302,19 @@ $apiInstance = new FastComments\Client\Api\ModerationApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + +$tenant_id = 'tenant_id_example'; // string $comment_id = 'comment_id_example'; // string -$spam = True; // bool -$perm_not_spam = True; // bool -$sso = 'sso_example'; // string +$options = [ + 'spam' => True, // bool + 'perm_not_spam' => True, // bool + 'broadcast_id' => 'broadcast_id_example', // string + 'sso' => 'sso_example', // string +]; + try { - $result = $apiInstance->postSetCommentSpamStatus($comment_id, $spam, $perm_not_spam, $sso); + $result = $apiInstance->postSetCommentSpamStatus($tenant_id, $comment_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling ModerationApi->postSetCommentSpamStatus: ', $e->getMessage(), PHP_EOL; @@ -2071,11 +2323,15 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | +| **tenant_id** | **string**| | | | **comment_id** | **string**| | | | **spam** | **bool**| | [optional] | | **perm_not_spam** | **bool**| | [optional] | +| **broadcast_id** | **string**| | [optional] | | **sso** | **string**| | [optional] | ### Return type @@ -2098,7 +2354,7 @@ No authorization required ## `postSetCommentText()` ```php -postSetCommentText($comment_id, $set_comment_text_params, $sso): \FastComments\Client\Model\SetCommentTextResponse +postSetCommentText($tenant_id, $comment_id, $set_comment_text_params, $options): \FastComments\Client\Model\SetCommentTextResponse ``` @@ -2116,12 +2372,18 @@ $apiInstance = new FastComments\Client\Api\ModerationApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + +$tenant_id = 'tenant_id_example'; // string $comment_id = 'comment_id_example'; // string $set_comment_text_params = new \FastComments\Client\Model\SetCommentTextParams(); // \FastComments\Client\Model\SetCommentTextParams -$sso = 'sso_example'; // string +$options = [ + 'broadcast_id' => 'broadcast_id_example', // string + 'sso' => 'sso_example', // string +]; + try { - $result = $apiInstance->postSetCommentText($comment_id, $set_comment_text_params, $sso); + $result = $apiInstance->postSetCommentText($tenant_id, $comment_id, $set_comment_text_params, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling ModerationApi->postSetCommentText: ', $e->getMessage(), PHP_EOL; @@ -2130,10 +2392,14 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | +| **tenant_id** | **string**| | | | **comment_id** | **string**| | | | **set_comment_text_params** | [**\FastComments\Client\Model\SetCommentTextParams**](../Model/SetCommentTextParams.md)| | | +| **broadcast_id** | **string**| | [optional] | | **sso** | **string**| | [optional] | ### Return type @@ -2156,7 +2422,7 @@ No authorization required ## `postUnFlagComment()` ```php -postUnFlagComment($comment_id, $sso): \FastComments\Client\Model\APIEmptyResponse +postUnFlagComment($tenant_id, $comment_id, $options): \FastComments\Client\Model\APIEmptyResponse ``` @@ -2174,11 +2440,17 @@ $apiInstance = new FastComments\Client\Api\ModerationApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + +$tenant_id = 'tenant_id_example'; // string $comment_id = 'comment_id_example'; // string -$sso = 'sso_example'; // string +$options = [ + 'broadcast_id' => 'broadcast_id_example', // string + 'sso' => 'sso_example', // string +]; + try { - $result = $apiInstance->postUnFlagComment($comment_id, $sso); + $result = $apiInstance->postUnFlagComment($tenant_id, $comment_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling ModerationApi->postUnFlagComment: ', $e->getMessage(), PHP_EOL; @@ -2187,9 +2459,13 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | +| **tenant_id** | **string**| | | | **comment_id** | **string**| | | +| **broadcast_id** | **string**| | [optional] | | **sso** | **string**| | [optional] | ### Return type @@ -2212,7 +2488,7 @@ No authorization required ## `postVote()` ```php -postVote($comment_id, $direction, $sso): \FastComments\Client\Model\VoteResponse +postVote($tenant_id, $comment_id, $options): \FastComments\Client\Model\VoteResponse ``` @@ -2230,12 +2506,18 @@ $apiInstance = new FastComments\Client\Api\ModerationApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + +$tenant_id = 'tenant_id_example'; // string $comment_id = 'comment_id_example'; // string -$direction = 'direction_example'; // string -$sso = 'sso_example'; // string +$options = [ + 'direction' => 'direction_example', // string + 'broadcast_id' => 'broadcast_id_example', // string + 'sso' => 'sso_example', // string +]; + try { - $result = $apiInstance->postVote($comment_id, $direction, $sso); + $result = $apiInstance->postVote($tenant_id, $comment_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling ModerationApi->postVote: ', $e->getMessage(), PHP_EOL; @@ -2244,10 +2526,14 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | +| **tenant_id** | **string**| | | | **comment_id** | **string**| | | | **direction** | **string**| | [optional] | +| **broadcast_id** | **string**| | [optional] | | **sso** | **string**| | [optional] | ### Return type @@ -2270,7 +2556,7 @@ No authorization required ## `putAwardBadge()` ```php -putAwardBadge($badge_id, $user_id, $comment_id, $broadcast_id, $sso): \FastComments\Client\Model\AwardUserBadgeResponse +putAwardBadge($tenant_id, $badge_id, $options): \FastComments\Client\Model\AwardUserBadgeResponse ``` @@ -2288,14 +2574,19 @@ $apiInstance = new FastComments\Client\Api\ModerationApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + +$tenant_id = 'tenant_id_example'; // string $badge_id = 'badge_id_example'; // string -$user_id = 'user_id_example'; // string -$comment_id = 'comment_id_example'; // string -$broadcast_id = 'broadcast_id_example'; // string -$sso = 'sso_example'; // string +$options = [ + 'user_id' => 'user_id_example', // string + 'comment_id' => 'comment_id_example', // string + 'broadcast_id' => 'broadcast_id_example', // string + 'sso' => 'sso_example', // string +]; + try { - $result = $apiInstance->putAwardBadge($badge_id, $user_id, $comment_id, $broadcast_id, $sso); + $result = $apiInstance->putAwardBadge($tenant_id, $badge_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling ModerationApi->putAwardBadge: ', $e->getMessage(), PHP_EOL; @@ -2304,8 +2595,11 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | +| **tenant_id** | **string**| | | | **badge_id** | **string**| | | | **user_id** | **string**| | [optional] | | **comment_id** | **string**| | [optional] | @@ -2332,7 +2626,7 @@ No authorization required ## `putCloseThread()` ```php -putCloseThread($url_id, $sso): \FastComments\Client\Model\APIEmptyResponse +putCloseThread($tenant_id, $url_id, $sso): \FastComments\Client\Model\APIEmptyResponse ``` @@ -2350,11 +2644,14 @@ $apiInstance = new FastComments\Client\Api\ModerationApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + +$tenant_id = 'tenant_id_example'; // string $url_id = 'url_id_example'; // string $sso = 'sso_example'; // string + try { - $result = $apiInstance->putCloseThread($url_id, $sso); + $result = $apiInstance->putCloseThread($tenant_id, $url_id, $sso); print_r($result); } catch (Exception $e) { echo 'Exception when calling ModerationApi->putCloseThread: ', $e->getMessage(), PHP_EOL; @@ -2365,6 +2662,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | +| **tenant_id** | **string**| | | | **url_id** | **string**| | | | **sso** | **string**| | [optional] | @@ -2388,7 +2686,7 @@ No authorization required ## `putRemoveBadge()` ```php -putRemoveBadge($badge_id, $user_id, $comment_id, $broadcast_id, $sso): \FastComments\Client\Model\RemoveUserBadgeResponse +putRemoveBadge($tenant_id, $badge_id, $options): \FastComments\Client\Model\RemoveUserBadgeResponse ``` @@ -2406,14 +2704,19 @@ $apiInstance = new FastComments\Client\Api\ModerationApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + +$tenant_id = 'tenant_id_example'; // string $badge_id = 'badge_id_example'; // string -$user_id = 'user_id_example'; // string -$comment_id = 'comment_id_example'; // string -$broadcast_id = 'broadcast_id_example'; // string -$sso = 'sso_example'; // string +$options = [ + 'user_id' => 'user_id_example', // string + 'comment_id' => 'comment_id_example', // string + 'broadcast_id' => 'broadcast_id_example', // string + 'sso' => 'sso_example', // string +]; + try { - $result = $apiInstance->putRemoveBadge($badge_id, $user_id, $comment_id, $broadcast_id, $sso); + $result = $apiInstance->putRemoveBadge($tenant_id, $badge_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling ModerationApi->putRemoveBadge: ', $e->getMessage(), PHP_EOL; @@ -2422,8 +2725,11 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | +| **tenant_id** | **string**| | | | **badge_id** | **string**| | | | **user_id** | **string**| | [optional] | | **comment_id** | **string**| | [optional] | @@ -2450,7 +2756,7 @@ No authorization required ## `putReopenThread()` ```php -putReopenThread($url_id, $sso): \FastComments\Client\Model\APIEmptyResponse +putReopenThread($tenant_id, $url_id, $sso): \FastComments\Client\Model\APIEmptyResponse ``` @@ -2468,11 +2774,14 @@ $apiInstance = new FastComments\Client\Api\ModerationApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + +$tenant_id = 'tenant_id_example'; // string $url_id = 'url_id_example'; // string $sso = 'sso_example'; // string + try { - $result = $apiInstance->putReopenThread($url_id, $sso); + $result = $apiInstance->putReopenThread($tenant_id, $url_id, $sso); print_r($result); } catch (Exception $e) { echo 'Exception when calling ModerationApi->putReopenThread: ', $e->getMessage(), PHP_EOL; @@ -2483,6 +2792,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | +| **tenant_id** | **string**| | | | **url_id** | **string**| | | | **sso** | **string**| | [optional] | @@ -2506,7 +2816,7 @@ No authorization required ## `setTrustFactor()` ```php -setTrustFactor($user_id, $trust_factor, $sso): \FastComments\Client\Model\SetUserTrustFactorResponse +setTrustFactor($tenant_id, $options): \FastComments\Client\Model\SetUserTrustFactorResponse ``` @@ -2524,12 +2834,17 @@ $apiInstance = new FastComments\Client\Api\ModerationApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); -$user_id = 'user_id_example'; // string -$trust_factor = 'trust_factor_example'; // string -$sso = 'sso_example'; // string + +$tenant_id = 'tenant_id_example'; // string +$options = [ + 'user_id' => 'user_id_example', // string + 'trust_factor' => 'trust_factor_example', // string + 'sso' => 'sso_example', // string +]; + try { - $result = $apiInstance->setTrustFactor($user_id, $trust_factor, $sso); + $result = $apiInstance->setTrustFactor($tenant_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling ModerationApi->setTrustFactor: ', $e->getMessage(), PHP_EOL; @@ -2538,8 +2853,11 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | +| **tenant_id** | **string**| | | | **user_id** | **string**| | [optional] | | **trust_factor** | **string**| | [optional] | | **sso** | **string**| | [optional] | diff --git a/docs/Api/PublicApi.md b/docs/Api/PublicApi.md index 3f717d8..cd52cff 100644 --- a/docs/Api/PublicApi.md +++ b/docs/Api/PublicApi.md @@ -1,6 +1,6 @@ # FastComments\Client\PublicApi -FastComments PHP API Client - A SDK for interacting with the FastComments API + All URIs are relative to https://fastcomments.com, except if the operation defines another base path. @@ -81,11 +81,13 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string $comment_id = 'comment_id_example'; // string $public_block_from_comment_params = new \FastComments\Client\Model\PublicBlockFromCommentParams(); // \FastComments\Client\Model\PublicBlockFromCommentParams $sso = 'sso_example'; // string + try { $result = $apiInstance->blockFromCommentPublic($tenant_id, $comment_id, $public_block_from_comment_params, $sso); print_r($result); @@ -141,10 +143,12 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string $comment_ids = 'comment_ids_example'; // string | A comma separated list of comment ids. $sso = 'sso_example'; // string + try { $result = $apiInstance->checkedCommentsForBlocked($tenant_id, $comment_ids, $sso); print_r($result); @@ -181,7 +185,7 @@ No authorization required ## `createCommentPublic()` ```php -createCommentPublic($tenant_id, $url_id, $broadcast_id, $comment_data, $session_id, $sso): \FastComments\Client\Model\SaveCommentsResponseWithPresence +createCommentPublic($tenant_id, $url_id, $broadcast_id, $comment_data, $options): \FastComments\Client\Model\SaveCommentsResponseWithPresence ``` @@ -199,15 +203,19 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string $url_id = 'url_id_example'; // string $broadcast_id = 'broadcast_id_example'; // string $comment_data = new \FastComments\Client\Model\CommentData(); // \FastComments\Client\Model\CommentData -$session_id = 'session_id_example'; // string -$sso = 'sso_example'; // string +$options = [ + 'session_id' => 'session_id_example', // string + 'sso' => 'sso_example', // string +]; + try { - $result = $apiInstance->createCommentPublic($tenant_id, $url_id, $broadcast_id, $comment_data, $session_id, $sso); + $result = $apiInstance->createCommentPublic($tenant_id, $url_id, $broadcast_id, $comment_data, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling PublicApi->createCommentPublic: ', $e->getMessage(), PHP_EOL; @@ -216,6 +224,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -245,7 +255,7 @@ No authorization required ## `createFeedPostPublic()` ```php -createFeedPostPublic($tenant_id, $create_feed_post_params, $broadcast_id, $sso): \FastComments\Client\Model\CreateFeedPostResponse +createFeedPostPublic($tenant_id, $create_feed_post_params, $options): \FastComments\Client\Model\CreateFeedPostResponse ``` @@ -263,13 +273,17 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string $create_feed_post_params = new \FastComments\Client\Model\CreateFeedPostParams(); // \FastComments\Client\Model\CreateFeedPostParams -$broadcast_id = 'broadcast_id_example'; // string -$sso = 'sso_example'; // string +$options = [ + 'broadcast_id' => 'broadcast_id_example', // string + 'sso' => 'sso_example', // string +]; + try { - $result = $apiInstance->createFeedPostPublic($tenant_id, $create_feed_post_params, $broadcast_id, $sso); + $result = $apiInstance->createFeedPostPublic($tenant_id, $create_feed_post_params, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling PublicApi->createFeedPostPublic: ', $e->getMessage(), PHP_EOL; @@ -278,6 +292,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -323,10 +339,12 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string $url_id = 'url_id_example'; // string $title = 'title_example'; // string + try { $result = $apiInstance->createV1PageReact($tenant_id, $url_id, $title); print_r($result); @@ -381,11 +399,13 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string $url_id = 'url_id_example'; // string $id = 'id_example'; // string $title = 'title_example'; // string + try { $result = $apiInstance->createV2PageReact($tenant_id, $url_id, $id, $title); print_r($result); @@ -423,7 +443,7 @@ No authorization required ## `deleteCommentPublic()` ```php -deleteCommentPublic($tenant_id, $comment_id, $broadcast_id, $edit_key, $sso): \FastComments\Client\Model\PublicAPIDeleteCommentResponse +deleteCommentPublic($tenant_id, $comment_id, $broadcast_id, $options): \FastComments\Client\Model\PublicAPIDeleteCommentResponse ``` @@ -441,14 +461,18 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string $comment_id = 'comment_id_example'; // string $broadcast_id = 'broadcast_id_example'; // string -$edit_key = 'edit_key_example'; // string -$sso = 'sso_example'; // string +$options = [ + 'edit_key' => 'edit_key_example', // string + 'sso' => 'sso_example', // string +]; + try { - $result = $apiInstance->deleteCommentPublic($tenant_id, $comment_id, $broadcast_id, $edit_key, $sso); + $result = $apiInstance->deleteCommentPublic($tenant_id, $comment_id, $broadcast_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling PublicApi->deleteCommentPublic: ', $e->getMessage(), PHP_EOL; @@ -457,6 +481,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -485,7 +511,7 @@ No authorization required ## `deleteCommentVote()` ```php -deleteCommentVote($tenant_id, $comment_id, $vote_id, $url_id, $broadcast_id, $edit_key, $sso): \FastComments\Client\Model\VoteDeleteResponse +deleteCommentVote($tenant_id, $comment_id, $vote_id, $url_id, $broadcast_id, $options): \FastComments\Client\Model\VoteDeleteResponse ``` @@ -503,16 +529,20 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string $comment_id = 'comment_id_example'; // string $vote_id = 'vote_id_example'; // string $url_id = 'url_id_example'; // string $broadcast_id = 'broadcast_id_example'; // string -$edit_key = 'edit_key_example'; // string -$sso = 'sso_example'; // string +$options = [ + 'edit_key' => 'edit_key_example', // string + 'sso' => 'sso_example', // string +]; + try { - $result = $apiInstance->deleteCommentVote($tenant_id, $comment_id, $vote_id, $url_id, $broadcast_id, $edit_key, $sso); + $result = $apiInstance->deleteCommentVote($tenant_id, $comment_id, $vote_id, $url_id, $broadcast_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling PublicApi->deleteCommentVote: ', $e->getMessage(), PHP_EOL; @@ -521,6 +551,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -551,7 +583,7 @@ No authorization required ## `deleteFeedPostPublic()` ```php -deleteFeedPostPublic($tenant_id, $post_id, $broadcast_id, $sso): \FastComments\Client\Model\DeleteFeedPostPublicResponse +deleteFeedPostPublic($tenant_id, $post_id, $options): \FastComments\Client\Model\DeleteFeedPostPublicResponse ``` @@ -569,13 +601,17 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string $post_id = 'post_id_example'; // string -$broadcast_id = 'broadcast_id_example'; // string -$sso = 'sso_example'; // string +$options = [ + 'broadcast_id' => 'broadcast_id_example', // string + 'sso' => 'sso_example', // string +]; + try { - $result = $apiInstance->deleteFeedPostPublic($tenant_id, $post_id, $broadcast_id, $sso); + $result = $apiInstance->deleteFeedPostPublic($tenant_id, $post_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling PublicApi->deleteFeedPostPublic: ', $e->getMessage(), PHP_EOL; @@ -584,6 +620,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -629,9 +667,11 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string $url_id = 'url_id_example'; // string + try { $result = $apiInstance->deleteV1PageReact($tenant_id, $url_id); print_r($result); @@ -685,10 +725,12 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string $url_id = 'url_id_example'; // string $id = 'id_example'; // string + try { $result = $apiInstance->deleteV2PageReact($tenant_id, $url_id, $id); print_r($result); @@ -743,11 +785,13 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string $comment_id = 'comment_id_example'; // string $is_flagged = True; // bool $sso = 'sso_example'; // string + try { $result = $apiInstance->flagCommentPublic($tenant_id, $comment_id, $is_flagged, $sso); print_r($result); @@ -785,7 +829,7 @@ No authorization required ## `getCommentText()` ```php -getCommentText($tenant_id, $comment_id, $edit_key, $sso): \FastComments\Client\Model\PublicAPIGetCommentTextResponse +getCommentText($tenant_id, $comment_id, $options): \FastComments\Client\Model\PublicAPIGetCommentTextResponse ``` @@ -803,13 +847,17 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string $comment_id = 'comment_id_example'; // string -$edit_key = 'edit_key_example'; // string -$sso = 'sso_example'; // string +$options = [ + 'edit_key' => 'edit_key_example', // string + 'sso' => 'sso_example', // string +]; + try { - $result = $apiInstance->getCommentText($tenant_id, $comment_id, $edit_key, $sso); + $result = $apiInstance->getCommentText($tenant_id, $comment_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling PublicApi->getCommentText: ', $e->getMessage(), PHP_EOL; @@ -818,6 +866,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -863,11 +913,13 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string $comment_id = 'comment_id_example'; // string $dir = 56; // int $sso = 'sso_example'; // string + try { $result = $apiInstance->getCommentVoteUserNames($tenant_id, $comment_id, $dir, $sso); print_r($result); @@ -905,7 +957,7 @@ No authorization required ## `getCommentsForUser()` ```php -getCommentsForUser($user_id, $direction, $replies_to_user_id, $page, $includei10n, $locale, $is_crawler): \FastComments\Client\Model\GetCommentsForUserResponse +getCommentsForUser($options): \FastComments\Client\Model\GetCommentsForUserResponse ``` @@ -923,16 +975,20 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); -$user_id = 'user_id_example'; // string -$direction = new \FastComments\Client\Model\\FastComments\Client\Model\SortDirections(); // \FastComments\Client\Model\SortDirections -$replies_to_user_id = 'replies_to_user_id_example'; // string -$page = 3.4; // float -$includei10n = True; // bool -$locale = 'locale_example'; // string -$is_crawler = True; // bool + +$options = [ + 'user_id' => 'user_id_example', // string + 'direction' => new \FastComments\Client\Model\\FastComments\Client\Model\SortDirections(), // \FastComments\Client\Model\SortDirections + 'replies_to_user_id' => 'replies_to_user_id_example', // string + 'page' => 3.4, // float + 'includei10n' => True, // bool + 'locale' => 'locale_example', // string + 'is_crawler' => True, // bool +]; + try { - $result = $apiInstance->getCommentsForUser($user_id, $direction, $replies_to_user_id, $page, $includei10n, $locale, $is_crawler); + $result = $apiInstance->getCommentsForUser($options); print_r($result); } catch (Exception $e) { echo 'Exception when calling PublicApi->getCommentsForUser: ', $e->getMessage(), PHP_EOL; @@ -941,6 +997,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **user_id** | **string**| | [optional] | @@ -971,7 +1029,7 @@ No authorization required ## `getCommentsPublic()` ```php -getCommentsPublic($tenant_id, $url_id, $page, $direction, $sso, $skip, $skip_children, $limit, $limit_children, $count_children, $fetch_page_for_comment_id, $include_config, $count_all, $includei10n, $locale, $modules, $is_crawler, $include_notification_count, $as_tree, $max_tree_depth, $use_full_translation_ids, $parent_id, $search_text, $hash_tags, $user_id, $custom_config_str, $after_comment_id, $before_comment_id): \FastComments\Client\Model\GetCommentsResponseWithPresencePublicComment +getCommentsPublic($tenant_id, $url_id, $options): \FastComments\Client\Model\GetCommentsResponseWithPresencePublicComment ``` @@ -991,37 +1049,41 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string $url_id = 'url_id_example'; // string -$page = 56; // int -$direction = new \FastComments\Client\Model\\FastComments\Client\Model\SortDirections(); // \FastComments\Client\Model\SortDirections -$sso = 'sso_example'; // string -$skip = 56; // int -$skip_children = 56; // int -$limit = 56; // int -$limit_children = 56; // int -$count_children = True; // bool -$fetch_page_for_comment_id = 'fetch_page_for_comment_id_example'; // string -$include_config = True; // bool -$count_all = True; // bool -$includei10n = True; // bool -$locale = 'locale_example'; // string -$modules = 'modules_example'; // string -$is_crawler = True; // bool -$include_notification_count = True; // bool -$as_tree = True; // bool -$max_tree_depth = 56; // int -$use_full_translation_ids = True; // bool -$parent_id = 'parent_id_example'; // string -$search_text = 'search_text_example'; // string -$hash_tags = array('hash_tags_example'); // string[] -$user_id = 'user_id_example'; // string -$custom_config_str = 'custom_config_str_example'; // string -$after_comment_id = 'after_comment_id_example'; // string -$before_comment_id = 'before_comment_id_example'; // string +$options = [ + 'page' => 56, // int + 'direction' => new \FastComments\Client\Model\\FastComments\Client\Model\SortDirections(), // \FastComments\Client\Model\SortDirections + 'sso' => 'sso_example', // string + 'skip' => 56, // int + 'skip_children' => 56, // int + 'limit' => 56, // int + 'limit_children' => 56, // int + 'count_children' => True, // bool + 'fetch_page_for_comment_id' => 'fetch_page_for_comment_id_example', // string + 'include_config' => True, // bool + 'count_all' => True, // bool + 'includei10n' => True, // bool + 'locale' => 'locale_example', // string + 'modules' => 'modules_example', // string + 'is_crawler' => True, // bool + 'include_notification_count' => True, // bool + 'as_tree' => True, // bool + 'max_tree_depth' => 56, // int + 'use_full_translation_ids' => True, // bool + 'parent_id' => 'parent_id_example', // string + 'search_text' => 'search_text_example', // string + 'hash_tags' => array('hash_tags_example'), // string[] + 'user_id' => 'user_id_example', // string + 'custom_config_str' => 'custom_config_str_example', // string + 'after_comment_id' => 'after_comment_id_example', // string + 'before_comment_id' => 'before_comment_id_example', // string +]; + try { - $result = $apiInstance->getCommentsPublic($tenant_id, $url_id, $page, $direction, $sso, $skip, $skip_children, $limit, $limit_children, $count_children, $fetch_page_for_comment_id, $include_config, $count_all, $includei10n, $locale, $modules, $is_crawler, $include_notification_count, $as_tree, $max_tree_depth, $use_full_translation_ids, $parent_id, $search_text, $hash_tags, $user_id, $custom_config_str, $after_comment_id, $before_comment_id); + $result = $apiInstance->getCommentsPublic($tenant_id, $url_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling PublicApi->getCommentsPublic: ', $e->getMessage(), PHP_EOL; @@ -1030,6 +1092,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -1101,12 +1165,14 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string $url_id = 'url_id_example'; // string $user_id_ws = 'user_id_ws_example'; // string $start_time = 56; // int $end_time = 56; // int + try { $result = $apiInstance->getEventLog($tenant_id, $url_id, $user_id_ws, $start_time, $end_time); print_r($result); @@ -1145,7 +1211,7 @@ No authorization required ## `getFeedPostsPublic()` ```php -getFeedPostsPublic($tenant_id, $after_id, $limit, $tags, $sso, $is_crawler, $include_user_info): \FastComments\Client\Model\PublicFeedPostsResponse +getFeedPostsPublic($tenant_id, $options): \FastComments\Client\Model\PublicFeedPostsResponse ``` @@ -1165,16 +1231,20 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string -$after_id = 'after_id_example'; // string -$limit = 56; // int -$tags = array('tags_example'); // string[] -$sso = 'sso_example'; // string -$is_crawler = True; // bool -$include_user_info = True; // bool +$options = [ + 'after_id' => 'after_id_example', // string + 'limit' => 56, // int + 'tags' => array('tags_example'), // string[] + 'sso' => 'sso_example', // string + 'is_crawler' => True, // bool + 'include_user_info' => True, // bool +]; + try { - $result = $apiInstance->getFeedPostsPublic($tenant_id, $after_id, $limit, $tags, $sso, $is_crawler, $include_user_info); + $result = $apiInstance->getFeedPostsPublic($tenant_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling PublicApi->getFeedPostsPublic: ', $e->getMessage(), PHP_EOL; @@ -1183,6 +1253,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -1231,10 +1303,12 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string $post_ids = array('post_ids_example'); // string[] $sso = 'sso_example'; // string + try { $result = $apiInstance->getFeedPostsStats($tenant_id, $post_ids, $sso); print_r($result); @@ -1289,9 +1363,11 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string $large_internal_url_sanitized = 'large_internal_url_sanitized_example'; // string + try { $result = $apiInstance->getGifLarge($tenant_id, $large_internal_url_sanitized); print_r($result); @@ -1327,7 +1403,7 @@ No authorization required ## `getGifsSearch()` ```php -getGifsSearch($tenant_id, $search, $locale, $rating, $page): \FastComments\Client\Model\GetGifsSearchResponse +getGifsSearch($tenant_id, $search, $options): \FastComments\Client\Model\GetGifsSearchResponse ``` @@ -1345,14 +1421,18 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string $search = 'search_example'; // string -$locale = 'locale_example'; // string -$rating = 'rating_example'; // string -$page = 3.4; // float +$options = [ + 'locale' => 'locale_example', // string + 'rating' => 'rating_example', // string + 'page' => 3.4, // float +]; + try { - $result = $apiInstance->getGifsSearch($tenant_id, $search, $locale, $rating, $page); + $result = $apiInstance->getGifsSearch($tenant_id, $search, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling PublicApi->getGifsSearch: ', $e->getMessage(), PHP_EOL; @@ -1361,6 +1441,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -1389,7 +1471,7 @@ No authorization required ## `getGifsTrending()` ```php -getGifsTrending($tenant_id, $locale, $rating, $page): \FastComments\Client\Model\GetGifsTrendingResponse +getGifsTrending($tenant_id, $options): \FastComments\Client\Model\GetGifsTrendingResponse ``` @@ -1407,13 +1489,17 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string -$locale = 'locale_example'; // string -$rating = 'rating_example'; // string -$page = 3.4; // float +$options = [ + 'locale' => 'locale_example', // string + 'rating' => 'rating_example', // string + 'page' => 3.4, // float +]; + try { - $result = $apiInstance->getGifsTrending($tenant_id, $locale, $rating, $page); + $result = $apiInstance->getGifsTrending($tenant_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling PublicApi->getGifsTrending: ', $e->getMessage(), PHP_EOL; @@ -1422,6 +1508,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -1469,12 +1557,14 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string $url_id = 'url_id_example'; // string $user_id_ws = 'user_id_ws_example'; // string $start_time = 56; // int $end_time = 56; // int + try { $result = $apiInstance->getGlobalEventLog($tenant_id, $url_id, $user_id_ws, $start_time, $end_time); print_r($result); @@ -1513,7 +1603,7 @@ No authorization required ## `getOfflineUsers()` ```php -getOfflineUsers($tenant_id, $url_id, $after_name, $after_user_id): \FastComments\Client\Model\PageUsersOfflineResponse +getOfflineUsers($tenant_id, $url_id, $options): \FastComments\Client\Model\PageUsersOfflineResponse ``` @@ -1533,13 +1623,17 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string $url_id = 'url_id_example'; // string | Page URL identifier (cleaned server-side). -$after_name = 'after_name_example'; // string | Cursor: pass nextAfterName from the previous response. -$after_user_id = 'after_user_id_example'; // string | Cursor tiebreaker: pass nextAfterUserId from the previous response. Required when afterName is set so name-ties don't drop entries. +$options = [ + 'after_name' => 'after_name_example', // string | Cursor: pass nextAfterName from the previous response. + 'after_user_id' => 'after_user_id_example', // string | Cursor tiebreaker: pass nextAfterUserId from the previous response. Required when afterName is set so name-ties don't drop entries. +]; + try { - $result = $apiInstance->getOfflineUsers($tenant_id, $url_id, $after_name, $after_user_id); + $result = $apiInstance->getOfflineUsers($tenant_id, $url_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling PublicApi->getOfflineUsers: ', $e->getMessage(), PHP_EOL; @@ -1548,6 +1642,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -1575,7 +1671,7 @@ No authorization required ## `getOnlineUsers()` ```php -getOnlineUsers($tenant_id, $url_id, $after_name, $after_user_id): \FastComments\Client\Model\PageUsersOnlineResponse +getOnlineUsers($tenant_id, $url_id, $options): \FastComments\Client\Model\PageUsersOnlineResponse ``` @@ -1595,13 +1691,17 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string $url_id = 'url_id_example'; // string | Page URL identifier (cleaned server-side). -$after_name = 'after_name_example'; // string | Cursor: pass nextAfterName from the previous response. -$after_user_id = 'after_user_id_example'; // string | Cursor tiebreaker: pass nextAfterUserId from the previous response. Required when afterName is set so name-ties don't drop entries. +$options = [ + 'after_name' => 'after_name_example', // string | Cursor: pass nextAfterName from the previous response. + 'after_user_id' => 'after_user_id_example', // string | Cursor tiebreaker: pass nextAfterUserId from the previous response. Required when afterName is set so name-ties don't drop entries. +]; + try { - $result = $apiInstance->getOnlineUsers($tenant_id, $url_id, $after_name, $after_user_id); + $result = $apiInstance->getOnlineUsers($tenant_id, $url_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling PublicApi->getOnlineUsers: ', $e->getMessage(), PHP_EOL; @@ -1610,6 +1710,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -1637,7 +1739,7 @@ No authorization required ## `getPagesPublic()` ```php -getPagesPublic($tenant_id, $cursor, $limit, $q, $sort_by, $has_comments): \FastComments\Client\Model\GetPublicPagesResponse +getPagesPublic($tenant_id, $options): \FastComments\Client\Model\GetPublicPagesResponse ``` @@ -1657,15 +1759,19 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string -$cursor = 'cursor_example'; // string | Opaque pagination cursor returned as `nextCursor` from a prior request. Tied to the same `sortBy`. -$limit = 56; // int | 1..200, default 50 -$q = 'q_example'; // string | Optional case-insensitive title prefix filter. -$sort_by = new \FastComments\Client\Model\\FastComments\Client\Model\PagesSortBy(); // \FastComments\Client\Model\PagesSortBy | Sort order. `updatedAt` (default, newest first), `commentCount` (most comments first), or `title` (alphabetical). -$has_comments = True; // bool | If true, only return pages with at least one comment. +$options = [ + 'cursor' => 'cursor_example', // string | Opaque pagination cursor returned as `nextCursor` from a prior request. Tied to the same `sortBy`. + 'limit' => 56, // int | 1..200, default 50 + 'q' => 'q_example', // string | Optional case-insensitive title prefix filter. + 'sort_by' => new \FastComments\Client\Model\\FastComments\Client\Model\PagesSortBy(), // \FastComments\Client\Model\PagesSortBy | Sort order. `updatedAt` (default, newest first), `commentCount` (most comments first), or `title` (alphabetical). + 'has_comments' => True, // bool | If true, only return pages with at least one comment. +]; + try { - $result = $apiInstance->getPagesPublic($tenant_id, $cursor, $limit, $q, $sort_by, $has_comments); + $result = $apiInstance->getPagesPublic($tenant_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling PublicApi->getPagesPublic: ', $e->getMessage(), PHP_EOL; @@ -1674,6 +1780,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -1703,7 +1811,7 @@ No authorization required ## `getTranslations()` ```php -getTranslations($namespace, $component, $locale, $use_full_translation_ids): \FastComments\Client\Model\GetTranslationsResponse +getTranslations($namespace, $component, $options): \FastComments\Client\Model\GetTranslationsResponse ``` @@ -1721,13 +1829,17 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $namespace = 'namespace_example'; // string $component = 'component_example'; // string -$locale = 'locale_example'; // string -$use_full_translation_ids = True; // bool +$options = [ + 'locale' => 'locale_example', // string + 'use_full_translation_ids' => True, // bool +]; + try { - $result = $apiInstance->getTranslations($namespace, $component, $locale, $use_full_translation_ids); + $result = $apiInstance->getTranslations($namespace, $component, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling PublicApi->getTranslations: ', $e->getMessage(), PHP_EOL; @@ -1736,6 +1848,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **namespace** | **string**| | | @@ -1781,9 +1895,11 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string $sso = 'sso_example'; // string + try { $result = $apiInstance->getUserNotificationCount($tenant_id, $sso); print_r($result); @@ -1819,7 +1935,7 @@ No authorization required ## `getUserNotifications()` ```php -getUserNotifications($tenant_id, $url_id, $page_size, $after_id, $include_context, $after_created_at, $unread_only, $dm_only, $no_dm, $include_translations, $include_tenant_notifications, $sso): \FastComments\Client\Model\GetMyNotificationsResponse +getUserNotifications($tenant_id, $options): \FastComments\Client\Model\GetMyNotificationsResponse ``` @@ -1837,21 +1953,25 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string -$url_id = 'url_id_example'; // string | Used to determine whether the current page is subscribed. -$page_size = 56; // int -$after_id = 'after_id_example'; // string -$include_context = True; // bool -$after_created_at = 56; // int -$unread_only = True; // bool -$dm_only = True; // bool -$no_dm = True; // bool -$include_translations = True; // bool -$include_tenant_notifications = True; // bool -$sso = 'sso_example'; // string +$options = [ + 'url_id' => 'url_id_example', // string | Used to determine whether the current page is subscribed. + 'page_size' => 56, // int + 'after_id' => 'after_id_example', // string + 'include_context' => True, // bool + 'after_created_at' => 56, // int + 'unread_only' => True, // bool + 'dm_only' => True, // bool + 'no_dm' => True, // bool + 'include_translations' => True, // bool + 'include_tenant_notifications' => True, // bool + 'sso' => 'sso_example', // string +]; + try { - $result = $apiInstance->getUserNotifications($tenant_id, $url_id, $page_size, $after_id, $include_context, $after_created_at, $unread_only, $dm_only, $no_dm, $include_translations, $include_tenant_notifications, $sso); + $result = $apiInstance->getUserNotifications($tenant_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling PublicApi->getUserNotifications: ', $e->getMessage(), PHP_EOL; @@ -1860,6 +1980,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -1913,10 +2035,12 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string $url_id_ws = 'url_id_ws_example'; // string $user_ids = 'user_ids_example'; // string + try { $result = $apiInstance->getUserPresenceStatuses($tenant_id, $url_id_ws, $user_ids); print_r($result); @@ -1953,7 +2077,7 @@ No authorization required ## `getUserReactsPublic()` ```php -getUserReactsPublic($tenant_id, $post_ids, $sso): \FastComments\Client\Model\UserReactsResponse +getUserReactsPublic($tenant_id, $options): \FastComments\Client\Model\UserReactsResponse ``` @@ -1971,12 +2095,16 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string -$post_ids = array('post_ids_example'); // string[] -$sso = 'sso_example'; // string +$options = [ + 'post_ids' => array('post_ids_example'), // string[] + 'sso' => 'sso_example', // string +]; + try { - $result = $apiInstance->getUserReactsPublic($tenant_id, $post_ids, $sso); + $result = $apiInstance->getUserReactsPublic($tenant_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling PublicApi->getUserReactsPublic: ', $e->getMessage(), PHP_EOL; @@ -1985,6 +2113,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -2031,9 +2161,11 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string $ids = 'ids_example'; // string | Comma-delimited userIds. + try { $result = $apiInstance->getUsersInfo($tenant_id, $ids); print_r($result); @@ -2087,9 +2219,11 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string $url_id = 'url_id_example'; // string + try { $result = $apiInstance->getV1PageLikes($tenant_id, $url_id); print_r($result); @@ -2143,10 +2277,12 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string $url_id = 'url_id_example'; // string $id = 'id_example'; // string + try { $result = $apiInstance->getV2PageReactUsers($tenant_id, $url_id, $id); print_r($result); @@ -2201,9 +2337,11 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string $url_id = 'url_id_example'; // string + try { $result = $apiInstance->getV2PageReacts($tenant_id, $url_id); print_r($result); @@ -2257,11 +2395,13 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string $comment_id = 'comment_id_example'; // string $broadcast_id = 'broadcast_id_example'; // string $sso = 'sso_example'; // string + try { $result = $apiInstance->lockComment($tenant_id, $comment_id, $broadcast_id, $sso); print_r($result); @@ -2318,6 +2458,8 @@ $apiInstance = new FastComments\Client\Api\PublicApi( new GuzzleHttp\Client() ); + + try { $result = $apiInstance->logoutPublic(); print_r($result); @@ -2368,11 +2510,13 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string $comment_id = 'comment_id_example'; // string $broadcast_id = 'broadcast_id_example'; // string $sso = 'sso_example'; // string + try { $result = $apiInstance->pinComment($tenant_id, $comment_id, $broadcast_id, $sso); print_r($result); @@ -2410,7 +2554,7 @@ No authorization required ## `reactFeedPostPublic()` ```php -reactFeedPostPublic($tenant_id, $post_id, $react_body_params, $is_undo, $broadcast_id, $sso): \FastComments\Client\Model\ReactFeedPostResponse +reactFeedPostPublic($tenant_id, $post_id, $react_body_params, $options): \FastComments\Client\Model\ReactFeedPostResponse ``` @@ -2428,15 +2572,19 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string $post_id = 'post_id_example'; // string $react_body_params = new \FastComments\Client\Model\ReactBodyParams(); // \FastComments\Client\Model\ReactBodyParams -$is_undo = True; // bool -$broadcast_id = 'broadcast_id_example'; // string -$sso = 'sso_example'; // string +$options = [ + 'is_undo' => True, // bool + 'broadcast_id' => 'broadcast_id_example', // string + 'sso' => 'sso_example', // string +]; + try { - $result = $apiInstance->reactFeedPostPublic($tenant_id, $post_id, $react_body_params, $is_undo, $broadcast_id, $sso); + $result = $apiInstance->reactFeedPostPublic($tenant_id, $post_id, $react_body_params, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling PublicApi->reactFeedPostPublic: ', $e->getMessage(), PHP_EOL; @@ -2445,6 +2593,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -2492,9 +2642,11 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string $sso = 'sso_example'; // string + try { $result = $apiInstance->resetUserNotificationCount($tenant_id, $sso); print_r($result); @@ -2530,7 +2682,7 @@ No authorization required ## `resetUserNotifications()` ```php -resetUserNotifications($tenant_id, $after_id, $after_created_at, $unread_only, $dm_only, $no_dm, $sso): \FastComments\Client\Model\ResetUserNotificationsResponse +resetUserNotifications($tenant_id, $options): \FastComments\Client\Model\ResetUserNotificationsResponse ``` @@ -2548,16 +2700,20 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string -$after_id = 'after_id_example'; // string -$after_created_at = 56; // int -$unread_only = True; // bool -$dm_only = True; // bool -$no_dm = True; // bool -$sso = 'sso_example'; // string +$options = [ + 'after_id' => 'after_id_example', // string + 'after_created_at' => 56, // int + 'unread_only' => True, // bool + 'dm_only' => True, // bool + 'no_dm' => True, // bool + 'sso' => 'sso_example', // string +]; + try { - $result = $apiInstance->resetUserNotifications($tenant_id, $after_id, $after_created_at, $unread_only, $dm_only, $no_dm, $sso); + $result = $apiInstance->resetUserNotifications($tenant_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling PublicApi->resetUserNotifications: ', $e->getMessage(), PHP_EOL; @@ -2566,6 +2722,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -2596,7 +2754,7 @@ No authorization required ## `searchUsers()` ```php -searchUsers($tenant_id, $url_id, $username_starts_with, $mention_group_ids, $sso, $search_section): \FastComments\Client\Model\SearchUsersResult +searchUsers($tenant_id, $url_id, $options): \FastComments\Client\Model\SearchUsersResult ``` @@ -2614,15 +2772,19 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string $url_id = 'url_id_example'; // string -$username_starts_with = 'username_starts_with_example'; // string -$mention_group_ids = array('mention_group_ids_example'); // string[] -$sso = 'sso_example'; // string -$search_section = 'search_section_example'; // string +$options = [ + 'username_starts_with' => 'username_starts_with_example', // string + 'mention_group_ids' => array('mention_group_ids_example'), // string[] + 'sso' => 'sso_example', // string + 'search_section' => 'search_section_example', // string +]; + try { - $result = $apiInstance->searchUsers($tenant_id, $url_id, $username_starts_with, $mention_group_ids, $sso, $search_section); + $result = $apiInstance->searchUsers($tenant_id, $url_id, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling PublicApi->searchUsers: ', $e->getMessage(), PHP_EOL; @@ -2631,6 +2793,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -2660,7 +2824,7 @@ No authorization required ## `setCommentText()` ```php -setCommentText($tenant_id, $comment_id, $broadcast_id, $comment_text_update_request, $edit_key, $sso): \FastComments\Client\Model\PublicAPISetCommentTextResponse +setCommentText($tenant_id, $comment_id, $broadcast_id, $comment_text_update_request, $options): \FastComments\Client\Model\PublicAPISetCommentTextResponse ``` @@ -2678,15 +2842,19 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string $comment_id = 'comment_id_example'; // string $broadcast_id = 'broadcast_id_example'; // string $comment_text_update_request = new \FastComments\Client\Model\CommentTextUpdateRequest(); // \FastComments\Client\Model\CommentTextUpdateRequest -$edit_key = 'edit_key_example'; // string -$sso = 'sso_example'; // string +$options = [ + 'edit_key' => 'edit_key_example', // string + 'sso' => 'sso_example', // string +]; + try { - $result = $apiInstance->setCommentText($tenant_id, $comment_id, $broadcast_id, $comment_text_update_request, $edit_key, $sso); + $result = $apiInstance->setCommentText($tenant_id, $comment_id, $broadcast_id, $comment_text_update_request, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling PublicApi->setCommentText: ', $e->getMessage(), PHP_EOL; @@ -2695,6 +2863,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -2742,11 +2912,13 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string $comment_id = 'comment_id_example'; // string $public_block_from_comment_params = new \FastComments\Client\Model\PublicBlockFromCommentParams(); // \FastComments\Client\Model\PublicBlockFromCommentParams $sso = 'sso_example'; // string + try { $result = $apiInstance->unBlockCommentPublic($tenant_id, $comment_id, $public_block_from_comment_params, $sso); print_r($result); @@ -2802,11 +2974,13 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string $comment_id = 'comment_id_example'; // string $broadcast_id = 'broadcast_id_example'; // string $sso = 'sso_example'; // string + try { $result = $apiInstance->unLockComment($tenant_id, $comment_id, $broadcast_id, $sso); print_r($result); @@ -2862,11 +3036,13 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string $comment_id = 'comment_id_example'; // string $broadcast_id = 'broadcast_id_example'; // string $sso = 'sso_example'; // string + try { $result = $apiInstance->unPinComment($tenant_id, $comment_id, $broadcast_id, $sso); print_r($result); @@ -2904,7 +3080,7 @@ No authorization required ## `updateFeedPostPublic()` ```php -updateFeedPostPublic($tenant_id, $post_id, $update_feed_post_params, $broadcast_id, $sso): \FastComments\Client\Model\CreateFeedPostResponse +updateFeedPostPublic($tenant_id, $post_id, $update_feed_post_params, $options): \FastComments\Client\Model\CreateFeedPostResponse ``` @@ -2922,14 +3098,18 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string $post_id = 'post_id_example'; // string $update_feed_post_params = new \FastComments\Client\Model\UpdateFeedPostParams(); // \FastComments\Client\Model\UpdateFeedPostParams -$broadcast_id = 'broadcast_id_example'; // string -$sso = 'sso_example'; // string +$options = [ + 'broadcast_id' => 'broadcast_id_example', // string + 'sso' => 'sso_example', // string +]; + try { - $result = $apiInstance->updateFeedPostPublic($tenant_id, $post_id, $update_feed_post_params, $broadcast_id, $sso); + $result = $apiInstance->updateFeedPostPublic($tenant_id, $post_id, $update_feed_post_params, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling PublicApi->updateFeedPostPublic: ', $e->getMessage(), PHP_EOL; @@ -2938,6 +3118,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -2986,12 +3168,14 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string $notification_id = 'notification_id_example'; // string $opted_in_or_out = 'opted_in_or_out_example'; // string $comment_id = 'comment_id_example'; // string $sso = 'sso_example'; // string + try { $result = $apiInstance->updateUserNotificationCommentSubscriptionStatus($tenant_id, $notification_id, $opted_in_or_out, $comment_id, $sso); print_r($result); @@ -3050,6 +3234,7 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string $url_id = 'url_id_example'; // string $url = 'url_example'; // string @@ -3057,6 +3242,7 @@ $page_title = 'page_title_example'; // string $subscribed_or_unsubscribed = 'subscribed_or_unsubscribed_example'; // string $sso = 'sso_example'; // string + try { $result = $apiInstance->updateUserNotificationPageSubscriptionStatus($tenant_id, $url_id, $url, $page_title, $subscribed_or_unsubscribed, $sso); print_r($result); @@ -3114,11 +3300,13 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string $notification_id = 'notification_id_example'; // string $new_status = 'new_status_example'; // string $sso = 'sso_example'; // string + try { $result = $apiInstance->updateUserNotificationStatus($tenant_id, $notification_id, $new_status, $sso); print_r($result); @@ -3156,7 +3344,7 @@ No authorization required ## `uploadImage()` ```php -uploadImage($tenant_id, $file, $size_preset, $url_id): \FastComments\Client\Model\UploadImageResponse +uploadImage($tenant_id, $file, $options): \FastComments\Client\Model\UploadImageResponse ``` @@ -3176,13 +3364,17 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string $file = '/path/to/file.txt'; // \SplFileObject -$size_preset = new \FastComments\Client\Model\\FastComments\Client\Model\SizePreset(); // \FastComments\Client\Model\SizePreset | Size preset: \"Default\" (1000x1000px) or \"CrossPlatform\" (creates sizes for popular devices) -$url_id = 'url_id_example'; // string | Page id that upload is happening from, to configure +$options = [ + 'size_preset' => new \FastComments\Client\Model\\FastComments\Client\Model\SizePreset(), // \FastComments\Client\Model\SizePreset | Size preset: \"Default\" (1000x1000px) or \"CrossPlatform\" (creates sizes for popular devices) + 'url_id' => 'url_id_example', // string | Page id that upload is happening from, to configure +]; + try { - $result = $apiInstance->uploadImage($tenant_id, $file, $size_preset, $url_id); + $result = $apiInstance->uploadImage($tenant_id, $file, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling PublicApi->uploadImage: ', $e->getMessage(), PHP_EOL; @@ -3191,6 +3383,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | @@ -3218,7 +3412,7 @@ No authorization required ## `voteComment()` ```php -voteComment($tenant_id, $comment_id, $url_id, $broadcast_id, $vote_body_params, $session_id, $sso): \FastComments\Client\Model\VoteResponse +voteComment($tenant_id, $comment_id, $url_id, $broadcast_id, $vote_body_params, $options): \FastComments\Client\Model\VoteResponse ``` @@ -3236,16 +3430,20 @@ $apiInstance = new FastComments\Client\Api\PublicApi( // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); + $tenant_id = 'tenant_id_example'; // string $comment_id = 'comment_id_example'; // string $url_id = 'url_id_example'; // string $broadcast_id = 'broadcast_id_example'; // string $vote_body_params = new \FastComments\Client\Model\VoteBodyParams(); // \FastComments\Client\Model\VoteBodyParams -$session_id = 'session_id_example'; // string -$sso = 'sso_example'; // string +$options = [ + 'session_id' => 'session_id_example', // string + 'sso' => 'sso_example', // string +]; + try { - $result = $apiInstance->voteComment($tenant_id, $comment_id, $url_id, $broadcast_id, $vote_body_params, $session_id, $sso); + $result = $apiInstance->voteComment($tenant_id, $comment_id, $url_id, $broadcast_id, $vote_body_params, $options); print_r($result); } catch (Exception $e) { echo 'Exception when calling PublicApi->voteComment: ', $e->getMessage(), PHP_EOL; @@ -3254,6 +3452,8 @@ try { ### Parameters +Note: required parameters and the request body are positional; the optional parameters listed below are passed as keys of the `$options` array. + | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **tenant_id** | **string**| | | diff --git a/docs/Model/APIAuditLog.md b/docs/Model/APIAuditLog.md index 51e3cf3..4824834 100644 --- a/docs/Model/APIAuditLog.md +++ b/docs/Model/APIAuditLog.md @@ -1,4 +1,4 @@ -# # APIAuditLog +# APIAuditLog ## Properties diff --git a/docs/Model/APIBanUserChangeLog.md b/docs/Model/APIBanUserChangeLog.md index 7542783..187f9bc 100644 --- a/docs/Model/APIBanUserChangeLog.md +++ b/docs/Model/APIBanUserChangeLog.md @@ -1,4 +1,4 @@ -# # APIBanUserChangeLog +# APIBanUserChangeLog ## Properties diff --git a/docs/Model/APIBanUserChangedValues.md b/docs/Model/APIBanUserChangedValues.md index 0e8dc40..ebaa1d2 100644 --- a/docs/Model/APIBanUserChangedValues.md +++ b/docs/Model/APIBanUserChangedValues.md @@ -1,4 +1,4 @@ -# # APIBanUserChangedValues +# APIBanUserChangedValues ## Properties diff --git a/docs/Model/APIBannedUser.md b/docs/Model/APIBannedUser.md index dc8d3fb..1f6d37f 100644 --- a/docs/Model/APIBannedUser.md +++ b/docs/Model/APIBannedUser.md @@ -1,4 +1,4 @@ -# # APIBannedUser +# APIBannedUser ## Properties diff --git a/docs/Model/APIBannedUserWithMultiMatchInfo.md b/docs/Model/APIBannedUserWithMultiMatchInfo.md index cb180cd..079a03a 100644 --- a/docs/Model/APIBannedUserWithMultiMatchInfo.md +++ b/docs/Model/APIBannedUserWithMultiMatchInfo.md @@ -1,4 +1,4 @@ -# # APIBannedUserWithMultiMatchInfo +# APIBannedUserWithMultiMatchInfo ## Properties diff --git a/docs/Model/APIComment.md b/docs/Model/APIComment.md index 264c98b..6670711 100644 --- a/docs/Model/APIComment.md +++ b/docs/Model/APIComment.md @@ -1,4 +1,4 @@ -# # APIComment +# APIComment ## Properties diff --git a/docs/Model/APICommentBase.md b/docs/Model/APICommentBase.md index 73003bb..d4fd87a 100644 --- a/docs/Model/APICommentBase.md +++ b/docs/Model/APICommentBase.md @@ -1,4 +1,4 @@ -# # APICommentBase +# APICommentBase ## Properties diff --git a/docs/Model/APICommentBaseMeta.md b/docs/Model/APICommentBaseMeta.md index d859e62..927229c 100644 --- a/docs/Model/APICommentBaseMeta.md +++ b/docs/Model/APICommentBaseMeta.md @@ -1,4 +1,4 @@ -# # APICommentBaseMeta +# APICommentBaseMeta ## Properties diff --git a/docs/Model/APICommentCommonBannedUser.md b/docs/Model/APICommentCommonBannedUser.md index a63e825..a9447f5 100644 --- a/docs/Model/APICommentCommonBannedUser.md +++ b/docs/Model/APICommentCommonBannedUser.md @@ -1,4 +1,4 @@ -# # APICommentCommonBannedUser +# APICommentCommonBannedUser ## Properties diff --git a/docs/Model/APICreateUserBadgeResponse.md b/docs/Model/APICreateUserBadgeResponse.md index cce0315..ea4c53f 100644 --- a/docs/Model/APICreateUserBadgeResponse.md +++ b/docs/Model/APICreateUserBadgeResponse.md @@ -1,4 +1,4 @@ -# # APICreateUserBadgeResponse +# APICreateUserBadgeResponse ## Properties diff --git a/docs/Model/APIDomainConfiguration.md b/docs/Model/APIDomainConfiguration.md index 26905c9..4421b2b 100644 --- a/docs/Model/APIDomainConfiguration.md +++ b/docs/Model/APIDomainConfiguration.md @@ -1,4 +1,4 @@ -# # APIDomainConfiguration +# APIDomainConfiguration ## Properties diff --git a/docs/Model/APIEmptyResponse.md b/docs/Model/APIEmptyResponse.md index db0861c..604e779 100644 --- a/docs/Model/APIEmptyResponse.md +++ b/docs/Model/APIEmptyResponse.md @@ -1,4 +1,4 @@ -# # APIEmptyResponse +# APIEmptyResponse ## Properties diff --git a/docs/Model/APIEmptySuccessResponse.md b/docs/Model/APIEmptySuccessResponse.md index fe48f7d..32a418f 100644 --- a/docs/Model/APIEmptySuccessResponse.md +++ b/docs/Model/APIEmptySuccessResponse.md @@ -1,4 +1,4 @@ -# # APIEmptySuccessResponse +# APIEmptySuccessResponse ## Properties diff --git a/docs/Model/APIError.md b/docs/Model/APIError.md index 722d291..ff8e4e3 100644 --- a/docs/Model/APIError.md +++ b/docs/Model/APIError.md @@ -1,4 +1,4 @@ -# # APIError +# APIError ## Properties diff --git a/docs/Model/APIGetCommentResponse.md b/docs/Model/APIGetCommentResponse.md index 9f3ca30..5a9e7f5 100644 --- a/docs/Model/APIGetCommentResponse.md +++ b/docs/Model/APIGetCommentResponse.md @@ -1,4 +1,4 @@ -# # APIGetCommentResponse +# APIGetCommentResponse ## Properties diff --git a/docs/Model/APIGetCommentsResponse.md b/docs/Model/APIGetCommentsResponse.md index f00c4e1..ee2dbcb 100644 --- a/docs/Model/APIGetCommentsResponse.md +++ b/docs/Model/APIGetCommentsResponse.md @@ -1,4 +1,4 @@ -# # APIGetCommentsResponse +# APIGetCommentsResponse ## Properties diff --git a/docs/Model/APIGetUserBadgeProgressListResponse.md b/docs/Model/APIGetUserBadgeProgressListResponse.md index 343cda5..fc064f7 100644 --- a/docs/Model/APIGetUserBadgeProgressListResponse.md +++ b/docs/Model/APIGetUserBadgeProgressListResponse.md @@ -1,4 +1,4 @@ -# # APIGetUserBadgeProgressListResponse +# APIGetUserBadgeProgressListResponse ## Properties diff --git a/docs/Model/APIGetUserBadgeProgressResponse.md b/docs/Model/APIGetUserBadgeProgressResponse.md index f4772d5..2122eca 100644 --- a/docs/Model/APIGetUserBadgeProgressResponse.md +++ b/docs/Model/APIGetUserBadgeProgressResponse.md @@ -1,4 +1,4 @@ -# # APIGetUserBadgeProgressResponse +# APIGetUserBadgeProgressResponse ## Properties diff --git a/docs/Model/APIGetUserBadgeResponse.md b/docs/Model/APIGetUserBadgeResponse.md index f9986ef..a0335dd 100644 --- a/docs/Model/APIGetUserBadgeResponse.md +++ b/docs/Model/APIGetUserBadgeResponse.md @@ -1,4 +1,4 @@ -# # APIGetUserBadgeResponse +# APIGetUserBadgeResponse ## Properties diff --git a/docs/Model/APIGetUserBadgesResponse.md b/docs/Model/APIGetUserBadgesResponse.md index 58ee75e..accba87 100644 --- a/docs/Model/APIGetUserBadgesResponse.md +++ b/docs/Model/APIGetUserBadgesResponse.md @@ -1,4 +1,4 @@ -# # APIGetUserBadgesResponse +# APIGetUserBadgesResponse ## Properties diff --git a/docs/Model/APIModerateGetUserBanPreferencesResponse.md b/docs/Model/APIModerateGetUserBanPreferencesResponse.md index a80cc48..9193bda 100644 --- a/docs/Model/APIModerateGetUserBanPreferencesResponse.md +++ b/docs/Model/APIModerateGetUserBanPreferencesResponse.md @@ -1,4 +1,4 @@ -# # APIModerateGetUserBanPreferencesResponse +# APIModerateGetUserBanPreferencesResponse ## Properties diff --git a/docs/Model/APIModerateUserBanPreferences.md b/docs/Model/APIModerateUserBanPreferences.md index c5ee083..b18404b 100644 --- a/docs/Model/APIModerateUserBanPreferences.md +++ b/docs/Model/APIModerateUserBanPreferences.md @@ -1,4 +1,4 @@ -# # APIModerateUserBanPreferences +# APIModerateUserBanPreferences ## Properties diff --git a/docs/Model/APIPage.md b/docs/Model/APIPage.md index fbc435e..fa732b5 100644 --- a/docs/Model/APIPage.md +++ b/docs/Model/APIPage.md @@ -1,4 +1,4 @@ -# # APIPage +# APIPage ## Properties diff --git a/docs/Model/APISSOUser.md b/docs/Model/APISSOUser.md index e298d90..7938af5 100644 --- a/docs/Model/APISSOUser.md +++ b/docs/Model/APISSOUser.md @@ -1,4 +1,4 @@ -# # APISSOUser +# APISSOUser ## Properties diff --git a/docs/Model/APISaveCommentResponse.md b/docs/Model/APISaveCommentResponse.md index 019c8c9..bc75756 100644 --- a/docs/Model/APISaveCommentResponse.md +++ b/docs/Model/APISaveCommentResponse.md @@ -1,4 +1,4 @@ -# # APISaveCommentResponse +# APISaveCommentResponse ## Properties diff --git a/docs/Model/APIStatus.md b/docs/Model/APIStatus.md index 92f60d5..82f7f16 100644 --- a/docs/Model/APIStatus.md +++ b/docs/Model/APIStatus.md @@ -1,4 +1,4 @@ -# # APIStatus +# APIStatus ## Properties diff --git a/docs/Model/APITenant.md b/docs/Model/APITenant.md index c9fffcf..d7960af 100644 --- a/docs/Model/APITenant.md +++ b/docs/Model/APITenant.md @@ -1,4 +1,4 @@ -# # APITenant +# APITenant ## Properties diff --git a/docs/Model/APITenantDailyUsage.md b/docs/Model/APITenantDailyUsage.md index 209c836..44c6885 100644 --- a/docs/Model/APITenantDailyUsage.md +++ b/docs/Model/APITenantDailyUsage.md @@ -1,4 +1,4 @@ -# # APITenantDailyUsage +# APITenantDailyUsage ## Properties diff --git a/docs/Model/APITicket.md b/docs/Model/APITicket.md index f09d465..57c6a6a 100644 --- a/docs/Model/APITicket.md +++ b/docs/Model/APITicket.md @@ -1,4 +1,4 @@ -# # APITicket +# APITicket ## Properties diff --git a/docs/Model/APITicketDetail.md b/docs/Model/APITicketDetail.md index 9ff3b9f..186de35 100644 --- a/docs/Model/APITicketDetail.md +++ b/docs/Model/APITicketDetail.md @@ -1,4 +1,4 @@ -# # APITicketDetail +# APITicketDetail ## Properties diff --git a/docs/Model/APITicketFile.md b/docs/Model/APITicketFile.md index 4b192bf..a67c6b7 100644 --- a/docs/Model/APITicketFile.md +++ b/docs/Model/APITicketFile.md @@ -1,4 +1,4 @@ -# # APITicketFile +# APITicketFile ## Properties diff --git a/docs/Model/APIUserSubscription.md b/docs/Model/APIUserSubscription.md index 50e2cdb..e021026 100644 --- a/docs/Model/APIUserSubscription.md +++ b/docs/Model/APIUserSubscription.md @@ -1,4 +1,4 @@ -# # APIUserSubscription +# APIUserSubscription ## Properties diff --git a/docs/Model/AddDomainConfigParams.md b/docs/Model/AddDomainConfigParams.md index 048cff7..91ab80d 100644 --- a/docs/Model/AddDomainConfigParams.md +++ b/docs/Model/AddDomainConfigParams.md @@ -1,4 +1,4 @@ -# # AddDomainConfigParams +# AddDomainConfigParams ## Properties diff --git a/docs/Model/AddDomainConfigResponse.md b/docs/Model/AddDomainConfigResponse.md index 7f3f083..ea330bd 100644 --- a/docs/Model/AddDomainConfigResponse.md +++ b/docs/Model/AddDomainConfigResponse.md @@ -1,12 +1,12 @@ -# # AddDomainConfigResponse +# AddDomainConfigResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**reason** | **string** | | -**code** | **string** | | +**reason** | **string** | | [optional] +**code** | **string** | | [optional] **status** | **mixed** | | -**configuration** | **mixed** | | +**configuration** | **mixed** | | [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/AddDomainConfigResponseAnyOf.md b/docs/Model/AddDomainConfigResponseAnyOf.md index 7df8152..c48ea1e 100644 --- a/docs/Model/AddDomainConfigResponseAnyOf.md +++ b/docs/Model/AddDomainConfigResponseAnyOf.md @@ -1,4 +1,4 @@ -# # AddDomainConfigResponseAnyOf +# AddDomainConfigResponseAnyOf ## Properties diff --git a/docs/Model/AddPageAPIResponse.md b/docs/Model/AddPageAPIResponse.md index 868a918..d91768a 100644 --- a/docs/Model/AddPageAPIResponse.md +++ b/docs/Model/AddPageAPIResponse.md @@ -1,4 +1,4 @@ -# # AddPageAPIResponse +# AddPageAPIResponse ## Properties diff --git a/docs/Model/AddSSOUserAPIResponse.md b/docs/Model/AddSSOUserAPIResponse.md index ef032d0..c723158 100644 --- a/docs/Model/AddSSOUserAPIResponse.md +++ b/docs/Model/AddSSOUserAPIResponse.md @@ -1,4 +1,4 @@ -# # AddSSOUserAPIResponse +# AddSSOUserAPIResponse ## Properties diff --git a/docs/Model/AdjustCommentVotesParams.md b/docs/Model/AdjustCommentVotesParams.md index 6be9ad4..cbab06f 100644 --- a/docs/Model/AdjustCommentVotesParams.md +++ b/docs/Model/AdjustCommentVotesParams.md @@ -1,4 +1,4 @@ -# # AdjustCommentVotesParams +# AdjustCommentVotesParams ## Properties diff --git a/docs/Model/AdjustVotesResponse.md b/docs/Model/AdjustVotesResponse.md index 5042f4b..1de1707 100644 --- a/docs/Model/AdjustVotesResponse.md +++ b/docs/Model/AdjustVotesResponse.md @@ -1,4 +1,4 @@ -# # AdjustVotesResponse +# AdjustVotesResponse ## Properties diff --git a/docs/Model/AggregateQuestionResultsResponse.md b/docs/Model/AggregateQuestionResultsResponse.md index 6f3c82d..fedc86d 100644 --- a/docs/Model/AggregateQuestionResultsResponse.md +++ b/docs/Model/AggregateQuestionResultsResponse.md @@ -1,4 +1,4 @@ -# # AggregateQuestionResultsResponse +# AggregateQuestionResultsResponse ## Properties diff --git a/docs/Model/AggregateResponse.md b/docs/Model/AggregateResponse.md index da31f65..66ce2a7 100644 --- a/docs/Model/AggregateResponse.md +++ b/docs/Model/AggregateResponse.md @@ -1,14 +1,14 @@ -# # AggregateResponse +# AggregateResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **status** | [**\FastComments\Client\Model\APIStatus**](APIStatus.md) | | -**data** | [**\FastComments\Client\Model\AggregationItem[]**](AggregationItem.md) | | +**data** | [**\FastComments\Client\Model\AggregationItem[]**](AggregationItem.md) | | [optional] **stats** | [**\FastComments\Client\Model\AggregationResponseStats**](AggregationResponseStats.md) | | [optional] -**reason** | **string** | | -**code** | **string** | | +**reason** | **string** | | [optional] +**code** | **string** | | [optional] **valid_resource_names** | **string[]** | | [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/AggregateTimeBucket.md b/docs/Model/AggregateTimeBucket.md index 2e09898..2b1d53d 100644 --- a/docs/Model/AggregateTimeBucket.md +++ b/docs/Model/AggregateTimeBucket.md @@ -1,4 +1,4 @@ -# # AggregateTimeBucket +# AggregateTimeBucket ## Properties diff --git a/docs/Model/AggregationAPIError.md b/docs/Model/AggregationAPIError.md index ad344e6..feea76c 100644 --- a/docs/Model/AggregationAPIError.md +++ b/docs/Model/AggregationAPIError.md @@ -1,4 +1,4 @@ -# # AggregationAPIError +# AggregationAPIError ## Properties diff --git a/docs/Model/AggregationItem.md b/docs/Model/AggregationItem.md index 4793f79..ba5c6be 100644 --- a/docs/Model/AggregationItem.md +++ b/docs/Model/AggregationItem.md @@ -1,4 +1,4 @@ -# # AggregationItem +# AggregationItem ## Properties diff --git a/docs/Model/AggregationOpType.md b/docs/Model/AggregationOpType.md index 3c3ee0b..b94be29 100644 --- a/docs/Model/AggregationOpType.md +++ b/docs/Model/AggregationOpType.md @@ -1,4 +1,4 @@ -# # AggregationOpType +# AggregationOpType ## Properties diff --git a/docs/Model/AggregationOperation.md b/docs/Model/AggregationOperation.md index 4849a59..b11d92d 100644 --- a/docs/Model/AggregationOperation.md +++ b/docs/Model/AggregationOperation.md @@ -1,4 +1,4 @@ -# # AggregationOperation +# AggregationOperation ## Properties diff --git a/docs/Model/AggregationRequest.md b/docs/Model/AggregationRequest.md index 4b50f5c..db96170 100644 --- a/docs/Model/AggregationRequest.md +++ b/docs/Model/AggregationRequest.md @@ -1,4 +1,4 @@ -# # AggregationRequest +# AggregationRequest ## Properties diff --git a/docs/Model/AggregationRequestSort.md b/docs/Model/AggregationRequestSort.md index ef62027..f4bdde6 100644 --- a/docs/Model/AggregationRequestSort.md +++ b/docs/Model/AggregationRequestSort.md @@ -1,4 +1,4 @@ -# # AggregationRequestSort +# AggregationRequestSort ## Properties diff --git a/docs/Model/AggregationResponse.md b/docs/Model/AggregationResponse.md index 1c94fb2..d5bd473 100644 --- a/docs/Model/AggregationResponse.md +++ b/docs/Model/AggregationResponse.md @@ -1,4 +1,4 @@ -# # AggregationResponse +# AggregationResponse ## Properties diff --git a/docs/Model/AggregationResponseStats.md b/docs/Model/AggregationResponseStats.md index 87cb172..669f030 100644 --- a/docs/Model/AggregationResponseStats.md +++ b/docs/Model/AggregationResponseStats.md @@ -1,4 +1,4 @@ -# # AggregationResponseStats +# AggregationResponseStats ## Properties diff --git a/docs/Model/AggregationValue.md b/docs/Model/AggregationValue.md index d3015bd..c75a200 100644 --- a/docs/Model/AggregationValue.md +++ b/docs/Model/AggregationValue.md @@ -1,4 +1,4 @@ -# # AggregationValue +# AggregationValue ## Properties diff --git a/docs/Model/AwardUserBadgeResponse.md b/docs/Model/AwardUserBadgeResponse.md index b9811bd..2467c34 100644 --- a/docs/Model/AwardUserBadgeResponse.md +++ b/docs/Model/AwardUserBadgeResponse.md @@ -1,4 +1,4 @@ -# # AwardUserBadgeResponse +# AwardUserBadgeResponse ## Properties diff --git a/docs/Model/BanUserFromCommentResult.md b/docs/Model/BanUserFromCommentResult.md index 2d81feb..e03bacf 100644 --- a/docs/Model/BanUserFromCommentResult.md +++ b/docs/Model/BanUserFromCommentResult.md @@ -1,4 +1,4 @@ -# # BanUserFromCommentResult +# BanUserFromCommentResult ## Properties diff --git a/docs/Model/BanUserUndoParams.md b/docs/Model/BanUserUndoParams.md index 4903cce..041bb33 100644 --- a/docs/Model/BanUserUndoParams.md +++ b/docs/Model/BanUserUndoParams.md @@ -1,4 +1,4 @@ -# # BanUserUndoParams +# BanUserUndoParams ## Properties diff --git a/docs/Model/BannedUserMatch.md b/docs/Model/BannedUserMatch.md index ba382e4..0d106c7 100644 --- a/docs/Model/BannedUserMatch.md +++ b/docs/Model/BannedUserMatch.md @@ -1,4 +1,4 @@ -# # BannedUserMatch +# BannedUserMatch ## Properties diff --git a/docs/Model/BannedUserMatchMatchedOnValue.md b/docs/Model/BannedUserMatchMatchedOnValue.md index 4730f00..1b5d88f 100644 --- a/docs/Model/BannedUserMatchMatchedOnValue.md +++ b/docs/Model/BannedUserMatchMatchedOnValue.md @@ -1,4 +1,4 @@ -# # BannedUserMatchMatchedOnValue +# BannedUserMatchMatchedOnValue ## Properties diff --git a/docs/Model/BannedUserMatchType.md b/docs/Model/BannedUserMatchType.md index a5346fc..b0f4a3b 100644 --- a/docs/Model/BannedUserMatchType.md +++ b/docs/Model/BannedUserMatchType.md @@ -1,4 +1,4 @@ -# # BannedUserMatchType +# BannedUserMatchType ## Properties diff --git a/docs/Model/BillingInfo.md b/docs/Model/BillingInfo.md index 4ae700a..937af6e 100644 --- a/docs/Model/BillingInfo.md +++ b/docs/Model/BillingInfo.md @@ -1,4 +1,4 @@ -# # BillingInfo +# BillingInfo ## Properties diff --git a/docs/Model/BlockFromCommentParams.md b/docs/Model/BlockFromCommentParams.md index dcd6957..74390db 100644 --- a/docs/Model/BlockFromCommentParams.md +++ b/docs/Model/BlockFromCommentParams.md @@ -1,4 +1,4 @@ -# # BlockFromCommentParams +# BlockFromCommentParams ## Properties diff --git a/docs/Model/BlockSuccess.md b/docs/Model/BlockSuccess.md index 1b32934..38bc071 100644 --- a/docs/Model/BlockSuccess.md +++ b/docs/Model/BlockSuccess.md @@ -1,4 +1,4 @@ -# # BlockSuccess +# BlockSuccess ## Properties diff --git a/docs/Model/BuildModerationFilterParams.md b/docs/Model/BuildModerationFilterParams.md index 8ce06c7..d0680ab 100644 --- a/docs/Model/BuildModerationFilterParams.md +++ b/docs/Model/BuildModerationFilterParams.md @@ -1,4 +1,4 @@ -# # BuildModerationFilterParams +# BuildModerationFilterParams ## Properties diff --git a/docs/Model/BuildModerationFilterResponse.md b/docs/Model/BuildModerationFilterResponse.md index 5767341..04d793f 100644 --- a/docs/Model/BuildModerationFilterResponse.md +++ b/docs/Model/BuildModerationFilterResponse.md @@ -1,4 +1,4 @@ -# # BuildModerationFilterResponse +# BuildModerationFilterResponse ## Properties diff --git a/docs/Model/BulkAggregateQuestionItem.md b/docs/Model/BulkAggregateQuestionItem.md index 0894451..4ab5e4f 100644 --- a/docs/Model/BulkAggregateQuestionItem.md +++ b/docs/Model/BulkAggregateQuestionItem.md @@ -1,4 +1,4 @@ -# # BulkAggregateQuestionItem +# BulkAggregateQuestionItem ## Properties diff --git a/docs/Model/BulkAggregateQuestionResultsRequest.md b/docs/Model/BulkAggregateQuestionResultsRequest.md index c798852..956f46a 100644 --- a/docs/Model/BulkAggregateQuestionResultsRequest.md +++ b/docs/Model/BulkAggregateQuestionResultsRequest.md @@ -1,4 +1,4 @@ -# # BulkAggregateQuestionResultsRequest +# BulkAggregateQuestionResultsRequest ## Properties diff --git a/docs/Model/BulkAggregateQuestionResultsResponse.md b/docs/Model/BulkAggregateQuestionResultsResponse.md index 5ae1577..e5eb65f 100644 --- a/docs/Model/BulkAggregateQuestionResultsResponse.md +++ b/docs/Model/BulkAggregateQuestionResultsResponse.md @@ -1,4 +1,4 @@ -# # BulkAggregateQuestionResultsResponse +# BulkAggregateQuestionResultsResponse ## Properties diff --git a/docs/Model/BulkCreateHashTagsBody.md b/docs/Model/BulkCreateHashTagsBody.md index 19d4762..118c7f0 100644 --- a/docs/Model/BulkCreateHashTagsBody.md +++ b/docs/Model/BulkCreateHashTagsBody.md @@ -1,4 +1,4 @@ -# # BulkCreateHashTagsBody +# BulkCreateHashTagsBody ## Properties diff --git a/docs/Model/BulkCreateHashTagsBodyTagsInner.md b/docs/Model/BulkCreateHashTagsBodyTagsInner.md index 4324387..6b97c33 100644 --- a/docs/Model/BulkCreateHashTagsBodyTagsInner.md +++ b/docs/Model/BulkCreateHashTagsBodyTagsInner.md @@ -1,4 +1,4 @@ -# # BulkCreateHashTagsBodyTagsInner +# BulkCreateHashTagsBodyTagsInner ## Properties diff --git a/docs/Model/BulkCreateHashTagsResponse.md b/docs/Model/BulkCreateHashTagsResponse.md index 040c540..1d40d4a 100644 --- a/docs/Model/BulkCreateHashTagsResponse.md +++ b/docs/Model/BulkCreateHashTagsResponse.md @@ -1,4 +1,4 @@ -# # BulkCreateHashTagsResponse +# BulkCreateHashTagsResponse ## Properties diff --git a/docs/Model/BulkCreateHashTagsResponseResultsInner.md b/docs/Model/BulkCreateHashTagsResponseResultsInner.md index c3d4e91..efdfdcd 100644 --- a/docs/Model/BulkCreateHashTagsResponseResultsInner.md +++ b/docs/Model/BulkCreateHashTagsResponseResultsInner.md @@ -1,13 +1,13 @@ -# # BulkCreateHashTagsResponseResultsInner +# BulkCreateHashTagsResponseResultsInner ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **status** | [**\FastComments\Client\Model\APIStatus**](APIStatus.md) | | -**hash_tag** | [**\FastComments\Client\Model\TenantHashTag**](TenantHashTag.md) | | -**reason** | **string** | | -**code** | **string** | | +**hash_tag** | [**\FastComments\Client\Model\TenantHashTag**](TenantHashTag.md) | | [optional] +**reason** | **string** | | [optional] +**code** | **string** | | [optional] **secondary_code** | **string** | | [optional] **banned_until** | **int** | | [optional] **max_character_length** | **int** | | [optional] diff --git a/docs/Model/BulkPreBanParams.md b/docs/Model/BulkPreBanParams.md index 3d94df4..48c5b96 100644 --- a/docs/Model/BulkPreBanParams.md +++ b/docs/Model/BulkPreBanParams.md @@ -1,4 +1,4 @@ -# # BulkPreBanParams +# BulkPreBanParams ## Properties diff --git a/docs/Model/BulkPreBanSummary.md b/docs/Model/BulkPreBanSummary.md index 800df3c..90b1c60 100644 --- a/docs/Model/BulkPreBanSummary.md +++ b/docs/Model/BulkPreBanSummary.md @@ -1,4 +1,4 @@ -# # BulkPreBanSummary +# BulkPreBanSummary ## Properties diff --git a/docs/Model/ChangeCommentPinStatusResponse.md b/docs/Model/ChangeCommentPinStatusResponse.md index a43d983..6c24f3c 100644 --- a/docs/Model/ChangeCommentPinStatusResponse.md +++ b/docs/Model/ChangeCommentPinStatusResponse.md @@ -1,4 +1,4 @@ -# # ChangeCommentPinStatusResponse +# ChangeCommentPinStatusResponse ## Properties diff --git a/docs/Model/ChangeTicketStateBody.md b/docs/Model/ChangeTicketStateBody.md index f1ec38a..7b0acc4 100644 --- a/docs/Model/ChangeTicketStateBody.md +++ b/docs/Model/ChangeTicketStateBody.md @@ -1,4 +1,4 @@ -# # ChangeTicketStateBody +# ChangeTicketStateBody ## Properties diff --git a/docs/Model/ChangeTicketStateResponse.md b/docs/Model/ChangeTicketStateResponse.md index 6a66e40..a4a9314 100644 --- a/docs/Model/ChangeTicketStateResponse.md +++ b/docs/Model/ChangeTicketStateResponse.md @@ -1,4 +1,4 @@ -# # ChangeTicketStateResponse +# ChangeTicketStateResponse ## Properties diff --git a/docs/Model/CheckBlockedCommentsResponse.md b/docs/Model/CheckBlockedCommentsResponse.md index 4b533f4..8209720 100644 --- a/docs/Model/CheckBlockedCommentsResponse.md +++ b/docs/Model/CheckBlockedCommentsResponse.md @@ -1,4 +1,4 @@ -# # CheckBlockedCommentsResponse +# CheckBlockedCommentsResponse ## Properties diff --git a/docs/Model/CombineQuestionResultsWithCommentsResponse.md b/docs/Model/CombineQuestionResultsWithCommentsResponse.md index 3a4a8e1..ac7b6ff 100644 --- a/docs/Model/CombineQuestionResultsWithCommentsResponse.md +++ b/docs/Model/CombineQuestionResultsWithCommentsResponse.md @@ -1,4 +1,4 @@ -# # CombineQuestionResultsWithCommentsResponse +# CombineQuestionResultsWithCommentsResponse ## Properties diff --git a/docs/Model/CommentData.md b/docs/Model/CommentData.md index d7e8324..d55067a 100644 --- a/docs/Model/CommentData.md +++ b/docs/Model/CommentData.md @@ -1,4 +1,4 @@ -# # CommentData +# CommentData ## Properties diff --git a/docs/Model/CommentHTMLRenderingMode.md b/docs/Model/CommentHTMLRenderingMode.md index edd6883..b60c005 100644 --- a/docs/Model/CommentHTMLRenderingMode.md +++ b/docs/Model/CommentHTMLRenderingMode.md @@ -1,4 +1,4 @@ -# # CommentHTMLRenderingMode +# CommentHTMLRenderingMode ## Properties diff --git a/docs/Model/CommentLogData.md b/docs/Model/CommentLogData.md index 59d1f1d..2a67d6d 100644 --- a/docs/Model/CommentLogData.md +++ b/docs/Model/CommentLogData.md @@ -1,4 +1,4 @@ -# # CommentLogData +# CommentLogData ## Properties diff --git a/docs/Model/CommentLogEntry.md b/docs/Model/CommentLogEntry.md index f7a35da..a0c98d5 100644 --- a/docs/Model/CommentLogEntry.md +++ b/docs/Model/CommentLogEntry.md @@ -1,4 +1,4 @@ -# # CommentLogEntry +# CommentLogEntry ## Properties diff --git a/docs/Model/CommentLogType.md b/docs/Model/CommentLogType.md index 1c6427f..1f2550c 100644 --- a/docs/Model/CommentLogType.md +++ b/docs/Model/CommentLogType.md @@ -1,4 +1,4 @@ -# # CommentLogType +# CommentLogType ## Properties diff --git a/docs/Model/CommentQuestionResultsRenderingType.md b/docs/Model/CommentQuestionResultsRenderingType.md index 44d5abb..34ee060 100644 --- a/docs/Model/CommentQuestionResultsRenderingType.md +++ b/docs/Model/CommentQuestionResultsRenderingType.md @@ -1,4 +1,4 @@ -# # CommentQuestionResultsRenderingType +# CommentQuestionResultsRenderingType ## Properties diff --git a/docs/Model/CommentQuestionsRequired.md b/docs/Model/CommentQuestionsRequired.md index 65096f9..a126acf 100644 --- a/docs/Model/CommentQuestionsRequired.md +++ b/docs/Model/CommentQuestionsRequired.md @@ -1,4 +1,4 @@ -# # CommentQuestionsRequired +# CommentQuestionsRequired ## Properties diff --git a/docs/Model/CommentTextUpdateRequest.md b/docs/Model/CommentTextUpdateRequest.md index 6190cf6..ad779a9 100644 --- a/docs/Model/CommentTextUpdateRequest.md +++ b/docs/Model/CommentTextUpdateRequest.md @@ -1,4 +1,4 @@ -# # CommentTextUpdateRequest +# CommentTextUpdateRequest ## Properties diff --git a/docs/Model/CommentThreadDeletionMode.md b/docs/Model/CommentThreadDeletionMode.md index a1b3e80..adb4480 100644 --- a/docs/Model/CommentThreadDeletionMode.md +++ b/docs/Model/CommentThreadDeletionMode.md @@ -1,4 +1,4 @@ -# # CommentThreadDeletionMode +# CommentThreadDeletionMode ## Properties diff --git a/docs/Model/CommentUserBadgeInfo.md b/docs/Model/CommentUserBadgeInfo.md index f505457..6a545d9 100644 --- a/docs/Model/CommentUserBadgeInfo.md +++ b/docs/Model/CommentUserBadgeInfo.md @@ -1,4 +1,4 @@ -# # CommentUserBadgeInfo +# CommentUserBadgeInfo ## Properties diff --git a/docs/Model/CommentUserHashTagInfo.md b/docs/Model/CommentUserHashTagInfo.md index 67fbc4d..39b3a73 100644 --- a/docs/Model/CommentUserHashTagInfo.md +++ b/docs/Model/CommentUserHashTagInfo.md @@ -1,4 +1,4 @@ -# # CommentUserHashTagInfo +# CommentUserHashTagInfo ## Properties diff --git a/docs/Model/CommentUserMentionInfo.md b/docs/Model/CommentUserMentionInfo.md index 48b5069..f4cba3a 100644 --- a/docs/Model/CommentUserMentionInfo.md +++ b/docs/Model/CommentUserMentionInfo.md @@ -1,4 +1,4 @@ -# # CommentUserMentionInfo +# CommentUserMentionInfo ## Properties diff --git a/docs/Model/CommenterNameFormats.md b/docs/Model/CommenterNameFormats.md index bfdb7e2..970a519 100644 --- a/docs/Model/CommenterNameFormats.md +++ b/docs/Model/CommenterNameFormats.md @@ -1,4 +1,4 @@ -# # CommenterNameFormats +# CommenterNameFormats ## Properties diff --git a/docs/Model/CommentsByIdsParams.md b/docs/Model/CommentsByIdsParams.md index d21f543..70d3eac 100644 --- a/docs/Model/CommentsByIdsParams.md +++ b/docs/Model/CommentsByIdsParams.md @@ -1,4 +1,4 @@ -# # CommentsByIdsParams +# CommentsByIdsParams ## Properties diff --git a/docs/Model/CreateAPIPageData.md b/docs/Model/CreateAPIPageData.md index 749d381..7dd3323 100644 --- a/docs/Model/CreateAPIPageData.md +++ b/docs/Model/CreateAPIPageData.md @@ -1,4 +1,4 @@ -# # CreateAPIPageData +# CreateAPIPageData ## Properties diff --git a/docs/Model/CreateAPISSOUserData.md b/docs/Model/CreateAPISSOUserData.md index 2023cc6..014982c 100644 --- a/docs/Model/CreateAPISSOUserData.md +++ b/docs/Model/CreateAPISSOUserData.md @@ -1,4 +1,4 @@ -# # CreateAPISSOUserData +# CreateAPISSOUserData ## Properties diff --git a/docs/Model/CreateAPIUserSubscriptionData.md b/docs/Model/CreateAPIUserSubscriptionData.md index 8320715..3b70ae7 100644 --- a/docs/Model/CreateAPIUserSubscriptionData.md +++ b/docs/Model/CreateAPIUserSubscriptionData.md @@ -1,4 +1,4 @@ -# # CreateAPIUserSubscriptionData +# CreateAPIUserSubscriptionData ## Properties diff --git a/docs/Model/CreateCommentParams.md b/docs/Model/CreateCommentParams.md index 70c73e6..6b6d0ba 100644 --- a/docs/Model/CreateCommentParams.md +++ b/docs/Model/CreateCommentParams.md @@ -1,4 +1,4 @@ -# # CreateCommentParams +# CreateCommentParams ## Properties diff --git a/docs/Model/CreateEmailTemplateBody.md b/docs/Model/CreateEmailTemplateBody.md index dcf15e5..2a6cbfb 100644 --- a/docs/Model/CreateEmailTemplateBody.md +++ b/docs/Model/CreateEmailTemplateBody.md @@ -1,4 +1,4 @@ -# # CreateEmailTemplateBody +# CreateEmailTemplateBody ## Properties diff --git a/docs/Model/CreateEmailTemplateResponse.md b/docs/Model/CreateEmailTemplateResponse.md index fda2e48..57b3e2a 100644 --- a/docs/Model/CreateEmailTemplateResponse.md +++ b/docs/Model/CreateEmailTemplateResponse.md @@ -1,4 +1,4 @@ -# # CreateEmailTemplateResponse +# CreateEmailTemplateResponse ## Properties diff --git a/docs/Model/CreateFeedPostParams.md b/docs/Model/CreateFeedPostParams.md index 1826118..da4b0f4 100644 --- a/docs/Model/CreateFeedPostParams.md +++ b/docs/Model/CreateFeedPostParams.md @@ -1,4 +1,4 @@ -# # CreateFeedPostParams +# CreateFeedPostParams ## Properties diff --git a/docs/Model/CreateFeedPostResponse.md b/docs/Model/CreateFeedPostResponse.md index 1ab827b..caab2c0 100644 --- a/docs/Model/CreateFeedPostResponse.md +++ b/docs/Model/CreateFeedPostResponse.md @@ -1,4 +1,4 @@ -# # CreateFeedPostResponse +# CreateFeedPostResponse ## Properties diff --git a/docs/Model/CreateFeedPostsResponse.md b/docs/Model/CreateFeedPostsResponse.md index f093fe8..888de50 100644 --- a/docs/Model/CreateFeedPostsResponse.md +++ b/docs/Model/CreateFeedPostsResponse.md @@ -1,4 +1,4 @@ -# # CreateFeedPostsResponse +# CreateFeedPostsResponse ## Properties diff --git a/docs/Model/CreateHashTagBody.md b/docs/Model/CreateHashTagBody.md index 290a763..cacce20 100644 --- a/docs/Model/CreateHashTagBody.md +++ b/docs/Model/CreateHashTagBody.md @@ -1,4 +1,4 @@ -# # CreateHashTagBody +# CreateHashTagBody ## Properties diff --git a/docs/Model/CreateHashTagResponse.md b/docs/Model/CreateHashTagResponse.md index f791be6..efd57f5 100644 --- a/docs/Model/CreateHashTagResponse.md +++ b/docs/Model/CreateHashTagResponse.md @@ -1,4 +1,4 @@ -# # CreateHashTagResponse +# CreateHashTagResponse ## Properties diff --git a/docs/Model/CreateModeratorBody.md b/docs/Model/CreateModeratorBody.md index d6b7e03..5b3804f 100644 --- a/docs/Model/CreateModeratorBody.md +++ b/docs/Model/CreateModeratorBody.md @@ -1,4 +1,4 @@ -# # CreateModeratorBody +# CreateModeratorBody ## Properties diff --git a/docs/Model/CreateModeratorResponse.md b/docs/Model/CreateModeratorResponse.md index 9dc0425..e593b3b 100644 --- a/docs/Model/CreateModeratorResponse.md +++ b/docs/Model/CreateModeratorResponse.md @@ -1,4 +1,4 @@ -# # CreateModeratorResponse +# CreateModeratorResponse ## Properties diff --git a/docs/Model/CreateQuestionConfigBody.md b/docs/Model/CreateQuestionConfigBody.md index e62d7f8..5e78320 100644 --- a/docs/Model/CreateQuestionConfigBody.md +++ b/docs/Model/CreateQuestionConfigBody.md @@ -1,4 +1,4 @@ -# # CreateQuestionConfigBody +# CreateQuestionConfigBody ## Properties diff --git a/docs/Model/CreateQuestionConfigResponse.md b/docs/Model/CreateQuestionConfigResponse.md index d16b43f..3e1b51e 100644 --- a/docs/Model/CreateQuestionConfigResponse.md +++ b/docs/Model/CreateQuestionConfigResponse.md @@ -1,4 +1,4 @@ -# # CreateQuestionConfigResponse +# CreateQuestionConfigResponse ## Properties diff --git a/docs/Model/CreateQuestionResultBody.md b/docs/Model/CreateQuestionResultBody.md index 362f33e..31f360f 100644 --- a/docs/Model/CreateQuestionResultBody.md +++ b/docs/Model/CreateQuestionResultBody.md @@ -1,4 +1,4 @@ -# # CreateQuestionResultBody +# CreateQuestionResultBody ## Properties diff --git a/docs/Model/CreateQuestionResultResponse.md b/docs/Model/CreateQuestionResultResponse.md index 2aa2d76..bc87188 100644 --- a/docs/Model/CreateQuestionResultResponse.md +++ b/docs/Model/CreateQuestionResultResponse.md @@ -1,4 +1,4 @@ -# # CreateQuestionResultResponse +# CreateQuestionResultResponse ## Properties diff --git a/docs/Model/CreateSubscriptionAPIResponse.md b/docs/Model/CreateSubscriptionAPIResponse.md index d1d1e94..bc3dd12 100644 --- a/docs/Model/CreateSubscriptionAPIResponse.md +++ b/docs/Model/CreateSubscriptionAPIResponse.md @@ -1,4 +1,4 @@ -# # CreateSubscriptionAPIResponse +# CreateSubscriptionAPIResponse ## Properties diff --git a/docs/Model/CreateTenantBody.md b/docs/Model/CreateTenantBody.md index 3be100a..3b4207b 100644 --- a/docs/Model/CreateTenantBody.md +++ b/docs/Model/CreateTenantBody.md @@ -1,4 +1,4 @@ -# # CreateTenantBody +# CreateTenantBody ## Properties diff --git a/docs/Model/CreateTenantPackageBody.md b/docs/Model/CreateTenantPackageBody.md index b08b431..790a60c 100644 --- a/docs/Model/CreateTenantPackageBody.md +++ b/docs/Model/CreateTenantPackageBody.md @@ -1,4 +1,4 @@ -# # CreateTenantPackageBody +# CreateTenantPackageBody ## Properties diff --git a/docs/Model/CreateTenantPackageResponse.md b/docs/Model/CreateTenantPackageResponse.md index 53cbb44..e2ea0af 100644 --- a/docs/Model/CreateTenantPackageResponse.md +++ b/docs/Model/CreateTenantPackageResponse.md @@ -1,4 +1,4 @@ -# # CreateTenantPackageResponse +# CreateTenantPackageResponse ## Properties diff --git a/docs/Model/CreateTenantResponse.md b/docs/Model/CreateTenantResponse.md index 9835d66..c8a93b0 100644 --- a/docs/Model/CreateTenantResponse.md +++ b/docs/Model/CreateTenantResponse.md @@ -1,4 +1,4 @@ -# # CreateTenantResponse +# CreateTenantResponse ## Properties diff --git a/docs/Model/CreateTenantUserBody.md b/docs/Model/CreateTenantUserBody.md index 55b40a5..f0b6c17 100644 --- a/docs/Model/CreateTenantUserBody.md +++ b/docs/Model/CreateTenantUserBody.md @@ -1,4 +1,4 @@ -# # CreateTenantUserBody +# CreateTenantUserBody ## Properties diff --git a/docs/Model/CreateTenantUserResponse.md b/docs/Model/CreateTenantUserResponse.md index 50adf6e..6d59ba1 100644 --- a/docs/Model/CreateTenantUserResponse.md +++ b/docs/Model/CreateTenantUserResponse.md @@ -1,4 +1,4 @@ -# # CreateTenantUserResponse +# CreateTenantUserResponse ## Properties diff --git a/docs/Model/CreateTicketBody.md b/docs/Model/CreateTicketBody.md index 30f097a..bfd93a0 100644 --- a/docs/Model/CreateTicketBody.md +++ b/docs/Model/CreateTicketBody.md @@ -1,4 +1,4 @@ -# # CreateTicketBody +# CreateTicketBody ## Properties diff --git a/docs/Model/CreateTicketResponse.md b/docs/Model/CreateTicketResponse.md index f0c1203..dc90b97 100644 --- a/docs/Model/CreateTicketResponse.md +++ b/docs/Model/CreateTicketResponse.md @@ -1,4 +1,4 @@ -# # CreateTicketResponse +# CreateTicketResponse ## Properties diff --git a/docs/Model/CreateUserBadgeParams.md b/docs/Model/CreateUserBadgeParams.md index a35cefc..fce732e 100644 --- a/docs/Model/CreateUserBadgeParams.md +++ b/docs/Model/CreateUserBadgeParams.md @@ -1,4 +1,4 @@ -# # CreateUserBadgeParams +# CreateUserBadgeParams ## Properties diff --git a/docs/Model/CreateV1PageReact.md b/docs/Model/CreateV1PageReact.md index ab559a3..d977b27 100644 --- a/docs/Model/CreateV1PageReact.md +++ b/docs/Model/CreateV1PageReact.md @@ -1,4 +1,4 @@ -# # CreateV1PageReact +# CreateV1PageReact ## Properties diff --git a/docs/Model/CustomConfigParameters.md b/docs/Model/CustomConfigParameters.md index cc634bd..2f9494b 100644 --- a/docs/Model/CustomConfigParameters.md +++ b/docs/Model/CustomConfigParameters.md @@ -1,4 +1,4 @@ -# # CustomConfigParameters +# CustomConfigParameters ## Properties diff --git a/docs/Model/CustomEmailTemplate.md b/docs/Model/CustomEmailTemplate.md index 6d77550..bcbae2c 100644 --- a/docs/Model/CustomEmailTemplate.md +++ b/docs/Model/CustomEmailTemplate.md @@ -1,4 +1,4 @@ -# # CustomEmailTemplate +# CustomEmailTemplate ## Properties diff --git a/docs/Model/DeleteCommentAction.md b/docs/Model/DeleteCommentAction.md index b49a853..48e842f 100644 --- a/docs/Model/DeleteCommentAction.md +++ b/docs/Model/DeleteCommentAction.md @@ -1,4 +1,4 @@ -# # DeleteCommentAction +# DeleteCommentAction ## Properties diff --git a/docs/Model/DeleteCommentResult.md b/docs/Model/DeleteCommentResult.md index 3333b22..8bb3b8d 100644 --- a/docs/Model/DeleteCommentResult.md +++ b/docs/Model/DeleteCommentResult.md @@ -1,4 +1,4 @@ -# # DeleteCommentResult +# DeleteCommentResult ## Properties diff --git a/docs/Model/DeleteDomainConfigResponse.md b/docs/Model/DeleteDomainConfigResponse.md index 8fe3c67..4772e05 100644 --- a/docs/Model/DeleteDomainConfigResponse.md +++ b/docs/Model/DeleteDomainConfigResponse.md @@ -1,4 +1,4 @@ -# # DeleteDomainConfigResponse +# DeleteDomainConfigResponse ## Properties diff --git a/docs/Model/DeleteFeedPostPublicResponse.md b/docs/Model/DeleteFeedPostPublicResponse.md index 80c547a..7321330 100644 --- a/docs/Model/DeleteFeedPostPublicResponse.md +++ b/docs/Model/DeleteFeedPostPublicResponse.md @@ -1,4 +1,4 @@ -# # DeleteFeedPostPublicResponse +# DeleteFeedPostPublicResponse ## Properties diff --git a/docs/Model/DeleteHashTagRequestBody.md b/docs/Model/DeleteHashTagRequestBody.md index eaba581..3ae55f8 100644 --- a/docs/Model/DeleteHashTagRequestBody.md +++ b/docs/Model/DeleteHashTagRequestBody.md @@ -1,4 +1,4 @@ -# # DeleteHashTagRequestBody +# DeleteHashTagRequestBody ## Properties diff --git a/docs/Model/DeletePageAPIResponse.md b/docs/Model/DeletePageAPIResponse.md index 2f7050f..7816f3f 100644 --- a/docs/Model/DeletePageAPIResponse.md +++ b/docs/Model/DeletePageAPIResponse.md @@ -1,4 +1,4 @@ -# # DeletePageAPIResponse +# DeletePageAPIResponse ## Properties diff --git a/docs/Model/DeleteSSOUserAPIResponse.md b/docs/Model/DeleteSSOUserAPIResponse.md index 7be3781..10da3ae 100644 --- a/docs/Model/DeleteSSOUserAPIResponse.md +++ b/docs/Model/DeleteSSOUserAPIResponse.md @@ -1,4 +1,4 @@ -# # DeleteSSOUserAPIResponse +# DeleteSSOUserAPIResponse ## Properties diff --git a/docs/Model/DeleteSubscriptionAPIResponse.md b/docs/Model/DeleteSubscriptionAPIResponse.md index 174457f..ae12f38 100644 --- a/docs/Model/DeleteSubscriptionAPIResponse.md +++ b/docs/Model/DeleteSubscriptionAPIResponse.md @@ -1,4 +1,4 @@ -# # DeleteSubscriptionAPIResponse +# DeleteSubscriptionAPIResponse ## Properties diff --git a/docs/Model/DeletedCommentResultComment.md b/docs/Model/DeletedCommentResultComment.md index 6bb439a..dedd86f 100644 --- a/docs/Model/DeletedCommentResultComment.md +++ b/docs/Model/DeletedCommentResultComment.md @@ -1,4 +1,4 @@ -# # DeletedCommentResultComment +# DeletedCommentResultComment ## Properties diff --git a/docs/Model/DigestEmailFrequency.md b/docs/Model/DigestEmailFrequency.md index 9e779c3..b62eb6d 100644 --- a/docs/Model/DigestEmailFrequency.md +++ b/docs/Model/DigestEmailFrequency.md @@ -1,4 +1,4 @@ -# # DigestEmailFrequency +# DigestEmailFrequency ## Properties diff --git a/docs/Model/EmailTemplateDefinition.md b/docs/Model/EmailTemplateDefinition.md index aacfb8b..1d21c18 100644 --- a/docs/Model/EmailTemplateDefinition.md +++ b/docs/Model/EmailTemplateDefinition.md @@ -1,4 +1,4 @@ -# # EmailTemplateDefinition +# EmailTemplateDefinition ## Properties diff --git a/docs/Model/EmailTemplateRenderErrorResponse.md b/docs/Model/EmailTemplateRenderErrorResponse.md index 747d2b0..04c3f38 100644 --- a/docs/Model/EmailTemplateRenderErrorResponse.md +++ b/docs/Model/EmailTemplateRenderErrorResponse.md @@ -1,4 +1,4 @@ -# # EmailTemplateRenderErrorResponse +# EmailTemplateRenderErrorResponse ## Properties diff --git a/docs/Model/EventLogEntry.md b/docs/Model/EventLogEntry.md index 7d1ccec..97591e1 100644 --- a/docs/Model/EventLogEntry.md +++ b/docs/Model/EventLogEntry.md @@ -1,4 +1,4 @@ -# # EventLogEntry +# EventLogEntry ## Properties diff --git a/docs/Model/FComment.md b/docs/Model/FComment.md index 7b893a2..ebc1270 100644 --- a/docs/Model/FComment.md +++ b/docs/Model/FComment.md @@ -1,4 +1,4 @@ -# # FComment +# FComment ## Properties diff --git a/docs/Model/FCommentMeta.md b/docs/Model/FCommentMeta.md index 70403f0..ccda776 100644 --- a/docs/Model/FCommentMeta.md +++ b/docs/Model/FCommentMeta.md @@ -1,4 +1,4 @@ -# # FCommentMeta +# FCommentMeta ## Properties diff --git a/docs/Model/FeedPost.md b/docs/Model/FeedPost.md index 5e83182..b2bf331 100644 --- a/docs/Model/FeedPost.md +++ b/docs/Model/FeedPost.md @@ -1,4 +1,4 @@ -# # FeedPost +# FeedPost ## Properties diff --git a/docs/Model/FeedPostLink.md b/docs/Model/FeedPostLink.md index 2a64b15..e1ced2f 100644 --- a/docs/Model/FeedPostLink.md +++ b/docs/Model/FeedPostLink.md @@ -1,4 +1,4 @@ -# # FeedPostLink +# FeedPostLink ## Properties diff --git a/docs/Model/FeedPostMediaItem.md b/docs/Model/FeedPostMediaItem.md index 2a757a4..4614d55 100644 --- a/docs/Model/FeedPostMediaItem.md +++ b/docs/Model/FeedPostMediaItem.md @@ -1,4 +1,4 @@ -# # FeedPostMediaItem +# FeedPostMediaItem ## Properties diff --git a/docs/Model/FeedPostMediaItemAsset.md b/docs/Model/FeedPostMediaItemAsset.md index db97d2f..1f4a942 100644 --- a/docs/Model/FeedPostMediaItemAsset.md +++ b/docs/Model/FeedPostMediaItemAsset.md @@ -1,4 +1,4 @@ -# # FeedPostMediaItemAsset +# FeedPostMediaItemAsset ## Properties diff --git a/docs/Model/FeedPostStats.md b/docs/Model/FeedPostStats.md index 4ff6c6c..bf50d06 100644 --- a/docs/Model/FeedPostStats.md +++ b/docs/Model/FeedPostStats.md @@ -1,4 +1,4 @@ -# # FeedPostStats +# FeedPostStats ## Properties diff --git a/docs/Model/FeedPostsStatsResponse.md b/docs/Model/FeedPostsStatsResponse.md index 8478256..86c676b 100644 --- a/docs/Model/FeedPostsStatsResponse.md +++ b/docs/Model/FeedPostsStatsResponse.md @@ -1,4 +1,4 @@ -# # FeedPostsStatsResponse +# FeedPostsStatsResponse ## Properties diff --git a/docs/Model/FindCommentsByRangeItem.md b/docs/Model/FindCommentsByRangeItem.md index 593d2b6..4bc6d97 100644 --- a/docs/Model/FindCommentsByRangeItem.md +++ b/docs/Model/FindCommentsByRangeItem.md @@ -1,4 +1,4 @@ -# # FindCommentsByRangeItem +# FindCommentsByRangeItem ## Properties diff --git a/docs/Model/FindCommentsByRangeResponse.md b/docs/Model/FindCommentsByRangeResponse.md index c8d8795..8b85565 100644 --- a/docs/Model/FindCommentsByRangeResponse.md +++ b/docs/Model/FindCommentsByRangeResponse.md @@ -1,4 +1,4 @@ -# # FindCommentsByRangeResponse +# FindCommentsByRangeResponse ## Properties diff --git a/docs/Model/FlagCommentResponse.md b/docs/Model/FlagCommentResponse.md index 0d7dddd..5c43181 100644 --- a/docs/Model/FlagCommentResponse.md +++ b/docs/Model/FlagCommentResponse.md @@ -1,4 +1,4 @@ -# # FlagCommentResponse +# FlagCommentResponse ## Properties diff --git a/docs/Model/GetAuditLogsResponse.md b/docs/Model/GetAuditLogsResponse.md index bd9ce8a..0994b23 100644 --- a/docs/Model/GetAuditLogsResponse.md +++ b/docs/Model/GetAuditLogsResponse.md @@ -1,4 +1,4 @@ -# # GetAuditLogsResponse +# GetAuditLogsResponse ## Properties diff --git a/docs/Model/GetBannedUsersCountResponse.md b/docs/Model/GetBannedUsersCountResponse.md index fa65986..04e0016 100644 --- a/docs/Model/GetBannedUsersCountResponse.md +++ b/docs/Model/GetBannedUsersCountResponse.md @@ -1,4 +1,4 @@ -# # GetBannedUsersCountResponse +# GetBannedUsersCountResponse ## Properties diff --git a/docs/Model/GetBannedUsersFromCommentResponse.md b/docs/Model/GetBannedUsersFromCommentResponse.md index 84f98d4..819fc50 100644 --- a/docs/Model/GetBannedUsersFromCommentResponse.md +++ b/docs/Model/GetBannedUsersFromCommentResponse.md @@ -1,4 +1,4 @@ -# # GetBannedUsersFromCommentResponse +# GetBannedUsersFromCommentResponse ## Properties diff --git a/docs/Model/GetCachedNotificationCountResponse.md b/docs/Model/GetCachedNotificationCountResponse.md index a6896dc..775a234 100644 --- a/docs/Model/GetCachedNotificationCountResponse.md +++ b/docs/Model/GetCachedNotificationCountResponse.md @@ -1,4 +1,4 @@ -# # GetCachedNotificationCountResponse +# GetCachedNotificationCountResponse ## Properties diff --git a/docs/Model/GetCommentBanStatusResponse.md b/docs/Model/GetCommentBanStatusResponse.md index f5bf5eb..5732f54 100644 --- a/docs/Model/GetCommentBanStatusResponse.md +++ b/docs/Model/GetCommentBanStatusResponse.md @@ -1,4 +1,4 @@ -# # GetCommentBanStatusResponse +# GetCommentBanStatusResponse ## Properties diff --git a/docs/Model/GetCommentTextResponse.md b/docs/Model/GetCommentTextResponse.md index a311052..779141c 100644 --- a/docs/Model/GetCommentTextResponse.md +++ b/docs/Model/GetCommentTextResponse.md @@ -1,4 +1,4 @@ -# # GetCommentTextResponse +# GetCommentTextResponse ## Properties diff --git a/docs/Model/GetCommentVoteUserNamesSuccessResponse.md b/docs/Model/GetCommentVoteUserNamesSuccessResponse.md index 8a7f1c4..478fd1e 100644 --- a/docs/Model/GetCommentVoteUserNamesSuccessResponse.md +++ b/docs/Model/GetCommentVoteUserNamesSuccessResponse.md @@ -1,4 +1,4 @@ -# # GetCommentVoteUserNamesSuccessResponse +# GetCommentVoteUserNamesSuccessResponse ## Properties diff --git a/docs/Model/GetCommentsForUserResponse.md b/docs/Model/GetCommentsForUserResponse.md index 2ee7ab2..9feb032 100644 --- a/docs/Model/GetCommentsForUserResponse.md +++ b/docs/Model/GetCommentsForUserResponse.md @@ -1,4 +1,4 @@ -# # GetCommentsForUserResponse +# GetCommentsForUserResponse ## Properties diff --git a/docs/Model/GetCommentsResponsePublicComment.md b/docs/Model/GetCommentsResponsePublicComment.md index 379a40b..8e8b059 100644 --- a/docs/Model/GetCommentsResponsePublicComment.md +++ b/docs/Model/GetCommentsResponsePublicComment.md @@ -1,4 +1,4 @@ -# # GetCommentsResponsePublicComment +# GetCommentsResponsePublicComment ## Properties diff --git a/docs/Model/GetCommentsResponseWithPresencePublicComment.md b/docs/Model/GetCommentsResponseWithPresencePublicComment.md index 3a52ff9..2afe39b 100644 --- a/docs/Model/GetCommentsResponseWithPresencePublicComment.md +++ b/docs/Model/GetCommentsResponseWithPresencePublicComment.md @@ -1,4 +1,4 @@ -# # GetCommentsResponseWithPresencePublicComment +# GetCommentsResponseWithPresencePublicComment ## Properties diff --git a/docs/Model/GetDomainConfigResponse.md b/docs/Model/GetDomainConfigResponse.md index f64136a..9ecebee 100644 --- a/docs/Model/GetDomainConfigResponse.md +++ b/docs/Model/GetDomainConfigResponse.md @@ -1,12 +1,12 @@ -# # GetDomainConfigResponse +# GetDomainConfigResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**configuration** | **mixed** | | +**configuration** | **mixed** | | [optional] **status** | **mixed** | | -**reason** | **string** | | -**code** | **string** | | +**reason** | **string** | | [optional] +**code** | **string** | | [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/GetDomainConfigsResponse.md b/docs/Model/GetDomainConfigsResponse.md index 437cd8f..40471be 100644 --- a/docs/Model/GetDomainConfigsResponse.md +++ b/docs/Model/GetDomainConfigsResponse.md @@ -1,12 +1,12 @@ -# # GetDomainConfigsResponse +# GetDomainConfigsResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**configurations** | **mixed** | | +**configurations** | **mixed** | | [optional] **status** | **mixed** | | -**reason** | **string** | | -**code** | **string** | | +**reason** | **string** | | [optional] +**code** | **string** | | [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/GetDomainConfigsResponseAnyOf.md b/docs/Model/GetDomainConfigsResponseAnyOf.md index 6c5a823..2e26272 100644 --- a/docs/Model/GetDomainConfigsResponseAnyOf.md +++ b/docs/Model/GetDomainConfigsResponseAnyOf.md @@ -1,4 +1,4 @@ -# # GetDomainConfigsResponseAnyOf +# GetDomainConfigsResponseAnyOf ## Properties diff --git a/docs/Model/GetDomainConfigsResponseAnyOf1.md b/docs/Model/GetDomainConfigsResponseAnyOf1.md index 2bd0153..c3d0e85 100644 --- a/docs/Model/GetDomainConfigsResponseAnyOf1.md +++ b/docs/Model/GetDomainConfigsResponseAnyOf1.md @@ -1,4 +1,4 @@ -# # GetDomainConfigsResponseAnyOf1 +# GetDomainConfigsResponseAnyOf1 ## Properties diff --git a/docs/Model/GetEmailTemplateDefinitionsResponse.md b/docs/Model/GetEmailTemplateDefinitionsResponse.md index eb0a6d4..f949596 100644 --- a/docs/Model/GetEmailTemplateDefinitionsResponse.md +++ b/docs/Model/GetEmailTemplateDefinitionsResponse.md @@ -1,4 +1,4 @@ -# # GetEmailTemplateDefinitionsResponse +# GetEmailTemplateDefinitionsResponse ## Properties diff --git a/docs/Model/GetEmailTemplateRenderErrorsResponse.md b/docs/Model/GetEmailTemplateRenderErrorsResponse.md index 8eab084..5af848c 100644 --- a/docs/Model/GetEmailTemplateRenderErrorsResponse.md +++ b/docs/Model/GetEmailTemplateRenderErrorsResponse.md @@ -1,4 +1,4 @@ -# # GetEmailTemplateRenderErrorsResponse +# GetEmailTemplateRenderErrorsResponse ## Properties diff --git a/docs/Model/GetEmailTemplateResponse.md b/docs/Model/GetEmailTemplateResponse.md index d9229cf..011535b 100644 --- a/docs/Model/GetEmailTemplateResponse.md +++ b/docs/Model/GetEmailTemplateResponse.md @@ -1,4 +1,4 @@ -# # GetEmailTemplateResponse +# GetEmailTemplateResponse ## Properties diff --git a/docs/Model/GetEmailTemplatesResponse.md b/docs/Model/GetEmailTemplatesResponse.md index 3b6c29e..5563e64 100644 --- a/docs/Model/GetEmailTemplatesResponse.md +++ b/docs/Model/GetEmailTemplatesResponse.md @@ -1,4 +1,4 @@ -# # GetEmailTemplatesResponse +# GetEmailTemplatesResponse ## Properties diff --git a/docs/Model/GetEventLogResponse.md b/docs/Model/GetEventLogResponse.md index 82136c3..7808a5a 100644 --- a/docs/Model/GetEventLogResponse.md +++ b/docs/Model/GetEventLogResponse.md @@ -1,4 +1,4 @@ -# # GetEventLogResponse +# GetEventLogResponse ## Properties diff --git a/docs/Model/GetFeedPostsResponse.md b/docs/Model/GetFeedPostsResponse.md index 00279aa..2913afa 100644 --- a/docs/Model/GetFeedPostsResponse.md +++ b/docs/Model/GetFeedPostsResponse.md @@ -1,4 +1,4 @@ -# # GetFeedPostsResponse +# GetFeedPostsResponse ## Properties diff --git a/docs/Model/GetGifsSearchResponse.md b/docs/Model/GetGifsSearchResponse.md index 8db09f3..b1a2253 100644 --- a/docs/Model/GetGifsSearchResponse.md +++ b/docs/Model/GetGifsSearchResponse.md @@ -1,11 +1,11 @@ -# # GetGifsSearchResponse +# GetGifsSearchResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**images** | **\FastComments\Client\Model\GifSearchResponseImagesInnerInner[][]** | | +**images** | **\FastComments\Client\Model\GifSearchResponseImagesInnerInner[][]** | | [optional] **status** | [**\FastComments\Client\Model\APIStatus**](APIStatus.md) | | -**code** | **string** | | +**code** | **string** | | [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/GetGifsTrendingResponse.md b/docs/Model/GetGifsTrendingResponse.md index 4bc8472..ca4ff7e 100644 --- a/docs/Model/GetGifsTrendingResponse.md +++ b/docs/Model/GetGifsTrendingResponse.md @@ -1,11 +1,11 @@ -# # GetGifsTrendingResponse +# GetGifsTrendingResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**images** | **\FastComments\Client\Model\GifSearchResponseImagesInnerInner[][]** | | +**images** | **\FastComments\Client\Model\GifSearchResponseImagesInnerInner[][]** | | [optional] **status** | [**\FastComments\Client\Model\APIStatus**](APIStatus.md) | | -**code** | **string** | | +**code** | **string** | | [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/GetHashTagsResponse.md b/docs/Model/GetHashTagsResponse.md index 5ea7d07..70f6057 100644 --- a/docs/Model/GetHashTagsResponse.md +++ b/docs/Model/GetHashTagsResponse.md @@ -1,4 +1,4 @@ -# # GetHashTagsResponse +# GetHashTagsResponse ## Properties diff --git a/docs/Model/GetModeratorResponse.md b/docs/Model/GetModeratorResponse.md index 093d842..bd454c4 100644 --- a/docs/Model/GetModeratorResponse.md +++ b/docs/Model/GetModeratorResponse.md @@ -1,4 +1,4 @@ -# # GetModeratorResponse +# GetModeratorResponse ## Properties diff --git a/docs/Model/GetModeratorsResponse.md b/docs/Model/GetModeratorsResponse.md index f52fe75..5c4d69b 100644 --- a/docs/Model/GetModeratorsResponse.md +++ b/docs/Model/GetModeratorsResponse.md @@ -1,4 +1,4 @@ -# # GetModeratorsResponse +# GetModeratorsResponse ## Properties diff --git a/docs/Model/GetMyNotificationsResponse.md b/docs/Model/GetMyNotificationsResponse.md index 669a28f..b1f2ae4 100644 --- a/docs/Model/GetMyNotificationsResponse.md +++ b/docs/Model/GetMyNotificationsResponse.md @@ -1,4 +1,4 @@ -# # GetMyNotificationsResponse +# GetMyNotificationsResponse ## Properties diff --git a/docs/Model/GetNotificationCountResponse.md b/docs/Model/GetNotificationCountResponse.md index 55dd3f7..1f660a5 100644 --- a/docs/Model/GetNotificationCountResponse.md +++ b/docs/Model/GetNotificationCountResponse.md @@ -1,4 +1,4 @@ -# # GetNotificationCountResponse +# GetNotificationCountResponse ## Properties diff --git a/docs/Model/GetNotificationsResponse.md b/docs/Model/GetNotificationsResponse.md index 4f91bf6..8c7ebd2 100644 --- a/docs/Model/GetNotificationsResponse.md +++ b/docs/Model/GetNotificationsResponse.md @@ -1,4 +1,4 @@ -# # GetNotificationsResponse +# GetNotificationsResponse ## Properties diff --git a/docs/Model/GetPageByURLIdAPIResponse.md b/docs/Model/GetPageByURLIdAPIResponse.md index 0ab4941..249dbc7 100644 --- a/docs/Model/GetPageByURLIdAPIResponse.md +++ b/docs/Model/GetPageByURLIdAPIResponse.md @@ -1,4 +1,4 @@ -# # GetPageByURLIdAPIResponse +# GetPageByURLIdAPIResponse ## Properties diff --git a/docs/Model/GetPagesAPIResponse.md b/docs/Model/GetPagesAPIResponse.md index 30b7f9e..620ed88 100644 --- a/docs/Model/GetPagesAPIResponse.md +++ b/docs/Model/GetPagesAPIResponse.md @@ -1,4 +1,4 @@ -# # GetPagesAPIResponse +# GetPagesAPIResponse ## Properties diff --git a/docs/Model/GetPendingWebhookEventCountResponse.md b/docs/Model/GetPendingWebhookEventCountResponse.md index a8fcb84..d42891e 100644 --- a/docs/Model/GetPendingWebhookEventCountResponse.md +++ b/docs/Model/GetPendingWebhookEventCountResponse.md @@ -1,4 +1,4 @@ -# # GetPendingWebhookEventCountResponse +# GetPendingWebhookEventCountResponse ## Properties diff --git a/docs/Model/GetPendingWebhookEventsResponse.md b/docs/Model/GetPendingWebhookEventsResponse.md index d7aa6f1..607b65f 100644 --- a/docs/Model/GetPendingWebhookEventsResponse.md +++ b/docs/Model/GetPendingWebhookEventsResponse.md @@ -1,4 +1,4 @@ -# # GetPendingWebhookEventsResponse +# GetPendingWebhookEventsResponse ## Properties diff --git a/docs/Model/GetPublicFeedPostsResponse.md b/docs/Model/GetPublicFeedPostsResponse.md index 4734a7c..becf659 100644 --- a/docs/Model/GetPublicFeedPostsResponse.md +++ b/docs/Model/GetPublicFeedPostsResponse.md @@ -1,4 +1,4 @@ -# # GetPublicFeedPostsResponse +# GetPublicFeedPostsResponse ## Properties diff --git a/docs/Model/GetPublicPagesResponse.md b/docs/Model/GetPublicPagesResponse.md index cd1d2ad..05ffefb 100644 --- a/docs/Model/GetPublicPagesResponse.md +++ b/docs/Model/GetPublicPagesResponse.md @@ -1,4 +1,4 @@ -# # GetPublicPagesResponse +# GetPublicPagesResponse ## Properties diff --git a/docs/Model/GetQuestionConfigResponse.md b/docs/Model/GetQuestionConfigResponse.md index 62ddce5..1638b73 100644 --- a/docs/Model/GetQuestionConfigResponse.md +++ b/docs/Model/GetQuestionConfigResponse.md @@ -1,4 +1,4 @@ -# # GetQuestionConfigResponse +# GetQuestionConfigResponse ## Properties diff --git a/docs/Model/GetQuestionConfigsResponse.md b/docs/Model/GetQuestionConfigsResponse.md index 980f174..c65c66d 100644 --- a/docs/Model/GetQuestionConfigsResponse.md +++ b/docs/Model/GetQuestionConfigsResponse.md @@ -1,4 +1,4 @@ -# # GetQuestionConfigsResponse +# GetQuestionConfigsResponse ## Properties diff --git a/docs/Model/GetQuestionResultResponse.md b/docs/Model/GetQuestionResultResponse.md index c7a614b..4c0ec69 100644 --- a/docs/Model/GetQuestionResultResponse.md +++ b/docs/Model/GetQuestionResultResponse.md @@ -1,4 +1,4 @@ -# # GetQuestionResultResponse +# GetQuestionResultResponse ## Properties diff --git a/docs/Model/GetQuestionResultsResponse.md b/docs/Model/GetQuestionResultsResponse.md index e6adef1..f894341 100644 --- a/docs/Model/GetQuestionResultsResponse.md +++ b/docs/Model/GetQuestionResultsResponse.md @@ -1,4 +1,4 @@ -# # GetQuestionResultsResponse +# GetQuestionResultsResponse ## Properties diff --git a/docs/Model/GetSSOUserByEmailAPIResponse.md b/docs/Model/GetSSOUserByEmailAPIResponse.md index 1c78933..1862814 100644 --- a/docs/Model/GetSSOUserByEmailAPIResponse.md +++ b/docs/Model/GetSSOUserByEmailAPIResponse.md @@ -1,4 +1,4 @@ -# # GetSSOUserByEmailAPIResponse +# GetSSOUserByEmailAPIResponse ## Properties diff --git a/docs/Model/GetSSOUserByIdAPIResponse.md b/docs/Model/GetSSOUserByIdAPIResponse.md index 9160346..4034972 100644 --- a/docs/Model/GetSSOUserByIdAPIResponse.md +++ b/docs/Model/GetSSOUserByIdAPIResponse.md @@ -1,4 +1,4 @@ -# # GetSSOUserByIdAPIResponse +# GetSSOUserByIdAPIResponse ## Properties diff --git a/docs/Model/GetSSOUsersResponse.md b/docs/Model/GetSSOUsersResponse.md index ef5a8b8..035cd60 100644 --- a/docs/Model/GetSSOUsersResponse.md +++ b/docs/Model/GetSSOUsersResponse.md @@ -1,4 +1,4 @@ -# # GetSSOUsersResponse +# GetSSOUsersResponse ## Properties diff --git a/docs/Model/GetSubscriptionsAPIResponse.md b/docs/Model/GetSubscriptionsAPIResponse.md index 3268e6a..8120f59 100644 --- a/docs/Model/GetSubscriptionsAPIResponse.md +++ b/docs/Model/GetSubscriptionsAPIResponse.md @@ -1,4 +1,4 @@ -# # GetSubscriptionsAPIResponse +# GetSubscriptionsAPIResponse ## Properties diff --git a/docs/Model/GetTenantDailyUsagesResponse.md b/docs/Model/GetTenantDailyUsagesResponse.md index 4d128d0..484b843 100644 --- a/docs/Model/GetTenantDailyUsagesResponse.md +++ b/docs/Model/GetTenantDailyUsagesResponse.md @@ -1,4 +1,4 @@ -# # GetTenantDailyUsagesResponse +# GetTenantDailyUsagesResponse ## Properties diff --git a/docs/Model/GetTenantManualBadgesResponse.md b/docs/Model/GetTenantManualBadgesResponse.md index 88f500d..6b32879 100644 --- a/docs/Model/GetTenantManualBadgesResponse.md +++ b/docs/Model/GetTenantManualBadgesResponse.md @@ -1,4 +1,4 @@ -# # GetTenantManualBadgesResponse +# GetTenantManualBadgesResponse ## Properties diff --git a/docs/Model/GetTenantPackageResponse.md b/docs/Model/GetTenantPackageResponse.md index 18790dd..7e147fd 100644 --- a/docs/Model/GetTenantPackageResponse.md +++ b/docs/Model/GetTenantPackageResponse.md @@ -1,4 +1,4 @@ -# # GetTenantPackageResponse +# GetTenantPackageResponse ## Properties diff --git a/docs/Model/GetTenantPackagesResponse.md b/docs/Model/GetTenantPackagesResponse.md index acbf1de..a0636b2 100644 --- a/docs/Model/GetTenantPackagesResponse.md +++ b/docs/Model/GetTenantPackagesResponse.md @@ -1,4 +1,4 @@ -# # GetTenantPackagesResponse +# GetTenantPackagesResponse ## Properties diff --git a/docs/Model/GetTenantResponse.md b/docs/Model/GetTenantResponse.md index 0dbd8db..2288886 100644 --- a/docs/Model/GetTenantResponse.md +++ b/docs/Model/GetTenantResponse.md @@ -1,4 +1,4 @@ -# # GetTenantResponse +# GetTenantResponse ## Properties diff --git a/docs/Model/GetTenantUserResponse.md b/docs/Model/GetTenantUserResponse.md index c7179ba..1a86a96 100644 --- a/docs/Model/GetTenantUserResponse.md +++ b/docs/Model/GetTenantUserResponse.md @@ -1,4 +1,4 @@ -# # GetTenantUserResponse +# GetTenantUserResponse ## Properties diff --git a/docs/Model/GetTenantUsersResponse.md b/docs/Model/GetTenantUsersResponse.md index 4c35590..cb09ed7 100644 --- a/docs/Model/GetTenantUsersResponse.md +++ b/docs/Model/GetTenantUsersResponse.md @@ -1,4 +1,4 @@ -# # GetTenantUsersResponse +# GetTenantUsersResponse ## Properties diff --git a/docs/Model/GetTenantsResponse.md b/docs/Model/GetTenantsResponse.md index 1154b79..b0295e1 100644 --- a/docs/Model/GetTenantsResponse.md +++ b/docs/Model/GetTenantsResponse.md @@ -1,4 +1,4 @@ -# # GetTenantsResponse +# GetTenantsResponse ## Properties diff --git a/docs/Model/GetTicketResponse.md b/docs/Model/GetTicketResponse.md index 3790e76..e03f404 100644 --- a/docs/Model/GetTicketResponse.md +++ b/docs/Model/GetTicketResponse.md @@ -1,4 +1,4 @@ -# # GetTicketResponse +# GetTicketResponse ## Properties diff --git a/docs/Model/GetTicketsResponse.md b/docs/Model/GetTicketsResponse.md index d9b00db..09e4e9a 100644 --- a/docs/Model/GetTicketsResponse.md +++ b/docs/Model/GetTicketsResponse.md @@ -1,4 +1,4 @@ -# # GetTicketsResponse +# GetTicketsResponse ## Properties diff --git a/docs/Model/GetTranslationsResponse.md b/docs/Model/GetTranslationsResponse.md index 143d984..cdecb0b 100644 --- a/docs/Model/GetTranslationsResponse.md +++ b/docs/Model/GetTranslationsResponse.md @@ -1,4 +1,4 @@ -# # GetTranslationsResponse +# GetTranslationsResponse ## Properties diff --git a/docs/Model/GetUserInternalProfileResponse.md b/docs/Model/GetUserInternalProfileResponse.md index b606dcc..a82e6c0 100644 --- a/docs/Model/GetUserInternalProfileResponse.md +++ b/docs/Model/GetUserInternalProfileResponse.md @@ -1,4 +1,4 @@ -# # GetUserInternalProfileResponse +# GetUserInternalProfileResponse ## Properties diff --git a/docs/Model/GetUserInternalProfileResponseProfile.md b/docs/Model/GetUserInternalProfileResponseProfile.md index f3fc3e1..286298a 100644 --- a/docs/Model/GetUserInternalProfileResponseProfile.md +++ b/docs/Model/GetUserInternalProfileResponseProfile.md @@ -1,4 +1,4 @@ -# # GetUserInternalProfileResponseProfile +# GetUserInternalProfileResponseProfile ## Properties diff --git a/docs/Model/GetUserManualBadgesResponse.md b/docs/Model/GetUserManualBadgesResponse.md index 1b08b96..5c25ca9 100644 --- a/docs/Model/GetUserManualBadgesResponse.md +++ b/docs/Model/GetUserManualBadgesResponse.md @@ -1,4 +1,4 @@ -# # GetUserManualBadgesResponse +# GetUserManualBadgesResponse ## Properties diff --git a/docs/Model/GetUserNotificationCountResponse.md b/docs/Model/GetUserNotificationCountResponse.md index 8fa9b42..ed24921 100644 --- a/docs/Model/GetUserNotificationCountResponse.md +++ b/docs/Model/GetUserNotificationCountResponse.md @@ -1,4 +1,4 @@ -# # GetUserNotificationCountResponse +# GetUserNotificationCountResponse ## Properties diff --git a/docs/Model/GetUserPresenceStatusesResponse.md b/docs/Model/GetUserPresenceStatusesResponse.md index 0c44309..4c09dd9 100644 --- a/docs/Model/GetUserPresenceStatusesResponse.md +++ b/docs/Model/GetUserPresenceStatusesResponse.md @@ -1,4 +1,4 @@ -# # GetUserPresenceStatusesResponse +# GetUserPresenceStatusesResponse ## Properties diff --git a/docs/Model/GetUserResponse.md b/docs/Model/GetUserResponse.md index 01aca73..b5ad2a0 100644 --- a/docs/Model/GetUserResponse.md +++ b/docs/Model/GetUserResponse.md @@ -1,4 +1,4 @@ -# # GetUserResponse +# GetUserResponse ## Properties diff --git a/docs/Model/GetUserTrustFactorResponse.md b/docs/Model/GetUserTrustFactorResponse.md index c27f93a..36aeb7a 100644 --- a/docs/Model/GetUserTrustFactorResponse.md +++ b/docs/Model/GetUserTrustFactorResponse.md @@ -1,4 +1,4 @@ -# # GetUserTrustFactorResponse +# GetUserTrustFactorResponse ## Properties diff --git a/docs/Model/GetV1PageLikes.md b/docs/Model/GetV1PageLikes.md index edac09f..784637b 100644 --- a/docs/Model/GetV1PageLikes.md +++ b/docs/Model/GetV1PageLikes.md @@ -1,4 +1,4 @@ -# # GetV1PageLikes +# GetV1PageLikes ## Properties diff --git a/docs/Model/GetV2PageReactUsersResponse.md b/docs/Model/GetV2PageReactUsersResponse.md index 0fb3d31..a266480 100644 --- a/docs/Model/GetV2PageReactUsersResponse.md +++ b/docs/Model/GetV2PageReactUsersResponse.md @@ -1,4 +1,4 @@ -# # GetV2PageReactUsersResponse +# GetV2PageReactUsersResponse ## Properties diff --git a/docs/Model/GetV2PageReacts.md b/docs/Model/GetV2PageReacts.md index 44cf10e..95addb6 100644 --- a/docs/Model/GetV2PageReacts.md +++ b/docs/Model/GetV2PageReacts.md @@ -1,4 +1,4 @@ -# # GetV2PageReacts +# GetV2PageReacts ## Properties diff --git a/docs/Model/GetVotesForUserResponse.md b/docs/Model/GetVotesForUserResponse.md index c8c2ef1..2c24ec7 100644 --- a/docs/Model/GetVotesForUserResponse.md +++ b/docs/Model/GetVotesForUserResponse.md @@ -1,4 +1,4 @@ -# # GetVotesForUserResponse +# GetVotesForUserResponse ## Properties diff --git a/docs/Model/GetVotesResponse.md b/docs/Model/GetVotesResponse.md index 12a834d..58c33a8 100644 --- a/docs/Model/GetVotesResponse.md +++ b/docs/Model/GetVotesResponse.md @@ -1,4 +1,4 @@ -# # GetVotesResponse +# GetVotesResponse ## Properties diff --git a/docs/Model/GifGetLargeResponse.md b/docs/Model/GifGetLargeResponse.md index e08e74b..c1f106a 100644 --- a/docs/Model/GifGetLargeResponse.md +++ b/docs/Model/GifGetLargeResponse.md @@ -1,4 +1,4 @@ -# # GifGetLargeResponse +# GifGetLargeResponse ## Properties diff --git a/docs/Model/GifRating.md b/docs/Model/GifRating.md index 61f1c28..ca9209e 100644 --- a/docs/Model/GifRating.md +++ b/docs/Model/GifRating.md @@ -1,4 +1,4 @@ -# # GifRating +# GifRating ## Properties diff --git a/docs/Model/GifSearchInternalError.md b/docs/Model/GifSearchInternalError.md index fd8b954..8a3e0dc 100644 --- a/docs/Model/GifSearchInternalError.md +++ b/docs/Model/GifSearchInternalError.md @@ -1,4 +1,4 @@ -# # GifSearchInternalError +# GifSearchInternalError ## Properties diff --git a/docs/Model/GifSearchResponse.md b/docs/Model/GifSearchResponse.md index 978763a..b273fad 100644 --- a/docs/Model/GifSearchResponse.md +++ b/docs/Model/GifSearchResponse.md @@ -1,4 +1,4 @@ -# # GifSearchResponse +# GifSearchResponse ## Properties diff --git a/docs/Model/GifSearchResponseImagesInnerInner.md b/docs/Model/GifSearchResponseImagesInnerInner.md index a0eeb30..f149d94 100644 --- a/docs/Model/GifSearchResponseImagesInnerInner.md +++ b/docs/Model/GifSearchResponseImagesInnerInner.md @@ -1,4 +1,4 @@ -# # GifSearchResponseImagesInnerInner +# GifSearchResponseImagesInnerInner ## Properties diff --git a/docs/Model/HeaderAccountNotification.md b/docs/Model/HeaderAccountNotification.md index 64b47d3..88c6a86 100644 --- a/docs/Model/HeaderAccountNotification.md +++ b/docs/Model/HeaderAccountNotification.md @@ -1,4 +1,4 @@ -# # HeaderAccountNotification +# HeaderAccountNotification ## Properties diff --git a/docs/Model/HeaderState.md b/docs/Model/HeaderState.md index d7e4fc9..d361d90 100644 --- a/docs/Model/HeaderState.md +++ b/docs/Model/HeaderState.md @@ -1,4 +1,4 @@ -# # HeaderState +# HeaderState ## Properties diff --git a/docs/Model/IgnoredResponse.md b/docs/Model/IgnoredResponse.md index 9d5c176..6cc24b8 100644 --- a/docs/Model/IgnoredResponse.md +++ b/docs/Model/IgnoredResponse.md @@ -1,4 +1,4 @@ -# # IgnoredResponse +# IgnoredResponse ## Properties diff --git a/docs/Model/ImageContentProfanityLevel.md b/docs/Model/ImageContentProfanityLevel.md index f876f9e..b9629ed 100644 --- a/docs/Model/ImageContentProfanityLevel.md +++ b/docs/Model/ImageContentProfanityLevel.md @@ -1,4 +1,4 @@ -# # ImageContentProfanityLevel +# ImageContentProfanityLevel ## Properties diff --git a/docs/Model/ImportedAgentApprovalNotificationFrequency.md b/docs/Model/ImportedAgentApprovalNotificationFrequency.md index 1e49231..65a0b0a 100644 --- a/docs/Model/ImportedAgentApprovalNotificationFrequency.md +++ b/docs/Model/ImportedAgentApprovalNotificationFrequency.md @@ -1,4 +1,4 @@ -# # ImportedAgentApprovalNotificationFrequency +# ImportedAgentApprovalNotificationFrequency ## Properties diff --git a/docs/Model/ImportedSiteType.md b/docs/Model/ImportedSiteType.md index 59e1192..6039ef8 100644 --- a/docs/Model/ImportedSiteType.md +++ b/docs/Model/ImportedSiteType.md @@ -1,4 +1,4 @@ -# # ImportedSiteType +# ImportedSiteType ## Properties diff --git a/docs/Model/LiveEvent.md b/docs/Model/LiveEvent.md index b139e69..8bb9313 100644 --- a/docs/Model/LiveEvent.md +++ b/docs/Model/LiveEvent.md @@ -1,4 +1,4 @@ -# # LiveEvent +# LiveEvent ## Properties diff --git a/docs/Model/LiveEventExtraInfo.md b/docs/Model/LiveEventExtraInfo.md index 6a62969..05fecda 100644 --- a/docs/Model/LiveEventExtraInfo.md +++ b/docs/Model/LiveEventExtraInfo.md @@ -1,4 +1,4 @@ -# # LiveEventExtraInfo +# LiveEventExtraInfo ## Properties diff --git a/docs/Model/LiveEventType.md b/docs/Model/LiveEventType.md index a5d118d..5bdab6b 100644 --- a/docs/Model/LiveEventType.md +++ b/docs/Model/LiveEventType.md @@ -1,4 +1,4 @@ -# # LiveEventType +# LiveEventType ## Properties diff --git a/docs/Model/MediaAsset.md b/docs/Model/MediaAsset.md index e08de5a..439f9fd 100644 --- a/docs/Model/MediaAsset.md +++ b/docs/Model/MediaAsset.md @@ -1,4 +1,4 @@ -# # MediaAsset +# MediaAsset ## Properties diff --git a/docs/Model/MentionAutoCompleteMode.md b/docs/Model/MentionAutoCompleteMode.md index 104970a..2aef85e 100644 --- a/docs/Model/MentionAutoCompleteMode.md +++ b/docs/Model/MentionAutoCompleteMode.md @@ -1,4 +1,4 @@ -# # MentionAutoCompleteMode +# MentionAutoCompleteMode ## Properties diff --git a/docs/Model/MetaItem.md b/docs/Model/MetaItem.md index 9a580a7..230face 100644 --- a/docs/Model/MetaItem.md +++ b/docs/Model/MetaItem.md @@ -1,4 +1,4 @@ -# # MetaItem +# MetaItem ## Properties diff --git a/docs/Model/ModerationAPIChildCommentsResponse.md b/docs/Model/ModerationAPIChildCommentsResponse.md index 879be6c..c8868f4 100644 --- a/docs/Model/ModerationAPIChildCommentsResponse.md +++ b/docs/Model/ModerationAPIChildCommentsResponse.md @@ -1,4 +1,4 @@ -# # ModerationAPIChildCommentsResponse +# ModerationAPIChildCommentsResponse ## Properties diff --git a/docs/Model/ModerationAPIComment.md b/docs/Model/ModerationAPIComment.md index 7365fdb..006b40f 100644 --- a/docs/Model/ModerationAPIComment.md +++ b/docs/Model/ModerationAPIComment.md @@ -1,4 +1,4 @@ -# # ModerationAPIComment +# ModerationAPIComment ## Properties diff --git a/docs/Model/ModerationAPICommentLog.md b/docs/Model/ModerationAPICommentLog.md index 05e75cf..6c916a7 100644 --- a/docs/Model/ModerationAPICommentLog.md +++ b/docs/Model/ModerationAPICommentLog.md @@ -1,4 +1,4 @@ -# # ModerationAPICommentLog +# ModerationAPICommentLog ## Properties diff --git a/docs/Model/ModerationAPICommentResponse.md b/docs/Model/ModerationAPICommentResponse.md index 71b0fa8..35a497f 100644 --- a/docs/Model/ModerationAPICommentResponse.md +++ b/docs/Model/ModerationAPICommentResponse.md @@ -1,4 +1,4 @@ -# # ModerationAPICommentResponse +# ModerationAPICommentResponse ## Properties diff --git a/docs/Model/ModerationAPICountCommentsResponse.md b/docs/Model/ModerationAPICountCommentsResponse.md index 480a4b8..aa36aa1 100644 --- a/docs/Model/ModerationAPICountCommentsResponse.md +++ b/docs/Model/ModerationAPICountCommentsResponse.md @@ -1,4 +1,4 @@ -# # ModerationAPICountCommentsResponse +# ModerationAPICountCommentsResponse ## Properties diff --git a/docs/Model/ModerationAPIGetCommentIdsResponse.md b/docs/Model/ModerationAPIGetCommentIdsResponse.md index a8f1023..8333d74 100644 --- a/docs/Model/ModerationAPIGetCommentIdsResponse.md +++ b/docs/Model/ModerationAPIGetCommentIdsResponse.md @@ -1,4 +1,4 @@ -# # ModerationAPIGetCommentIdsResponse +# ModerationAPIGetCommentIdsResponse ## Properties diff --git a/docs/Model/ModerationAPIGetCommentsResponse.md b/docs/Model/ModerationAPIGetCommentsResponse.md index 70b1d49..0831331 100644 --- a/docs/Model/ModerationAPIGetCommentsResponse.md +++ b/docs/Model/ModerationAPIGetCommentsResponse.md @@ -1,4 +1,4 @@ -# # ModerationAPIGetCommentsResponse +# ModerationAPIGetCommentsResponse ## Properties diff --git a/docs/Model/ModerationAPIGetLogsResponse.md b/docs/Model/ModerationAPIGetLogsResponse.md index 6dfd09b..7a0c77c 100644 --- a/docs/Model/ModerationAPIGetLogsResponse.md +++ b/docs/Model/ModerationAPIGetLogsResponse.md @@ -1,4 +1,4 @@ -# # ModerationAPIGetLogsResponse +# ModerationAPIGetLogsResponse ## Properties diff --git a/docs/Model/ModerationCommentSearchResponse.md b/docs/Model/ModerationCommentSearchResponse.md index 99ffbe1..1c8b542 100644 --- a/docs/Model/ModerationCommentSearchResponse.md +++ b/docs/Model/ModerationCommentSearchResponse.md @@ -1,4 +1,4 @@ -# # ModerationCommentSearchResponse +# ModerationCommentSearchResponse ## Properties diff --git a/docs/Model/ModerationExportResponse.md b/docs/Model/ModerationExportResponse.md index f32a0fb..7ccbdba 100644 --- a/docs/Model/ModerationExportResponse.md +++ b/docs/Model/ModerationExportResponse.md @@ -1,4 +1,4 @@ -# # ModerationExportResponse +# ModerationExportResponse ## Properties diff --git a/docs/Model/ModerationExportStatusResponse.md b/docs/Model/ModerationExportStatusResponse.md index e3abf3a..ac3c9f9 100644 --- a/docs/Model/ModerationExportStatusResponse.md +++ b/docs/Model/ModerationExportStatusResponse.md @@ -1,4 +1,4 @@ -# # ModerationExportStatusResponse +# ModerationExportStatusResponse ## Properties diff --git a/docs/Model/ModerationFilter.md b/docs/Model/ModerationFilter.md index c6b9d85..146f808 100644 --- a/docs/Model/ModerationFilter.md +++ b/docs/Model/ModerationFilter.md @@ -1,4 +1,4 @@ -# # ModerationFilter +# ModerationFilter ## Properties diff --git a/docs/Model/ModerationPageSearchProjected.md b/docs/Model/ModerationPageSearchProjected.md index 8cf2948..34101dd 100644 --- a/docs/Model/ModerationPageSearchProjected.md +++ b/docs/Model/ModerationPageSearchProjected.md @@ -1,4 +1,4 @@ -# # ModerationPageSearchProjected +# ModerationPageSearchProjected ## Properties diff --git a/docs/Model/ModerationPageSearchResponse.md b/docs/Model/ModerationPageSearchResponse.md index be2a20b..c585ad5 100644 --- a/docs/Model/ModerationPageSearchResponse.md +++ b/docs/Model/ModerationPageSearchResponse.md @@ -1,4 +1,4 @@ -# # ModerationPageSearchResponse +# ModerationPageSearchResponse ## Properties diff --git a/docs/Model/ModerationSiteSearchProjected.md b/docs/Model/ModerationSiteSearchProjected.md index f45758c..dca27a2 100644 --- a/docs/Model/ModerationSiteSearchProjected.md +++ b/docs/Model/ModerationSiteSearchProjected.md @@ -1,4 +1,4 @@ -# # ModerationSiteSearchProjected +# ModerationSiteSearchProjected ## Properties diff --git a/docs/Model/ModerationSiteSearchResponse.md b/docs/Model/ModerationSiteSearchResponse.md index 9692e9a..352af4c 100644 --- a/docs/Model/ModerationSiteSearchResponse.md +++ b/docs/Model/ModerationSiteSearchResponse.md @@ -1,4 +1,4 @@ -# # ModerationSiteSearchResponse +# ModerationSiteSearchResponse ## Properties diff --git a/docs/Model/ModerationSuggestResponse.md b/docs/Model/ModerationSuggestResponse.md index 9b6329f..4453357 100644 --- a/docs/Model/ModerationSuggestResponse.md +++ b/docs/Model/ModerationSuggestResponse.md @@ -1,4 +1,4 @@ -# # ModerationSuggestResponse +# ModerationSuggestResponse ## Properties diff --git a/docs/Model/ModerationUserSearchProjected.md b/docs/Model/ModerationUserSearchProjected.md index f067c18..a679d6f 100644 --- a/docs/Model/ModerationUserSearchProjected.md +++ b/docs/Model/ModerationUserSearchProjected.md @@ -1,4 +1,4 @@ -# # ModerationUserSearchProjected +# ModerationUserSearchProjected ## Properties diff --git a/docs/Model/ModerationUserSearchResponse.md b/docs/Model/ModerationUserSearchResponse.md index 64d24a8..f5f0da1 100644 --- a/docs/Model/ModerationUserSearchResponse.md +++ b/docs/Model/ModerationUserSearchResponse.md @@ -1,4 +1,4 @@ -# # ModerationUserSearchResponse +# ModerationUserSearchResponse ## Properties diff --git a/docs/Model/Moderator.md b/docs/Model/Moderator.md index f45ed3f..bd4070d 100644 --- a/docs/Model/Moderator.md +++ b/docs/Model/Moderator.md @@ -1,4 +1,4 @@ -# # Moderator +# Moderator ## Properties diff --git a/docs/Model/NotificationAndCount.md b/docs/Model/NotificationAndCount.md index c63f672..7fa1f1b 100644 --- a/docs/Model/NotificationAndCount.md +++ b/docs/Model/NotificationAndCount.md @@ -1,4 +1,4 @@ -# # NotificationAndCount +# NotificationAndCount ## Properties diff --git a/docs/Model/NotificationObjectType.md b/docs/Model/NotificationObjectType.md index 6486d99..b8d7582 100644 --- a/docs/Model/NotificationObjectType.md +++ b/docs/Model/NotificationObjectType.md @@ -1,4 +1,4 @@ -# # NotificationObjectType +# NotificationObjectType ## Properties diff --git a/docs/Model/NotificationType.md b/docs/Model/NotificationType.md index e02cd64..5145078 100644 --- a/docs/Model/NotificationType.md +++ b/docs/Model/NotificationType.md @@ -1,4 +1,4 @@ -# # NotificationType +# NotificationType ## Properties diff --git a/docs/Model/PageUserEntry.md b/docs/Model/PageUserEntry.md index f87869e..c6c4f07 100644 --- a/docs/Model/PageUserEntry.md +++ b/docs/Model/PageUserEntry.md @@ -1,4 +1,4 @@ -# # PageUserEntry +# PageUserEntry ## Properties diff --git a/docs/Model/PageUsersInfoResponse.md b/docs/Model/PageUsersInfoResponse.md index 5696a37..74ea904 100644 --- a/docs/Model/PageUsersInfoResponse.md +++ b/docs/Model/PageUsersInfoResponse.md @@ -1,4 +1,4 @@ -# # PageUsersInfoResponse +# PageUsersInfoResponse ## Properties diff --git a/docs/Model/PageUsersOfflineResponse.md b/docs/Model/PageUsersOfflineResponse.md index 19ae534..cafbd0a 100644 --- a/docs/Model/PageUsersOfflineResponse.md +++ b/docs/Model/PageUsersOfflineResponse.md @@ -1,4 +1,4 @@ -# # PageUsersOfflineResponse +# PageUsersOfflineResponse ## Properties diff --git a/docs/Model/PageUsersOnlineResponse.md b/docs/Model/PageUsersOnlineResponse.md index ba67033..da88c1c 100644 --- a/docs/Model/PageUsersOnlineResponse.md +++ b/docs/Model/PageUsersOnlineResponse.md @@ -1,4 +1,4 @@ -# # PageUsersOnlineResponse +# PageUsersOnlineResponse ## Properties diff --git a/docs/Model/PagesSortBy.md b/docs/Model/PagesSortBy.md index 8e343b3..7c961e9 100644 --- a/docs/Model/PagesSortBy.md +++ b/docs/Model/PagesSortBy.md @@ -1,4 +1,4 @@ -# # PagesSortBy +# PagesSortBy ## Properties diff --git a/docs/Model/PatchDomainConfigParams.md b/docs/Model/PatchDomainConfigParams.md index cb7ede7..a764eb3 100644 --- a/docs/Model/PatchDomainConfigParams.md +++ b/docs/Model/PatchDomainConfigParams.md @@ -1,4 +1,4 @@ -# # PatchDomainConfigParams +# PatchDomainConfigParams ## Properties diff --git a/docs/Model/PatchDomainConfigResponse.md b/docs/Model/PatchDomainConfigResponse.md index 65145c4..613ee38 100644 --- a/docs/Model/PatchDomainConfigResponse.md +++ b/docs/Model/PatchDomainConfigResponse.md @@ -1,12 +1,12 @@ -# # PatchDomainConfigResponse +# PatchDomainConfigResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**configuration** | **mixed** | | +**configuration** | **mixed** | | [optional] **status** | **mixed** | | -**reason** | **string** | | -**code** | **string** | | +**reason** | **string** | | [optional] +**code** | **string** | | [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/PatchPageAPIResponse.md b/docs/Model/PatchPageAPIResponse.md index a7b5752..1c78f66 100644 --- a/docs/Model/PatchPageAPIResponse.md +++ b/docs/Model/PatchPageAPIResponse.md @@ -1,4 +1,4 @@ -# # PatchPageAPIResponse +# PatchPageAPIResponse ## Properties diff --git a/docs/Model/PatchSSOUserAPIResponse.md b/docs/Model/PatchSSOUserAPIResponse.md index 69a1373..40bf92c 100644 --- a/docs/Model/PatchSSOUserAPIResponse.md +++ b/docs/Model/PatchSSOUserAPIResponse.md @@ -1,4 +1,4 @@ -# # PatchSSOUserAPIResponse +# PatchSSOUserAPIResponse ## Properties diff --git a/docs/Model/PendingCommentToSyncOutbound.md b/docs/Model/PendingCommentToSyncOutbound.md index 8383c34..692a358 100644 --- a/docs/Model/PendingCommentToSyncOutbound.md +++ b/docs/Model/PendingCommentToSyncOutbound.md @@ -1,4 +1,4 @@ -# # PendingCommentToSyncOutbound +# PendingCommentToSyncOutbound ## Properties diff --git a/docs/Model/PostRemoveCommentResponse.md b/docs/Model/PostRemoveCommentApiResponse.md similarity index 90% rename from docs/Model/PostRemoveCommentResponse.md rename to docs/Model/PostRemoveCommentApiResponse.md index 1d7de9c..146b47c 100644 --- a/docs/Model/PostRemoveCommentResponse.md +++ b/docs/Model/PostRemoveCommentApiResponse.md @@ -1,4 +1,4 @@ -# # PostRemoveCommentResponse +# PostRemoveCommentApiResponse ## Properties diff --git a/docs/Model/PreBanSummary.md b/docs/Model/PreBanSummary.md index 7d63b80..af5f605 100644 --- a/docs/Model/PreBanSummary.md +++ b/docs/Model/PreBanSummary.md @@ -1,4 +1,4 @@ -# # PreBanSummary +# PreBanSummary ## Properties diff --git a/docs/Model/PubSubComment.md b/docs/Model/PubSubComment.md index d2f32f8..f2fd5fe 100644 --- a/docs/Model/PubSubComment.md +++ b/docs/Model/PubSubComment.md @@ -1,4 +1,4 @@ -# # PubSubComment +# PubSubComment ## Properties diff --git a/docs/Model/PubSubCommentBase.md b/docs/Model/PubSubCommentBase.md index 9ba4bec..bfbeb95 100644 --- a/docs/Model/PubSubCommentBase.md +++ b/docs/Model/PubSubCommentBase.md @@ -1,4 +1,4 @@ -# # PubSubCommentBase +# PubSubCommentBase ## Properties diff --git a/docs/Model/PubSubVote.md b/docs/Model/PubSubVote.md index a40ce06..47b1597 100644 --- a/docs/Model/PubSubVote.md +++ b/docs/Model/PubSubVote.md @@ -1,4 +1,4 @@ -# # PubSubVote +# PubSubVote ## Properties diff --git a/docs/Model/PublicAPIDeleteCommentResponse.md b/docs/Model/PublicAPIDeleteCommentResponse.md index 3fa3e2c..7d2ca94 100644 --- a/docs/Model/PublicAPIDeleteCommentResponse.md +++ b/docs/Model/PublicAPIDeleteCommentResponse.md @@ -1,4 +1,4 @@ -# # PublicAPIDeleteCommentResponse +# PublicAPIDeleteCommentResponse ## Properties diff --git a/docs/Model/PublicAPIGetCommentTextResponse.md b/docs/Model/PublicAPIGetCommentTextResponse.md index b184b9b..ba411fe 100644 --- a/docs/Model/PublicAPIGetCommentTextResponse.md +++ b/docs/Model/PublicAPIGetCommentTextResponse.md @@ -1,4 +1,4 @@ -# # PublicAPIGetCommentTextResponse +# PublicAPIGetCommentTextResponse ## Properties diff --git a/docs/Model/PublicAPISetCommentTextResponse.md b/docs/Model/PublicAPISetCommentTextResponse.md index ece17f2..6ed981c 100644 --- a/docs/Model/PublicAPISetCommentTextResponse.md +++ b/docs/Model/PublicAPISetCommentTextResponse.md @@ -1,4 +1,4 @@ -# # PublicAPISetCommentTextResponse +# PublicAPISetCommentTextResponse ## Properties diff --git a/docs/Model/PublicBlockFromCommentParams.md b/docs/Model/PublicBlockFromCommentParams.md index 02b4ee1..a726a67 100644 --- a/docs/Model/PublicBlockFromCommentParams.md +++ b/docs/Model/PublicBlockFromCommentParams.md @@ -1,4 +1,4 @@ -# # PublicBlockFromCommentParams +# PublicBlockFromCommentParams ## Properties diff --git a/docs/Model/PublicComment.md b/docs/Model/PublicComment.md index 8e57585..4ebfa4f 100644 --- a/docs/Model/PublicComment.md +++ b/docs/Model/PublicComment.md @@ -1,4 +1,4 @@ -# # PublicComment +# PublicComment ## Properties diff --git a/docs/Model/PublicCommentBase.md b/docs/Model/PublicCommentBase.md index 5374717..1d8bd63 100644 --- a/docs/Model/PublicCommentBase.md +++ b/docs/Model/PublicCommentBase.md @@ -1,4 +1,4 @@ -# # PublicCommentBase +# PublicCommentBase ## Properties diff --git a/docs/Model/PublicFeedPostsResponse.md b/docs/Model/PublicFeedPostsResponse.md index 9c2744e..3a90697 100644 --- a/docs/Model/PublicFeedPostsResponse.md +++ b/docs/Model/PublicFeedPostsResponse.md @@ -1,4 +1,4 @@ -# # PublicFeedPostsResponse +# PublicFeedPostsResponse ## Properties diff --git a/docs/Model/PublicPage.md b/docs/Model/PublicPage.md index d5659a7..4832714 100644 --- a/docs/Model/PublicPage.md +++ b/docs/Model/PublicPage.md @@ -1,4 +1,4 @@ -# # PublicPage +# PublicPage ## Properties diff --git a/docs/Model/PublicVote.md b/docs/Model/PublicVote.md index ae53032..e5022c8 100644 --- a/docs/Model/PublicVote.md +++ b/docs/Model/PublicVote.md @@ -1,4 +1,4 @@ -# # PublicVote +# PublicVote ## Properties diff --git a/docs/Model/PutDomainConfigResponse.md b/docs/Model/PutDomainConfigResponse.md index 4b3c880..17a7215 100644 --- a/docs/Model/PutDomainConfigResponse.md +++ b/docs/Model/PutDomainConfigResponse.md @@ -1,12 +1,12 @@ -# # PutDomainConfigResponse +# PutDomainConfigResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**configuration** | **mixed** | | +**configuration** | **mixed** | | [optional] **status** | **mixed** | | -**reason** | **string** | | -**code** | **string** | | +**reason** | **string** | | [optional] +**code** | **string** | | [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/PutSSOUserAPIResponse.md b/docs/Model/PutSSOUserAPIResponse.md index 0dd6744..a2878d3 100644 --- a/docs/Model/PutSSOUserAPIResponse.md +++ b/docs/Model/PutSSOUserAPIResponse.md @@ -1,4 +1,4 @@ -# # PutSSOUserAPIResponse +# PutSSOUserAPIResponse ## Properties diff --git a/docs/Model/QueryPredicate.md b/docs/Model/QueryPredicate.md index fe86eaa..a90dd5d 100644 --- a/docs/Model/QueryPredicate.md +++ b/docs/Model/QueryPredicate.md @@ -1,4 +1,4 @@ -# # QueryPredicate +# QueryPredicate ## Properties diff --git a/docs/Model/QueryPredicateValue.md b/docs/Model/QueryPredicateValue.md index cbe5372..0b0bf7f 100644 --- a/docs/Model/QueryPredicateValue.md +++ b/docs/Model/QueryPredicateValue.md @@ -1,4 +1,4 @@ -# # QueryPredicateValue +# QueryPredicateValue ## Properties diff --git a/docs/Model/QuestionConfig.md b/docs/Model/QuestionConfig.md index e552ce4..e57e8ee 100644 --- a/docs/Model/QuestionConfig.md +++ b/docs/Model/QuestionConfig.md @@ -1,4 +1,4 @@ -# # QuestionConfig +# QuestionConfig ## Properties diff --git a/docs/Model/QuestionConfigCustomOptionsInner.md b/docs/Model/QuestionConfigCustomOptionsInner.md index 46b3104..6ca2ef1 100644 --- a/docs/Model/QuestionConfigCustomOptionsInner.md +++ b/docs/Model/QuestionConfigCustomOptionsInner.md @@ -1,4 +1,4 @@ -# # QuestionConfigCustomOptionsInner +# QuestionConfigCustomOptionsInner ## Properties diff --git a/docs/Model/QuestionDatum.md b/docs/Model/QuestionDatum.md index ce13861..4e37f78 100644 --- a/docs/Model/QuestionDatum.md +++ b/docs/Model/QuestionDatum.md @@ -1,4 +1,4 @@ -# # QuestionDatum +# QuestionDatum ## Properties diff --git a/docs/Model/QuestionRenderingType.md b/docs/Model/QuestionRenderingType.md index a2aeb55..4b5865e 100644 --- a/docs/Model/QuestionRenderingType.md +++ b/docs/Model/QuestionRenderingType.md @@ -1,4 +1,4 @@ -# # QuestionRenderingType +# QuestionRenderingType ## Properties diff --git a/docs/Model/QuestionResult.md b/docs/Model/QuestionResult.md index 0bb81d3..31c8587 100644 --- a/docs/Model/QuestionResult.md +++ b/docs/Model/QuestionResult.md @@ -1,4 +1,4 @@ -# # QuestionResult +# QuestionResult ## Properties diff --git a/docs/Model/QuestionResultAggregationOverall.md b/docs/Model/QuestionResultAggregationOverall.md index e706427..86da7fc 100644 --- a/docs/Model/QuestionResultAggregationOverall.md +++ b/docs/Model/QuestionResultAggregationOverall.md @@ -1,4 +1,4 @@ -# # QuestionResultAggregationOverall +# QuestionResultAggregationOverall ## Properties diff --git a/docs/Model/QuestionSubQuestionVisibility.md b/docs/Model/QuestionSubQuestionVisibility.md index 268b182..402b144 100644 --- a/docs/Model/QuestionSubQuestionVisibility.md +++ b/docs/Model/QuestionSubQuestionVisibility.md @@ -1,4 +1,4 @@ -# # QuestionSubQuestionVisibility +# QuestionSubQuestionVisibility ## Properties diff --git a/docs/Model/QuestionWhenSave.md b/docs/Model/QuestionWhenSave.md index fe6769c..10eb192 100644 --- a/docs/Model/QuestionWhenSave.md +++ b/docs/Model/QuestionWhenSave.md @@ -1,4 +1,4 @@ -# # QuestionWhenSave +# QuestionWhenSave ## Properties diff --git a/docs/Model/ReactBodyParams.md b/docs/Model/ReactBodyParams.md index f9fc190..e308fa5 100644 --- a/docs/Model/ReactBodyParams.md +++ b/docs/Model/ReactBodyParams.md @@ -1,4 +1,4 @@ -# # ReactBodyParams +# ReactBodyParams ## Properties diff --git a/docs/Model/ReactFeedPostResponse.md b/docs/Model/ReactFeedPostResponse.md index d251857..cb2f835 100644 --- a/docs/Model/ReactFeedPostResponse.md +++ b/docs/Model/ReactFeedPostResponse.md @@ -1,4 +1,4 @@ -# # ReactFeedPostResponse +# ReactFeedPostResponse ## Properties diff --git a/docs/Model/RecordStringBeforeStringOrNullAfterStringOrNullValue.md b/docs/Model/RecordStringBeforeStringOrNullAfterStringOrNullValue.md index 7acff4b..d0e97fc 100644 --- a/docs/Model/RecordStringBeforeStringOrNullAfterStringOrNullValue.md +++ b/docs/Model/RecordStringBeforeStringOrNullAfterStringOrNullValue.md @@ -1,4 +1,4 @@ -# # RecordStringBeforeStringOrNullAfterStringOrNullValue +# RecordStringBeforeStringOrNullAfterStringOrNullValue ## Properties diff --git a/docs/Model/RemoveCommentActionResponse.md b/docs/Model/RemoveCommentActionResponse.md index ec50ccc..e48797f 100644 --- a/docs/Model/RemoveCommentActionResponse.md +++ b/docs/Model/RemoveCommentActionResponse.md @@ -1,4 +1,4 @@ -# # RemoveCommentActionResponse +# RemoveCommentActionResponse ## Properties diff --git a/docs/Model/RemoveUserBadgeResponse.md b/docs/Model/RemoveUserBadgeResponse.md index 33d2846..472f8ed 100644 --- a/docs/Model/RemoveUserBadgeResponse.md +++ b/docs/Model/RemoveUserBadgeResponse.md @@ -1,4 +1,4 @@ -# # RemoveUserBadgeResponse +# RemoveUserBadgeResponse ## Properties diff --git a/docs/Model/RenderEmailTemplateBody.md b/docs/Model/RenderEmailTemplateBody.md index 98e4b4e..92cd9d5 100644 --- a/docs/Model/RenderEmailTemplateBody.md +++ b/docs/Model/RenderEmailTemplateBody.md @@ -1,4 +1,4 @@ -# # RenderEmailTemplateBody +# RenderEmailTemplateBody ## Properties diff --git a/docs/Model/RenderEmailTemplateResponse.md b/docs/Model/RenderEmailTemplateResponse.md index 265b153..52be3a2 100644 --- a/docs/Model/RenderEmailTemplateResponse.md +++ b/docs/Model/RenderEmailTemplateResponse.md @@ -1,4 +1,4 @@ -# # RenderEmailTemplateResponse +# RenderEmailTemplateResponse ## Properties diff --git a/docs/Model/RenderableUserNotification.md b/docs/Model/RenderableUserNotification.md index e01b614..eb6b7c6 100644 --- a/docs/Model/RenderableUserNotification.md +++ b/docs/Model/RenderableUserNotification.md @@ -1,4 +1,4 @@ -# # RenderableUserNotification +# RenderableUserNotification ## Properties diff --git a/docs/Model/RepeatCommentCheckIgnoredReason.md b/docs/Model/RepeatCommentCheckIgnoredReason.md index 4121d78..b998227 100644 --- a/docs/Model/RepeatCommentCheckIgnoredReason.md +++ b/docs/Model/RepeatCommentCheckIgnoredReason.md @@ -1,4 +1,4 @@ -# # RepeatCommentCheckIgnoredReason +# RepeatCommentCheckIgnoredReason ## Properties diff --git a/docs/Model/RepeatCommentHandlingAction.md b/docs/Model/RepeatCommentHandlingAction.md index 92f98f6..c7f149d 100644 --- a/docs/Model/RepeatCommentHandlingAction.md +++ b/docs/Model/RepeatCommentHandlingAction.md @@ -1,4 +1,4 @@ -# # RepeatCommentHandlingAction +# RepeatCommentHandlingAction ## Properties diff --git a/docs/Model/ReplaceTenantPackageBody.md b/docs/Model/ReplaceTenantPackageBody.md index 89c66db..f781bf4 100644 --- a/docs/Model/ReplaceTenantPackageBody.md +++ b/docs/Model/ReplaceTenantPackageBody.md @@ -1,4 +1,4 @@ -# # ReplaceTenantPackageBody +# ReplaceTenantPackageBody ## Properties diff --git a/docs/Model/ReplaceTenantUserBody.md b/docs/Model/ReplaceTenantUserBody.md index a7aa860..175eca9 100644 --- a/docs/Model/ReplaceTenantUserBody.md +++ b/docs/Model/ReplaceTenantUserBody.md @@ -1,4 +1,4 @@ -# # ReplaceTenantUserBody +# ReplaceTenantUserBody ## Properties diff --git a/docs/Model/ResetUserNotificationsResponse.md b/docs/Model/ResetUserNotificationsResponse.md index d0e25f4..63d21be 100644 --- a/docs/Model/ResetUserNotificationsResponse.md +++ b/docs/Model/ResetUserNotificationsResponse.md @@ -1,4 +1,4 @@ -# # ResetUserNotificationsResponse +# ResetUserNotificationsResponse ## Properties diff --git a/docs/Model/SORTDIR.md b/docs/Model/SORTDIR.md index a6146f8..2ae954c 100644 --- a/docs/Model/SORTDIR.md +++ b/docs/Model/SORTDIR.md @@ -1,4 +1,4 @@ -# # SORTDIR +# SORTDIR ## Properties diff --git a/docs/Model/SSOSecurityLevel.md b/docs/Model/SSOSecurityLevel.md index 967fb3a..d2677ec 100644 --- a/docs/Model/SSOSecurityLevel.md +++ b/docs/Model/SSOSecurityLevel.md @@ -1,4 +1,4 @@ -# # SSOSecurityLevel +# SSOSecurityLevel ## Properties diff --git a/docs/Model/SaveCommentResponseOptimized.md b/docs/Model/SaveCommentResponseOptimized.md index 9a44ceb..d6094c5 100644 --- a/docs/Model/SaveCommentResponseOptimized.md +++ b/docs/Model/SaveCommentResponseOptimized.md @@ -1,4 +1,4 @@ -# # SaveCommentResponseOptimized +# SaveCommentResponseOptimized ## Properties diff --git a/docs/Model/SaveCommentsBulkResponse.md b/docs/Model/SaveCommentsBulkResponse.md index f9cc2f4..17f6aab 100644 --- a/docs/Model/SaveCommentsBulkResponse.md +++ b/docs/Model/SaveCommentsBulkResponse.md @@ -1,15 +1,15 @@ -# # SaveCommentsBulkResponse +# SaveCommentsBulkResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **status** | [**\FastComments\Client\Model\APIStatus**](APIStatus.md) | | -**comment** | [**\FastComments\Client\Model\APIComment**](APIComment.md) | | -**user** | [**\FastComments\Client\Model\UserSessionInfo**](UserSessionInfo.md) | | +**comment** | [**\FastComments\Client\Model\APIComment**](APIComment.md) | | [optional] +**user** | [**\FastComments\Client\Model\UserSessionInfo**](UserSessionInfo.md) | | [optional] **module_data** | **array** | Construct a type with a set of properties K of type T | [optional] -**reason** | **string** | | -**code** | **string** | | +**reason** | **string** | | [optional] +**code** | **string** | | [optional] **secondary_code** | **string** | | [optional] **banned_until** | **int** | | [optional] **max_character_length** | **int** | | [optional] diff --git a/docs/Model/SaveCommentsResponseWithPresence.md b/docs/Model/SaveCommentsResponseWithPresence.md index 24d6fd2..bbeaa47 100644 --- a/docs/Model/SaveCommentsResponseWithPresence.md +++ b/docs/Model/SaveCommentsResponseWithPresence.md @@ -1,4 +1,4 @@ -# # SaveCommentsResponseWithPresence +# SaveCommentsResponseWithPresence ## Properties diff --git a/docs/Model/SearchUsersResponse.md b/docs/Model/SearchUsersResponse.md index 45475bb..eb05e78 100644 --- a/docs/Model/SearchUsersResponse.md +++ b/docs/Model/SearchUsersResponse.md @@ -1,4 +1,4 @@ -# # SearchUsersResponse +# SearchUsersResponse ## Properties diff --git a/docs/Model/SearchUsersResult.md b/docs/Model/SearchUsersResult.md index 5d86e23..650f509 100644 --- a/docs/Model/SearchUsersResult.md +++ b/docs/Model/SearchUsersResult.md @@ -1,11 +1,11 @@ -# # SearchUsersResult +# SearchUsersResult ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **status** | [**\FastComments\Client\Model\APIStatus**](APIStatus.md) | | -**sections** | [**\FastComments\Client\Model\UserSearchSectionResult[]**](UserSearchSectionResult.md) | | -**users** | [**\FastComments\Client\Model\UserSearchResult[]**](UserSearchResult.md) | | +**sections** | [**\FastComments\Client\Model\UserSearchSectionResult[]**](UserSearchSectionResult.md) | | [optional] +**users** | [**\FastComments\Client\Model\UserSearchResult[]**](UserSearchResult.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/SearchUsersSectionedResponse.md b/docs/Model/SearchUsersSectionedResponse.md index c61d606..24e24cb 100644 --- a/docs/Model/SearchUsersSectionedResponse.md +++ b/docs/Model/SearchUsersSectionedResponse.md @@ -1,4 +1,4 @@ -# # SearchUsersSectionedResponse +# SearchUsersSectionedResponse ## Properties diff --git a/docs/Model/SetCommentApprovedResponse.md b/docs/Model/SetCommentApprovedResponse.md index 1dc95b5..ef149c8 100644 --- a/docs/Model/SetCommentApprovedResponse.md +++ b/docs/Model/SetCommentApprovedResponse.md @@ -1,4 +1,4 @@ -# # SetCommentApprovedResponse +# SetCommentApprovedResponse ## Properties diff --git a/docs/Model/SetCommentTextParams.md b/docs/Model/SetCommentTextParams.md index 9a7d417..1acf620 100644 --- a/docs/Model/SetCommentTextParams.md +++ b/docs/Model/SetCommentTextParams.md @@ -1,4 +1,4 @@ -# # SetCommentTextParams +# SetCommentTextParams ## Properties diff --git a/docs/Model/SetCommentTextResponse.md b/docs/Model/SetCommentTextResponse.md index a5a5908..348e6bf 100644 --- a/docs/Model/SetCommentTextResponse.md +++ b/docs/Model/SetCommentTextResponse.md @@ -1,4 +1,4 @@ -# # SetCommentTextResponse +# SetCommentTextResponse ## Properties diff --git a/docs/Model/SetCommentTextResult.md b/docs/Model/SetCommentTextResult.md index 0696773..397b216 100644 --- a/docs/Model/SetCommentTextResult.md +++ b/docs/Model/SetCommentTextResult.md @@ -1,4 +1,4 @@ -# # SetCommentTextResult +# SetCommentTextResult ## Properties diff --git a/docs/Model/SetUserTrustFactorResponse.md b/docs/Model/SetUserTrustFactorResponse.md index 6473573..e13fd0d 100644 --- a/docs/Model/SetUserTrustFactorResponse.md +++ b/docs/Model/SetUserTrustFactorResponse.md @@ -1,4 +1,4 @@ -# # SetUserTrustFactorResponse +# SetUserTrustFactorResponse ## Properties diff --git a/docs/Model/SizePreset.md b/docs/Model/SizePreset.md index d3d9fa3..8292231 100644 --- a/docs/Model/SizePreset.md +++ b/docs/Model/SizePreset.md @@ -1,4 +1,4 @@ -# # SizePreset +# SizePreset ## Properties diff --git a/docs/Model/SortDirections.md b/docs/Model/SortDirections.md index b183c75..281ac15 100644 --- a/docs/Model/SortDirections.md +++ b/docs/Model/SortDirections.md @@ -1,4 +1,4 @@ -# # SortDirections +# SortDirections ## Properties diff --git a/docs/Model/SpamRule.md b/docs/Model/SpamRule.md index 9d451b5..1f9ef00 100644 --- a/docs/Model/SpamRule.md +++ b/docs/Model/SpamRule.md @@ -1,4 +1,4 @@ -# # SpamRule +# SpamRule ## Properties diff --git a/docs/Model/TOSConfig.md b/docs/Model/TOSConfig.md index fe4387e..07ea2ae 100644 --- a/docs/Model/TOSConfig.md +++ b/docs/Model/TOSConfig.md @@ -1,4 +1,4 @@ -# # TOSConfig +# TOSConfig ## Properties diff --git a/docs/Model/TenantBadge.md b/docs/Model/TenantBadge.md index e735b97..b140771 100644 --- a/docs/Model/TenantBadge.md +++ b/docs/Model/TenantBadge.md @@ -1,4 +1,4 @@ -# # TenantBadge +# TenantBadge ## Properties diff --git a/docs/Model/TenantHashTag.md b/docs/Model/TenantHashTag.md index 3b16c57..426fad3 100644 --- a/docs/Model/TenantHashTag.md +++ b/docs/Model/TenantHashTag.md @@ -1,4 +1,4 @@ -# # TenantHashTag +# TenantHashTag ## Properties diff --git a/docs/Model/TenantPackage.md b/docs/Model/TenantPackage.md index 0acac0a..90ca3d8 100644 --- a/docs/Model/TenantPackage.md +++ b/docs/Model/TenantPackage.md @@ -1,4 +1,4 @@ -# # TenantPackage +# TenantPackage ## Properties diff --git a/docs/Model/UnBlockFromCommentParams.md b/docs/Model/UnBlockFromCommentParams.md index cd32976..3333726 100644 --- a/docs/Model/UnBlockFromCommentParams.md +++ b/docs/Model/UnBlockFromCommentParams.md @@ -1,4 +1,4 @@ -# # UnBlockFromCommentParams +# UnBlockFromCommentParams ## Properties diff --git a/docs/Model/UnblockSuccess.md b/docs/Model/UnblockSuccess.md index 3100dac..c24750f 100644 --- a/docs/Model/UnblockSuccess.md +++ b/docs/Model/UnblockSuccess.md @@ -1,4 +1,4 @@ -# # UnblockSuccess +# UnblockSuccess ## Properties diff --git a/docs/Model/UpdatableCommentParams.md b/docs/Model/UpdatableCommentParams.md index 5967460..489177a 100644 --- a/docs/Model/UpdatableCommentParams.md +++ b/docs/Model/UpdatableCommentParams.md @@ -1,4 +1,4 @@ -# # UpdatableCommentParams +# UpdatableCommentParams ## Properties diff --git a/docs/Model/UpdateAPIPageData.md b/docs/Model/UpdateAPIPageData.md index 89d9dd7..8106a2e 100644 --- a/docs/Model/UpdateAPIPageData.md +++ b/docs/Model/UpdateAPIPageData.md @@ -1,4 +1,4 @@ -# # UpdateAPIPageData +# UpdateAPIPageData ## Properties diff --git a/docs/Model/UpdateAPISSOUserData.md b/docs/Model/UpdateAPISSOUserData.md index c963afa..a652ad7 100644 --- a/docs/Model/UpdateAPISSOUserData.md +++ b/docs/Model/UpdateAPISSOUserData.md @@ -1,4 +1,4 @@ -# # UpdateAPISSOUserData +# UpdateAPISSOUserData ## Properties diff --git a/docs/Model/UpdateAPIUserSubscriptionData.md b/docs/Model/UpdateAPIUserSubscriptionData.md index c5db1e1..99d0210 100644 --- a/docs/Model/UpdateAPIUserSubscriptionData.md +++ b/docs/Model/UpdateAPIUserSubscriptionData.md @@ -1,4 +1,4 @@ -# # UpdateAPIUserSubscriptionData +# UpdateAPIUserSubscriptionData ## Properties diff --git a/docs/Model/UpdateDomainConfigParams.md b/docs/Model/UpdateDomainConfigParams.md index 5fb062e..9b553ad 100644 --- a/docs/Model/UpdateDomainConfigParams.md +++ b/docs/Model/UpdateDomainConfigParams.md @@ -1,4 +1,4 @@ -# # UpdateDomainConfigParams +# UpdateDomainConfigParams ## Properties diff --git a/docs/Model/UpdateEmailTemplateBody.md b/docs/Model/UpdateEmailTemplateBody.md index a6e0b9f..d8abb49 100644 --- a/docs/Model/UpdateEmailTemplateBody.md +++ b/docs/Model/UpdateEmailTemplateBody.md @@ -1,4 +1,4 @@ -# # UpdateEmailTemplateBody +# UpdateEmailTemplateBody ## Properties diff --git a/docs/Model/UpdateFeedPostParams.md b/docs/Model/UpdateFeedPostParams.md index 63e570d..0176658 100644 --- a/docs/Model/UpdateFeedPostParams.md +++ b/docs/Model/UpdateFeedPostParams.md @@ -1,4 +1,4 @@ -# # UpdateFeedPostParams +# UpdateFeedPostParams ## Properties diff --git a/docs/Model/UpdateHashTagBody.md b/docs/Model/UpdateHashTagBody.md index 873ad4e..3de5d65 100644 --- a/docs/Model/UpdateHashTagBody.md +++ b/docs/Model/UpdateHashTagBody.md @@ -1,4 +1,4 @@ -# # UpdateHashTagBody +# UpdateHashTagBody ## Properties diff --git a/docs/Model/UpdateHashTagResponse.md b/docs/Model/UpdateHashTagResponse.md index a30955e..c8c34c2 100644 --- a/docs/Model/UpdateHashTagResponse.md +++ b/docs/Model/UpdateHashTagResponse.md @@ -1,4 +1,4 @@ -# # UpdateHashTagResponse +# UpdateHashTagResponse ## Properties diff --git a/docs/Model/UpdateModeratorBody.md b/docs/Model/UpdateModeratorBody.md index f7fee47..7516bcb 100644 --- a/docs/Model/UpdateModeratorBody.md +++ b/docs/Model/UpdateModeratorBody.md @@ -1,4 +1,4 @@ -# # UpdateModeratorBody +# UpdateModeratorBody ## Properties diff --git a/docs/Model/UpdateNotificationBody.md b/docs/Model/UpdateNotificationBody.md index 20682ab..e6fc7b5 100644 --- a/docs/Model/UpdateNotificationBody.md +++ b/docs/Model/UpdateNotificationBody.md @@ -1,4 +1,4 @@ -# # UpdateNotificationBody +# UpdateNotificationBody ## Properties diff --git a/docs/Model/UpdateQuestionConfigBody.md b/docs/Model/UpdateQuestionConfigBody.md index cf3faa4..0d06dcc 100644 --- a/docs/Model/UpdateQuestionConfigBody.md +++ b/docs/Model/UpdateQuestionConfigBody.md @@ -1,4 +1,4 @@ -# # UpdateQuestionConfigBody +# UpdateQuestionConfigBody ## Properties diff --git a/docs/Model/UpdateQuestionResultBody.md b/docs/Model/UpdateQuestionResultBody.md index f974f45..d5c97a1 100644 --- a/docs/Model/UpdateQuestionResultBody.md +++ b/docs/Model/UpdateQuestionResultBody.md @@ -1,4 +1,4 @@ -# # UpdateQuestionResultBody +# UpdateQuestionResultBody ## Properties diff --git a/docs/Model/UpdateSubscriptionAPIResponse.md b/docs/Model/UpdateSubscriptionAPIResponse.md index 019a68d..4f80c78 100644 --- a/docs/Model/UpdateSubscriptionAPIResponse.md +++ b/docs/Model/UpdateSubscriptionAPIResponse.md @@ -1,4 +1,4 @@ -# # UpdateSubscriptionAPIResponse +# UpdateSubscriptionAPIResponse ## Properties diff --git a/docs/Model/UpdateTenantBody.md b/docs/Model/UpdateTenantBody.md index e096ba3..80db5d1 100644 --- a/docs/Model/UpdateTenantBody.md +++ b/docs/Model/UpdateTenantBody.md @@ -1,4 +1,4 @@ -# # UpdateTenantBody +# UpdateTenantBody ## Properties diff --git a/docs/Model/UpdateTenantPackageBody.md b/docs/Model/UpdateTenantPackageBody.md index 4f07230..2ddb6e9 100644 --- a/docs/Model/UpdateTenantPackageBody.md +++ b/docs/Model/UpdateTenantPackageBody.md @@ -1,4 +1,4 @@ -# # UpdateTenantPackageBody +# UpdateTenantPackageBody ## Properties diff --git a/docs/Model/UpdateTenantUserBody.md b/docs/Model/UpdateTenantUserBody.md index 05ee508..f89adc7 100644 --- a/docs/Model/UpdateTenantUserBody.md +++ b/docs/Model/UpdateTenantUserBody.md @@ -1,4 +1,4 @@ -# # UpdateTenantUserBody +# UpdateTenantUserBody ## Properties diff --git a/docs/Model/UpdateUserBadgeParams.md b/docs/Model/UpdateUserBadgeParams.md index d91c907..97dcfb0 100644 --- a/docs/Model/UpdateUserBadgeParams.md +++ b/docs/Model/UpdateUserBadgeParams.md @@ -1,4 +1,4 @@ -# # UpdateUserBadgeParams +# UpdateUserBadgeParams ## Properties diff --git a/docs/Model/UpdateUserNotificationCommentSubscriptionStatusResponse.md b/docs/Model/UpdateUserNotificationCommentSubscriptionStatusResponse.md index d2056b4..0a3e895 100644 --- a/docs/Model/UpdateUserNotificationCommentSubscriptionStatusResponse.md +++ b/docs/Model/UpdateUserNotificationCommentSubscriptionStatusResponse.md @@ -1,12 +1,12 @@ -# # UpdateUserNotificationCommentSubscriptionStatusResponse +# UpdateUserNotificationCommentSubscriptionStatusResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **status** | [**\FastComments\Client\Model\APIStatus**](APIStatus.md) | | -**matched_count** | **int** | | -**modified_count** | **int** | | -**note** | **string** | | +**matched_count** | **int** | | [optional] +**modified_count** | **int** | | [optional] +**note** | **string** | | [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/UpdateUserNotificationPageSubscriptionStatusResponse.md b/docs/Model/UpdateUserNotificationPageSubscriptionStatusResponse.md index d109c6e..3bea574 100644 --- a/docs/Model/UpdateUserNotificationPageSubscriptionStatusResponse.md +++ b/docs/Model/UpdateUserNotificationPageSubscriptionStatusResponse.md @@ -1,12 +1,12 @@ -# # UpdateUserNotificationPageSubscriptionStatusResponse +# UpdateUserNotificationPageSubscriptionStatusResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **status** | [**\FastComments\Client\Model\APIStatus**](APIStatus.md) | | -**matched_count** | **int** | | -**modified_count** | **int** | | -**note** | **string** | | +**matched_count** | **int** | | [optional] +**modified_count** | **int** | | [optional] +**note** | **string** | | [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/UpdateUserNotificationStatusResponse.md b/docs/Model/UpdateUserNotificationStatusResponse.md index 00dbf70..231e35d 100644 --- a/docs/Model/UpdateUserNotificationStatusResponse.md +++ b/docs/Model/UpdateUserNotificationStatusResponse.md @@ -1,12 +1,12 @@ -# # UpdateUserNotificationStatusResponse +# UpdateUserNotificationStatusResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **status** | [**\FastComments\Client\Model\APIStatus**](APIStatus.md) | | -**matched_count** | **int** | | -**modified_count** | **int** | | -**note** | **string** | | +**matched_count** | **int** | | [optional] +**modified_count** | **int** | | [optional] +**note** | **string** | | [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/UploadImageResponse.md b/docs/Model/UploadImageResponse.md index deac348..f5f7c4e 100644 --- a/docs/Model/UploadImageResponse.md +++ b/docs/Model/UploadImageResponse.md @@ -1,4 +1,4 @@ -# # UploadImageResponse +# UploadImageResponse ## Properties diff --git a/docs/Model/User.md b/docs/Model/User.md index 39d619f..fd2837f 100644 --- a/docs/Model/User.md +++ b/docs/Model/User.md @@ -1,4 +1,4 @@ -# # User +# User ## Properties diff --git a/docs/Model/UserBadge.md b/docs/Model/UserBadge.md index 9897c17..76f03ac 100644 --- a/docs/Model/UserBadge.md +++ b/docs/Model/UserBadge.md @@ -1,4 +1,4 @@ -# # UserBadge +# UserBadge ## Properties diff --git a/docs/Model/UserBadgeProgress.md b/docs/Model/UserBadgeProgress.md index fe2bb2e..589d34c 100644 --- a/docs/Model/UserBadgeProgress.md +++ b/docs/Model/UserBadgeProgress.md @@ -1,4 +1,4 @@ -# # UserBadgeProgress +# UserBadgeProgress ## Properties diff --git a/docs/Model/UserNotification.md b/docs/Model/UserNotification.md index d1d3f94..b453489 100644 --- a/docs/Model/UserNotification.md +++ b/docs/Model/UserNotification.md @@ -1,4 +1,4 @@ -# # UserNotification +# UserNotification ## Properties diff --git a/docs/Model/UserNotificationCount.md b/docs/Model/UserNotificationCount.md index 1fc6055..710d4fa 100644 --- a/docs/Model/UserNotificationCount.md +++ b/docs/Model/UserNotificationCount.md @@ -1,4 +1,4 @@ -# # UserNotificationCount +# UserNotificationCount ## Properties diff --git a/docs/Model/UserNotificationWriteResponse.md b/docs/Model/UserNotificationWriteResponse.md index 6ee7126..f469f90 100644 --- a/docs/Model/UserNotificationWriteResponse.md +++ b/docs/Model/UserNotificationWriteResponse.md @@ -1,4 +1,4 @@ -# # UserNotificationWriteResponse +# UserNotificationWriteResponse ## Properties diff --git a/docs/Model/UserPresenceData.md b/docs/Model/UserPresenceData.md index 8bc89e8..0499fb5 100644 --- a/docs/Model/UserPresenceData.md +++ b/docs/Model/UserPresenceData.md @@ -1,4 +1,4 @@ -# # UserPresenceData +# UserPresenceData ## Properties diff --git a/docs/Model/UserReactsResponse.md b/docs/Model/UserReactsResponse.md index 96b0069..b4d7cc6 100644 --- a/docs/Model/UserReactsResponse.md +++ b/docs/Model/UserReactsResponse.md @@ -1,4 +1,4 @@ -# # UserReactsResponse +# UserReactsResponse ## Properties diff --git a/docs/Model/UserSearchResult.md b/docs/Model/UserSearchResult.md index 396449d..c9ed2f8 100644 --- a/docs/Model/UserSearchResult.md +++ b/docs/Model/UserSearchResult.md @@ -1,4 +1,4 @@ -# # UserSearchResult +# UserSearchResult ## Properties diff --git a/docs/Model/UserSearchSection.md b/docs/Model/UserSearchSection.md index 0c822cc..bbe7c42 100644 --- a/docs/Model/UserSearchSection.md +++ b/docs/Model/UserSearchSection.md @@ -1,4 +1,4 @@ -# # UserSearchSection +# UserSearchSection ## Properties diff --git a/docs/Model/UserSearchSectionResult.md b/docs/Model/UserSearchSectionResult.md index f878536..3242471 100644 --- a/docs/Model/UserSearchSectionResult.md +++ b/docs/Model/UserSearchSectionResult.md @@ -1,4 +1,4 @@ -# # UserSearchSectionResult +# UserSearchSectionResult ## Properties diff --git a/docs/Model/UserSessionInfo.md b/docs/Model/UserSessionInfo.md index 86e212e..36e9005 100644 --- a/docs/Model/UserSessionInfo.md +++ b/docs/Model/UserSessionInfo.md @@ -1,4 +1,4 @@ -# # UserSessionInfo +# UserSessionInfo ## Properties diff --git a/docs/Model/UsersListLocation.md b/docs/Model/UsersListLocation.md index 85396d0..e7301b4 100644 --- a/docs/Model/UsersListLocation.md +++ b/docs/Model/UsersListLocation.md @@ -1,4 +1,4 @@ -# # UsersListLocation +# UsersListLocation ## Properties diff --git a/docs/Model/VoteBodyParams.md b/docs/Model/VoteBodyParams.md index 1ce3530..8b51b6b 100644 --- a/docs/Model/VoteBodyParams.md +++ b/docs/Model/VoteBodyParams.md @@ -1,4 +1,4 @@ -# # VoteBodyParams +# VoteBodyParams ## Properties diff --git a/docs/Model/VoteDeleteResponse.md b/docs/Model/VoteDeleteResponse.md index 4e9eed9..bf3ae43 100644 --- a/docs/Model/VoteDeleteResponse.md +++ b/docs/Model/VoteDeleteResponse.md @@ -1,4 +1,4 @@ -# # VoteDeleteResponse +# VoteDeleteResponse ## Properties diff --git a/docs/Model/VoteResponse.md b/docs/Model/VoteResponse.md index 829c5fb..02e2873 100644 --- a/docs/Model/VoteResponse.md +++ b/docs/Model/VoteResponse.md @@ -1,10 +1,10 @@ -# # VoteResponse +# VoteResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**status** | [**\FastComments\Client\Model\VoteResponseStatus**](VoteResponseStatus.md) | | +**status** | **string** | | **vote_id** | **string** | | [optional] **is_verified** | **bool** | | [optional] **user** | [**\FastComments\Client\Model\VoteResponseUser**](VoteResponseUser.md) | | [optional] diff --git a/docs/Model/VoteResponseStatus.md b/docs/Model/VoteResponseStatus.md deleted file mode 100644 index 3716b9e..0000000 --- a/docs/Model/VoteResponseStatus.md +++ /dev/null @@ -1,8 +0,0 @@ -# # VoteResponseStatus - -## 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/VoteResponseUser.md b/docs/Model/VoteResponseUser.md index 1c36519..646e2a9 100644 --- a/docs/Model/VoteResponseUser.md +++ b/docs/Model/VoteResponseUser.md @@ -1,4 +1,4 @@ -# # VoteResponseUser +# VoteResponseUser ## Properties diff --git a/docs/Model/VoteStyle.md b/docs/Model/VoteStyle.md index f04a96b..0b56d75 100644 --- a/docs/Model/VoteStyle.md +++ b/docs/Model/VoteStyle.md @@ -1,4 +1,4 @@ -# # VoteStyle +# VoteStyle ## Properties diff --git a/lib/Api/DefaultApi.php b/lib/Api/DefaultApi.php index 05dce97..cd82a8d 100644 --- a/lib/Api/DefaultApi.php +++ b/lib/Api/DefaultApi.php @@ -1,7 +1,7 @@ addDomainConfigWithHttpInfo($tenant_id, $add_domain_config_params, $contentType); + list($response) = $this->addDomainConfigWithHttpInfo($tenant_id, $add_domain_config_params); return $response; } @@ -494,9 +497,9 @@ public function addDomainConfig($tenant_id, $add_domain_config_params, string $c * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\AddDomainConfigResponse, HTTP status code, HTTP response headers (array of strings) */ - public function addDomainConfigWithHttpInfo($tenant_id, $add_domain_config_params, string $contentType = self::contentTypes['addDomainConfig'][0]) + public function addDomainConfigWithHttpInfo($tenant_id, $add_domain_config_params) { - $request = $this->addDomainConfigRequest($tenant_id, $add_domain_config_params, $contentType); + $request = $this->addDomainConfigRequest($tenant_id, $add_domain_config_params); try { $options = $this->createHttpClientOption(); @@ -523,34 +526,15 @@ public function addDomainConfigWithHttpInfo($tenant_id, $add_domain_config_param switch($statusCode) { case 200: - if ('\FastComments\Client\Model\AddDomainConfigResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\AddDomainConfigResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\AddDomainConfigResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\AddDomainConfigResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -564,34 +548,11 @@ public function addDomainConfigWithHttpInfo($tenant_id, $add_domain_config_param ); } - $returnType = '\FastComments\Client\Model\AddDomainConfigResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\AddDomainConfigResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -601,8 +562,10 @@ public function addDomainConfigWithHttpInfo($tenant_id, $add_domain_config_param $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -619,9 +582,9 @@ public function addDomainConfigWithHttpInfo($tenant_id, $add_domain_config_param * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addDomainConfigAsync($tenant_id, $add_domain_config_params, string $contentType = self::contentTypes['addDomainConfig'][0]) + public function addDomainConfigAsync($tenant_id, $add_domain_config_params) { - return $this->addDomainConfigAsyncWithHttpInfo($tenant_id, $add_domain_config_params, $contentType) + return $this->addDomainConfigAsyncWithHttpInfo($tenant_id, $add_domain_config_params) ->then( function ($response) { return $response[0]; @@ -641,10 +604,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addDomainConfigAsyncWithHttpInfo($tenant_id, $add_domain_config_params, string $contentType = self::contentTypes['addDomainConfig'][0]) + public function addDomainConfigAsyncWithHttpInfo($tenant_id, $add_domain_config_params) { $returnType = '\FastComments\Client\Model\AddDomainConfigResponse'; - $request = $this->addDomainConfigRequest($tenant_id, $add_domain_config_params, $contentType); + $request = $this->addDomainConfigRequest($tenant_id, $add_domain_config_params); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -692,9 +655,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function addDomainConfigRequest($tenant_id, $add_domain_config_params, string $contentType = self::contentTypes['addDomainConfig'][0]) + public function addDomainConfigRequest($tenant_id, $add_domain_config_params) { - + $contentType = self::contentTypes['addDomainConfig'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -800,7 +764,7 @@ public function addDomainConfigRequest($tenant_id, $add_domain_config_params, st * * FastComments PHP API Client - A SDK for interacting with the FastComments API * - * @param string|null $tenant_id tenant_id (optional) + * @param string $tenant_id tenant_id (required) * @param \FastComments\Client\Model\CreateHashTagBody|null $create_hash_tag_body create_hash_tag_body (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['addHashTag'] to see the possible values for this operation * @@ -808,9 +772,9 @@ public function addDomainConfigRequest($tenant_id, $add_domain_config_params, st * @throws \InvalidArgumentException * @return \FastComments\Client\Model\CreateHashTagResponse|\FastComments\Client\Model\APIError */ - public function addHashTag($tenant_id = null, $create_hash_tag_body = null, string $contentType = self::contentTypes['addHashTag'][0]) + public function addHashTag($tenant_id, $create_hash_tag_body = null) { - list($response) = $this->addHashTagWithHttpInfo($tenant_id, $create_hash_tag_body, $contentType); + list($response) = $this->addHashTagWithHttpInfo($tenant_id, $create_hash_tag_body); return $response; } @@ -819,7 +783,7 @@ public function addHashTag($tenant_id = null, $create_hash_tag_body = null, stri * * FastComments PHP API Client - A SDK for interacting with the FastComments API * - * @param string|null $tenant_id (optional) + * @param string $tenant_id (required) * @param \FastComments\Client\Model\CreateHashTagBody|null $create_hash_tag_body (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['addHashTag'] to see the possible values for this operation * @@ -827,9 +791,9 @@ public function addHashTag($tenant_id = null, $create_hash_tag_body = null, stri * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\CreateHashTagResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function addHashTagWithHttpInfo($tenant_id = null, $create_hash_tag_body = null, string $contentType = self::contentTypes['addHashTag'][0]) + public function addHashTagWithHttpInfo($tenant_id, $create_hash_tag_body = null) { - $request = $this->addHashTagRequest($tenant_id, $create_hash_tag_body, $contentType); + $request = $this->addHashTagRequest($tenant_id, $create_hash_tag_body); try { $options = $this->createHttpClientOption(); @@ -856,61 +820,21 @@ public function addHashTagWithHttpInfo($tenant_id = null, $create_hash_tag_body switch($statusCode) { case 200: - if ('\FastComments\Client\Model\CreateHashTagResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\CreateHashTagResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\CreateHashTagResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\CreateHashTagResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -924,34 +848,11 @@ public function addHashTagWithHttpInfo($tenant_id = null, $create_hash_tag_body ); } - $returnType = '\FastComments\Client\Model\CreateHashTagResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\CreateHashTagResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -961,7 +862,7 @@ public function addHashTagWithHttpInfo($tenant_id = null, $create_hash_tag_body $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -969,8 +870,10 @@ public function addHashTagWithHttpInfo($tenant_id = null, $create_hash_tag_body $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -980,16 +883,16 @@ public function addHashTagWithHttpInfo($tenant_id = null, $create_hash_tag_body * * FastComments PHP API Client - A SDK for interacting with the FastComments API * - * @param string|null $tenant_id (optional) + * @param string $tenant_id (required) * @param \FastComments\Client\Model\CreateHashTagBody|null $create_hash_tag_body (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['addHashTag'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addHashTagAsync($tenant_id = null, $create_hash_tag_body = null, string $contentType = self::contentTypes['addHashTag'][0]) + public function addHashTagAsync($tenant_id, $create_hash_tag_body = null) { - return $this->addHashTagAsyncWithHttpInfo($tenant_id, $create_hash_tag_body, $contentType) + return $this->addHashTagAsyncWithHttpInfo($tenant_id, $create_hash_tag_body) ->then( function ($response) { return $response[0]; @@ -1002,17 +905,17 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * - * @param string|null $tenant_id (optional) + * @param string $tenant_id (required) * @param \FastComments\Client\Model\CreateHashTagBody|null $create_hash_tag_body (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['addHashTag'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addHashTagAsyncWithHttpInfo($tenant_id = null, $create_hash_tag_body = null, string $contentType = self::contentTypes['addHashTag'][0]) + public function addHashTagAsyncWithHttpInfo($tenant_id, $create_hash_tag_body = null) { $returnType = '\FastComments\Client\Model\CreateHashTagResponse'; - $request = $this->addHashTagRequest($tenant_id, $create_hash_tag_body, $contentType); + $request = $this->addHashTagRequest($tenant_id, $create_hash_tag_body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1053,16 +956,23 @@ function ($exception) { /** * Create request for operation 'addHashTag' * - * @param string|null $tenant_id (optional) + * @param string $tenant_id (required) * @param \FastComments\Client\Model\CreateHashTagBody|null $create_hash_tag_body (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['addHashTag'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function addHashTagRequest($tenant_id = null, $create_hash_tag_body = null, string $contentType = self::contentTypes['addHashTag'][0]) + public function addHashTagRequest($tenant_id, $create_hash_tag_body = null) { - + $contentType = self::contentTypes['addHashTag'][0]; + + // verify the required parameter 'tenant_id' is set + if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $tenant_id when calling addHashTag' + ); + } @@ -1080,7 +990,7 @@ public function addHashTagRequest($tenant_id = null, $create_hash_tag_body = nul 'string', // openApiType 'form', // style true, // explode - false // required + true // required ) ?? []); @@ -1156,7 +1066,7 @@ public function addHashTagRequest($tenant_id = null, $create_hash_tag_body = nul * * FastComments PHP API Client - A SDK for interacting with the FastComments API * - * @param string|null $tenant_id tenant_id (optional) + * @param string $tenant_id tenant_id (required) * @param \FastComments\Client\Model\BulkCreateHashTagsBody|null $bulk_create_hash_tags_body bulk_create_hash_tags_body (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['addHashTagsBulk'] to see the possible values for this operation * @@ -1164,9 +1074,9 @@ public function addHashTagRequest($tenant_id = null, $create_hash_tag_body = nul * @throws \InvalidArgumentException * @return \FastComments\Client\Model\BulkCreateHashTagsResponse|\FastComments\Client\Model\APIError */ - public function addHashTagsBulk($tenant_id = null, $bulk_create_hash_tags_body = null, string $contentType = self::contentTypes['addHashTagsBulk'][0]) + public function addHashTagsBulk($tenant_id, $bulk_create_hash_tags_body = null) { - list($response) = $this->addHashTagsBulkWithHttpInfo($tenant_id, $bulk_create_hash_tags_body, $contentType); + list($response) = $this->addHashTagsBulkWithHttpInfo($tenant_id, $bulk_create_hash_tags_body); return $response; } @@ -1175,7 +1085,7 @@ public function addHashTagsBulk($tenant_id = null, $bulk_create_hash_tags_body = * * FastComments PHP API Client - A SDK for interacting with the FastComments API * - * @param string|null $tenant_id (optional) + * @param string $tenant_id (required) * @param \FastComments\Client\Model\BulkCreateHashTagsBody|null $bulk_create_hash_tags_body (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['addHashTagsBulk'] to see the possible values for this operation * @@ -1183,9 +1093,9 @@ public function addHashTagsBulk($tenant_id = null, $bulk_create_hash_tags_body = * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\BulkCreateHashTagsResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function addHashTagsBulkWithHttpInfo($tenant_id = null, $bulk_create_hash_tags_body = null, string $contentType = self::contentTypes['addHashTagsBulk'][0]) + public function addHashTagsBulkWithHttpInfo($tenant_id, $bulk_create_hash_tags_body = null) { - $request = $this->addHashTagsBulkRequest($tenant_id, $bulk_create_hash_tags_body, $contentType); + $request = $this->addHashTagsBulkRequest($tenant_id, $bulk_create_hash_tags_body); try { $options = $this->createHttpClientOption(); @@ -1212,61 +1122,21 @@ public function addHashTagsBulkWithHttpInfo($tenant_id = null, $bulk_create_hash switch($statusCode) { case 200: - if ('\FastComments\Client\Model\BulkCreateHashTagsResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\BulkCreateHashTagsResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\BulkCreateHashTagsResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\BulkCreateHashTagsResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -1280,34 +1150,11 @@ public function addHashTagsBulkWithHttpInfo($tenant_id = null, $bulk_create_hash ); } - $returnType = '\FastComments\Client\Model\BulkCreateHashTagsResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\BulkCreateHashTagsResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1317,7 +1164,7 @@ public function addHashTagsBulkWithHttpInfo($tenant_id = null, $bulk_create_hash $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1325,8 +1172,10 @@ public function addHashTagsBulkWithHttpInfo($tenant_id = null, $bulk_create_hash $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -1336,16 +1185,16 @@ public function addHashTagsBulkWithHttpInfo($tenant_id = null, $bulk_create_hash * * FastComments PHP API Client - A SDK for interacting with the FastComments API * - * @param string|null $tenant_id (optional) + * @param string $tenant_id (required) * @param \FastComments\Client\Model\BulkCreateHashTagsBody|null $bulk_create_hash_tags_body (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['addHashTagsBulk'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addHashTagsBulkAsync($tenant_id = null, $bulk_create_hash_tags_body = null, string $contentType = self::contentTypes['addHashTagsBulk'][0]) + public function addHashTagsBulkAsync($tenant_id, $bulk_create_hash_tags_body = null) { - return $this->addHashTagsBulkAsyncWithHttpInfo($tenant_id, $bulk_create_hash_tags_body, $contentType) + return $this->addHashTagsBulkAsyncWithHttpInfo($tenant_id, $bulk_create_hash_tags_body) ->then( function ($response) { return $response[0]; @@ -1358,17 +1207,17 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * - * @param string|null $tenant_id (optional) + * @param string $tenant_id (required) * @param \FastComments\Client\Model\BulkCreateHashTagsBody|null $bulk_create_hash_tags_body (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['addHashTagsBulk'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addHashTagsBulkAsyncWithHttpInfo($tenant_id = null, $bulk_create_hash_tags_body = null, string $contentType = self::contentTypes['addHashTagsBulk'][0]) + public function addHashTagsBulkAsyncWithHttpInfo($tenant_id, $bulk_create_hash_tags_body = null) { $returnType = '\FastComments\Client\Model\BulkCreateHashTagsResponse'; - $request = $this->addHashTagsBulkRequest($tenant_id, $bulk_create_hash_tags_body, $contentType); + $request = $this->addHashTagsBulkRequest($tenant_id, $bulk_create_hash_tags_body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1409,16 +1258,23 @@ function ($exception) { /** * Create request for operation 'addHashTagsBulk' * - * @param string|null $tenant_id (optional) + * @param string $tenant_id (required) * @param \FastComments\Client\Model\BulkCreateHashTagsBody|null $bulk_create_hash_tags_body (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['addHashTagsBulk'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function addHashTagsBulkRequest($tenant_id = null, $bulk_create_hash_tags_body = null, string $contentType = self::contentTypes['addHashTagsBulk'][0]) + public function addHashTagsBulkRequest($tenant_id, $bulk_create_hash_tags_body = null) { - + $contentType = self::contentTypes['addHashTagsBulk'][0]; + + // verify the required parameter 'tenant_id' is set + if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $tenant_id when calling addHashTagsBulk' + ); + } @@ -1436,7 +1292,7 @@ public function addHashTagsBulkRequest($tenant_id = null, $bulk_create_hash_tags 'string', // openApiType 'form', // style true, // explode - false // required + true // required ) ?? []); @@ -1520,9 +1376,9 @@ public function addHashTagsBulkRequest($tenant_id = null, $bulk_create_hash_tags * @throws \InvalidArgumentException * @return \FastComments\Client\Model\AddPageAPIResponse */ - public function addPage($tenant_id, $create_api_page_data, string $contentType = self::contentTypes['addPage'][0]) + public function addPage($tenant_id, $create_api_page_data) { - list($response) = $this->addPageWithHttpInfo($tenant_id, $create_api_page_data, $contentType); + list($response) = $this->addPageWithHttpInfo($tenant_id, $create_api_page_data); return $response; } @@ -1539,9 +1395,9 @@ public function addPage($tenant_id, $create_api_page_data, string $contentType = * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\AddPageAPIResponse, HTTP status code, HTTP response headers (array of strings) */ - public function addPageWithHttpInfo($tenant_id, $create_api_page_data, string $contentType = self::contentTypes['addPage'][0]) + public function addPageWithHttpInfo($tenant_id, $create_api_page_data) { - $request = $this->addPageRequest($tenant_id, $create_api_page_data, $contentType); + $request = $this->addPageRequest($tenant_id, $create_api_page_data); try { $options = $this->createHttpClientOption(); @@ -1568,34 +1424,15 @@ public function addPageWithHttpInfo($tenant_id, $create_api_page_data, string $c switch($statusCode) { case 200: - if ('\FastComments\Client\Model\AddPageAPIResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\AddPageAPIResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\AddPageAPIResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\AddPageAPIResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -1609,34 +1446,11 @@ public function addPageWithHttpInfo($tenant_id, $create_api_page_data, string $c ); } - $returnType = '\FastComments\Client\Model\AddPageAPIResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\AddPageAPIResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1646,8 +1460,10 @@ public function addPageWithHttpInfo($tenant_id, $create_api_page_data, string $c $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -1664,9 +1480,9 @@ public function addPageWithHttpInfo($tenant_id, $create_api_page_data, string $c * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addPageAsync($tenant_id, $create_api_page_data, string $contentType = self::contentTypes['addPage'][0]) + public function addPageAsync($tenant_id, $create_api_page_data) { - return $this->addPageAsyncWithHttpInfo($tenant_id, $create_api_page_data, $contentType) + return $this->addPageAsyncWithHttpInfo($tenant_id, $create_api_page_data) ->then( function ($response) { return $response[0]; @@ -1686,10 +1502,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addPageAsyncWithHttpInfo($tenant_id, $create_api_page_data, string $contentType = self::contentTypes['addPage'][0]) + public function addPageAsyncWithHttpInfo($tenant_id, $create_api_page_data) { $returnType = '\FastComments\Client\Model\AddPageAPIResponse'; - $request = $this->addPageRequest($tenant_id, $create_api_page_data, $contentType); + $request = $this->addPageRequest($tenant_id, $create_api_page_data); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1737,9 +1553,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function addPageRequest($tenant_id, $create_api_page_data, string $contentType = self::contentTypes['addPage'][0]) + public function addPageRequest($tenant_id, $create_api_page_data) { - + $contentType = self::contentTypes['addPage'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -1853,9 +1670,9 @@ public function addPageRequest($tenant_id, $create_api_page_data, string $conten * @throws \InvalidArgumentException * @return \FastComments\Client\Model\AddSSOUserAPIResponse */ - public function addSSOUser($tenant_id, $create_apisso_user_data, string $contentType = self::contentTypes['addSSOUser'][0]) + public function addSSOUser($tenant_id, $create_apisso_user_data) { - list($response) = $this->addSSOUserWithHttpInfo($tenant_id, $create_apisso_user_data, $contentType); + list($response) = $this->addSSOUserWithHttpInfo($tenant_id, $create_apisso_user_data); return $response; } @@ -1872,9 +1689,9 @@ public function addSSOUser($tenant_id, $create_apisso_user_data, string $content * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\AddSSOUserAPIResponse, HTTP status code, HTTP response headers (array of strings) */ - public function addSSOUserWithHttpInfo($tenant_id, $create_apisso_user_data, string $contentType = self::contentTypes['addSSOUser'][0]) + public function addSSOUserWithHttpInfo($tenant_id, $create_apisso_user_data) { - $request = $this->addSSOUserRequest($tenant_id, $create_apisso_user_data, $contentType); + $request = $this->addSSOUserRequest($tenant_id, $create_apisso_user_data); try { $options = $this->createHttpClientOption(); @@ -1901,34 +1718,15 @@ public function addSSOUserWithHttpInfo($tenant_id, $create_apisso_user_data, str switch($statusCode) { case 200: - if ('\FastComments\Client\Model\AddSSOUserAPIResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\AddSSOUserAPIResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\AddSSOUserAPIResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\AddSSOUserAPIResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -1942,34 +1740,11 @@ public function addSSOUserWithHttpInfo($tenant_id, $create_apisso_user_data, str ); } - $returnType = '\FastComments\Client\Model\AddSSOUserAPIResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\AddSSOUserAPIResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1979,8 +1754,10 @@ public function addSSOUserWithHttpInfo($tenant_id, $create_apisso_user_data, str $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -1997,9 +1774,9 @@ public function addSSOUserWithHttpInfo($tenant_id, $create_apisso_user_data, str * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addSSOUserAsync($tenant_id, $create_apisso_user_data, string $contentType = self::contentTypes['addSSOUser'][0]) + public function addSSOUserAsync($tenant_id, $create_apisso_user_data) { - return $this->addSSOUserAsyncWithHttpInfo($tenant_id, $create_apisso_user_data, $contentType) + return $this->addSSOUserAsyncWithHttpInfo($tenant_id, $create_apisso_user_data) ->then( function ($response) { return $response[0]; @@ -2019,10 +1796,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addSSOUserAsyncWithHttpInfo($tenant_id, $create_apisso_user_data, string $contentType = self::contentTypes['addSSOUser'][0]) + public function addSSOUserAsyncWithHttpInfo($tenant_id, $create_apisso_user_data) { $returnType = '\FastComments\Client\Model\AddSSOUserAPIResponse'; - $request = $this->addSSOUserRequest($tenant_id, $create_apisso_user_data, $contentType); + $request = $this->addSSOUserRequest($tenant_id, $create_apisso_user_data); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2070,9 +1847,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function addSSOUserRequest($tenant_id, $create_apisso_user_data, string $contentType = self::contentTypes['addSSOUser'][0]) + public function addSSOUserRequest($tenant_id, $create_apisso_user_data) { - + $contentType = self::contentTypes['addSSOUser'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -2178,6 +1956,8 @@ public function addSSOUserRequest($tenant_id, $create_apisso_user_data, string $ * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param \FastComments\Client\Model\AggregationRequest $aggregation_request aggregation_request (required) * @param string|null $parent_tenant_id parent_tenant_id (optional) @@ -2188,9 +1968,9 @@ public function addSSOUserRequest($tenant_id, $create_apisso_user_data, string $ * @throws \InvalidArgumentException * @return \FastComments\Client\Model\AggregateResponse */ - public function aggregate($tenant_id, $aggregation_request, $parent_tenant_id = null, $include_stats = null, string $contentType = self::contentTypes['aggregate'][0]) + public function aggregate($tenant_id, $aggregation_request, array $options = []) { - list($response) = $this->aggregateWithHttpInfo($tenant_id, $aggregation_request, $parent_tenant_id, $include_stats, $contentType); + list($response) = $this->aggregateWithHttpInfo($tenant_id, $aggregation_request, $options); return $response; } @@ -2199,6 +1979,8 @@ public function aggregate($tenant_id, $aggregation_request, $parent_tenant_id = * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param \FastComments\Client\Model\AggregationRequest $aggregation_request (required) * @param string|null $parent_tenant_id (optional) @@ -2209,9 +1991,9 @@ public function aggregate($tenant_id, $aggregation_request, $parent_tenant_id = * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\AggregateResponse, HTTP status code, HTTP response headers (array of strings) */ - public function aggregateWithHttpInfo($tenant_id, $aggregation_request, $parent_tenant_id = null, $include_stats = null, string $contentType = self::contentTypes['aggregate'][0]) + public function aggregateWithHttpInfo($tenant_id, $aggregation_request, array $options = []) { - $request = $this->aggregateRequest($tenant_id, $aggregation_request, $parent_tenant_id, $include_stats, $contentType); + $request = $this->aggregateRequest($tenant_id, $aggregation_request, $options); try { $options = $this->createHttpClientOption(); @@ -2238,34 +2020,15 @@ public function aggregateWithHttpInfo($tenant_id, $aggregation_request, $parent_ switch($statusCode) { case 200: - if ('\FastComments\Client\Model\AggregateResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\AggregateResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\AggregateResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\AggregateResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -2279,34 +2042,11 @@ public function aggregateWithHttpInfo($tenant_id, $aggregation_request, $parent_ ); } - $returnType = '\FastComments\Client\Model\AggregateResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\AggregateResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2316,8 +2056,10 @@ public function aggregateWithHttpInfo($tenant_id, $aggregation_request, $parent_ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -2327,6 +2069,8 @@ public function aggregateWithHttpInfo($tenant_id, $aggregation_request, $parent_ * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param \FastComments\Client\Model\AggregationRequest $aggregation_request (required) * @param string|null $parent_tenant_id (optional) @@ -2336,9 +2080,9 @@ public function aggregateWithHttpInfo($tenant_id, $aggregation_request, $parent_ * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function aggregateAsync($tenant_id, $aggregation_request, $parent_tenant_id = null, $include_stats = null, string $contentType = self::contentTypes['aggregate'][0]) + public function aggregateAsync($tenant_id, $aggregation_request, array $options = []) { - return $this->aggregateAsyncWithHttpInfo($tenant_id, $aggregation_request, $parent_tenant_id, $include_stats, $contentType) + return $this->aggregateAsyncWithHttpInfo($tenant_id, $aggregation_request, $options) ->then( function ($response) { return $response[0]; @@ -2351,6 +2095,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param \FastComments\Client\Model\AggregationRequest $aggregation_request (required) * @param string|null $parent_tenant_id (optional) @@ -2360,10 +2106,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function aggregateAsyncWithHttpInfo($tenant_id, $aggregation_request, $parent_tenant_id = null, $include_stats = null, string $contentType = self::contentTypes['aggregate'][0]) + public function aggregateAsyncWithHttpInfo($tenant_id, $aggregation_request, array $options = []) { $returnType = '\FastComments\Client\Model\AggregateResponse'; - $request = $this->aggregateRequest($tenant_id, $aggregation_request, $parent_tenant_id, $include_stats, $contentType); + $request = $this->aggregateRequest($tenant_id, $aggregation_request, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2404,6 +2150,8 @@ function ($exception) { /** * Create request for operation 'aggregate' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param \FastComments\Client\Model\AggregationRequest $aggregation_request (required) * @param string|null $parent_tenant_id (optional) @@ -2413,9 +2161,13 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function aggregateRequest($tenant_id, $aggregation_request, $parent_tenant_id = null, $include_stats = null, string $contentType = self::contentTypes['aggregate'][0]) + public function aggregateRequest($tenant_id, $aggregation_request, array $options = []) { - + // unbox the optional parameters and request options from the $options array + $parent_tenant_id = array_key_exists('parent_tenant_id', $options) ? $options['parent_tenant_id'] : null; + $include_stats = array_key_exists('include_stats', $options) ? $options['include_stats'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['aggregate'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -2541,6 +2293,8 @@ public function aggregateRequest($tenant_id, $aggregation_request, $parent_tenan * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string|null $question_id question_id (optional) * @param string[]|null $question_ids question_ids (optional) @@ -2554,9 +2308,9 @@ public function aggregateRequest($tenant_id, $aggregation_request, $parent_tenan * @throws \InvalidArgumentException * @return \FastComments\Client\Model\AggregateQuestionResultsResponse|\FastComments\Client\Model\APIError */ - public function aggregateQuestionResults($tenant_id, $question_id = null, $question_ids = null, $url_id = null, $time_bucket = null, $start_date = null, $force_recalculate = null, string $contentType = self::contentTypes['aggregateQuestionResults'][0]) + public function aggregateQuestionResults($tenant_id, array $options = []) { - list($response) = $this->aggregateQuestionResultsWithHttpInfo($tenant_id, $question_id, $question_ids, $url_id, $time_bucket, $start_date, $force_recalculate, $contentType); + list($response) = $this->aggregateQuestionResultsWithHttpInfo($tenant_id, $options); return $response; } @@ -2565,6 +2319,8 @@ public function aggregateQuestionResults($tenant_id, $question_id = null, $quest * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $question_id (optional) * @param string[]|null $question_ids (optional) @@ -2578,9 +2334,9 @@ public function aggregateQuestionResults($tenant_id, $question_id = null, $quest * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\AggregateQuestionResultsResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function aggregateQuestionResultsWithHttpInfo($tenant_id, $question_id = null, $question_ids = null, $url_id = null, $time_bucket = null, $start_date = null, $force_recalculate = null, string $contentType = self::contentTypes['aggregateQuestionResults'][0]) + public function aggregateQuestionResultsWithHttpInfo($tenant_id, array $options = []) { - $request = $this->aggregateQuestionResultsRequest($tenant_id, $question_id, $question_ids, $url_id, $time_bucket, $start_date, $force_recalculate, $contentType); + $request = $this->aggregateQuestionResultsRequest($tenant_id, $options); try { $options = $this->createHttpClientOption(); @@ -2607,61 +2363,21 @@ public function aggregateQuestionResultsWithHttpInfo($tenant_id, $question_id = switch($statusCode) { case 200: - if ('\FastComments\Client\Model\AggregateQuestionResultsResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\AggregateQuestionResultsResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\AggregateQuestionResultsResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\AggregateQuestionResultsResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -2675,34 +2391,11 @@ public function aggregateQuestionResultsWithHttpInfo($tenant_id, $question_id = ); } - $returnType = '\FastComments\Client\Model\AggregateQuestionResultsResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\AggregateQuestionResultsResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2712,7 +2405,7 @@ public function aggregateQuestionResultsWithHttpInfo($tenant_id, $question_id = $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -2720,8 +2413,10 @@ public function aggregateQuestionResultsWithHttpInfo($tenant_id, $question_id = $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -2731,6 +2426,8 @@ public function aggregateQuestionResultsWithHttpInfo($tenant_id, $question_id = * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $question_id (optional) * @param string[]|null $question_ids (optional) @@ -2743,9 +2440,9 @@ public function aggregateQuestionResultsWithHttpInfo($tenant_id, $question_id = * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function aggregateQuestionResultsAsync($tenant_id, $question_id = null, $question_ids = null, $url_id = null, $time_bucket = null, $start_date = null, $force_recalculate = null, string $contentType = self::contentTypes['aggregateQuestionResults'][0]) + public function aggregateQuestionResultsAsync($tenant_id, array $options = []) { - return $this->aggregateQuestionResultsAsyncWithHttpInfo($tenant_id, $question_id, $question_ids, $url_id, $time_bucket, $start_date, $force_recalculate, $contentType) + return $this->aggregateQuestionResultsAsyncWithHttpInfo($tenant_id, $options) ->then( function ($response) { return $response[0]; @@ -2758,6 +2455,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $question_id (optional) * @param string[]|null $question_ids (optional) @@ -2770,10 +2469,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function aggregateQuestionResultsAsyncWithHttpInfo($tenant_id, $question_id = null, $question_ids = null, $url_id = null, $time_bucket = null, $start_date = null, $force_recalculate = null, string $contentType = self::contentTypes['aggregateQuestionResults'][0]) + public function aggregateQuestionResultsAsyncWithHttpInfo($tenant_id, array $options = []) { $returnType = '\FastComments\Client\Model\AggregateQuestionResultsResponse'; - $request = $this->aggregateQuestionResultsRequest($tenant_id, $question_id, $question_ids, $url_id, $time_bucket, $start_date, $force_recalculate, $contentType); + $request = $this->aggregateQuestionResultsRequest($tenant_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2814,6 +2513,8 @@ function ($exception) { /** * Create request for operation 'aggregateQuestionResults' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $question_id (optional) * @param string[]|null $question_ids (optional) @@ -2826,9 +2527,17 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function aggregateQuestionResultsRequest($tenant_id, $question_id = null, $question_ids = null, $url_id = null, $time_bucket = null, $start_date = null, $force_recalculate = null, string $contentType = self::contentTypes['aggregateQuestionResults'][0]) - { - + public function aggregateQuestionResultsRequest($tenant_id, array $options = []) + { + // unbox the optional parameters and request options from the $options array + $question_id = array_key_exists('question_id', $options) ? $options['question_id'] : null; + $question_ids = array_key_exists('question_ids', $options) ? $options['question_ids'] : null; + $url_id = array_key_exists('url_id', $options) ? $options['url_id'] : null; + $time_bucket = array_key_exists('time_bucket', $options) ? $options['time_bucket'] : null; + $start_date = array_key_exists('start_date', $options) ? $options['start_date'] : null; + $force_recalculate = array_key_exists('force_recalculate', $options) ? $options['force_recalculate'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['aggregateQuestionResults'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -2980,6 +2689,8 @@ public function aggregateQuestionResultsRequest($tenant_id, $question_id = null, * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $id id (required) * @param \FastComments\Client\Model\BlockFromCommentParams $block_from_comment_params block_from_comment_params (required) @@ -2991,9 +2702,9 @@ public function aggregateQuestionResultsRequest($tenant_id, $question_id = null, * @throws \InvalidArgumentException * @return \FastComments\Client\Model\BlockSuccess|\FastComments\Client\Model\APIError */ - public function blockUserFromComment($tenant_id, $id, $block_from_comment_params, $user_id = null, $anon_user_id = null, string $contentType = self::contentTypes['blockUserFromComment'][0]) + public function blockUserFromComment($tenant_id, $id, $block_from_comment_params, array $options = []) { - list($response) = $this->blockUserFromCommentWithHttpInfo($tenant_id, $id, $block_from_comment_params, $user_id, $anon_user_id, $contentType); + list($response) = $this->blockUserFromCommentWithHttpInfo($tenant_id, $id, $block_from_comment_params, $options); return $response; } @@ -3002,6 +2713,8 @@ public function blockUserFromComment($tenant_id, $id, $block_from_comment_params * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param \FastComments\Client\Model\BlockFromCommentParams $block_from_comment_params (required) @@ -3013,9 +2726,9 @@ public function blockUserFromComment($tenant_id, $id, $block_from_comment_params * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\BlockSuccess|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function blockUserFromCommentWithHttpInfo($tenant_id, $id, $block_from_comment_params, $user_id = null, $anon_user_id = null, string $contentType = self::contentTypes['blockUserFromComment'][0]) + public function blockUserFromCommentWithHttpInfo($tenant_id, $id, $block_from_comment_params, array $options = []) { - $request = $this->blockUserFromCommentRequest($tenant_id, $id, $block_from_comment_params, $user_id, $anon_user_id, $contentType); + $request = $this->blockUserFromCommentRequest($tenant_id, $id, $block_from_comment_params, $options); try { $options = $this->createHttpClientOption(); @@ -3042,61 +2755,21 @@ public function blockUserFromCommentWithHttpInfo($tenant_id, $id, $block_from_co switch($statusCode) { case 200: - if ('\FastComments\Client\Model\BlockSuccess' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\BlockSuccess' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\BlockSuccess', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\BlockSuccess', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -3110,34 +2783,11 @@ public function blockUserFromCommentWithHttpInfo($tenant_id, $id, $block_from_co ); } - $returnType = '\FastComments\Client\Model\BlockSuccess'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\BlockSuccess', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3147,7 +2797,7 @@ public function blockUserFromCommentWithHttpInfo($tenant_id, $id, $block_from_co $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -3155,8 +2805,10 @@ public function blockUserFromCommentWithHttpInfo($tenant_id, $id, $block_from_co $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -3166,6 +2818,8 @@ public function blockUserFromCommentWithHttpInfo($tenant_id, $id, $block_from_co * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param \FastComments\Client\Model\BlockFromCommentParams $block_from_comment_params (required) @@ -3176,9 +2830,9 @@ public function blockUserFromCommentWithHttpInfo($tenant_id, $id, $block_from_co * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function blockUserFromCommentAsync($tenant_id, $id, $block_from_comment_params, $user_id = null, $anon_user_id = null, string $contentType = self::contentTypes['blockUserFromComment'][0]) + public function blockUserFromCommentAsync($tenant_id, $id, $block_from_comment_params, array $options = []) { - return $this->blockUserFromCommentAsyncWithHttpInfo($tenant_id, $id, $block_from_comment_params, $user_id, $anon_user_id, $contentType) + return $this->blockUserFromCommentAsyncWithHttpInfo($tenant_id, $id, $block_from_comment_params, $options) ->then( function ($response) { return $response[0]; @@ -3191,6 +2845,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param \FastComments\Client\Model\BlockFromCommentParams $block_from_comment_params (required) @@ -3201,10 +2857,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function blockUserFromCommentAsyncWithHttpInfo($tenant_id, $id, $block_from_comment_params, $user_id = null, $anon_user_id = null, string $contentType = self::contentTypes['blockUserFromComment'][0]) + public function blockUserFromCommentAsyncWithHttpInfo($tenant_id, $id, $block_from_comment_params, array $options = []) { $returnType = '\FastComments\Client\Model\BlockSuccess'; - $request = $this->blockUserFromCommentRequest($tenant_id, $id, $block_from_comment_params, $user_id, $anon_user_id, $contentType); + $request = $this->blockUserFromCommentRequest($tenant_id, $id, $block_from_comment_params, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3245,6 +2901,8 @@ function ($exception) { /** * Create request for operation 'blockUserFromComment' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param \FastComments\Client\Model\BlockFromCommentParams $block_from_comment_params (required) @@ -3255,9 +2913,13 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function blockUserFromCommentRequest($tenant_id, $id, $block_from_comment_params, $user_id = null, $anon_user_id = null, string $contentType = self::contentTypes['blockUserFromComment'][0]) + public function blockUserFromCommentRequest($tenant_id, $id, $block_from_comment_params, array $options = []) { - + // unbox the optional parameters and request options from the $options array + $user_id = array_key_exists('user_id', $options) ? $options['user_id'] : null; + $anon_user_id = array_key_exists('anon_user_id', $options) ? $options['anon_user_id'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['blockUserFromComment'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -3321,7 +2983,7 @@ public function blockUserFromCommentRequest($tenant_id, $id, $block_from_comment // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -3398,6 +3060,8 @@ public function blockUserFromCommentRequest($tenant_id, $id, $block_from_comment * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param \FastComments\Client\Model\BulkAggregateQuestionResultsRequest $bulk_aggregate_question_results_request bulk_aggregate_question_results_request (required) * @param bool|null $force_recalculate force_recalculate (optional) @@ -3407,9 +3071,9 @@ public function blockUserFromCommentRequest($tenant_id, $id, $block_from_comment * @throws \InvalidArgumentException * @return \FastComments\Client\Model\BulkAggregateQuestionResultsResponse|\FastComments\Client\Model\APIError */ - public function bulkAggregateQuestionResults($tenant_id, $bulk_aggregate_question_results_request, $force_recalculate = null, string $contentType = self::contentTypes['bulkAggregateQuestionResults'][0]) + public function bulkAggregateQuestionResults($tenant_id, $bulk_aggregate_question_results_request, $force_recalculate = null) { - list($response) = $this->bulkAggregateQuestionResultsWithHttpInfo($tenant_id, $bulk_aggregate_question_results_request, $force_recalculate, $contentType); + list($response) = $this->bulkAggregateQuestionResultsWithHttpInfo($tenant_id, $bulk_aggregate_question_results_request, $force_recalculate); return $response; } @@ -3418,6 +3082,8 @@ public function bulkAggregateQuestionResults($tenant_id, $bulk_aggregate_questio * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param \FastComments\Client\Model\BulkAggregateQuestionResultsRequest $bulk_aggregate_question_results_request (required) * @param bool|null $force_recalculate (optional) @@ -3427,9 +3093,9 @@ public function bulkAggregateQuestionResults($tenant_id, $bulk_aggregate_questio * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\BulkAggregateQuestionResultsResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function bulkAggregateQuestionResultsWithHttpInfo($tenant_id, $bulk_aggregate_question_results_request, $force_recalculate = null, string $contentType = self::contentTypes['bulkAggregateQuestionResults'][0]) + public function bulkAggregateQuestionResultsWithHttpInfo($tenant_id, $bulk_aggregate_question_results_request, $force_recalculate = null) { - $request = $this->bulkAggregateQuestionResultsRequest($tenant_id, $bulk_aggregate_question_results_request, $force_recalculate, $contentType); + $request = $this->bulkAggregateQuestionResultsRequest($tenant_id, $bulk_aggregate_question_results_request, $force_recalculate); try { $options = $this->createHttpClientOption(); @@ -3456,61 +3122,21 @@ public function bulkAggregateQuestionResultsWithHttpInfo($tenant_id, $bulk_aggre switch($statusCode) { case 200: - if ('\FastComments\Client\Model\BulkAggregateQuestionResultsResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\BulkAggregateQuestionResultsResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\BulkAggregateQuestionResultsResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\BulkAggregateQuestionResultsResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -3524,34 +3150,11 @@ public function bulkAggregateQuestionResultsWithHttpInfo($tenant_id, $bulk_aggre ); } - $returnType = '\FastComments\Client\Model\BulkAggregateQuestionResultsResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\BulkAggregateQuestionResultsResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3561,7 +3164,7 @@ public function bulkAggregateQuestionResultsWithHttpInfo($tenant_id, $bulk_aggre $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -3569,8 +3172,10 @@ public function bulkAggregateQuestionResultsWithHttpInfo($tenant_id, $bulk_aggre $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -3580,6 +3185,8 @@ public function bulkAggregateQuestionResultsWithHttpInfo($tenant_id, $bulk_aggre * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param \FastComments\Client\Model\BulkAggregateQuestionResultsRequest $bulk_aggregate_question_results_request (required) * @param bool|null $force_recalculate (optional) @@ -3588,9 +3195,9 @@ public function bulkAggregateQuestionResultsWithHttpInfo($tenant_id, $bulk_aggre * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function bulkAggregateQuestionResultsAsync($tenant_id, $bulk_aggregate_question_results_request, $force_recalculate = null, string $contentType = self::contentTypes['bulkAggregateQuestionResults'][0]) + public function bulkAggregateQuestionResultsAsync($tenant_id, $bulk_aggregate_question_results_request, $force_recalculate = null) { - return $this->bulkAggregateQuestionResultsAsyncWithHttpInfo($tenant_id, $bulk_aggregate_question_results_request, $force_recalculate, $contentType) + return $this->bulkAggregateQuestionResultsAsyncWithHttpInfo($tenant_id, $bulk_aggregate_question_results_request, $force_recalculate) ->then( function ($response) { return $response[0]; @@ -3603,6 +3210,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param \FastComments\Client\Model\BulkAggregateQuestionResultsRequest $bulk_aggregate_question_results_request (required) * @param bool|null $force_recalculate (optional) @@ -3611,10 +3220,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function bulkAggregateQuestionResultsAsyncWithHttpInfo($tenant_id, $bulk_aggregate_question_results_request, $force_recalculate = null, string $contentType = self::contentTypes['bulkAggregateQuestionResults'][0]) + public function bulkAggregateQuestionResultsAsyncWithHttpInfo($tenant_id, $bulk_aggregate_question_results_request, $force_recalculate = null) { $returnType = '\FastComments\Client\Model\BulkAggregateQuestionResultsResponse'; - $request = $this->bulkAggregateQuestionResultsRequest($tenant_id, $bulk_aggregate_question_results_request, $force_recalculate, $contentType); + $request = $this->bulkAggregateQuestionResultsRequest($tenant_id, $bulk_aggregate_question_results_request, $force_recalculate); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3655,6 +3264,8 @@ function ($exception) { /** * Create request for operation 'bulkAggregateQuestionResults' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param \FastComments\Client\Model\BulkAggregateQuestionResultsRequest $bulk_aggregate_question_results_request (required) * @param bool|null $force_recalculate (optional) @@ -3663,9 +3274,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function bulkAggregateQuestionResultsRequest($tenant_id, $bulk_aggregate_question_results_request, $force_recalculate = null, string $contentType = self::contentTypes['bulkAggregateQuestionResults'][0]) + public function bulkAggregateQuestionResultsRequest($tenant_id, $bulk_aggregate_question_results_request, $force_recalculate = null) { - + $contentType = self::contentTypes['bulkAggregateQuestionResults'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -3791,9 +3403,9 @@ public function bulkAggregateQuestionResultsRequest($tenant_id, $bulk_aggregate_ * @throws \InvalidArgumentException * @return \FastComments\Client\Model\ChangeTicketStateResponse|\FastComments\Client\Model\APIError */ - public function changeTicketState($tenant_id, $user_id, $id, $change_ticket_state_body, string $contentType = self::contentTypes['changeTicketState'][0]) + public function changeTicketState($tenant_id, $user_id, $id, $change_ticket_state_body) { - list($response) = $this->changeTicketStateWithHttpInfo($tenant_id, $user_id, $id, $change_ticket_state_body, $contentType); + list($response) = $this->changeTicketStateWithHttpInfo($tenant_id, $user_id, $id, $change_ticket_state_body); return $response; } @@ -3812,9 +3424,9 @@ public function changeTicketState($tenant_id, $user_id, $id, $change_ticket_stat * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\ChangeTicketStateResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function changeTicketStateWithHttpInfo($tenant_id, $user_id, $id, $change_ticket_state_body, string $contentType = self::contentTypes['changeTicketState'][0]) + public function changeTicketStateWithHttpInfo($tenant_id, $user_id, $id, $change_ticket_state_body) { - $request = $this->changeTicketStateRequest($tenant_id, $user_id, $id, $change_ticket_state_body, $contentType); + $request = $this->changeTicketStateRequest($tenant_id, $user_id, $id, $change_ticket_state_body); try { $options = $this->createHttpClientOption(); @@ -3841,61 +3453,21 @@ public function changeTicketStateWithHttpInfo($tenant_id, $user_id, $id, $change switch($statusCode) { case 200: - if ('\FastComments\Client\Model\ChangeTicketStateResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\ChangeTicketStateResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\ChangeTicketStateResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\ChangeTicketStateResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -3909,34 +3481,11 @@ public function changeTicketStateWithHttpInfo($tenant_id, $user_id, $id, $change ); } - $returnType = '\FastComments\Client\Model\ChangeTicketStateResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\ChangeTicketStateResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3946,7 +3495,7 @@ public function changeTicketStateWithHttpInfo($tenant_id, $user_id, $id, $change $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -3954,8 +3503,10 @@ public function changeTicketStateWithHttpInfo($tenant_id, $user_id, $id, $change $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -3974,9 +3525,9 @@ public function changeTicketStateWithHttpInfo($tenant_id, $user_id, $id, $change * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function changeTicketStateAsync($tenant_id, $user_id, $id, $change_ticket_state_body, string $contentType = self::contentTypes['changeTicketState'][0]) + public function changeTicketStateAsync($tenant_id, $user_id, $id, $change_ticket_state_body) { - return $this->changeTicketStateAsyncWithHttpInfo($tenant_id, $user_id, $id, $change_ticket_state_body, $contentType) + return $this->changeTicketStateAsyncWithHttpInfo($tenant_id, $user_id, $id, $change_ticket_state_body) ->then( function ($response) { return $response[0]; @@ -3998,10 +3549,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function changeTicketStateAsyncWithHttpInfo($tenant_id, $user_id, $id, $change_ticket_state_body, string $contentType = self::contentTypes['changeTicketState'][0]) + public function changeTicketStateAsyncWithHttpInfo($tenant_id, $user_id, $id, $change_ticket_state_body) { $returnType = '\FastComments\Client\Model\ChangeTicketStateResponse'; - $request = $this->changeTicketStateRequest($tenant_id, $user_id, $id, $change_ticket_state_body, $contentType); + $request = $this->changeTicketStateRequest($tenant_id, $user_id, $id, $change_ticket_state_body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4051,9 +3602,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function changeTicketStateRequest($tenant_id, $user_id, $id, $change_ticket_state_body, string $contentType = self::contentTypes['changeTicketState'][0]) + public function changeTicketStateRequest($tenant_id, $user_id, $id, $change_ticket_state_body) { - + $contentType = self::contentTypes['changeTicketState'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -4113,7 +3665,7 @@ public function changeTicketStateRequest($tenant_id, $user_id, $id, $change_tick // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -4190,6 +3742,8 @@ public function changeTicketStateRequest($tenant_id, $user_id, $id, $change_tick * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string|null $question_id question_id (optional) * @param string[]|null $question_ids question_ids (optional) @@ -4205,9 +3759,9 @@ public function changeTicketStateRequest($tenant_id, $user_id, $id, $change_tick * @throws \InvalidArgumentException * @return \FastComments\Client\Model\CombineQuestionResultsWithCommentsResponse|\FastComments\Client\Model\APIError */ - public function combineCommentsWithQuestionResults($tenant_id, $question_id = null, $question_ids = null, $url_id = null, $start_date = null, $force_recalculate = null, $min_value = null, $max_value = null, $limit = null, string $contentType = self::contentTypes['combineCommentsWithQuestionResults'][0]) + public function combineCommentsWithQuestionResults($tenant_id, array $options = []) { - list($response) = $this->combineCommentsWithQuestionResultsWithHttpInfo($tenant_id, $question_id, $question_ids, $url_id, $start_date, $force_recalculate, $min_value, $max_value, $limit, $contentType); + list($response) = $this->combineCommentsWithQuestionResultsWithHttpInfo($tenant_id, $options); return $response; } @@ -4216,6 +3770,8 @@ public function combineCommentsWithQuestionResults($tenant_id, $question_id = nu * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $question_id (optional) * @param string[]|null $question_ids (optional) @@ -4231,9 +3787,9 @@ public function combineCommentsWithQuestionResults($tenant_id, $question_id = nu * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\CombineQuestionResultsWithCommentsResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function combineCommentsWithQuestionResultsWithHttpInfo($tenant_id, $question_id = null, $question_ids = null, $url_id = null, $start_date = null, $force_recalculate = null, $min_value = null, $max_value = null, $limit = null, string $contentType = self::contentTypes['combineCommentsWithQuestionResults'][0]) + public function combineCommentsWithQuestionResultsWithHttpInfo($tenant_id, array $options = []) { - $request = $this->combineCommentsWithQuestionResultsRequest($tenant_id, $question_id, $question_ids, $url_id, $start_date, $force_recalculate, $min_value, $max_value, $limit, $contentType); + $request = $this->combineCommentsWithQuestionResultsRequest($tenant_id, $options); try { $options = $this->createHttpClientOption(); @@ -4260,61 +3816,21 @@ public function combineCommentsWithQuestionResultsWithHttpInfo($tenant_id, $ques switch($statusCode) { case 200: - if ('\FastComments\Client\Model\CombineQuestionResultsWithCommentsResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\CombineQuestionResultsWithCommentsResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\CombineQuestionResultsWithCommentsResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\CombineQuestionResultsWithCommentsResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -4328,34 +3844,11 @@ public function combineCommentsWithQuestionResultsWithHttpInfo($tenant_id, $ques ); } - $returnType = '\FastComments\Client\Model\CombineQuestionResultsWithCommentsResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\CombineQuestionResultsWithCommentsResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -4365,7 +3858,7 @@ public function combineCommentsWithQuestionResultsWithHttpInfo($tenant_id, $ques $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -4373,8 +3866,10 @@ public function combineCommentsWithQuestionResultsWithHttpInfo($tenant_id, $ques $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -4384,6 +3879,8 @@ public function combineCommentsWithQuestionResultsWithHttpInfo($tenant_id, $ques * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $question_id (optional) * @param string[]|null $question_ids (optional) @@ -4398,9 +3895,9 @@ public function combineCommentsWithQuestionResultsWithHttpInfo($tenant_id, $ques * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function combineCommentsWithQuestionResultsAsync($tenant_id, $question_id = null, $question_ids = null, $url_id = null, $start_date = null, $force_recalculate = null, $min_value = null, $max_value = null, $limit = null, string $contentType = self::contentTypes['combineCommentsWithQuestionResults'][0]) + public function combineCommentsWithQuestionResultsAsync($tenant_id, array $options = []) { - return $this->combineCommentsWithQuestionResultsAsyncWithHttpInfo($tenant_id, $question_id, $question_ids, $url_id, $start_date, $force_recalculate, $min_value, $max_value, $limit, $contentType) + return $this->combineCommentsWithQuestionResultsAsyncWithHttpInfo($tenant_id, $options) ->then( function ($response) { return $response[0]; @@ -4413,6 +3910,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $question_id (optional) * @param string[]|null $question_ids (optional) @@ -4427,10 +3926,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function combineCommentsWithQuestionResultsAsyncWithHttpInfo($tenant_id, $question_id = null, $question_ids = null, $url_id = null, $start_date = null, $force_recalculate = null, $min_value = null, $max_value = null, $limit = null, string $contentType = self::contentTypes['combineCommentsWithQuestionResults'][0]) + public function combineCommentsWithQuestionResultsAsyncWithHttpInfo($tenant_id, array $options = []) { $returnType = '\FastComments\Client\Model\CombineQuestionResultsWithCommentsResponse'; - $request = $this->combineCommentsWithQuestionResultsRequest($tenant_id, $question_id, $question_ids, $url_id, $start_date, $force_recalculate, $min_value, $max_value, $limit, $contentType); + $request = $this->combineCommentsWithQuestionResultsRequest($tenant_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4471,6 +3970,8 @@ function ($exception) { /** * Create request for operation 'combineCommentsWithQuestionResults' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $question_id (optional) * @param string[]|null $question_ids (optional) @@ -4485,9 +3986,19 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function combineCommentsWithQuestionResultsRequest($tenant_id, $question_id = null, $question_ids = null, $url_id = null, $start_date = null, $force_recalculate = null, $min_value = null, $max_value = null, $limit = null, string $contentType = self::contentTypes['combineCommentsWithQuestionResults'][0]) - { - + public function combineCommentsWithQuestionResultsRequest($tenant_id, array $options = []) + { + // unbox the optional parameters and request options from the $options array + $question_id = array_key_exists('question_id', $options) ? $options['question_id'] : null; + $question_ids = array_key_exists('question_ids', $options) ? $options['question_ids'] : null; + $url_id = array_key_exists('url_id', $options) ? $options['url_id'] : null; + $start_date = array_key_exists('start_date', $options) ? $options['start_date'] : null; + $force_recalculate = array_key_exists('force_recalculate', $options) ? $options['force_recalculate'] : null; + $min_value = array_key_exists('min_value', $options) ? $options['min_value'] : null; + $max_value = array_key_exists('max_value', $options) ? $options['max_value'] : null; + $limit = array_key_exists('limit', $options) ? $options['limit'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['combineCommentsWithQuestionResults'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -4667,9 +4178,9 @@ public function combineCommentsWithQuestionResultsRequest($tenant_id, $question_ * @throws \InvalidArgumentException * @return \FastComments\Client\Model\CreateEmailTemplateResponse|\FastComments\Client\Model\APIError */ - public function createEmailTemplate($tenant_id, $create_email_template_body, string $contentType = self::contentTypes['createEmailTemplate'][0]) + public function createEmailTemplate($tenant_id, $create_email_template_body) { - list($response) = $this->createEmailTemplateWithHttpInfo($tenant_id, $create_email_template_body, $contentType); + list($response) = $this->createEmailTemplateWithHttpInfo($tenant_id, $create_email_template_body); return $response; } @@ -4686,9 +4197,9 @@ public function createEmailTemplate($tenant_id, $create_email_template_body, str * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\CreateEmailTemplateResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function createEmailTemplateWithHttpInfo($tenant_id, $create_email_template_body, string $contentType = self::contentTypes['createEmailTemplate'][0]) + public function createEmailTemplateWithHttpInfo($tenant_id, $create_email_template_body) { - $request = $this->createEmailTemplateRequest($tenant_id, $create_email_template_body, $contentType); + $request = $this->createEmailTemplateRequest($tenant_id, $create_email_template_body); try { $options = $this->createHttpClientOption(); @@ -4715,61 +4226,21 @@ public function createEmailTemplateWithHttpInfo($tenant_id, $create_email_templa switch($statusCode) { case 200: - if ('\FastComments\Client\Model\CreateEmailTemplateResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\CreateEmailTemplateResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\CreateEmailTemplateResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\CreateEmailTemplateResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -4783,34 +4254,11 @@ public function createEmailTemplateWithHttpInfo($tenant_id, $create_email_templa ); } - $returnType = '\FastComments\Client\Model\CreateEmailTemplateResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\CreateEmailTemplateResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -4820,7 +4268,7 @@ public function createEmailTemplateWithHttpInfo($tenant_id, $create_email_templa $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -4828,8 +4276,10 @@ public function createEmailTemplateWithHttpInfo($tenant_id, $create_email_templa $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -4846,9 +4296,9 @@ public function createEmailTemplateWithHttpInfo($tenant_id, $create_email_templa * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createEmailTemplateAsync($tenant_id, $create_email_template_body, string $contentType = self::contentTypes['createEmailTemplate'][0]) + public function createEmailTemplateAsync($tenant_id, $create_email_template_body) { - return $this->createEmailTemplateAsyncWithHttpInfo($tenant_id, $create_email_template_body, $contentType) + return $this->createEmailTemplateAsyncWithHttpInfo($tenant_id, $create_email_template_body) ->then( function ($response) { return $response[0]; @@ -4868,10 +4318,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createEmailTemplateAsyncWithHttpInfo($tenant_id, $create_email_template_body, string $contentType = self::contentTypes['createEmailTemplate'][0]) + public function createEmailTemplateAsyncWithHttpInfo($tenant_id, $create_email_template_body) { $returnType = '\FastComments\Client\Model\CreateEmailTemplateResponse'; - $request = $this->createEmailTemplateRequest($tenant_id, $create_email_template_body, $contentType); + $request = $this->createEmailTemplateRequest($tenant_id, $create_email_template_body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4919,9 +4369,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function createEmailTemplateRequest($tenant_id, $create_email_template_body, string $contentType = self::contentTypes['createEmailTemplate'][0]) + public function createEmailTemplateRequest($tenant_id, $create_email_template_body) { - + $contentType = self::contentTypes['createEmailTemplate'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -5027,6 +4478,8 @@ public function createEmailTemplateRequest($tenant_id, $create_email_template_bo * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param \FastComments\Client\Model\CreateFeedPostParams $create_feed_post_params create_feed_post_params (required) * @param string|null $broadcast_id broadcast_id (optional) @@ -5039,9 +4492,9 @@ public function createEmailTemplateRequest($tenant_id, $create_email_template_bo * @throws \InvalidArgumentException * @return \FastComments\Client\Model\CreateFeedPostsResponse|\FastComments\Client\Model\APIError */ - public function createFeedPost($tenant_id, $create_feed_post_params, $broadcast_id = null, $is_live = null, $do_spam_check = null, $skip_dup_check = null, string $contentType = self::contentTypes['createFeedPost'][0]) + public function createFeedPost($tenant_id, $create_feed_post_params, array $options = []) { - list($response) = $this->createFeedPostWithHttpInfo($tenant_id, $create_feed_post_params, $broadcast_id, $is_live, $do_spam_check, $skip_dup_check, $contentType); + list($response) = $this->createFeedPostWithHttpInfo($tenant_id, $create_feed_post_params, $options); return $response; } @@ -5050,6 +4503,8 @@ public function createFeedPost($tenant_id, $create_feed_post_params, $broadcast_ * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param \FastComments\Client\Model\CreateFeedPostParams $create_feed_post_params (required) * @param string|null $broadcast_id (optional) @@ -5062,9 +4517,9 @@ public function createFeedPost($tenant_id, $create_feed_post_params, $broadcast_ * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\CreateFeedPostsResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function createFeedPostWithHttpInfo($tenant_id, $create_feed_post_params, $broadcast_id = null, $is_live = null, $do_spam_check = null, $skip_dup_check = null, string $contentType = self::contentTypes['createFeedPost'][0]) + public function createFeedPostWithHttpInfo($tenant_id, $create_feed_post_params, array $options = []) { - $request = $this->createFeedPostRequest($tenant_id, $create_feed_post_params, $broadcast_id, $is_live, $do_spam_check, $skip_dup_check, $contentType); + $request = $this->createFeedPostRequest($tenant_id, $create_feed_post_params, $options); try { $options = $this->createHttpClientOption(); @@ -5091,61 +4546,21 @@ public function createFeedPostWithHttpInfo($tenant_id, $create_feed_post_params, switch($statusCode) { case 200: - if ('\FastComments\Client\Model\CreateFeedPostsResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\CreateFeedPostsResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\CreateFeedPostsResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\CreateFeedPostsResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -5159,34 +4574,11 @@ public function createFeedPostWithHttpInfo($tenant_id, $create_feed_post_params, ); } - $returnType = '\FastComments\Client\Model\CreateFeedPostsResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\CreateFeedPostsResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -5196,7 +4588,7 @@ public function createFeedPostWithHttpInfo($tenant_id, $create_feed_post_params, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -5204,8 +4596,10 @@ public function createFeedPostWithHttpInfo($tenant_id, $create_feed_post_params, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -5215,6 +4609,8 @@ public function createFeedPostWithHttpInfo($tenant_id, $create_feed_post_params, * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param \FastComments\Client\Model\CreateFeedPostParams $create_feed_post_params (required) * @param string|null $broadcast_id (optional) @@ -5226,9 +4622,9 @@ public function createFeedPostWithHttpInfo($tenant_id, $create_feed_post_params, * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createFeedPostAsync($tenant_id, $create_feed_post_params, $broadcast_id = null, $is_live = null, $do_spam_check = null, $skip_dup_check = null, string $contentType = self::contentTypes['createFeedPost'][0]) + public function createFeedPostAsync($tenant_id, $create_feed_post_params, array $options = []) { - return $this->createFeedPostAsyncWithHttpInfo($tenant_id, $create_feed_post_params, $broadcast_id, $is_live, $do_spam_check, $skip_dup_check, $contentType) + return $this->createFeedPostAsyncWithHttpInfo($tenant_id, $create_feed_post_params, $options) ->then( function ($response) { return $response[0]; @@ -5241,6 +4637,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param \FastComments\Client\Model\CreateFeedPostParams $create_feed_post_params (required) * @param string|null $broadcast_id (optional) @@ -5252,10 +4650,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createFeedPostAsyncWithHttpInfo($tenant_id, $create_feed_post_params, $broadcast_id = null, $is_live = null, $do_spam_check = null, $skip_dup_check = null, string $contentType = self::contentTypes['createFeedPost'][0]) + public function createFeedPostAsyncWithHttpInfo($tenant_id, $create_feed_post_params, array $options = []) { $returnType = '\FastComments\Client\Model\CreateFeedPostsResponse'; - $request = $this->createFeedPostRequest($tenant_id, $create_feed_post_params, $broadcast_id, $is_live, $do_spam_check, $skip_dup_check, $contentType); + $request = $this->createFeedPostRequest($tenant_id, $create_feed_post_params, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5296,6 +4694,8 @@ function ($exception) { /** * Create request for operation 'createFeedPost' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param \FastComments\Client\Model\CreateFeedPostParams $create_feed_post_params (required) * @param string|null $broadcast_id (optional) @@ -5307,9 +4707,15 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function createFeedPostRequest($tenant_id, $create_feed_post_params, $broadcast_id = null, $is_live = null, $do_spam_check = null, $skip_dup_check = null, string $contentType = self::contentTypes['createFeedPost'][0]) + public function createFeedPostRequest($tenant_id, $create_feed_post_params, array $options = []) { - + // unbox the optional parameters and request options from the $options array + $broadcast_id = array_key_exists('broadcast_id', $options) ? $options['broadcast_id'] : null; + $is_live = array_key_exists('is_live', $options) ? $options['is_live'] : null; + $do_spam_check = array_key_exists('do_spam_check', $options) ? $options['do_spam_check'] : null; + $skip_dup_check = array_key_exists('skip_dup_check', $options) ? $options['skip_dup_check'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['createFeedPost'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -5463,9 +4869,9 @@ public function createFeedPostRequest($tenant_id, $create_feed_post_params, $bro * @throws \InvalidArgumentException * @return \FastComments\Client\Model\CreateModeratorResponse|\FastComments\Client\Model\APIError */ - public function createModerator($tenant_id, $create_moderator_body, string $contentType = self::contentTypes['createModerator'][0]) + public function createModerator($tenant_id, $create_moderator_body) { - list($response) = $this->createModeratorWithHttpInfo($tenant_id, $create_moderator_body, $contentType); + list($response) = $this->createModeratorWithHttpInfo($tenant_id, $create_moderator_body); return $response; } @@ -5482,9 +4888,9 @@ public function createModerator($tenant_id, $create_moderator_body, string $cont * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\CreateModeratorResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function createModeratorWithHttpInfo($tenant_id, $create_moderator_body, string $contentType = self::contentTypes['createModerator'][0]) + public function createModeratorWithHttpInfo($tenant_id, $create_moderator_body) { - $request = $this->createModeratorRequest($tenant_id, $create_moderator_body, $contentType); + $request = $this->createModeratorRequest($tenant_id, $create_moderator_body); try { $options = $this->createHttpClientOption(); @@ -5511,61 +4917,21 @@ public function createModeratorWithHttpInfo($tenant_id, $create_moderator_body, switch($statusCode) { case 200: - if ('\FastComments\Client\Model\CreateModeratorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\CreateModeratorResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\CreateModeratorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\CreateModeratorResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -5579,34 +4945,11 @@ public function createModeratorWithHttpInfo($tenant_id, $create_moderator_body, ); } - $returnType = '\FastComments\Client\Model\CreateModeratorResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\CreateModeratorResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -5616,7 +4959,7 @@ public function createModeratorWithHttpInfo($tenant_id, $create_moderator_body, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -5624,8 +4967,10 @@ public function createModeratorWithHttpInfo($tenant_id, $create_moderator_body, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -5642,9 +4987,9 @@ public function createModeratorWithHttpInfo($tenant_id, $create_moderator_body, * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createModeratorAsync($tenant_id, $create_moderator_body, string $contentType = self::contentTypes['createModerator'][0]) + public function createModeratorAsync($tenant_id, $create_moderator_body) { - return $this->createModeratorAsyncWithHttpInfo($tenant_id, $create_moderator_body, $contentType) + return $this->createModeratorAsyncWithHttpInfo($tenant_id, $create_moderator_body) ->then( function ($response) { return $response[0]; @@ -5664,10 +5009,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createModeratorAsyncWithHttpInfo($tenant_id, $create_moderator_body, string $contentType = self::contentTypes['createModerator'][0]) + public function createModeratorAsyncWithHttpInfo($tenant_id, $create_moderator_body) { $returnType = '\FastComments\Client\Model\CreateModeratorResponse'; - $request = $this->createModeratorRequest($tenant_id, $create_moderator_body, $contentType); + $request = $this->createModeratorRequest($tenant_id, $create_moderator_body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5715,9 +5060,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function createModeratorRequest($tenant_id, $create_moderator_body, string $contentType = self::contentTypes['createModerator'][0]) + public function createModeratorRequest($tenant_id, $create_moderator_body) { - + $contentType = self::contentTypes['createModerator'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -5831,9 +5177,9 @@ public function createModeratorRequest($tenant_id, $create_moderator_body, strin * @throws \InvalidArgumentException * @return \FastComments\Client\Model\CreateQuestionConfigResponse|\FastComments\Client\Model\APIError */ - public function createQuestionConfig($tenant_id, $create_question_config_body, string $contentType = self::contentTypes['createQuestionConfig'][0]) + public function createQuestionConfig($tenant_id, $create_question_config_body) { - list($response) = $this->createQuestionConfigWithHttpInfo($tenant_id, $create_question_config_body, $contentType); + list($response) = $this->createQuestionConfigWithHttpInfo($tenant_id, $create_question_config_body); return $response; } @@ -5850,9 +5196,9 @@ public function createQuestionConfig($tenant_id, $create_question_config_body, s * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\CreateQuestionConfigResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function createQuestionConfigWithHttpInfo($tenant_id, $create_question_config_body, string $contentType = self::contentTypes['createQuestionConfig'][0]) + public function createQuestionConfigWithHttpInfo($tenant_id, $create_question_config_body) { - $request = $this->createQuestionConfigRequest($tenant_id, $create_question_config_body, $contentType); + $request = $this->createQuestionConfigRequest($tenant_id, $create_question_config_body); try { $options = $this->createHttpClientOption(); @@ -5879,61 +5225,21 @@ public function createQuestionConfigWithHttpInfo($tenant_id, $create_question_co switch($statusCode) { case 200: - if ('\FastComments\Client\Model\CreateQuestionConfigResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\CreateQuestionConfigResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\CreateQuestionConfigResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\CreateQuestionConfigResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -5947,34 +5253,11 @@ public function createQuestionConfigWithHttpInfo($tenant_id, $create_question_co ); } - $returnType = '\FastComments\Client\Model\CreateQuestionConfigResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\CreateQuestionConfigResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -5984,7 +5267,7 @@ public function createQuestionConfigWithHttpInfo($tenant_id, $create_question_co $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -5992,8 +5275,10 @@ public function createQuestionConfigWithHttpInfo($tenant_id, $create_question_co $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -6010,9 +5295,9 @@ public function createQuestionConfigWithHttpInfo($tenant_id, $create_question_co * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createQuestionConfigAsync($tenant_id, $create_question_config_body, string $contentType = self::contentTypes['createQuestionConfig'][0]) + public function createQuestionConfigAsync($tenant_id, $create_question_config_body) { - return $this->createQuestionConfigAsyncWithHttpInfo($tenant_id, $create_question_config_body, $contentType) + return $this->createQuestionConfigAsyncWithHttpInfo($tenant_id, $create_question_config_body) ->then( function ($response) { return $response[0]; @@ -6032,10 +5317,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createQuestionConfigAsyncWithHttpInfo($tenant_id, $create_question_config_body, string $contentType = self::contentTypes['createQuestionConfig'][0]) + public function createQuestionConfigAsyncWithHttpInfo($tenant_id, $create_question_config_body) { $returnType = '\FastComments\Client\Model\CreateQuestionConfigResponse'; - $request = $this->createQuestionConfigRequest($tenant_id, $create_question_config_body, $contentType); + $request = $this->createQuestionConfigRequest($tenant_id, $create_question_config_body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -6083,9 +5368,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function createQuestionConfigRequest($tenant_id, $create_question_config_body, string $contentType = self::contentTypes['createQuestionConfig'][0]) + public function createQuestionConfigRequest($tenant_id, $create_question_config_body) { - + $contentType = self::contentTypes['createQuestionConfig'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -6199,9 +5485,9 @@ public function createQuestionConfigRequest($tenant_id, $create_question_config_ * @throws \InvalidArgumentException * @return \FastComments\Client\Model\CreateQuestionResultResponse|\FastComments\Client\Model\APIError */ - public function createQuestionResult($tenant_id, $create_question_result_body, string $contentType = self::contentTypes['createQuestionResult'][0]) + public function createQuestionResult($tenant_id, $create_question_result_body) { - list($response) = $this->createQuestionResultWithHttpInfo($tenant_id, $create_question_result_body, $contentType); + list($response) = $this->createQuestionResultWithHttpInfo($tenant_id, $create_question_result_body); return $response; } @@ -6218,9 +5504,9 @@ public function createQuestionResult($tenant_id, $create_question_result_body, s * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\CreateQuestionResultResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function createQuestionResultWithHttpInfo($tenant_id, $create_question_result_body, string $contentType = self::contentTypes['createQuestionResult'][0]) + public function createQuestionResultWithHttpInfo($tenant_id, $create_question_result_body) { - $request = $this->createQuestionResultRequest($tenant_id, $create_question_result_body, $contentType); + $request = $this->createQuestionResultRequest($tenant_id, $create_question_result_body); try { $options = $this->createHttpClientOption(); @@ -6247,61 +5533,21 @@ public function createQuestionResultWithHttpInfo($tenant_id, $create_question_re switch($statusCode) { case 200: - if ('\FastComments\Client\Model\CreateQuestionResultResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\CreateQuestionResultResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\CreateQuestionResultResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\CreateQuestionResultResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -6315,34 +5561,11 @@ public function createQuestionResultWithHttpInfo($tenant_id, $create_question_re ); } - $returnType = '\FastComments\Client\Model\CreateQuestionResultResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\CreateQuestionResultResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -6352,7 +5575,7 @@ public function createQuestionResultWithHttpInfo($tenant_id, $create_question_re $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -6360,8 +5583,10 @@ public function createQuestionResultWithHttpInfo($tenant_id, $create_question_re $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -6378,9 +5603,9 @@ public function createQuestionResultWithHttpInfo($tenant_id, $create_question_re * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createQuestionResultAsync($tenant_id, $create_question_result_body, string $contentType = self::contentTypes['createQuestionResult'][0]) + public function createQuestionResultAsync($tenant_id, $create_question_result_body) { - return $this->createQuestionResultAsyncWithHttpInfo($tenant_id, $create_question_result_body, $contentType) + return $this->createQuestionResultAsyncWithHttpInfo($tenant_id, $create_question_result_body) ->then( function ($response) { return $response[0]; @@ -6400,10 +5625,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createQuestionResultAsyncWithHttpInfo($tenant_id, $create_question_result_body, string $contentType = self::contentTypes['createQuestionResult'][0]) + public function createQuestionResultAsyncWithHttpInfo($tenant_id, $create_question_result_body) { $returnType = '\FastComments\Client\Model\CreateQuestionResultResponse'; - $request = $this->createQuestionResultRequest($tenant_id, $create_question_result_body, $contentType); + $request = $this->createQuestionResultRequest($tenant_id, $create_question_result_body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -6451,9 +5676,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function createQuestionResultRequest($tenant_id, $create_question_result_body, string $contentType = self::contentTypes['createQuestionResult'][0]) + public function createQuestionResultRequest($tenant_id, $create_question_result_body) { - + $contentType = self::contentTypes['createQuestionResult'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -6567,9 +5793,9 @@ public function createQuestionResultRequest($tenant_id, $create_question_result_ * @throws \InvalidArgumentException * @return \FastComments\Client\Model\CreateSubscriptionAPIResponse */ - public function createSubscription($tenant_id, $create_api_user_subscription_data, string $contentType = self::contentTypes['createSubscription'][0]) + public function createSubscription($tenant_id, $create_api_user_subscription_data) { - list($response) = $this->createSubscriptionWithHttpInfo($tenant_id, $create_api_user_subscription_data, $contentType); + list($response) = $this->createSubscriptionWithHttpInfo($tenant_id, $create_api_user_subscription_data); return $response; } @@ -6586,9 +5812,9 @@ public function createSubscription($tenant_id, $create_api_user_subscription_dat * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\CreateSubscriptionAPIResponse, HTTP status code, HTTP response headers (array of strings) */ - public function createSubscriptionWithHttpInfo($tenant_id, $create_api_user_subscription_data, string $contentType = self::contentTypes['createSubscription'][0]) + public function createSubscriptionWithHttpInfo($tenant_id, $create_api_user_subscription_data) { - $request = $this->createSubscriptionRequest($tenant_id, $create_api_user_subscription_data, $contentType); + $request = $this->createSubscriptionRequest($tenant_id, $create_api_user_subscription_data); try { $options = $this->createHttpClientOption(); @@ -6615,34 +5841,15 @@ public function createSubscriptionWithHttpInfo($tenant_id, $create_api_user_subs switch($statusCode) { case 200: - if ('\FastComments\Client\Model\CreateSubscriptionAPIResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\CreateSubscriptionAPIResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\CreateSubscriptionAPIResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\CreateSubscriptionAPIResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -6656,34 +5863,11 @@ public function createSubscriptionWithHttpInfo($tenant_id, $create_api_user_subs ); } - $returnType = '\FastComments\Client\Model\CreateSubscriptionAPIResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\CreateSubscriptionAPIResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -6693,8 +5877,10 @@ public function createSubscriptionWithHttpInfo($tenant_id, $create_api_user_subs $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -6711,9 +5897,9 @@ public function createSubscriptionWithHttpInfo($tenant_id, $create_api_user_subs * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createSubscriptionAsync($tenant_id, $create_api_user_subscription_data, string $contentType = self::contentTypes['createSubscription'][0]) + public function createSubscriptionAsync($tenant_id, $create_api_user_subscription_data) { - return $this->createSubscriptionAsyncWithHttpInfo($tenant_id, $create_api_user_subscription_data, $contentType) + return $this->createSubscriptionAsyncWithHttpInfo($tenant_id, $create_api_user_subscription_data) ->then( function ($response) { return $response[0]; @@ -6733,10 +5919,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createSubscriptionAsyncWithHttpInfo($tenant_id, $create_api_user_subscription_data, string $contentType = self::contentTypes['createSubscription'][0]) + public function createSubscriptionAsyncWithHttpInfo($tenant_id, $create_api_user_subscription_data) { $returnType = '\FastComments\Client\Model\CreateSubscriptionAPIResponse'; - $request = $this->createSubscriptionRequest($tenant_id, $create_api_user_subscription_data, $contentType); + $request = $this->createSubscriptionRequest($tenant_id, $create_api_user_subscription_data); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -6784,9 +5970,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function createSubscriptionRequest($tenant_id, $create_api_user_subscription_data, string $contentType = self::contentTypes['createSubscription'][0]) + public function createSubscriptionRequest($tenant_id, $create_api_user_subscription_data) { - + $contentType = self::contentTypes['createSubscription'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -6900,9 +6087,9 @@ public function createSubscriptionRequest($tenant_id, $create_api_user_subscript * @throws \InvalidArgumentException * @return \FastComments\Client\Model\CreateTenantResponse|\FastComments\Client\Model\APIError */ - public function createTenant($tenant_id, $create_tenant_body, string $contentType = self::contentTypes['createTenant'][0]) + public function createTenant($tenant_id, $create_tenant_body) { - list($response) = $this->createTenantWithHttpInfo($tenant_id, $create_tenant_body, $contentType); + list($response) = $this->createTenantWithHttpInfo($tenant_id, $create_tenant_body); return $response; } @@ -6919,9 +6106,9 @@ public function createTenant($tenant_id, $create_tenant_body, string $contentTyp * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\CreateTenantResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function createTenantWithHttpInfo($tenant_id, $create_tenant_body, string $contentType = self::contentTypes['createTenant'][0]) + public function createTenantWithHttpInfo($tenant_id, $create_tenant_body) { - $request = $this->createTenantRequest($tenant_id, $create_tenant_body, $contentType); + $request = $this->createTenantRequest($tenant_id, $create_tenant_body); try { $options = $this->createHttpClientOption(); @@ -6948,61 +6135,21 @@ public function createTenantWithHttpInfo($tenant_id, $create_tenant_body, string switch($statusCode) { case 200: - if ('\FastComments\Client\Model\CreateTenantResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\CreateTenantResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\CreateTenantResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\CreateTenantResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -7016,34 +6163,11 @@ public function createTenantWithHttpInfo($tenant_id, $create_tenant_body, string ); } - $returnType = '\FastComments\Client\Model\CreateTenantResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\CreateTenantResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -7053,7 +6177,7 @@ public function createTenantWithHttpInfo($tenant_id, $create_tenant_body, string $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -7061,8 +6185,10 @@ public function createTenantWithHttpInfo($tenant_id, $create_tenant_body, string $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -7079,9 +6205,9 @@ public function createTenantWithHttpInfo($tenant_id, $create_tenant_body, string * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createTenantAsync($tenant_id, $create_tenant_body, string $contentType = self::contentTypes['createTenant'][0]) + public function createTenantAsync($tenant_id, $create_tenant_body) { - return $this->createTenantAsyncWithHttpInfo($tenant_id, $create_tenant_body, $contentType) + return $this->createTenantAsyncWithHttpInfo($tenant_id, $create_tenant_body) ->then( function ($response) { return $response[0]; @@ -7101,10 +6227,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createTenantAsyncWithHttpInfo($tenant_id, $create_tenant_body, string $contentType = self::contentTypes['createTenant'][0]) + public function createTenantAsyncWithHttpInfo($tenant_id, $create_tenant_body) { $returnType = '\FastComments\Client\Model\CreateTenantResponse'; - $request = $this->createTenantRequest($tenant_id, $create_tenant_body, $contentType); + $request = $this->createTenantRequest($tenant_id, $create_tenant_body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -7152,9 +6278,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function createTenantRequest($tenant_id, $create_tenant_body, string $contentType = self::contentTypes['createTenant'][0]) + public function createTenantRequest($tenant_id, $create_tenant_body) { - + $contentType = self::contentTypes['createTenant'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -7268,9 +6395,9 @@ public function createTenantRequest($tenant_id, $create_tenant_body, string $con * @throws \InvalidArgumentException * @return \FastComments\Client\Model\CreateTenantPackageResponse|\FastComments\Client\Model\APIError */ - public function createTenantPackage($tenant_id, $create_tenant_package_body, string $contentType = self::contentTypes['createTenantPackage'][0]) + public function createTenantPackage($tenant_id, $create_tenant_package_body) { - list($response) = $this->createTenantPackageWithHttpInfo($tenant_id, $create_tenant_package_body, $contentType); + list($response) = $this->createTenantPackageWithHttpInfo($tenant_id, $create_tenant_package_body); return $response; } @@ -7287,9 +6414,9 @@ public function createTenantPackage($tenant_id, $create_tenant_package_body, str * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\CreateTenantPackageResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function createTenantPackageWithHttpInfo($tenant_id, $create_tenant_package_body, string $contentType = self::contentTypes['createTenantPackage'][0]) + public function createTenantPackageWithHttpInfo($tenant_id, $create_tenant_package_body) { - $request = $this->createTenantPackageRequest($tenant_id, $create_tenant_package_body, $contentType); + $request = $this->createTenantPackageRequest($tenant_id, $create_tenant_package_body); try { $options = $this->createHttpClientOption(); @@ -7316,61 +6443,21 @@ public function createTenantPackageWithHttpInfo($tenant_id, $create_tenant_packa switch($statusCode) { case 200: - if ('\FastComments\Client\Model\CreateTenantPackageResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\CreateTenantPackageResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\CreateTenantPackageResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\CreateTenantPackageResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -7384,34 +6471,11 @@ public function createTenantPackageWithHttpInfo($tenant_id, $create_tenant_packa ); } - $returnType = '\FastComments\Client\Model\CreateTenantPackageResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\CreateTenantPackageResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -7421,7 +6485,7 @@ public function createTenantPackageWithHttpInfo($tenant_id, $create_tenant_packa $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -7429,8 +6493,10 @@ public function createTenantPackageWithHttpInfo($tenant_id, $create_tenant_packa $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -7447,9 +6513,9 @@ public function createTenantPackageWithHttpInfo($tenant_id, $create_tenant_packa * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createTenantPackageAsync($tenant_id, $create_tenant_package_body, string $contentType = self::contentTypes['createTenantPackage'][0]) + public function createTenantPackageAsync($tenant_id, $create_tenant_package_body) { - return $this->createTenantPackageAsyncWithHttpInfo($tenant_id, $create_tenant_package_body, $contentType) + return $this->createTenantPackageAsyncWithHttpInfo($tenant_id, $create_tenant_package_body) ->then( function ($response) { return $response[0]; @@ -7469,10 +6535,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createTenantPackageAsyncWithHttpInfo($tenant_id, $create_tenant_package_body, string $contentType = self::contentTypes['createTenantPackage'][0]) + public function createTenantPackageAsyncWithHttpInfo($tenant_id, $create_tenant_package_body) { $returnType = '\FastComments\Client\Model\CreateTenantPackageResponse'; - $request = $this->createTenantPackageRequest($tenant_id, $create_tenant_package_body, $contentType); + $request = $this->createTenantPackageRequest($tenant_id, $create_tenant_package_body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -7520,9 +6586,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function createTenantPackageRequest($tenant_id, $create_tenant_package_body, string $contentType = self::contentTypes['createTenantPackage'][0]) + public function createTenantPackageRequest($tenant_id, $create_tenant_package_body) { - + $contentType = self::contentTypes['createTenantPackage'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -7636,9 +6703,9 @@ public function createTenantPackageRequest($tenant_id, $create_tenant_package_bo * @throws \InvalidArgumentException * @return \FastComments\Client\Model\CreateTenantUserResponse|\FastComments\Client\Model\APIError */ - public function createTenantUser($tenant_id, $create_tenant_user_body, string $contentType = self::contentTypes['createTenantUser'][0]) + public function createTenantUser($tenant_id, $create_tenant_user_body) { - list($response) = $this->createTenantUserWithHttpInfo($tenant_id, $create_tenant_user_body, $contentType); + list($response) = $this->createTenantUserWithHttpInfo($tenant_id, $create_tenant_user_body); return $response; } @@ -7655,9 +6722,9 @@ public function createTenantUser($tenant_id, $create_tenant_user_body, string $c * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\CreateTenantUserResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function createTenantUserWithHttpInfo($tenant_id, $create_tenant_user_body, string $contentType = self::contentTypes['createTenantUser'][0]) + public function createTenantUserWithHttpInfo($tenant_id, $create_tenant_user_body) { - $request = $this->createTenantUserRequest($tenant_id, $create_tenant_user_body, $contentType); + $request = $this->createTenantUserRequest($tenant_id, $create_tenant_user_body); try { $options = $this->createHttpClientOption(); @@ -7684,61 +6751,21 @@ public function createTenantUserWithHttpInfo($tenant_id, $create_tenant_user_bod switch($statusCode) { case 200: - if ('\FastComments\Client\Model\CreateTenantUserResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\CreateTenantUserResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\CreateTenantUserResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\CreateTenantUserResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -7752,34 +6779,11 @@ public function createTenantUserWithHttpInfo($tenant_id, $create_tenant_user_bod ); } - $returnType = '\FastComments\Client\Model\CreateTenantUserResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\CreateTenantUserResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -7789,7 +6793,7 @@ public function createTenantUserWithHttpInfo($tenant_id, $create_tenant_user_bod $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -7797,8 +6801,10 @@ public function createTenantUserWithHttpInfo($tenant_id, $create_tenant_user_bod $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -7815,9 +6821,9 @@ public function createTenantUserWithHttpInfo($tenant_id, $create_tenant_user_bod * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createTenantUserAsync($tenant_id, $create_tenant_user_body, string $contentType = self::contentTypes['createTenantUser'][0]) + public function createTenantUserAsync($tenant_id, $create_tenant_user_body) { - return $this->createTenantUserAsyncWithHttpInfo($tenant_id, $create_tenant_user_body, $contentType) + return $this->createTenantUserAsyncWithHttpInfo($tenant_id, $create_tenant_user_body) ->then( function ($response) { return $response[0]; @@ -7837,10 +6843,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createTenantUserAsyncWithHttpInfo($tenant_id, $create_tenant_user_body, string $contentType = self::contentTypes['createTenantUser'][0]) + public function createTenantUserAsyncWithHttpInfo($tenant_id, $create_tenant_user_body) { $returnType = '\FastComments\Client\Model\CreateTenantUserResponse'; - $request = $this->createTenantUserRequest($tenant_id, $create_tenant_user_body, $contentType); + $request = $this->createTenantUserRequest($tenant_id, $create_tenant_user_body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -7888,9 +6894,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function createTenantUserRequest($tenant_id, $create_tenant_user_body, string $contentType = self::contentTypes['createTenantUser'][0]) + public function createTenantUserRequest($tenant_id, $create_tenant_user_body) { - + $contentType = self::contentTypes['createTenantUser'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -8005,9 +7012,9 @@ public function createTenantUserRequest($tenant_id, $create_tenant_user_body, st * @throws \InvalidArgumentException * @return \FastComments\Client\Model\CreateTicketResponse|\FastComments\Client\Model\APIError */ - public function createTicket($tenant_id, $user_id, $create_ticket_body, string $contentType = self::contentTypes['createTicket'][0]) + public function createTicket($tenant_id, $user_id, $create_ticket_body) { - list($response) = $this->createTicketWithHttpInfo($tenant_id, $user_id, $create_ticket_body, $contentType); + list($response) = $this->createTicketWithHttpInfo($tenant_id, $user_id, $create_ticket_body); return $response; } @@ -8025,9 +7032,9 @@ public function createTicket($tenant_id, $user_id, $create_ticket_body, string $ * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\CreateTicketResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function createTicketWithHttpInfo($tenant_id, $user_id, $create_ticket_body, string $contentType = self::contentTypes['createTicket'][0]) + public function createTicketWithHttpInfo($tenant_id, $user_id, $create_ticket_body) { - $request = $this->createTicketRequest($tenant_id, $user_id, $create_ticket_body, $contentType); + $request = $this->createTicketRequest($tenant_id, $user_id, $create_ticket_body); try { $options = $this->createHttpClientOption(); @@ -8054,61 +7061,21 @@ public function createTicketWithHttpInfo($tenant_id, $user_id, $create_ticket_bo switch($statusCode) { case 200: - if ('\FastComments\Client\Model\CreateTicketResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\CreateTicketResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\CreateTicketResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\CreateTicketResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -8122,34 +7089,11 @@ public function createTicketWithHttpInfo($tenant_id, $user_id, $create_ticket_bo ); } - $returnType = '\FastComments\Client\Model\CreateTicketResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\CreateTicketResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -8159,7 +7103,7 @@ public function createTicketWithHttpInfo($tenant_id, $user_id, $create_ticket_bo $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -8167,8 +7111,10 @@ public function createTicketWithHttpInfo($tenant_id, $user_id, $create_ticket_bo $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -8186,9 +7132,9 @@ public function createTicketWithHttpInfo($tenant_id, $user_id, $create_ticket_bo * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createTicketAsync($tenant_id, $user_id, $create_ticket_body, string $contentType = self::contentTypes['createTicket'][0]) + public function createTicketAsync($tenant_id, $user_id, $create_ticket_body) { - return $this->createTicketAsyncWithHttpInfo($tenant_id, $user_id, $create_ticket_body, $contentType) + return $this->createTicketAsyncWithHttpInfo($tenant_id, $user_id, $create_ticket_body) ->then( function ($response) { return $response[0]; @@ -8209,10 +7155,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createTicketAsyncWithHttpInfo($tenant_id, $user_id, $create_ticket_body, string $contentType = self::contentTypes['createTicket'][0]) + public function createTicketAsyncWithHttpInfo($tenant_id, $user_id, $create_ticket_body) { $returnType = '\FastComments\Client\Model\CreateTicketResponse'; - $request = $this->createTicketRequest($tenant_id, $user_id, $create_ticket_body, $contentType); + $request = $this->createTicketRequest($tenant_id, $user_id, $create_ticket_body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -8261,9 +7207,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function createTicketRequest($tenant_id, $user_id, $create_ticket_body, string $contentType = self::contentTypes['createTicket'][0]) + public function createTicketRequest($tenant_id, $user_id, $create_ticket_body) { - + $contentType = self::contentTypes['createTicket'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -8393,9 +7340,9 @@ public function createTicketRequest($tenant_id, $user_id, $create_ticket_body, s * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APICreateUserBadgeResponse|\FastComments\Client\Model\APIError */ - public function createUserBadge($tenant_id, $create_user_badge_params, string $contentType = self::contentTypes['createUserBadge'][0]) + public function createUserBadge($tenant_id, $create_user_badge_params) { - list($response) = $this->createUserBadgeWithHttpInfo($tenant_id, $create_user_badge_params, $contentType); + list($response) = $this->createUserBadgeWithHttpInfo($tenant_id, $create_user_badge_params); return $response; } @@ -8412,9 +7359,9 @@ public function createUserBadge($tenant_id, $create_user_badge_params, string $c * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APICreateUserBadgeResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function createUserBadgeWithHttpInfo($tenant_id, $create_user_badge_params, string $contentType = self::contentTypes['createUserBadge'][0]) + public function createUserBadgeWithHttpInfo($tenant_id, $create_user_badge_params) { - $request = $this->createUserBadgeRequest($tenant_id, $create_user_badge_params, $contentType); + $request = $this->createUserBadgeRequest($tenant_id, $create_user_badge_params); try { $options = $this->createHttpClientOption(); @@ -8441,61 +7388,21 @@ public function createUserBadgeWithHttpInfo($tenant_id, $create_user_badge_param switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APICreateUserBadgeResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APICreateUserBadgeResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APICreateUserBadgeResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APICreateUserBadgeResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -8509,34 +7416,11 @@ public function createUserBadgeWithHttpInfo($tenant_id, $create_user_badge_param ); } - $returnType = '\FastComments\Client\Model\APICreateUserBadgeResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APICreateUserBadgeResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -8546,7 +7430,7 @@ public function createUserBadgeWithHttpInfo($tenant_id, $create_user_badge_param $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -8554,8 +7438,10 @@ public function createUserBadgeWithHttpInfo($tenant_id, $create_user_badge_param $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -8572,9 +7458,9 @@ public function createUserBadgeWithHttpInfo($tenant_id, $create_user_badge_param * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createUserBadgeAsync($tenant_id, $create_user_badge_params, string $contentType = self::contentTypes['createUserBadge'][0]) + public function createUserBadgeAsync($tenant_id, $create_user_badge_params) { - return $this->createUserBadgeAsyncWithHttpInfo($tenant_id, $create_user_badge_params, $contentType) + return $this->createUserBadgeAsyncWithHttpInfo($tenant_id, $create_user_badge_params) ->then( function ($response) { return $response[0]; @@ -8594,10 +7480,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createUserBadgeAsyncWithHttpInfo($tenant_id, $create_user_badge_params, string $contentType = self::contentTypes['createUserBadge'][0]) + public function createUserBadgeAsyncWithHttpInfo($tenant_id, $create_user_badge_params) { $returnType = '\FastComments\Client\Model\APICreateUserBadgeResponse'; - $request = $this->createUserBadgeRequest($tenant_id, $create_user_badge_params, $contentType); + $request = $this->createUserBadgeRequest($tenant_id, $create_user_badge_params); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -8645,9 +7531,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function createUserBadgeRequest($tenant_id, $create_user_badge_params, string $contentType = self::contentTypes['createUserBadge'][0]) + public function createUserBadgeRequest($tenant_id, $create_user_badge_params) { - + $contentType = self::contentTypes['createUserBadge'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -8753,6 +7640,8 @@ public function createUserBadgeRequest($tenant_id, $create_user_badge_params, st * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $comment_id comment_id (required) * @param string $direction direction (required) @@ -8764,9 +7653,9 @@ public function createUserBadgeRequest($tenant_id, $create_user_badge_params, st * @throws \InvalidArgumentException * @return \FastComments\Client\Model\VoteResponse|\FastComments\Client\Model\APIError */ - public function createVote($tenant_id, $comment_id, $direction, $user_id = null, $anon_user_id = null, string $contentType = self::contentTypes['createVote'][0]) + public function createVote($tenant_id, $comment_id, $direction, array $options = []) { - list($response) = $this->createVoteWithHttpInfo($tenant_id, $comment_id, $direction, $user_id, $anon_user_id, $contentType); + list($response) = $this->createVoteWithHttpInfo($tenant_id, $comment_id, $direction, $options); return $response; } @@ -8775,6 +7664,8 @@ public function createVote($tenant_id, $comment_id, $direction, $user_id = null, * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param string $direction (required) @@ -8786,9 +7677,9 @@ public function createVote($tenant_id, $comment_id, $direction, $user_id = null, * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\VoteResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function createVoteWithHttpInfo($tenant_id, $comment_id, $direction, $user_id = null, $anon_user_id = null, string $contentType = self::contentTypes['createVote'][0]) + public function createVoteWithHttpInfo($tenant_id, $comment_id, $direction, array $options = []) { - $request = $this->createVoteRequest($tenant_id, $comment_id, $direction, $user_id, $anon_user_id, $contentType); + $request = $this->createVoteRequest($tenant_id, $comment_id, $direction, $options); try { $options = $this->createHttpClientOption(); @@ -8815,61 +7706,21 @@ public function createVoteWithHttpInfo($tenant_id, $comment_id, $direction, $use switch($statusCode) { case 200: - if ('\FastComments\Client\Model\VoteResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\VoteResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\VoteResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\VoteResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -8883,34 +7734,11 @@ public function createVoteWithHttpInfo($tenant_id, $comment_id, $direction, $use ); } - $returnType = '\FastComments\Client\Model\VoteResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\VoteResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -8920,7 +7748,7 @@ public function createVoteWithHttpInfo($tenant_id, $comment_id, $direction, $use $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -8928,8 +7756,10 @@ public function createVoteWithHttpInfo($tenant_id, $comment_id, $direction, $use $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -8939,6 +7769,8 @@ public function createVoteWithHttpInfo($tenant_id, $comment_id, $direction, $use * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param string $direction (required) @@ -8949,9 +7781,9 @@ public function createVoteWithHttpInfo($tenant_id, $comment_id, $direction, $use * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createVoteAsync($tenant_id, $comment_id, $direction, $user_id = null, $anon_user_id = null, string $contentType = self::contentTypes['createVote'][0]) + public function createVoteAsync($tenant_id, $comment_id, $direction, array $options = []) { - return $this->createVoteAsyncWithHttpInfo($tenant_id, $comment_id, $direction, $user_id, $anon_user_id, $contentType) + return $this->createVoteAsyncWithHttpInfo($tenant_id, $comment_id, $direction, $options) ->then( function ($response) { return $response[0]; @@ -8964,6 +7796,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param string $direction (required) @@ -8974,10 +7808,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createVoteAsyncWithHttpInfo($tenant_id, $comment_id, $direction, $user_id = null, $anon_user_id = null, string $contentType = self::contentTypes['createVote'][0]) + public function createVoteAsyncWithHttpInfo($tenant_id, $comment_id, $direction, array $options = []) { $returnType = '\FastComments\Client\Model\VoteResponse'; - $request = $this->createVoteRequest($tenant_id, $comment_id, $direction, $user_id, $anon_user_id, $contentType); + $request = $this->createVoteRequest($tenant_id, $comment_id, $direction, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -9018,6 +7852,8 @@ function ($exception) { /** * Create request for operation 'createVote' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param string $direction (required) @@ -9028,9 +7864,13 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function createVoteRequest($tenant_id, $comment_id, $direction, $user_id = null, $anon_user_id = null, string $contentType = self::contentTypes['createVote'][0]) + public function createVoteRequest($tenant_id, $comment_id, $direction, array $options = []) { - + // unbox the optional parameters and request options from the $options array + $user_id = array_key_exists('user_id', $options) ? $options['user_id'] : null; + $anon_user_id = array_key_exists('anon_user_id', $options) ? $options['anon_user_id'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['createVote'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -9174,6 +8014,8 @@ public function createVoteRequest($tenant_id, $comment_id, $direction, $user_id * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $id id (required) * @param string|null $context_user_id context_user_id (optional) @@ -9184,9 +8026,9 @@ public function createVoteRequest($tenant_id, $comment_id, $direction, $user_id * @throws \InvalidArgumentException * @return \FastComments\Client\Model\DeleteCommentResult|\FastComments\Client\Model\APIError */ - public function deleteComment($tenant_id, $id, $context_user_id = null, $is_live = null, string $contentType = self::contentTypes['deleteComment'][0]) + public function deleteComment($tenant_id, $id, array $options = []) { - list($response) = $this->deleteCommentWithHttpInfo($tenant_id, $id, $context_user_id, $is_live, $contentType); + list($response) = $this->deleteCommentWithHttpInfo($tenant_id, $id, $options); return $response; } @@ -9195,6 +8037,8 @@ public function deleteComment($tenant_id, $id, $context_user_id = null, $is_live * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param string|null $context_user_id (optional) @@ -9205,9 +8049,9 @@ public function deleteComment($tenant_id, $id, $context_user_id = null, $is_live * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\DeleteCommentResult|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function deleteCommentWithHttpInfo($tenant_id, $id, $context_user_id = null, $is_live = null, string $contentType = self::contentTypes['deleteComment'][0]) + public function deleteCommentWithHttpInfo($tenant_id, $id, array $options = []) { - $request = $this->deleteCommentRequest($tenant_id, $id, $context_user_id, $is_live, $contentType); + $request = $this->deleteCommentRequest($tenant_id, $id, $options); try { $options = $this->createHttpClientOption(); @@ -9234,61 +8078,21 @@ public function deleteCommentWithHttpInfo($tenant_id, $id, $context_user_id = nu switch($statusCode) { case 200: - if ('\FastComments\Client\Model\DeleteCommentResult' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\DeleteCommentResult' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\DeleteCommentResult', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\DeleteCommentResult', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -9302,34 +8106,11 @@ public function deleteCommentWithHttpInfo($tenant_id, $id, $context_user_id = nu ); } - $returnType = '\FastComments\Client\Model\DeleteCommentResult'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\DeleteCommentResult', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -9339,7 +8120,7 @@ public function deleteCommentWithHttpInfo($tenant_id, $id, $context_user_id = nu $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -9347,8 +8128,10 @@ public function deleteCommentWithHttpInfo($tenant_id, $id, $context_user_id = nu $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -9358,6 +8141,8 @@ public function deleteCommentWithHttpInfo($tenant_id, $id, $context_user_id = nu * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param string|null $context_user_id (optional) @@ -9367,9 +8152,9 @@ public function deleteCommentWithHttpInfo($tenant_id, $id, $context_user_id = nu * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteCommentAsync($tenant_id, $id, $context_user_id = null, $is_live = null, string $contentType = self::contentTypes['deleteComment'][0]) + public function deleteCommentAsync($tenant_id, $id, array $options = []) { - return $this->deleteCommentAsyncWithHttpInfo($tenant_id, $id, $context_user_id, $is_live, $contentType) + return $this->deleteCommentAsyncWithHttpInfo($tenant_id, $id, $options) ->then( function ($response) { return $response[0]; @@ -9382,6 +8167,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param string|null $context_user_id (optional) @@ -9391,10 +8178,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteCommentAsyncWithHttpInfo($tenant_id, $id, $context_user_id = null, $is_live = null, string $contentType = self::contentTypes['deleteComment'][0]) + public function deleteCommentAsyncWithHttpInfo($tenant_id, $id, array $options = []) { $returnType = '\FastComments\Client\Model\DeleteCommentResult'; - $request = $this->deleteCommentRequest($tenant_id, $id, $context_user_id, $is_live, $contentType); + $request = $this->deleteCommentRequest($tenant_id, $id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -9435,6 +8222,8 @@ function ($exception) { /** * Create request for operation 'deleteComment' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param string|null $context_user_id (optional) @@ -9444,9 +8233,13 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteCommentRequest($tenant_id, $id, $context_user_id = null, $is_live = null, string $contentType = self::contentTypes['deleteComment'][0]) + public function deleteCommentRequest($tenant_id, $id, array $options = []) { - + // unbox the optional parameters and request options from the $options array + $context_user_id = array_key_exists('context_user_id', $options) ? $options['context_user_id'] : null; + $is_live = array_key_exists('is_live', $options) ? $options['is_live'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['deleteComment'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -9503,7 +8296,7 @@ public function deleteCommentRequest($tenant_id, $id, $context_user_id = null, $ // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -9581,9 +8374,9 @@ public function deleteCommentRequest($tenant_id, $id, $context_user_id = null, $ * @throws \InvalidArgumentException * @return \FastComments\Client\Model\DeleteDomainConfigResponse */ - public function deleteDomainConfig($tenant_id, $domain, string $contentType = self::contentTypes['deleteDomainConfig'][0]) + public function deleteDomainConfig($tenant_id, $domain) { - list($response) = $this->deleteDomainConfigWithHttpInfo($tenant_id, $domain, $contentType); + list($response) = $this->deleteDomainConfigWithHttpInfo($tenant_id, $domain); return $response; } @@ -9600,9 +8393,9 @@ public function deleteDomainConfig($tenant_id, $domain, string $contentType = se * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\DeleteDomainConfigResponse, HTTP status code, HTTP response headers (array of strings) */ - public function deleteDomainConfigWithHttpInfo($tenant_id, $domain, string $contentType = self::contentTypes['deleteDomainConfig'][0]) + public function deleteDomainConfigWithHttpInfo($tenant_id, $domain) { - $request = $this->deleteDomainConfigRequest($tenant_id, $domain, $contentType); + $request = $this->deleteDomainConfigRequest($tenant_id, $domain); try { $options = $this->createHttpClientOption(); @@ -9629,34 +8422,15 @@ public function deleteDomainConfigWithHttpInfo($tenant_id, $domain, string $cont switch($statusCode) { case 200: - if ('\FastComments\Client\Model\DeleteDomainConfigResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\DeleteDomainConfigResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\DeleteDomainConfigResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\DeleteDomainConfigResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -9670,34 +8444,11 @@ public function deleteDomainConfigWithHttpInfo($tenant_id, $domain, string $cont ); } - $returnType = '\FastComments\Client\Model\DeleteDomainConfigResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\DeleteDomainConfigResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -9707,8 +8458,10 @@ public function deleteDomainConfigWithHttpInfo($tenant_id, $domain, string $cont $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -9725,9 +8478,9 @@ public function deleteDomainConfigWithHttpInfo($tenant_id, $domain, string $cont * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteDomainConfigAsync($tenant_id, $domain, string $contentType = self::contentTypes['deleteDomainConfig'][0]) + public function deleteDomainConfigAsync($tenant_id, $domain) { - return $this->deleteDomainConfigAsyncWithHttpInfo($tenant_id, $domain, $contentType) + return $this->deleteDomainConfigAsyncWithHttpInfo($tenant_id, $domain) ->then( function ($response) { return $response[0]; @@ -9747,10 +8500,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteDomainConfigAsyncWithHttpInfo($tenant_id, $domain, string $contentType = self::contentTypes['deleteDomainConfig'][0]) + public function deleteDomainConfigAsyncWithHttpInfo($tenant_id, $domain) { $returnType = '\FastComments\Client\Model\DeleteDomainConfigResponse'; - $request = $this->deleteDomainConfigRequest($tenant_id, $domain, $contentType); + $request = $this->deleteDomainConfigRequest($tenant_id, $domain); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -9798,9 +8551,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteDomainConfigRequest($tenant_id, $domain, string $contentType = self::contentTypes['deleteDomainConfig'][0]) + public function deleteDomainConfigRequest($tenant_id, $domain) { - + $contentType = self::contentTypes['deleteDomainConfig'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -9837,7 +8591,7 @@ public function deleteDomainConfigRequest($tenant_id, $domain, string $contentTy // path params if ($domain !== null) { $resourcePath = str_replace( - '{' . 'domain' . '}', + '{domain}', ObjectSerializer::toPathValue($domain), $resourcePath ); @@ -9915,9 +8669,9 @@ public function deleteDomainConfigRequest($tenant_id, $domain, string $contentTy * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError */ - public function deleteEmailTemplate($tenant_id, $id, string $contentType = self::contentTypes['deleteEmailTemplate'][0]) + public function deleteEmailTemplate($tenant_id, $id) { - list($response) = $this->deleteEmailTemplateWithHttpInfo($tenant_id, $id, $contentType); + list($response) = $this->deleteEmailTemplateWithHttpInfo($tenant_id, $id); return $response; } @@ -9934,9 +8688,9 @@ public function deleteEmailTemplate($tenant_id, $id, string $contentType = self: * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function deleteEmailTemplateWithHttpInfo($tenant_id, $id, string $contentType = self::contentTypes['deleteEmailTemplate'][0]) + public function deleteEmailTemplateWithHttpInfo($tenant_id, $id) { - $request = $this->deleteEmailTemplateRequest($tenant_id, $id, $contentType); + $request = $this->deleteEmailTemplateRequest($tenant_id, $id); try { $options = $this->createHttpClientOption(); @@ -9963,61 +8717,21 @@ public function deleteEmailTemplateWithHttpInfo($tenant_id, $id, string $content switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APIEmptyResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIEmptyResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIEmptyResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -10031,34 +8745,11 @@ public function deleteEmailTemplateWithHttpInfo($tenant_id, $id, string $content ); } - $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -10068,7 +8759,7 @@ public function deleteEmailTemplateWithHttpInfo($tenant_id, $id, string $content $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -10076,8 +8767,10 @@ public function deleteEmailTemplateWithHttpInfo($tenant_id, $id, string $content $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -10094,9 +8787,9 @@ public function deleteEmailTemplateWithHttpInfo($tenant_id, $id, string $content * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteEmailTemplateAsync($tenant_id, $id, string $contentType = self::contentTypes['deleteEmailTemplate'][0]) + public function deleteEmailTemplateAsync($tenant_id, $id) { - return $this->deleteEmailTemplateAsyncWithHttpInfo($tenant_id, $id, $contentType) + return $this->deleteEmailTemplateAsyncWithHttpInfo($tenant_id, $id) ->then( function ($response) { return $response[0]; @@ -10116,10 +8809,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteEmailTemplateAsyncWithHttpInfo($tenant_id, $id, string $contentType = self::contentTypes['deleteEmailTemplate'][0]) + public function deleteEmailTemplateAsyncWithHttpInfo($tenant_id, $id) { $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - $request = $this->deleteEmailTemplateRequest($tenant_id, $id, $contentType); + $request = $this->deleteEmailTemplateRequest($tenant_id, $id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -10167,9 +8860,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteEmailTemplateRequest($tenant_id, $id, string $contentType = self::contentTypes['deleteEmailTemplate'][0]) + public function deleteEmailTemplateRequest($tenant_id, $id) { - + $contentType = self::contentTypes['deleteEmailTemplate'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -10206,7 +8900,7 @@ public function deleteEmailTemplateRequest($tenant_id, $id, string $contentType // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -10285,9 +8979,9 @@ public function deleteEmailTemplateRequest($tenant_id, $id, string $contentType * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError */ - public function deleteEmailTemplateRenderError($tenant_id, $id, $error_id, string $contentType = self::contentTypes['deleteEmailTemplateRenderError'][0]) + public function deleteEmailTemplateRenderError($tenant_id, $id, $error_id) { - list($response) = $this->deleteEmailTemplateRenderErrorWithHttpInfo($tenant_id, $id, $error_id, $contentType); + list($response) = $this->deleteEmailTemplateRenderErrorWithHttpInfo($tenant_id, $id, $error_id); return $response; } @@ -10305,9 +8999,9 @@ public function deleteEmailTemplateRenderError($tenant_id, $id, $error_id, strin * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function deleteEmailTemplateRenderErrorWithHttpInfo($tenant_id, $id, $error_id, string $contentType = self::contentTypes['deleteEmailTemplateRenderError'][0]) + public function deleteEmailTemplateRenderErrorWithHttpInfo($tenant_id, $id, $error_id) { - $request = $this->deleteEmailTemplateRenderErrorRequest($tenant_id, $id, $error_id, $contentType); + $request = $this->deleteEmailTemplateRenderErrorRequest($tenant_id, $id, $error_id); try { $options = $this->createHttpClientOption(); @@ -10334,61 +9028,21 @@ public function deleteEmailTemplateRenderErrorWithHttpInfo($tenant_id, $id, $err switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APIEmptyResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIEmptyResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIEmptyResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -10402,34 +9056,11 @@ public function deleteEmailTemplateRenderErrorWithHttpInfo($tenant_id, $id, $err ); } - $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -10439,7 +9070,7 @@ public function deleteEmailTemplateRenderErrorWithHttpInfo($tenant_id, $id, $err $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -10447,8 +9078,10 @@ public function deleteEmailTemplateRenderErrorWithHttpInfo($tenant_id, $id, $err $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -10466,9 +9099,9 @@ public function deleteEmailTemplateRenderErrorWithHttpInfo($tenant_id, $id, $err * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteEmailTemplateRenderErrorAsync($tenant_id, $id, $error_id, string $contentType = self::contentTypes['deleteEmailTemplateRenderError'][0]) + public function deleteEmailTemplateRenderErrorAsync($tenant_id, $id, $error_id) { - return $this->deleteEmailTemplateRenderErrorAsyncWithHttpInfo($tenant_id, $id, $error_id, $contentType) + return $this->deleteEmailTemplateRenderErrorAsyncWithHttpInfo($tenant_id, $id, $error_id) ->then( function ($response) { return $response[0]; @@ -10489,10 +9122,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteEmailTemplateRenderErrorAsyncWithHttpInfo($tenant_id, $id, $error_id, string $contentType = self::contentTypes['deleteEmailTemplateRenderError'][0]) + public function deleteEmailTemplateRenderErrorAsyncWithHttpInfo($tenant_id, $id, $error_id) { $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - $request = $this->deleteEmailTemplateRenderErrorRequest($tenant_id, $id, $error_id, $contentType); + $request = $this->deleteEmailTemplateRenderErrorRequest($tenant_id, $id, $error_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -10541,9 +9174,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteEmailTemplateRenderErrorRequest($tenant_id, $id, $error_id, string $contentType = self::contentTypes['deleteEmailTemplateRenderError'][0]) + public function deleteEmailTemplateRenderErrorRequest($tenant_id, $id, $error_id) { - + $contentType = self::contentTypes['deleteEmailTemplateRenderError'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -10587,7 +9221,7 @@ public function deleteEmailTemplateRenderErrorRequest($tenant_id, $id, $error_id // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -10595,7 +9229,7 @@ public function deleteEmailTemplateRenderErrorRequest($tenant_id, $id, $error_id // path params if ($error_id !== null) { $resourcePath = str_replace( - '{' . 'errorId' . '}', + '{errorId}', ObjectSerializer::toPathValue($error_id), $resourcePath ); @@ -10665,8 +9299,8 @@ public function deleteEmailTemplateRenderErrorRequest($tenant_id, $id, $error_id * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * @param string $tenant_id tenant_id (required) * @param string $tag tag (required) - * @param string|null $tenant_id tenant_id (optional) * @param \FastComments\Client\Model\DeleteHashTagRequestBody|null $delete_hash_tag_request_body delete_hash_tag_request_body (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteHashTag'] to see the possible values for this operation * @@ -10674,9 +9308,9 @@ public function deleteEmailTemplateRenderErrorRequest($tenant_id, $id, $error_id * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError */ - public function deleteHashTag($tag, $tenant_id = null, $delete_hash_tag_request_body = null, string $contentType = self::contentTypes['deleteHashTag'][0]) + public function deleteHashTag($tenant_id, $tag, $delete_hash_tag_request_body = null) { - list($response) = $this->deleteHashTagWithHttpInfo($tag, $tenant_id, $delete_hash_tag_request_body, $contentType); + list($response) = $this->deleteHashTagWithHttpInfo($tenant_id, $tag, $delete_hash_tag_request_body); return $response; } @@ -10685,8 +9319,8 @@ public function deleteHashTag($tag, $tenant_id = null, $delete_hash_tag_request_ * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * @param string $tenant_id (required) * @param string $tag (required) - * @param string|null $tenant_id (optional) * @param \FastComments\Client\Model\DeleteHashTagRequestBody|null $delete_hash_tag_request_body (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteHashTag'] to see the possible values for this operation * @@ -10694,9 +9328,9 @@ public function deleteHashTag($tag, $tenant_id = null, $delete_hash_tag_request_ * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function deleteHashTagWithHttpInfo($tag, $tenant_id = null, $delete_hash_tag_request_body = null, string $contentType = self::contentTypes['deleteHashTag'][0]) + public function deleteHashTagWithHttpInfo($tenant_id, $tag, $delete_hash_tag_request_body = null) { - $request = $this->deleteHashTagRequest($tag, $tenant_id, $delete_hash_tag_request_body, $contentType); + $request = $this->deleteHashTagRequest($tenant_id, $tag, $delete_hash_tag_request_body); try { $options = $this->createHttpClientOption(); @@ -10723,61 +9357,21 @@ public function deleteHashTagWithHttpInfo($tag, $tenant_id = null, $delete_hash_ switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APIEmptyResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIEmptyResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIEmptyResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -10791,34 +9385,11 @@ public function deleteHashTagWithHttpInfo($tag, $tenant_id = null, $delete_hash_ ); } - $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -10828,7 +9399,7 @@ public function deleteHashTagWithHttpInfo($tag, $tenant_id = null, $delete_hash_ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -10836,8 +9407,10 @@ public function deleteHashTagWithHttpInfo($tag, $tenant_id = null, $delete_hash_ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -10847,17 +9420,17 @@ public function deleteHashTagWithHttpInfo($tag, $tenant_id = null, $delete_hash_ * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * @param string $tenant_id (required) * @param string $tag (required) - * @param string|null $tenant_id (optional) * @param \FastComments\Client\Model\DeleteHashTagRequestBody|null $delete_hash_tag_request_body (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteHashTag'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteHashTagAsync($tag, $tenant_id = null, $delete_hash_tag_request_body = null, string $contentType = self::contentTypes['deleteHashTag'][0]) + public function deleteHashTagAsync($tenant_id, $tag, $delete_hash_tag_request_body = null) { - return $this->deleteHashTagAsyncWithHttpInfo($tag, $tenant_id, $delete_hash_tag_request_body, $contentType) + return $this->deleteHashTagAsyncWithHttpInfo($tenant_id, $tag, $delete_hash_tag_request_body) ->then( function ($response) { return $response[0]; @@ -10870,18 +9443,18 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * @param string $tenant_id (required) * @param string $tag (required) - * @param string|null $tenant_id (optional) * @param \FastComments\Client\Model\DeleteHashTagRequestBody|null $delete_hash_tag_request_body (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteHashTag'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteHashTagAsyncWithHttpInfo($tag, $tenant_id = null, $delete_hash_tag_request_body = null, string $contentType = self::contentTypes['deleteHashTag'][0]) + public function deleteHashTagAsyncWithHttpInfo($tenant_id, $tag, $delete_hash_tag_request_body = null) { $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - $request = $this->deleteHashTagRequest($tag, $tenant_id, $delete_hash_tag_request_body, $contentType); + $request = $this->deleteHashTagRequest($tenant_id, $tag, $delete_hash_tag_request_body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -10922,16 +9495,24 @@ function ($exception) { /** * Create request for operation 'deleteHashTag' * + * @param string $tenant_id (required) * @param string $tag (required) - * @param string|null $tenant_id (optional) * @param \FastComments\Client\Model\DeleteHashTagRequestBody|null $delete_hash_tag_request_body (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteHashTag'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteHashTagRequest($tag, $tenant_id = null, $delete_hash_tag_request_body = null, string $contentType = self::contentTypes['deleteHashTag'][0]) + public function deleteHashTagRequest($tenant_id, $tag, $delete_hash_tag_request_body = null) { + $contentType = self::contentTypes['deleteHashTag'][0]; + + // verify the required parameter 'tenant_id' is set + if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $tenant_id when calling deleteHashTag' + ); + } // verify the required parameter 'tag' is set if ($tag === null || (is_array($tag) && count($tag) === 0)) { @@ -10942,7 +9523,6 @@ public function deleteHashTagRequest($tag, $tenant_id = null, $delete_hash_tag_r - $resourcePath = '/api/v1/hash-tags/{tag}'; $formParams = []; $queryParams = []; @@ -10957,14 +9537,14 @@ public function deleteHashTagRequest($tag, $tenant_id = null, $delete_hash_tag_r 'string', // openApiType 'form', // style true, // explode - false // required + true // required ) ?? []); // path params if ($tag !== null) { $resourcePath = str_replace( - '{' . 'tag' . '}', + '{tag}', ObjectSerializer::toPathValue($tag), $resourcePath ); @@ -11041,6 +9621,8 @@ public function deleteHashTagRequest($tag, $tenant_id = null, $delete_hash_tag_r * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $id id (required) * @param string|null $send_email send_email (optional) @@ -11050,9 +9632,9 @@ public function deleteHashTagRequest($tag, $tenant_id = null, $delete_hash_tag_r * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError */ - public function deleteModerator($tenant_id, $id, $send_email = null, string $contentType = self::contentTypes['deleteModerator'][0]) + public function deleteModerator($tenant_id, $id, $send_email = null) { - list($response) = $this->deleteModeratorWithHttpInfo($tenant_id, $id, $send_email, $contentType); + list($response) = $this->deleteModeratorWithHttpInfo($tenant_id, $id, $send_email); return $response; } @@ -11061,6 +9643,8 @@ public function deleteModerator($tenant_id, $id, $send_email = null, string $con * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param string|null $send_email (optional) @@ -11070,9 +9654,9 @@ public function deleteModerator($tenant_id, $id, $send_email = null, string $con * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function deleteModeratorWithHttpInfo($tenant_id, $id, $send_email = null, string $contentType = self::contentTypes['deleteModerator'][0]) + public function deleteModeratorWithHttpInfo($tenant_id, $id, $send_email = null) { - $request = $this->deleteModeratorRequest($tenant_id, $id, $send_email, $contentType); + $request = $this->deleteModeratorRequest($tenant_id, $id, $send_email); try { $options = $this->createHttpClientOption(); @@ -11099,61 +9683,21 @@ public function deleteModeratorWithHttpInfo($tenant_id, $id, $send_email = null, switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APIEmptyResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIEmptyResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIEmptyResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -11167,34 +9711,11 @@ public function deleteModeratorWithHttpInfo($tenant_id, $id, $send_email = null, ); } - $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -11204,7 +9725,7 @@ public function deleteModeratorWithHttpInfo($tenant_id, $id, $send_email = null, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -11212,8 +9733,10 @@ public function deleteModeratorWithHttpInfo($tenant_id, $id, $send_email = null, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -11223,6 +9746,8 @@ public function deleteModeratorWithHttpInfo($tenant_id, $id, $send_email = null, * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param string|null $send_email (optional) @@ -11231,9 +9756,9 @@ public function deleteModeratorWithHttpInfo($tenant_id, $id, $send_email = null, * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteModeratorAsync($tenant_id, $id, $send_email = null, string $contentType = self::contentTypes['deleteModerator'][0]) + public function deleteModeratorAsync($tenant_id, $id, $send_email = null) { - return $this->deleteModeratorAsyncWithHttpInfo($tenant_id, $id, $send_email, $contentType) + return $this->deleteModeratorAsyncWithHttpInfo($tenant_id, $id, $send_email) ->then( function ($response) { return $response[0]; @@ -11246,6 +9771,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param string|null $send_email (optional) @@ -11254,10 +9781,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteModeratorAsyncWithHttpInfo($tenant_id, $id, $send_email = null, string $contentType = self::contentTypes['deleteModerator'][0]) + public function deleteModeratorAsyncWithHttpInfo($tenant_id, $id, $send_email = null) { $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - $request = $this->deleteModeratorRequest($tenant_id, $id, $send_email, $contentType); + $request = $this->deleteModeratorRequest($tenant_id, $id, $send_email); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -11298,6 +9825,8 @@ function ($exception) { /** * Create request for operation 'deleteModerator' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param string|null $send_email (optional) @@ -11306,9 +9835,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteModeratorRequest($tenant_id, $id, $send_email = null, string $contentType = self::contentTypes['deleteModerator'][0]) + public function deleteModeratorRequest($tenant_id, $id, $send_email = null) { - + $contentType = self::contentTypes['deleteModerator'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -11355,7 +9885,7 @@ public function deleteModeratorRequest($tenant_id, $id, $send_email = null, stri // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -11433,9 +9963,9 @@ public function deleteModeratorRequest($tenant_id, $id, $send_email = null, stri * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError */ - public function deleteNotificationCount($tenant_id, $id, string $contentType = self::contentTypes['deleteNotificationCount'][0]) + public function deleteNotificationCount($tenant_id, $id) { - list($response) = $this->deleteNotificationCountWithHttpInfo($tenant_id, $id, $contentType); + list($response) = $this->deleteNotificationCountWithHttpInfo($tenant_id, $id); return $response; } @@ -11452,9 +9982,9 @@ public function deleteNotificationCount($tenant_id, $id, string $contentType = s * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function deleteNotificationCountWithHttpInfo($tenant_id, $id, string $contentType = self::contentTypes['deleteNotificationCount'][0]) + public function deleteNotificationCountWithHttpInfo($tenant_id, $id) { - $request = $this->deleteNotificationCountRequest($tenant_id, $id, $contentType); + $request = $this->deleteNotificationCountRequest($tenant_id, $id); try { $options = $this->createHttpClientOption(); @@ -11481,61 +10011,21 @@ public function deleteNotificationCountWithHttpInfo($tenant_id, $id, string $con switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APIEmptyResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIEmptyResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIEmptyResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -11549,34 +10039,11 @@ public function deleteNotificationCountWithHttpInfo($tenant_id, $id, string $con ); } - $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -11586,7 +10053,7 @@ public function deleteNotificationCountWithHttpInfo($tenant_id, $id, string $con $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -11594,8 +10061,10 @@ public function deleteNotificationCountWithHttpInfo($tenant_id, $id, string $con $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -11612,9 +10081,9 @@ public function deleteNotificationCountWithHttpInfo($tenant_id, $id, string $con * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteNotificationCountAsync($tenant_id, $id, string $contentType = self::contentTypes['deleteNotificationCount'][0]) + public function deleteNotificationCountAsync($tenant_id, $id) { - return $this->deleteNotificationCountAsyncWithHttpInfo($tenant_id, $id, $contentType) + return $this->deleteNotificationCountAsyncWithHttpInfo($tenant_id, $id) ->then( function ($response) { return $response[0]; @@ -11634,10 +10103,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteNotificationCountAsyncWithHttpInfo($tenant_id, $id, string $contentType = self::contentTypes['deleteNotificationCount'][0]) + public function deleteNotificationCountAsyncWithHttpInfo($tenant_id, $id) { $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - $request = $this->deleteNotificationCountRequest($tenant_id, $id, $contentType); + $request = $this->deleteNotificationCountRequest($tenant_id, $id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -11685,9 +10154,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteNotificationCountRequest($tenant_id, $id, string $contentType = self::contentTypes['deleteNotificationCount'][0]) + public function deleteNotificationCountRequest($tenant_id, $id) { - + $contentType = self::contentTypes['deleteNotificationCount'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -11724,7 +10194,7 @@ public function deleteNotificationCountRequest($tenant_id, $id, string $contentT // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -11802,9 +10272,9 @@ public function deleteNotificationCountRequest($tenant_id, $id, string $contentT * @throws \InvalidArgumentException * @return \FastComments\Client\Model\DeletePageAPIResponse */ - public function deletePage($tenant_id, $id, string $contentType = self::contentTypes['deletePage'][0]) + public function deletePage($tenant_id, $id) { - list($response) = $this->deletePageWithHttpInfo($tenant_id, $id, $contentType); + list($response) = $this->deletePageWithHttpInfo($tenant_id, $id); return $response; } @@ -11821,9 +10291,9 @@ public function deletePage($tenant_id, $id, string $contentType = self::contentT * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\DeletePageAPIResponse, HTTP status code, HTTP response headers (array of strings) */ - public function deletePageWithHttpInfo($tenant_id, $id, string $contentType = self::contentTypes['deletePage'][0]) + public function deletePageWithHttpInfo($tenant_id, $id) { - $request = $this->deletePageRequest($tenant_id, $id, $contentType); + $request = $this->deletePageRequest($tenant_id, $id); try { $options = $this->createHttpClientOption(); @@ -11850,34 +10320,15 @@ public function deletePageWithHttpInfo($tenant_id, $id, string $contentType = se switch($statusCode) { case 200: - if ('\FastComments\Client\Model\DeletePageAPIResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\DeletePageAPIResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\DeletePageAPIResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\DeletePageAPIResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -11891,34 +10342,11 @@ public function deletePageWithHttpInfo($tenant_id, $id, string $contentType = se ); } - $returnType = '\FastComments\Client\Model\DeletePageAPIResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\DeletePageAPIResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -11928,8 +10356,10 @@ public function deletePageWithHttpInfo($tenant_id, $id, string $contentType = se $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -11946,9 +10376,9 @@ public function deletePageWithHttpInfo($tenant_id, $id, string $contentType = se * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deletePageAsync($tenant_id, $id, string $contentType = self::contentTypes['deletePage'][0]) + public function deletePageAsync($tenant_id, $id) { - return $this->deletePageAsyncWithHttpInfo($tenant_id, $id, $contentType) + return $this->deletePageAsyncWithHttpInfo($tenant_id, $id) ->then( function ($response) { return $response[0]; @@ -11968,10 +10398,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deletePageAsyncWithHttpInfo($tenant_id, $id, string $contentType = self::contentTypes['deletePage'][0]) + public function deletePageAsyncWithHttpInfo($tenant_id, $id) { $returnType = '\FastComments\Client\Model\DeletePageAPIResponse'; - $request = $this->deletePageRequest($tenant_id, $id, $contentType); + $request = $this->deletePageRequest($tenant_id, $id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -12019,9 +10449,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deletePageRequest($tenant_id, $id, string $contentType = self::contentTypes['deletePage'][0]) + public function deletePageRequest($tenant_id, $id) { - + $contentType = self::contentTypes['deletePage'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -12058,7 +10489,7 @@ public function deletePageRequest($tenant_id, $id, string $contentType = self::c // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -12136,9 +10567,9 @@ public function deletePageRequest($tenant_id, $id, string $contentType = self::c * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError */ - public function deletePendingWebhookEvent($tenant_id, $id, string $contentType = self::contentTypes['deletePendingWebhookEvent'][0]) + public function deletePendingWebhookEvent($tenant_id, $id) { - list($response) = $this->deletePendingWebhookEventWithHttpInfo($tenant_id, $id, $contentType); + list($response) = $this->deletePendingWebhookEventWithHttpInfo($tenant_id, $id); return $response; } @@ -12155,9 +10586,9 @@ public function deletePendingWebhookEvent($tenant_id, $id, string $contentType = * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function deletePendingWebhookEventWithHttpInfo($tenant_id, $id, string $contentType = self::contentTypes['deletePendingWebhookEvent'][0]) + public function deletePendingWebhookEventWithHttpInfo($tenant_id, $id) { - $request = $this->deletePendingWebhookEventRequest($tenant_id, $id, $contentType); + $request = $this->deletePendingWebhookEventRequest($tenant_id, $id); try { $options = $this->createHttpClientOption(); @@ -12184,61 +10615,21 @@ public function deletePendingWebhookEventWithHttpInfo($tenant_id, $id, string $c switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APIEmptyResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIEmptyResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIEmptyResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -12252,34 +10643,11 @@ public function deletePendingWebhookEventWithHttpInfo($tenant_id, $id, string $c ); } - $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -12289,7 +10657,7 @@ public function deletePendingWebhookEventWithHttpInfo($tenant_id, $id, string $c $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -12297,8 +10665,10 @@ public function deletePendingWebhookEventWithHttpInfo($tenant_id, $id, string $c $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -12315,9 +10685,9 @@ public function deletePendingWebhookEventWithHttpInfo($tenant_id, $id, string $c * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deletePendingWebhookEventAsync($tenant_id, $id, string $contentType = self::contentTypes['deletePendingWebhookEvent'][0]) + public function deletePendingWebhookEventAsync($tenant_id, $id) { - return $this->deletePendingWebhookEventAsyncWithHttpInfo($tenant_id, $id, $contentType) + return $this->deletePendingWebhookEventAsyncWithHttpInfo($tenant_id, $id) ->then( function ($response) { return $response[0]; @@ -12337,10 +10707,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deletePendingWebhookEventAsyncWithHttpInfo($tenant_id, $id, string $contentType = self::contentTypes['deletePendingWebhookEvent'][0]) + public function deletePendingWebhookEventAsyncWithHttpInfo($tenant_id, $id) { $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - $request = $this->deletePendingWebhookEventRequest($tenant_id, $id, $contentType); + $request = $this->deletePendingWebhookEventRequest($tenant_id, $id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -12388,9 +10758,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deletePendingWebhookEventRequest($tenant_id, $id, string $contentType = self::contentTypes['deletePendingWebhookEvent'][0]) + public function deletePendingWebhookEventRequest($tenant_id, $id) { - + $contentType = self::contentTypes['deletePendingWebhookEvent'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -12427,7 +10798,7 @@ public function deletePendingWebhookEventRequest($tenant_id, $id, string $conten // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -12505,9 +10876,9 @@ public function deletePendingWebhookEventRequest($tenant_id, $id, string $conten * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError */ - public function deleteQuestionConfig($tenant_id, $id, string $contentType = self::contentTypes['deleteQuestionConfig'][0]) + public function deleteQuestionConfig($tenant_id, $id) { - list($response) = $this->deleteQuestionConfigWithHttpInfo($tenant_id, $id, $contentType); + list($response) = $this->deleteQuestionConfigWithHttpInfo($tenant_id, $id); return $response; } @@ -12524,9 +10895,9 @@ public function deleteQuestionConfig($tenant_id, $id, string $contentType = self * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function deleteQuestionConfigWithHttpInfo($tenant_id, $id, string $contentType = self::contentTypes['deleteQuestionConfig'][0]) + public function deleteQuestionConfigWithHttpInfo($tenant_id, $id) { - $request = $this->deleteQuestionConfigRequest($tenant_id, $id, $contentType); + $request = $this->deleteQuestionConfigRequest($tenant_id, $id); try { $options = $this->createHttpClientOption(); @@ -12553,61 +10924,21 @@ public function deleteQuestionConfigWithHttpInfo($tenant_id, $id, string $conten switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APIEmptyResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIEmptyResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIEmptyResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -12621,34 +10952,11 @@ public function deleteQuestionConfigWithHttpInfo($tenant_id, $id, string $conten ); } - $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -12658,7 +10966,7 @@ public function deleteQuestionConfigWithHttpInfo($tenant_id, $id, string $conten $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -12666,8 +10974,10 @@ public function deleteQuestionConfigWithHttpInfo($tenant_id, $id, string $conten $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -12684,9 +10994,9 @@ public function deleteQuestionConfigWithHttpInfo($tenant_id, $id, string $conten * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteQuestionConfigAsync($tenant_id, $id, string $contentType = self::contentTypes['deleteQuestionConfig'][0]) + public function deleteQuestionConfigAsync($tenant_id, $id) { - return $this->deleteQuestionConfigAsyncWithHttpInfo($tenant_id, $id, $contentType) + return $this->deleteQuestionConfigAsyncWithHttpInfo($tenant_id, $id) ->then( function ($response) { return $response[0]; @@ -12706,10 +11016,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteQuestionConfigAsyncWithHttpInfo($tenant_id, $id, string $contentType = self::contentTypes['deleteQuestionConfig'][0]) + public function deleteQuestionConfigAsyncWithHttpInfo($tenant_id, $id) { $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - $request = $this->deleteQuestionConfigRequest($tenant_id, $id, $contentType); + $request = $this->deleteQuestionConfigRequest($tenant_id, $id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -12757,9 +11067,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteQuestionConfigRequest($tenant_id, $id, string $contentType = self::contentTypes['deleteQuestionConfig'][0]) + public function deleteQuestionConfigRequest($tenant_id, $id) { - + $contentType = self::contentTypes['deleteQuestionConfig'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -12796,7 +11107,7 @@ public function deleteQuestionConfigRequest($tenant_id, $id, string $contentType // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -12874,9 +11185,9 @@ public function deleteQuestionConfigRequest($tenant_id, $id, string $contentType * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError */ - public function deleteQuestionResult($tenant_id, $id, string $contentType = self::contentTypes['deleteQuestionResult'][0]) + public function deleteQuestionResult($tenant_id, $id) { - list($response) = $this->deleteQuestionResultWithHttpInfo($tenant_id, $id, $contentType); + list($response) = $this->deleteQuestionResultWithHttpInfo($tenant_id, $id); return $response; } @@ -12893,9 +11204,9 @@ public function deleteQuestionResult($tenant_id, $id, string $contentType = self * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function deleteQuestionResultWithHttpInfo($tenant_id, $id, string $contentType = self::contentTypes['deleteQuestionResult'][0]) + public function deleteQuestionResultWithHttpInfo($tenant_id, $id) { - $request = $this->deleteQuestionResultRequest($tenant_id, $id, $contentType); + $request = $this->deleteQuestionResultRequest($tenant_id, $id); try { $options = $this->createHttpClientOption(); @@ -12922,61 +11233,21 @@ public function deleteQuestionResultWithHttpInfo($tenant_id, $id, string $conten switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APIEmptyResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIEmptyResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIEmptyResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -12990,34 +11261,11 @@ public function deleteQuestionResultWithHttpInfo($tenant_id, $id, string $conten ); } - $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -13027,7 +11275,7 @@ public function deleteQuestionResultWithHttpInfo($tenant_id, $id, string $conten $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -13035,8 +11283,10 @@ public function deleteQuestionResultWithHttpInfo($tenant_id, $id, string $conten $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -13053,9 +11303,9 @@ public function deleteQuestionResultWithHttpInfo($tenant_id, $id, string $conten * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteQuestionResultAsync($tenant_id, $id, string $contentType = self::contentTypes['deleteQuestionResult'][0]) + public function deleteQuestionResultAsync($tenant_id, $id) { - return $this->deleteQuestionResultAsyncWithHttpInfo($tenant_id, $id, $contentType) + return $this->deleteQuestionResultAsyncWithHttpInfo($tenant_id, $id) ->then( function ($response) { return $response[0]; @@ -13075,10 +11325,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteQuestionResultAsyncWithHttpInfo($tenant_id, $id, string $contentType = self::contentTypes['deleteQuestionResult'][0]) + public function deleteQuestionResultAsyncWithHttpInfo($tenant_id, $id) { $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - $request = $this->deleteQuestionResultRequest($tenant_id, $id, $contentType); + $request = $this->deleteQuestionResultRequest($tenant_id, $id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -13126,9 +11376,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteQuestionResultRequest($tenant_id, $id, string $contentType = self::contentTypes['deleteQuestionResult'][0]) + public function deleteQuestionResultRequest($tenant_id, $id) { - + $contentType = self::contentTypes['deleteQuestionResult'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -13165,7 +11416,7 @@ public function deleteQuestionResultRequest($tenant_id, $id, string $contentType // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -13235,6 +11486,8 @@ public function deleteQuestionResultRequest($tenant_id, $id, string $contentType * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $id id (required) * @param bool|null $delete_comments delete_comments (optional) @@ -13245,9 +11498,9 @@ public function deleteQuestionResultRequest($tenant_id, $id, string $contentType * @throws \InvalidArgumentException * @return \FastComments\Client\Model\DeleteSSOUserAPIResponse */ - public function deleteSSOUser($tenant_id, $id, $delete_comments = null, $comment_delete_mode = null, string $contentType = self::contentTypes['deleteSSOUser'][0]) + public function deleteSSOUser($tenant_id, $id, array $options = []) { - list($response) = $this->deleteSSOUserWithHttpInfo($tenant_id, $id, $delete_comments, $comment_delete_mode, $contentType); + list($response) = $this->deleteSSOUserWithHttpInfo($tenant_id, $id, $options); return $response; } @@ -13256,6 +11509,8 @@ public function deleteSSOUser($tenant_id, $id, $delete_comments = null, $comment * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param bool|null $delete_comments (optional) @@ -13266,9 +11521,9 @@ public function deleteSSOUser($tenant_id, $id, $delete_comments = null, $comment * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\DeleteSSOUserAPIResponse, HTTP status code, HTTP response headers (array of strings) */ - public function deleteSSOUserWithHttpInfo($tenant_id, $id, $delete_comments = null, $comment_delete_mode = null, string $contentType = self::contentTypes['deleteSSOUser'][0]) + public function deleteSSOUserWithHttpInfo($tenant_id, $id, array $options = []) { - $request = $this->deleteSSOUserRequest($tenant_id, $id, $delete_comments, $comment_delete_mode, $contentType); + $request = $this->deleteSSOUserRequest($tenant_id, $id, $options); try { $options = $this->createHttpClientOption(); @@ -13295,34 +11550,15 @@ public function deleteSSOUserWithHttpInfo($tenant_id, $id, $delete_comments = nu switch($statusCode) { case 200: - if ('\FastComments\Client\Model\DeleteSSOUserAPIResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\DeleteSSOUserAPIResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\DeleteSSOUserAPIResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\DeleteSSOUserAPIResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -13336,34 +11572,11 @@ public function deleteSSOUserWithHttpInfo($tenant_id, $id, $delete_comments = nu ); } - $returnType = '\FastComments\Client\Model\DeleteSSOUserAPIResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\DeleteSSOUserAPIResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -13373,8 +11586,10 @@ public function deleteSSOUserWithHttpInfo($tenant_id, $id, $delete_comments = nu $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -13384,6 +11599,8 @@ public function deleteSSOUserWithHttpInfo($tenant_id, $id, $delete_comments = nu * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param bool|null $delete_comments (optional) @@ -13393,9 +11610,9 @@ public function deleteSSOUserWithHttpInfo($tenant_id, $id, $delete_comments = nu * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteSSOUserAsync($tenant_id, $id, $delete_comments = null, $comment_delete_mode = null, string $contentType = self::contentTypes['deleteSSOUser'][0]) + public function deleteSSOUserAsync($tenant_id, $id, array $options = []) { - return $this->deleteSSOUserAsyncWithHttpInfo($tenant_id, $id, $delete_comments, $comment_delete_mode, $contentType) + return $this->deleteSSOUserAsyncWithHttpInfo($tenant_id, $id, $options) ->then( function ($response) { return $response[0]; @@ -13408,6 +11625,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param bool|null $delete_comments (optional) @@ -13417,10 +11636,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteSSOUserAsyncWithHttpInfo($tenant_id, $id, $delete_comments = null, $comment_delete_mode = null, string $contentType = self::contentTypes['deleteSSOUser'][0]) + public function deleteSSOUserAsyncWithHttpInfo($tenant_id, $id, array $options = []) { $returnType = '\FastComments\Client\Model\DeleteSSOUserAPIResponse'; - $request = $this->deleteSSOUserRequest($tenant_id, $id, $delete_comments, $comment_delete_mode, $contentType); + $request = $this->deleteSSOUserRequest($tenant_id, $id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -13461,6 +11680,8 @@ function ($exception) { /** * Create request for operation 'deleteSSOUser' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param bool|null $delete_comments (optional) @@ -13470,9 +11691,13 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteSSOUserRequest($tenant_id, $id, $delete_comments = null, $comment_delete_mode = null, string $contentType = self::contentTypes['deleteSSOUser'][0]) + public function deleteSSOUserRequest($tenant_id, $id, array $options = []) { - + // unbox the optional parameters and request options from the $options array + $delete_comments = array_key_exists('delete_comments', $options) ? $options['delete_comments'] : null; + $comment_delete_mode = array_key_exists('comment_delete_mode', $options) ? $options['comment_delete_mode'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['deleteSSOUser'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -13529,7 +11754,7 @@ public function deleteSSOUserRequest($tenant_id, $id, $delete_comments = null, $ // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -13599,6 +11824,8 @@ public function deleteSSOUserRequest($tenant_id, $id, $delete_comments = null, $ * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $id id (required) * @param string|null $user_id user_id (optional) @@ -13608,9 +11835,9 @@ public function deleteSSOUserRequest($tenant_id, $id, $delete_comments = null, $ * @throws \InvalidArgumentException * @return \FastComments\Client\Model\DeleteSubscriptionAPIResponse */ - public function deleteSubscription($tenant_id, $id, $user_id = null, string $contentType = self::contentTypes['deleteSubscription'][0]) + public function deleteSubscription($tenant_id, $id, $user_id = null) { - list($response) = $this->deleteSubscriptionWithHttpInfo($tenant_id, $id, $user_id, $contentType); + list($response) = $this->deleteSubscriptionWithHttpInfo($tenant_id, $id, $user_id); return $response; } @@ -13619,6 +11846,8 @@ public function deleteSubscription($tenant_id, $id, $user_id = null, string $con * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param string|null $user_id (optional) @@ -13628,9 +11857,9 @@ public function deleteSubscription($tenant_id, $id, $user_id = null, string $con * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\DeleteSubscriptionAPIResponse, HTTP status code, HTTP response headers (array of strings) */ - public function deleteSubscriptionWithHttpInfo($tenant_id, $id, $user_id = null, string $contentType = self::contentTypes['deleteSubscription'][0]) + public function deleteSubscriptionWithHttpInfo($tenant_id, $id, $user_id = null) { - $request = $this->deleteSubscriptionRequest($tenant_id, $id, $user_id, $contentType); + $request = $this->deleteSubscriptionRequest($tenant_id, $id, $user_id); try { $options = $this->createHttpClientOption(); @@ -13657,34 +11886,15 @@ public function deleteSubscriptionWithHttpInfo($tenant_id, $id, $user_id = null, switch($statusCode) { case 200: - if ('\FastComments\Client\Model\DeleteSubscriptionAPIResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\DeleteSubscriptionAPIResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\DeleteSubscriptionAPIResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\DeleteSubscriptionAPIResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -13698,34 +11908,11 @@ public function deleteSubscriptionWithHttpInfo($tenant_id, $id, $user_id = null, ); } - $returnType = '\FastComments\Client\Model\DeleteSubscriptionAPIResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\DeleteSubscriptionAPIResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -13735,8 +11922,10 @@ public function deleteSubscriptionWithHttpInfo($tenant_id, $id, $user_id = null, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -13746,6 +11935,8 @@ public function deleteSubscriptionWithHttpInfo($tenant_id, $id, $user_id = null, * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param string|null $user_id (optional) @@ -13754,9 +11945,9 @@ public function deleteSubscriptionWithHttpInfo($tenant_id, $id, $user_id = null, * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteSubscriptionAsync($tenant_id, $id, $user_id = null, string $contentType = self::contentTypes['deleteSubscription'][0]) + public function deleteSubscriptionAsync($tenant_id, $id, $user_id = null) { - return $this->deleteSubscriptionAsyncWithHttpInfo($tenant_id, $id, $user_id, $contentType) + return $this->deleteSubscriptionAsyncWithHttpInfo($tenant_id, $id, $user_id) ->then( function ($response) { return $response[0]; @@ -13769,6 +11960,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param string|null $user_id (optional) @@ -13777,10 +11970,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteSubscriptionAsyncWithHttpInfo($tenant_id, $id, $user_id = null, string $contentType = self::contentTypes['deleteSubscription'][0]) + public function deleteSubscriptionAsyncWithHttpInfo($tenant_id, $id, $user_id = null) { $returnType = '\FastComments\Client\Model\DeleteSubscriptionAPIResponse'; - $request = $this->deleteSubscriptionRequest($tenant_id, $id, $user_id, $contentType); + $request = $this->deleteSubscriptionRequest($tenant_id, $id, $user_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -13821,6 +12014,8 @@ function ($exception) { /** * Create request for operation 'deleteSubscription' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param string|null $user_id (optional) @@ -13829,9 +12024,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteSubscriptionRequest($tenant_id, $id, $user_id = null, string $contentType = self::contentTypes['deleteSubscription'][0]) + public function deleteSubscriptionRequest($tenant_id, $id, $user_id = null) { - + $contentType = self::contentTypes['deleteSubscription'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -13878,7 +12074,7 @@ public function deleteSubscriptionRequest($tenant_id, $id, $user_id = null, stri // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -13948,6 +12144,8 @@ public function deleteSubscriptionRequest($tenant_id, $id, $user_id = null, stri * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $id id (required) * @param string|null $sure sure (optional) @@ -13957,9 +12155,9 @@ public function deleteSubscriptionRequest($tenant_id, $id, $user_id = null, stri * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError */ - public function deleteTenant($tenant_id, $id, $sure = null, string $contentType = self::contentTypes['deleteTenant'][0]) + public function deleteTenant($tenant_id, $id, $sure = null) { - list($response) = $this->deleteTenantWithHttpInfo($tenant_id, $id, $sure, $contentType); + list($response) = $this->deleteTenantWithHttpInfo($tenant_id, $id, $sure); return $response; } @@ -13968,6 +12166,8 @@ public function deleteTenant($tenant_id, $id, $sure = null, string $contentType * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param string|null $sure (optional) @@ -13977,9 +12177,9 @@ public function deleteTenant($tenant_id, $id, $sure = null, string $contentType * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function deleteTenantWithHttpInfo($tenant_id, $id, $sure = null, string $contentType = self::contentTypes['deleteTenant'][0]) + public function deleteTenantWithHttpInfo($tenant_id, $id, $sure = null) { - $request = $this->deleteTenantRequest($tenant_id, $id, $sure, $contentType); + $request = $this->deleteTenantRequest($tenant_id, $id, $sure); try { $options = $this->createHttpClientOption(); @@ -14006,61 +12206,21 @@ public function deleteTenantWithHttpInfo($tenant_id, $id, $sure = null, string $ switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APIEmptyResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIEmptyResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIEmptyResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -14074,34 +12234,11 @@ public function deleteTenantWithHttpInfo($tenant_id, $id, $sure = null, string $ ); } - $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -14111,7 +12248,7 @@ public function deleteTenantWithHttpInfo($tenant_id, $id, $sure = null, string $ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -14119,8 +12256,10 @@ public function deleteTenantWithHttpInfo($tenant_id, $id, $sure = null, string $ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -14130,6 +12269,8 @@ public function deleteTenantWithHttpInfo($tenant_id, $id, $sure = null, string $ * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param string|null $sure (optional) @@ -14138,9 +12279,9 @@ public function deleteTenantWithHttpInfo($tenant_id, $id, $sure = null, string $ * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteTenantAsync($tenant_id, $id, $sure = null, string $contentType = self::contentTypes['deleteTenant'][0]) + public function deleteTenantAsync($tenant_id, $id, $sure = null) { - return $this->deleteTenantAsyncWithHttpInfo($tenant_id, $id, $sure, $contentType) + return $this->deleteTenantAsyncWithHttpInfo($tenant_id, $id, $sure) ->then( function ($response) { return $response[0]; @@ -14153,6 +12294,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param string|null $sure (optional) @@ -14161,10 +12304,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteTenantAsyncWithHttpInfo($tenant_id, $id, $sure = null, string $contentType = self::contentTypes['deleteTenant'][0]) + public function deleteTenantAsyncWithHttpInfo($tenant_id, $id, $sure = null) { $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - $request = $this->deleteTenantRequest($tenant_id, $id, $sure, $contentType); + $request = $this->deleteTenantRequest($tenant_id, $id, $sure); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -14205,6 +12348,8 @@ function ($exception) { /** * Create request for operation 'deleteTenant' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param string|null $sure (optional) @@ -14213,9 +12358,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteTenantRequest($tenant_id, $id, $sure = null, string $contentType = self::contentTypes['deleteTenant'][0]) + public function deleteTenantRequest($tenant_id, $id, $sure = null) { - + $contentType = self::contentTypes['deleteTenant'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -14262,7 +12408,7 @@ public function deleteTenantRequest($tenant_id, $id, $sure = null, string $conte // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -14340,9 +12486,9 @@ public function deleteTenantRequest($tenant_id, $id, $sure = null, string $conte * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError */ - public function deleteTenantPackage($tenant_id, $id, string $contentType = self::contentTypes['deleteTenantPackage'][0]) + public function deleteTenantPackage($tenant_id, $id) { - list($response) = $this->deleteTenantPackageWithHttpInfo($tenant_id, $id, $contentType); + list($response) = $this->deleteTenantPackageWithHttpInfo($tenant_id, $id); return $response; } @@ -14359,9 +12505,9 @@ public function deleteTenantPackage($tenant_id, $id, string $contentType = self: * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function deleteTenantPackageWithHttpInfo($tenant_id, $id, string $contentType = self::contentTypes['deleteTenantPackage'][0]) + public function deleteTenantPackageWithHttpInfo($tenant_id, $id) { - $request = $this->deleteTenantPackageRequest($tenant_id, $id, $contentType); + $request = $this->deleteTenantPackageRequest($tenant_id, $id); try { $options = $this->createHttpClientOption(); @@ -14388,61 +12534,21 @@ public function deleteTenantPackageWithHttpInfo($tenant_id, $id, string $content switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APIEmptyResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIEmptyResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIEmptyResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -14456,34 +12562,11 @@ public function deleteTenantPackageWithHttpInfo($tenant_id, $id, string $content ); } - $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -14493,7 +12576,7 @@ public function deleteTenantPackageWithHttpInfo($tenant_id, $id, string $content $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -14501,8 +12584,10 @@ public function deleteTenantPackageWithHttpInfo($tenant_id, $id, string $content $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -14519,9 +12604,9 @@ public function deleteTenantPackageWithHttpInfo($tenant_id, $id, string $content * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteTenantPackageAsync($tenant_id, $id, string $contentType = self::contentTypes['deleteTenantPackage'][0]) + public function deleteTenantPackageAsync($tenant_id, $id) { - return $this->deleteTenantPackageAsyncWithHttpInfo($tenant_id, $id, $contentType) + return $this->deleteTenantPackageAsyncWithHttpInfo($tenant_id, $id) ->then( function ($response) { return $response[0]; @@ -14541,10 +12626,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteTenantPackageAsyncWithHttpInfo($tenant_id, $id, string $contentType = self::contentTypes['deleteTenantPackage'][0]) + public function deleteTenantPackageAsyncWithHttpInfo($tenant_id, $id) { $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - $request = $this->deleteTenantPackageRequest($tenant_id, $id, $contentType); + $request = $this->deleteTenantPackageRequest($tenant_id, $id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -14592,9 +12677,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteTenantPackageRequest($tenant_id, $id, string $contentType = self::contentTypes['deleteTenantPackage'][0]) + public function deleteTenantPackageRequest($tenant_id, $id) { - + $contentType = self::contentTypes['deleteTenantPackage'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -14631,7 +12717,7 @@ public function deleteTenantPackageRequest($tenant_id, $id, string $contentType // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -14701,6 +12787,8 @@ public function deleteTenantPackageRequest($tenant_id, $id, string $contentType * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $id id (required) * @param string|null $delete_comments delete_comments (optional) @@ -14711,9 +12799,9 @@ public function deleteTenantPackageRequest($tenant_id, $id, string $contentType * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError */ - public function deleteTenantUser($tenant_id, $id, $delete_comments = null, $comment_delete_mode = null, string $contentType = self::contentTypes['deleteTenantUser'][0]) + public function deleteTenantUser($tenant_id, $id, array $options = []) { - list($response) = $this->deleteTenantUserWithHttpInfo($tenant_id, $id, $delete_comments, $comment_delete_mode, $contentType); + list($response) = $this->deleteTenantUserWithHttpInfo($tenant_id, $id, $options); return $response; } @@ -14722,6 +12810,8 @@ public function deleteTenantUser($tenant_id, $id, $delete_comments = null, $comm * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param string|null $delete_comments (optional) @@ -14732,9 +12822,9 @@ public function deleteTenantUser($tenant_id, $id, $delete_comments = null, $comm * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function deleteTenantUserWithHttpInfo($tenant_id, $id, $delete_comments = null, $comment_delete_mode = null, string $contentType = self::contentTypes['deleteTenantUser'][0]) + public function deleteTenantUserWithHttpInfo($tenant_id, $id, array $options = []) { - $request = $this->deleteTenantUserRequest($tenant_id, $id, $delete_comments, $comment_delete_mode, $contentType); + $request = $this->deleteTenantUserRequest($tenant_id, $id, $options); try { $options = $this->createHttpClientOption(); @@ -14761,61 +12851,21 @@ public function deleteTenantUserWithHttpInfo($tenant_id, $id, $delete_comments = switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APIEmptyResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIEmptyResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIEmptyResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -14829,34 +12879,11 @@ public function deleteTenantUserWithHttpInfo($tenant_id, $id, $delete_comments = ); } - $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -14866,7 +12893,7 @@ public function deleteTenantUserWithHttpInfo($tenant_id, $id, $delete_comments = $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -14874,8 +12901,10 @@ public function deleteTenantUserWithHttpInfo($tenant_id, $id, $delete_comments = $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -14885,6 +12914,8 @@ public function deleteTenantUserWithHttpInfo($tenant_id, $id, $delete_comments = * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param string|null $delete_comments (optional) @@ -14894,9 +12925,9 @@ public function deleteTenantUserWithHttpInfo($tenant_id, $id, $delete_comments = * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteTenantUserAsync($tenant_id, $id, $delete_comments = null, $comment_delete_mode = null, string $contentType = self::contentTypes['deleteTenantUser'][0]) + public function deleteTenantUserAsync($tenant_id, $id, array $options = []) { - return $this->deleteTenantUserAsyncWithHttpInfo($tenant_id, $id, $delete_comments, $comment_delete_mode, $contentType) + return $this->deleteTenantUserAsyncWithHttpInfo($tenant_id, $id, $options) ->then( function ($response) { return $response[0]; @@ -14909,6 +12940,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param string|null $delete_comments (optional) @@ -14918,10 +12951,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteTenantUserAsyncWithHttpInfo($tenant_id, $id, $delete_comments = null, $comment_delete_mode = null, string $contentType = self::contentTypes['deleteTenantUser'][0]) + public function deleteTenantUserAsyncWithHttpInfo($tenant_id, $id, array $options = []) { $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - $request = $this->deleteTenantUserRequest($tenant_id, $id, $delete_comments, $comment_delete_mode, $contentType); + $request = $this->deleteTenantUserRequest($tenant_id, $id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -14962,6 +12995,8 @@ function ($exception) { /** * Create request for operation 'deleteTenantUser' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param string|null $delete_comments (optional) @@ -14971,9 +13006,13 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteTenantUserRequest($tenant_id, $id, $delete_comments = null, $comment_delete_mode = null, string $contentType = self::contentTypes['deleteTenantUser'][0]) + public function deleteTenantUserRequest($tenant_id, $id, array $options = []) { - + // unbox the optional parameters and request options from the $options array + $delete_comments = array_key_exists('delete_comments', $options) ? $options['delete_comments'] : null; + $comment_delete_mode = array_key_exists('comment_delete_mode', $options) ? $options['comment_delete_mode'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['deleteTenantUser'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -15030,7 +13069,7 @@ public function deleteTenantUserRequest($tenant_id, $id, $delete_comments = null // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -15108,9 +13147,9 @@ public function deleteTenantUserRequest($tenant_id, $id, $delete_comments = null * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APIEmptySuccessResponse|\FastComments\Client\Model\APIError */ - public function deleteUserBadge($tenant_id, $id, string $contentType = self::contentTypes['deleteUserBadge'][0]) + public function deleteUserBadge($tenant_id, $id) { - list($response) = $this->deleteUserBadgeWithHttpInfo($tenant_id, $id, $contentType); + list($response) = $this->deleteUserBadgeWithHttpInfo($tenant_id, $id); return $response; } @@ -15127,9 +13166,9 @@ public function deleteUserBadge($tenant_id, $id, string $contentType = self::con * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APIEmptySuccessResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function deleteUserBadgeWithHttpInfo($tenant_id, $id, string $contentType = self::contentTypes['deleteUserBadge'][0]) + public function deleteUserBadgeWithHttpInfo($tenant_id, $id) { - $request = $this->deleteUserBadgeRequest($tenant_id, $id, $contentType); + $request = $this->deleteUserBadgeRequest($tenant_id, $id); try { $options = $this->createHttpClientOption(); @@ -15156,61 +13195,21 @@ public function deleteUserBadgeWithHttpInfo($tenant_id, $id, string $contentType switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APIEmptySuccessResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIEmptySuccessResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIEmptySuccessResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptySuccessResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -15224,34 +13223,11 @@ public function deleteUserBadgeWithHttpInfo($tenant_id, $id, string $contentType ); } - $returnType = '\FastComments\Client\Model\APIEmptySuccessResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptySuccessResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -15261,7 +13237,7 @@ public function deleteUserBadgeWithHttpInfo($tenant_id, $id, string $contentType $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -15269,8 +13245,10 @@ public function deleteUserBadgeWithHttpInfo($tenant_id, $id, string $contentType $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -15287,9 +13265,9 @@ public function deleteUserBadgeWithHttpInfo($tenant_id, $id, string $contentType * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteUserBadgeAsync($tenant_id, $id, string $contentType = self::contentTypes['deleteUserBadge'][0]) + public function deleteUserBadgeAsync($tenant_id, $id) { - return $this->deleteUserBadgeAsyncWithHttpInfo($tenant_id, $id, $contentType) + return $this->deleteUserBadgeAsyncWithHttpInfo($tenant_id, $id) ->then( function ($response) { return $response[0]; @@ -15309,10 +13287,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteUserBadgeAsyncWithHttpInfo($tenant_id, $id, string $contentType = self::contentTypes['deleteUserBadge'][0]) + public function deleteUserBadgeAsyncWithHttpInfo($tenant_id, $id) { $returnType = '\FastComments\Client\Model\APIEmptySuccessResponse'; - $request = $this->deleteUserBadgeRequest($tenant_id, $id, $contentType); + $request = $this->deleteUserBadgeRequest($tenant_id, $id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -15360,9 +13338,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteUserBadgeRequest($tenant_id, $id, string $contentType = self::contentTypes['deleteUserBadge'][0]) + public function deleteUserBadgeRequest($tenant_id, $id) { - + $contentType = self::contentTypes['deleteUserBadge'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -15399,7 +13378,7 @@ public function deleteUserBadgeRequest($tenant_id, $id, string $contentType = se // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -15469,6 +13448,8 @@ public function deleteUserBadgeRequest($tenant_id, $id, string $contentType = se * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $id id (required) * @param string|null $edit_key edit_key (optional) @@ -15478,9 +13459,9 @@ public function deleteUserBadgeRequest($tenant_id, $id, string $contentType = se * @throws \InvalidArgumentException * @return \FastComments\Client\Model\VoteDeleteResponse|\FastComments\Client\Model\APIError */ - public function deleteVote($tenant_id, $id, $edit_key = null, string $contentType = self::contentTypes['deleteVote'][0]) + public function deleteVote($tenant_id, $id, $edit_key = null) { - list($response) = $this->deleteVoteWithHttpInfo($tenant_id, $id, $edit_key, $contentType); + list($response) = $this->deleteVoteWithHttpInfo($tenant_id, $id, $edit_key); return $response; } @@ -15489,6 +13470,8 @@ public function deleteVote($tenant_id, $id, $edit_key = null, string $contentTyp * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param string|null $edit_key (optional) @@ -15498,9 +13481,9 @@ public function deleteVote($tenant_id, $id, $edit_key = null, string $contentTyp * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\VoteDeleteResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function deleteVoteWithHttpInfo($tenant_id, $id, $edit_key = null, string $contentType = self::contentTypes['deleteVote'][0]) + public function deleteVoteWithHttpInfo($tenant_id, $id, $edit_key = null) { - $request = $this->deleteVoteRequest($tenant_id, $id, $edit_key, $contentType); + $request = $this->deleteVoteRequest($tenant_id, $id, $edit_key); try { $options = $this->createHttpClientOption(); @@ -15527,61 +13510,21 @@ public function deleteVoteWithHttpInfo($tenant_id, $id, $edit_key = null, string switch($statusCode) { case 200: - if ('\FastComments\Client\Model\VoteDeleteResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\VoteDeleteResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\VoteDeleteResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\VoteDeleteResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -15595,34 +13538,11 @@ public function deleteVoteWithHttpInfo($tenant_id, $id, $edit_key = null, string ); } - $returnType = '\FastComments\Client\Model\VoteDeleteResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\VoteDeleteResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -15632,7 +13552,7 @@ public function deleteVoteWithHttpInfo($tenant_id, $id, $edit_key = null, string $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -15640,8 +13560,10 @@ public function deleteVoteWithHttpInfo($tenant_id, $id, $edit_key = null, string $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -15651,6 +13573,8 @@ public function deleteVoteWithHttpInfo($tenant_id, $id, $edit_key = null, string * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param string|null $edit_key (optional) @@ -15659,9 +13583,9 @@ public function deleteVoteWithHttpInfo($tenant_id, $id, $edit_key = null, string * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteVoteAsync($tenant_id, $id, $edit_key = null, string $contentType = self::contentTypes['deleteVote'][0]) + public function deleteVoteAsync($tenant_id, $id, $edit_key = null) { - return $this->deleteVoteAsyncWithHttpInfo($tenant_id, $id, $edit_key, $contentType) + return $this->deleteVoteAsyncWithHttpInfo($tenant_id, $id, $edit_key) ->then( function ($response) { return $response[0]; @@ -15674,6 +13598,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param string|null $edit_key (optional) @@ -15682,10 +13608,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteVoteAsyncWithHttpInfo($tenant_id, $id, $edit_key = null, string $contentType = self::contentTypes['deleteVote'][0]) + public function deleteVoteAsyncWithHttpInfo($tenant_id, $id, $edit_key = null) { $returnType = '\FastComments\Client\Model\VoteDeleteResponse'; - $request = $this->deleteVoteRequest($tenant_id, $id, $edit_key, $contentType); + $request = $this->deleteVoteRequest($tenant_id, $id, $edit_key); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -15726,6 +13652,8 @@ function ($exception) { /** * Create request for operation 'deleteVote' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param string|null $edit_key (optional) @@ -15734,9 +13662,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteVoteRequest($tenant_id, $id, $edit_key = null, string $contentType = self::contentTypes['deleteVote'][0]) + public function deleteVoteRequest($tenant_id, $id, $edit_key = null) { - + $contentType = self::contentTypes['deleteVote'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -15783,7 +13712,7 @@ public function deleteVoteRequest($tenant_id, $id, $edit_key = null, string $con // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -15853,6 +13782,8 @@ public function deleteVoteRequest($tenant_id, $id, $edit_key = null, string $con * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $id id (required) * @param string|null $user_id user_id (optional) @@ -15863,9 +13794,9 @@ public function deleteVoteRequest($tenant_id, $id, $edit_key = null, string $con * @throws \InvalidArgumentException * @return \FastComments\Client\Model\FlagCommentResponse|\FastComments\Client\Model\APIError */ - public function flagComment($tenant_id, $id, $user_id = null, $anon_user_id = null, string $contentType = self::contentTypes['flagComment'][0]) + public function flagComment($tenant_id, $id, array $options = []) { - list($response) = $this->flagCommentWithHttpInfo($tenant_id, $id, $user_id, $anon_user_id, $contentType); + list($response) = $this->flagCommentWithHttpInfo($tenant_id, $id, $options); return $response; } @@ -15874,6 +13805,8 @@ public function flagComment($tenant_id, $id, $user_id = null, $anon_user_id = nu * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param string|null $user_id (optional) @@ -15884,9 +13817,9 @@ public function flagComment($tenant_id, $id, $user_id = null, $anon_user_id = nu * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\FlagCommentResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function flagCommentWithHttpInfo($tenant_id, $id, $user_id = null, $anon_user_id = null, string $contentType = self::contentTypes['flagComment'][0]) + public function flagCommentWithHttpInfo($tenant_id, $id, array $options = []) { - $request = $this->flagCommentRequest($tenant_id, $id, $user_id, $anon_user_id, $contentType); + $request = $this->flagCommentRequest($tenant_id, $id, $options); try { $options = $this->createHttpClientOption(); @@ -15913,61 +13846,21 @@ public function flagCommentWithHttpInfo($tenant_id, $id, $user_id = null, $anon_ switch($statusCode) { case 200: - if ('\FastComments\Client\Model\FlagCommentResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\FlagCommentResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\FlagCommentResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\FlagCommentResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -15981,34 +13874,11 @@ public function flagCommentWithHttpInfo($tenant_id, $id, $user_id = null, $anon_ ); } - $returnType = '\FastComments\Client\Model\FlagCommentResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\FlagCommentResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -16018,7 +13888,7 @@ public function flagCommentWithHttpInfo($tenant_id, $id, $user_id = null, $anon_ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -16026,8 +13896,10 @@ public function flagCommentWithHttpInfo($tenant_id, $id, $user_id = null, $anon_ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -16037,6 +13909,8 @@ public function flagCommentWithHttpInfo($tenant_id, $id, $user_id = null, $anon_ * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param string|null $user_id (optional) @@ -16046,9 +13920,9 @@ public function flagCommentWithHttpInfo($tenant_id, $id, $user_id = null, $anon_ * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function flagCommentAsync($tenant_id, $id, $user_id = null, $anon_user_id = null, string $contentType = self::contentTypes['flagComment'][0]) + public function flagCommentAsync($tenant_id, $id, array $options = []) { - return $this->flagCommentAsyncWithHttpInfo($tenant_id, $id, $user_id, $anon_user_id, $contentType) + return $this->flagCommentAsyncWithHttpInfo($tenant_id, $id, $options) ->then( function ($response) { return $response[0]; @@ -16061,6 +13935,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param string|null $user_id (optional) @@ -16070,10 +13946,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function flagCommentAsyncWithHttpInfo($tenant_id, $id, $user_id = null, $anon_user_id = null, string $contentType = self::contentTypes['flagComment'][0]) + public function flagCommentAsyncWithHttpInfo($tenant_id, $id, array $options = []) { $returnType = '\FastComments\Client\Model\FlagCommentResponse'; - $request = $this->flagCommentRequest($tenant_id, $id, $user_id, $anon_user_id, $contentType); + $request = $this->flagCommentRequest($tenant_id, $id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -16114,6 +13990,8 @@ function ($exception) { /** * Create request for operation 'flagComment' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param string|null $user_id (optional) @@ -16123,9 +14001,13 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function flagCommentRequest($tenant_id, $id, $user_id = null, $anon_user_id = null, string $contentType = self::contentTypes['flagComment'][0]) + public function flagCommentRequest($tenant_id, $id, array $options = []) { - + // unbox the optional parameters and request options from the $options array + $user_id = array_key_exists('user_id', $options) ? $options['user_id'] : null; + $anon_user_id = array_key_exists('anon_user_id', $options) ? $options['anon_user_id'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['flagComment'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -16182,7 +14064,7 @@ public function flagCommentRequest($tenant_id, $id, $user_id = null, $anon_user_ // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -16252,6 +14134,8 @@ public function flagCommentRequest($tenant_id, $id, $user_id = null, $anon_user_ * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param float|null $limit limit (optional) * @param float|null $skip skip (optional) @@ -16264,9 +14148,9 @@ public function flagCommentRequest($tenant_id, $id, $user_id = null, $anon_user_ * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetAuditLogsResponse|\FastComments\Client\Model\APIError */ - public function getAuditLogs($tenant_id, $limit = null, $skip = null, $order = null, $after = null, $before = null, string $contentType = self::contentTypes['getAuditLogs'][0]) + public function getAuditLogs($tenant_id, array $options = []) { - list($response) = $this->getAuditLogsWithHttpInfo($tenant_id, $limit, $skip, $order, $after, $before, $contentType); + list($response) = $this->getAuditLogsWithHttpInfo($tenant_id, $options); return $response; } @@ -16275,6 +14159,8 @@ public function getAuditLogs($tenant_id, $limit = null, $skip = null, $order = n * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param float|null $limit (optional) * @param float|null $skip (optional) @@ -16287,9 +14173,9 @@ public function getAuditLogs($tenant_id, $limit = null, $skip = null, $order = n * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetAuditLogsResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getAuditLogsWithHttpInfo($tenant_id, $limit = null, $skip = null, $order = null, $after = null, $before = null, string $contentType = self::contentTypes['getAuditLogs'][0]) + public function getAuditLogsWithHttpInfo($tenant_id, array $options = []) { - $request = $this->getAuditLogsRequest($tenant_id, $limit, $skip, $order, $after, $before, $contentType); + $request = $this->getAuditLogsRequest($tenant_id, $options); try { $options = $this->createHttpClientOption(); @@ -16316,61 +14202,21 @@ public function getAuditLogsWithHttpInfo($tenant_id, $limit = null, $skip = null switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetAuditLogsResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetAuditLogsResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetAuditLogsResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetAuditLogsResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -16384,34 +14230,11 @@ public function getAuditLogsWithHttpInfo($tenant_id, $limit = null, $skip = null ); } - $returnType = '\FastComments\Client\Model\GetAuditLogsResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetAuditLogsResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -16421,7 +14244,7 @@ public function getAuditLogsWithHttpInfo($tenant_id, $limit = null, $skip = null $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -16429,8 +14252,10 @@ public function getAuditLogsWithHttpInfo($tenant_id, $limit = null, $skip = null $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -16440,6 +14265,8 @@ public function getAuditLogsWithHttpInfo($tenant_id, $limit = null, $skip = null * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param float|null $limit (optional) * @param float|null $skip (optional) @@ -16451,9 +14278,9 @@ public function getAuditLogsWithHttpInfo($tenant_id, $limit = null, $skip = null * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAuditLogsAsync($tenant_id, $limit = null, $skip = null, $order = null, $after = null, $before = null, string $contentType = self::contentTypes['getAuditLogs'][0]) + public function getAuditLogsAsync($tenant_id, array $options = []) { - return $this->getAuditLogsAsyncWithHttpInfo($tenant_id, $limit, $skip, $order, $after, $before, $contentType) + return $this->getAuditLogsAsyncWithHttpInfo($tenant_id, $options) ->then( function ($response) { return $response[0]; @@ -16466,6 +14293,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param float|null $limit (optional) * @param float|null $skip (optional) @@ -16477,10 +14306,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAuditLogsAsyncWithHttpInfo($tenant_id, $limit = null, $skip = null, $order = null, $after = null, $before = null, string $contentType = self::contentTypes['getAuditLogs'][0]) + public function getAuditLogsAsyncWithHttpInfo($tenant_id, array $options = []) { $returnType = '\FastComments\Client\Model\GetAuditLogsResponse'; - $request = $this->getAuditLogsRequest($tenant_id, $limit, $skip, $order, $after, $before, $contentType); + $request = $this->getAuditLogsRequest($tenant_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -16521,6 +14350,8 @@ function ($exception) { /** * Create request for operation 'getAuditLogs' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param float|null $limit (optional) * @param float|null $skip (optional) @@ -16532,9 +14363,16 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getAuditLogsRequest($tenant_id, $limit = null, $skip = null, $order = null, $after = null, $before = null, string $contentType = self::contentTypes['getAuditLogs'][0]) + public function getAuditLogsRequest($tenant_id, array $options = []) { - + // unbox the optional parameters and request options from the $options array + $limit = array_key_exists('limit', $options) ? $options['limit'] : null; + $skip = array_key_exists('skip', $options) ? $options['skip'] : null; + $order = array_key_exists('order', $options) ? $options['order'] : null; + $after = array_key_exists('after', $options) ? $options['after'] : null; + $before = array_key_exists('before', $options) ? $options['before'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['getAuditLogs'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -16684,9 +14522,9 @@ public function getAuditLogsRequest($tenant_id, $limit = null, $skip = null, $or * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetCachedNotificationCountResponse|\FastComments\Client\Model\APIError */ - public function getCachedNotificationCount($tenant_id, $id, string $contentType = self::contentTypes['getCachedNotificationCount'][0]) + public function getCachedNotificationCount($tenant_id, $id) { - list($response) = $this->getCachedNotificationCountWithHttpInfo($tenant_id, $id, $contentType); + list($response) = $this->getCachedNotificationCountWithHttpInfo($tenant_id, $id); return $response; } @@ -16703,9 +14541,9 @@ public function getCachedNotificationCount($tenant_id, $id, string $contentType * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetCachedNotificationCountResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getCachedNotificationCountWithHttpInfo($tenant_id, $id, string $contentType = self::contentTypes['getCachedNotificationCount'][0]) + public function getCachedNotificationCountWithHttpInfo($tenant_id, $id) { - $request = $this->getCachedNotificationCountRequest($tenant_id, $id, $contentType); + $request = $this->getCachedNotificationCountRequest($tenant_id, $id); try { $options = $this->createHttpClientOption(); @@ -16732,61 +14570,21 @@ public function getCachedNotificationCountWithHttpInfo($tenant_id, $id, string $ switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetCachedNotificationCountResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetCachedNotificationCountResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetCachedNotificationCountResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetCachedNotificationCountResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -16800,34 +14598,11 @@ public function getCachedNotificationCountWithHttpInfo($tenant_id, $id, string $ ); } - $returnType = '\FastComments\Client\Model\GetCachedNotificationCountResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetCachedNotificationCountResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -16837,7 +14612,7 @@ public function getCachedNotificationCountWithHttpInfo($tenant_id, $id, string $ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -16845,8 +14620,10 @@ public function getCachedNotificationCountWithHttpInfo($tenant_id, $id, string $ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -16863,9 +14640,9 @@ public function getCachedNotificationCountWithHttpInfo($tenant_id, $id, string $ * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCachedNotificationCountAsync($tenant_id, $id, string $contentType = self::contentTypes['getCachedNotificationCount'][0]) + public function getCachedNotificationCountAsync($tenant_id, $id) { - return $this->getCachedNotificationCountAsyncWithHttpInfo($tenant_id, $id, $contentType) + return $this->getCachedNotificationCountAsyncWithHttpInfo($tenant_id, $id) ->then( function ($response) { return $response[0]; @@ -16885,10 +14662,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCachedNotificationCountAsyncWithHttpInfo($tenant_id, $id, string $contentType = self::contentTypes['getCachedNotificationCount'][0]) + public function getCachedNotificationCountAsyncWithHttpInfo($tenant_id, $id) { $returnType = '\FastComments\Client\Model\GetCachedNotificationCountResponse'; - $request = $this->getCachedNotificationCountRequest($tenant_id, $id, $contentType); + $request = $this->getCachedNotificationCountRequest($tenant_id, $id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -16936,9 +14713,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getCachedNotificationCountRequest($tenant_id, $id, string $contentType = self::contentTypes['getCachedNotificationCount'][0]) + public function getCachedNotificationCountRequest($tenant_id, $id) { - + $contentType = self::contentTypes['getCachedNotificationCount'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -16975,7 +14753,7 @@ public function getCachedNotificationCountRequest($tenant_id, $id, string $conte // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -17053,9 +14831,9 @@ public function getCachedNotificationCountRequest($tenant_id, $id, string $conte * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APIGetCommentResponse|\FastComments\Client\Model\APIError */ - public function getComment($tenant_id, $id, string $contentType = self::contentTypes['getComment'][0]) + public function getComment($tenant_id, $id) { - list($response) = $this->getCommentWithHttpInfo($tenant_id, $id, $contentType); + list($response) = $this->getCommentWithHttpInfo($tenant_id, $id); return $response; } @@ -17072,9 +14850,9 @@ public function getComment($tenant_id, $id, string $contentType = self::contentT * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APIGetCommentResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getCommentWithHttpInfo($tenant_id, $id, string $contentType = self::contentTypes['getComment'][0]) + public function getCommentWithHttpInfo($tenant_id, $id) { - $request = $this->getCommentRequest($tenant_id, $id, $contentType); + $request = $this->getCommentRequest($tenant_id, $id); try { $options = $this->createHttpClientOption(); @@ -17101,61 +14879,21 @@ public function getCommentWithHttpInfo($tenant_id, $id, string $contentType = se switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APIGetCommentResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIGetCommentResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIGetCommentResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIGetCommentResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -17169,34 +14907,11 @@ public function getCommentWithHttpInfo($tenant_id, $id, string $contentType = se ); } - $returnType = '\FastComments\Client\Model\APIGetCommentResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIGetCommentResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -17206,7 +14921,7 @@ public function getCommentWithHttpInfo($tenant_id, $id, string $contentType = se $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -17214,8 +14929,10 @@ public function getCommentWithHttpInfo($tenant_id, $id, string $contentType = se $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -17232,9 +14949,9 @@ public function getCommentWithHttpInfo($tenant_id, $id, string $contentType = se * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCommentAsync($tenant_id, $id, string $contentType = self::contentTypes['getComment'][0]) + public function getCommentAsync($tenant_id, $id) { - return $this->getCommentAsyncWithHttpInfo($tenant_id, $id, $contentType) + return $this->getCommentAsyncWithHttpInfo($tenant_id, $id) ->then( function ($response) { return $response[0]; @@ -17254,10 +14971,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCommentAsyncWithHttpInfo($tenant_id, $id, string $contentType = self::contentTypes['getComment'][0]) + public function getCommentAsyncWithHttpInfo($tenant_id, $id) { $returnType = '\FastComments\Client\Model\APIGetCommentResponse'; - $request = $this->getCommentRequest($tenant_id, $id, $contentType); + $request = $this->getCommentRequest($tenant_id, $id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -17305,9 +15022,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getCommentRequest($tenant_id, $id, string $contentType = self::contentTypes['getComment'][0]) + public function getCommentRequest($tenant_id, $id) { - + $contentType = self::contentTypes['getComment'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -17344,7 +15062,7 @@ public function getCommentRequest($tenant_id, $id, string $contentType = self::c // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -17414,6 +15132,8 @@ public function getCommentRequest($tenant_id, $id, string $contentType = self::c * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param int|null $page page (optional) * @param int|null $limit limit (optional) @@ -17437,9 +15157,9 @@ public function getCommentRequest($tenant_id, $id, string $contentType = self::c * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APIGetCommentsResponse|\FastComments\Client\Model\APIError */ - public function getComments($tenant_id, $page = null, $limit = null, $skip = null, $as_tree = null, $skip_children = null, $limit_children = null, $max_tree_depth = null, $url_id = null, $user_id = null, $anon_user_id = null, $context_user_id = null, $hash_tag = null, $parent_id = null, $direction = null, $from_date = null, $to_date = null, string $contentType = self::contentTypes['getComments'][0]) + public function getComments($tenant_id, array $options = []) { - list($response) = $this->getCommentsWithHttpInfo($tenant_id, $page, $limit, $skip, $as_tree, $skip_children, $limit_children, $max_tree_depth, $url_id, $user_id, $anon_user_id, $context_user_id, $hash_tag, $parent_id, $direction, $from_date, $to_date, $contentType); + list($response) = $this->getCommentsWithHttpInfo($tenant_id, $options); return $response; } @@ -17448,6 +15168,8 @@ public function getComments($tenant_id, $page = null, $limit = null, $skip = nul * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param int|null $page (optional) * @param int|null $limit (optional) @@ -17471,9 +15193,9 @@ public function getComments($tenant_id, $page = null, $limit = null, $skip = nul * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APIGetCommentsResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getCommentsWithHttpInfo($tenant_id, $page = null, $limit = null, $skip = null, $as_tree = null, $skip_children = null, $limit_children = null, $max_tree_depth = null, $url_id = null, $user_id = null, $anon_user_id = null, $context_user_id = null, $hash_tag = null, $parent_id = null, $direction = null, $from_date = null, $to_date = null, string $contentType = self::contentTypes['getComments'][0]) + public function getCommentsWithHttpInfo($tenant_id, array $options = []) { - $request = $this->getCommentsRequest($tenant_id, $page, $limit, $skip, $as_tree, $skip_children, $limit_children, $max_tree_depth, $url_id, $user_id, $anon_user_id, $context_user_id, $hash_tag, $parent_id, $direction, $from_date, $to_date, $contentType); + $request = $this->getCommentsRequest($tenant_id, $options); try { $options = $this->createHttpClientOption(); @@ -17500,61 +15222,21 @@ public function getCommentsWithHttpInfo($tenant_id, $page = null, $limit = null, switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APIGetCommentsResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIGetCommentsResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIGetCommentsResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIGetCommentsResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -17568,34 +15250,11 @@ public function getCommentsWithHttpInfo($tenant_id, $page = null, $limit = null, ); } - $returnType = '\FastComments\Client\Model\APIGetCommentsResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIGetCommentsResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -17605,7 +15264,7 @@ public function getCommentsWithHttpInfo($tenant_id, $page = null, $limit = null, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -17613,8 +15272,10 @@ public function getCommentsWithHttpInfo($tenant_id, $page = null, $limit = null, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -17624,6 +15285,8 @@ public function getCommentsWithHttpInfo($tenant_id, $page = null, $limit = null, * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param int|null $page (optional) * @param int|null $limit (optional) @@ -17646,9 +15309,9 @@ public function getCommentsWithHttpInfo($tenant_id, $page = null, $limit = null, * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCommentsAsync($tenant_id, $page = null, $limit = null, $skip = null, $as_tree = null, $skip_children = null, $limit_children = null, $max_tree_depth = null, $url_id = null, $user_id = null, $anon_user_id = null, $context_user_id = null, $hash_tag = null, $parent_id = null, $direction = null, $from_date = null, $to_date = null, string $contentType = self::contentTypes['getComments'][0]) + public function getCommentsAsync($tenant_id, array $options = []) { - return $this->getCommentsAsyncWithHttpInfo($tenant_id, $page, $limit, $skip, $as_tree, $skip_children, $limit_children, $max_tree_depth, $url_id, $user_id, $anon_user_id, $context_user_id, $hash_tag, $parent_id, $direction, $from_date, $to_date, $contentType) + return $this->getCommentsAsyncWithHttpInfo($tenant_id, $options) ->then( function ($response) { return $response[0]; @@ -17661,6 +15324,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param int|null $page (optional) * @param int|null $limit (optional) @@ -17683,10 +15348,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCommentsAsyncWithHttpInfo($tenant_id, $page = null, $limit = null, $skip = null, $as_tree = null, $skip_children = null, $limit_children = null, $max_tree_depth = null, $url_id = null, $user_id = null, $anon_user_id = null, $context_user_id = null, $hash_tag = null, $parent_id = null, $direction = null, $from_date = null, $to_date = null, string $contentType = self::contentTypes['getComments'][0]) + public function getCommentsAsyncWithHttpInfo($tenant_id, array $options = []) { $returnType = '\FastComments\Client\Model\APIGetCommentsResponse'; - $request = $this->getCommentsRequest($tenant_id, $page, $limit, $skip, $as_tree, $skip_children, $limit_children, $max_tree_depth, $url_id, $user_id, $anon_user_id, $context_user_id, $hash_tag, $parent_id, $direction, $from_date, $to_date, $contentType); + $request = $this->getCommentsRequest($tenant_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -17727,6 +15392,8 @@ function ($exception) { /** * Create request for operation 'getComments' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param int|null $page (optional) * @param int|null $limit (optional) @@ -17749,9 +15416,27 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getCommentsRequest($tenant_id, $page = null, $limit = null, $skip = null, $as_tree = null, $skip_children = null, $limit_children = null, $max_tree_depth = null, $url_id = null, $user_id = null, $anon_user_id = null, $context_user_id = null, $hash_tag = null, $parent_id = null, $direction = null, $from_date = null, $to_date = null, string $contentType = self::contentTypes['getComments'][0]) - { - + public function getCommentsRequest($tenant_id, array $options = []) + { + // unbox the optional parameters and request options from the $options array + $page = array_key_exists('page', $options) ? $options['page'] : null; + $limit = array_key_exists('limit', $options) ? $options['limit'] : null; + $skip = array_key_exists('skip', $options) ? $options['skip'] : null; + $as_tree = array_key_exists('as_tree', $options) ? $options['as_tree'] : null; + $skip_children = array_key_exists('skip_children', $options) ? $options['skip_children'] : null; + $limit_children = array_key_exists('limit_children', $options) ? $options['limit_children'] : null; + $max_tree_depth = array_key_exists('max_tree_depth', $options) ? $options['max_tree_depth'] : null; + $url_id = array_key_exists('url_id', $options) ? $options['url_id'] : null; + $user_id = array_key_exists('user_id', $options) ? $options['user_id'] : null; + $anon_user_id = array_key_exists('anon_user_id', $options) ? $options['anon_user_id'] : null; + $context_user_id = array_key_exists('context_user_id', $options) ? $options['context_user_id'] : null; + $hash_tag = array_key_exists('hash_tag', $options) ? $options['hash_tag'] : null; + $parent_id = array_key_exists('parent_id', $options) ? $options['parent_id'] : null; + $direction = array_key_exists('direction', $options) ? $options['direction'] : null; + $from_date = array_key_exists('from_date', $options) ? $options['from_date'] : null; + $to_date = array_key_exists('to_date', $options) ? $options['to_date'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['getComments'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -18011,9 +15696,9 @@ public function getCommentsRequest($tenant_id, $page = null, $limit = null, $ski * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetDomainConfigResponse */ - public function getDomainConfig($tenant_id, $domain, string $contentType = self::contentTypes['getDomainConfig'][0]) + public function getDomainConfig($tenant_id, $domain) { - list($response) = $this->getDomainConfigWithHttpInfo($tenant_id, $domain, $contentType); + list($response) = $this->getDomainConfigWithHttpInfo($tenant_id, $domain); return $response; } @@ -18030,9 +15715,9 @@ public function getDomainConfig($tenant_id, $domain, string $contentType = self: * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetDomainConfigResponse, HTTP status code, HTTP response headers (array of strings) */ - public function getDomainConfigWithHttpInfo($tenant_id, $domain, string $contentType = self::contentTypes['getDomainConfig'][0]) + public function getDomainConfigWithHttpInfo($tenant_id, $domain) { - $request = $this->getDomainConfigRequest($tenant_id, $domain, $contentType); + $request = $this->getDomainConfigRequest($tenant_id, $domain); try { $options = $this->createHttpClientOption(); @@ -18059,34 +15744,15 @@ public function getDomainConfigWithHttpInfo($tenant_id, $domain, string $content switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetDomainConfigResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetDomainConfigResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetDomainConfigResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetDomainConfigResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -18100,34 +15766,11 @@ public function getDomainConfigWithHttpInfo($tenant_id, $domain, string $content ); } - $returnType = '\FastComments\Client\Model\GetDomainConfigResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetDomainConfigResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -18137,8 +15780,10 @@ public function getDomainConfigWithHttpInfo($tenant_id, $domain, string $content $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -18155,9 +15800,9 @@ public function getDomainConfigWithHttpInfo($tenant_id, $domain, string $content * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getDomainConfigAsync($tenant_id, $domain, string $contentType = self::contentTypes['getDomainConfig'][0]) + public function getDomainConfigAsync($tenant_id, $domain) { - return $this->getDomainConfigAsyncWithHttpInfo($tenant_id, $domain, $contentType) + return $this->getDomainConfigAsyncWithHttpInfo($tenant_id, $domain) ->then( function ($response) { return $response[0]; @@ -18177,10 +15822,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getDomainConfigAsyncWithHttpInfo($tenant_id, $domain, string $contentType = self::contentTypes['getDomainConfig'][0]) + public function getDomainConfigAsyncWithHttpInfo($tenant_id, $domain) { $returnType = '\FastComments\Client\Model\GetDomainConfigResponse'; - $request = $this->getDomainConfigRequest($tenant_id, $domain, $contentType); + $request = $this->getDomainConfigRequest($tenant_id, $domain); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -18228,9 +15873,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getDomainConfigRequest($tenant_id, $domain, string $contentType = self::contentTypes['getDomainConfig'][0]) + public function getDomainConfigRequest($tenant_id, $domain) { - + $contentType = self::contentTypes['getDomainConfig'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -18267,7 +15913,7 @@ public function getDomainConfigRequest($tenant_id, $domain, string $contentType // path params if ($domain !== null) { $resourcePath = str_replace( - '{' . 'domain' . '}', + '{domain}', ObjectSerializer::toPathValue($domain), $resourcePath ); @@ -18344,9 +15990,9 @@ public function getDomainConfigRequest($tenant_id, $domain, string $contentType * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetDomainConfigsResponse */ - public function getDomainConfigs($tenant_id, string $contentType = self::contentTypes['getDomainConfigs'][0]) + public function getDomainConfigs($tenant_id) { - list($response) = $this->getDomainConfigsWithHttpInfo($tenant_id, $contentType); + list($response) = $this->getDomainConfigsWithHttpInfo($tenant_id); return $response; } @@ -18362,9 +16008,9 @@ public function getDomainConfigs($tenant_id, string $contentType = self::content * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetDomainConfigsResponse, HTTP status code, HTTP response headers (array of strings) */ - public function getDomainConfigsWithHttpInfo($tenant_id, string $contentType = self::contentTypes['getDomainConfigs'][0]) + public function getDomainConfigsWithHttpInfo($tenant_id) { - $request = $this->getDomainConfigsRequest($tenant_id, $contentType); + $request = $this->getDomainConfigsRequest($tenant_id); try { $options = $this->createHttpClientOption(); @@ -18391,34 +16037,15 @@ public function getDomainConfigsWithHttpInfo($tenant_id, string $contentType = s switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetDomainConfigsResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetDomainConfigsResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetDomainConfigsResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetDomainConfigsResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -18432,34 +16059,11 @@ public function getDomainConfigsWithHttpInfo($tenant_id, string $contentType = s ); } - $returnType = '\FastComments\Client\Model\GetDomainConfigsResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetDomainConfigsResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -18469,8 +16073,10 @@ public function getDomainConfigsWithHttpInfo($tenant_id, string $contentType = s $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -18486,9 +16092,9 @@ public function getDomainConfigsWithHttpInfo($tenant_id, string $contentType = s * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getDomainConfigsAsync($tenant_id, string $contentType = self::contentTypes['getDomainConfigs'][0]) + public function getDomainConfigsAsync($tenant_id) { - return $this->getDomainConfigsAsyncWithHttpInfo($tenant_id, $contentType) + return $this->getDomainConfigsAsyncWithHttpInfo($tenant_id) ->then( function ($response) { return $response[0]; @@ -18507,10 +16113,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getDomainConfigsAsyncWithHttpInfo($tenant_id, string $contentType = self::contentTypes['getDomainConfigs'][0]) + public function getDomainConfigsAsyncWithHttpInfo($tenant_id) { $returnType = '\FastComments\Client\Model\GetDomainConfigsResponse'; - $request = $this->getDomainConfigsRequest($tenant_id, $contentType); + $request = $this->getDomainConfigsRequest($tenant_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -18557,9 +16163,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getDomainConfigsRequest($tenant_id, string $contentType = self::contentTypes['getDomainConfigs'][0]) + public function getDomainConfigsRequest($tenant_id) { - + $contentType = self::contentTypes['getDomainConfigs'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -18659,9 +16266,9 @@ public function getDomainConfigsRequest($tenant_id, string $contentType = self:: * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetEmailTemplateResponse|\FastComments\Client\Model\APIError */ - public function getEmailTemplate($tenant_id, $id, string $contentType = self::contentTypes['getEmailTemplate'][0]) + public function getEmailTemplate($tenant_id, $id) { - list($response) = $this->getEmailTemplateWithHttpInfo($tenant_id, $id, $contentType); + list($response) = $this->getEmailTemplateWithHttpInfo($tenant_id, $id); return $response; } @@ -18678,9 +16285,9 @@ public function getEmailTemplate($tenant_id, $id, string $contentType = self::co * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetEmailTemplateResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getEmailTemplateWithHttpInfo($tenant_id, $id, string $contentType = self::contentTypes['getEmailTemplate'][0]) + public function getEmailTemplateWithHttpInfo($tenant_id, $id) { - $request = $this->getEmailTemplateRequest($tenant_id, $id, $contentType); + $request = $this->getEmailTemplateRequest($tenant_id, $id); try { $options = $this->createHttpClientOption(); @@ -18707,61 +16314,21 @@ public function getEmailTemplateWithHttpInfo($tenant_id, $id, string $contentTyp switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetEmailTemplateResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetEmailTemplateResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetEmailTemplateResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetEmailTemplateResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -18775,34 +16342,11 @@ public function getEmailTemplateWithHttpInfo($tenant_id, $id, string $contentTyp ); } - $returnType = '\FastComments\Client\Model\GetEmailTemplateResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetEmailTemplateResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -18812,7 +16356,7 @@ public function getEmailTemplateWithHttpInfo($tenant_id, $id, string $contentTyp $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -18820,8 +16364,10 @@ public function getEmailTemplateWithHttpInfo($tenant_id, $id, string $contentTyp $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -18838,9 +16384,9 @@ public function getEmailTemplateWithHttpInfo($tenant_id, $id, string $contentTyp * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEmailTemplateAsync($tenant_id, $id, string $contentType = self::contentTypes['getEmailTemplate'][0]) + public function getEmailTemplateAsync($tenant_id, $id) { - return $this->getEmailTemplateAsyncWithHttpInfo($tenant_id, $id, $contentType) + return $this->getEmailTemplateAsyncWithHttpInfo($tenant_id, $id) ->then( function ($response) { return $response[0]; @@ -18860,10 +16406,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEmailTemplateAsyncWithHttpInfo($tenant_id, $id, string $contentType = self::contentTypes['getEmailTemplate'][0]) + public function getEmailTemplateAsyncWithHttpInfo($tenant_id, $id) { $returnType = '\FastComments\Client\Model\GetEmailTemplateResponse'; - $request = $this->getEmailTemplateRequest($tenant_id, $id, $contentType); + $request = $this->getEmailTemplateRequest($tenant_id, $id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -18911,9 +16457,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getEmailTemplateRequest($tenant_id, $id, string $contentType = self::contentTypes['getEmailTemplate'][0]) + public function getEmailTemplateRequest($tenant_id, $id) { - + $contentType = self::contentTypes['getEmailTemplate'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -18950,7 +16497,7 @@ public function getEmailTemplateRequest($tenant_id, $id, string $contentType = s // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -19027,9 +16574,9 @@ public function getEmailTemplateRequest($tenant_id, $id, string $contentType = s * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetEmailTemplateDefinitionsResponse|\FastComments\Client\Model\APIError */ - public function getEmailTemplateDefinitions($tenant_id, string $contentType = self::contentTypes['getEmailTemplateDefinitions'][0]) + public function getEmailTemplateDefinitions($tenant_id) { - list($response) = $this->getEmailTemplateDefinitionsWithHttpInfo($tenant_id, $contentType); + list($response) = $this->getEmailTemplateDefinitionsWithHttpInfo($tenant_id); return $response; } @@ -19045,9 +16592,9 @@ public function getEmailTemplateDefinitions($tenant_id, string $contentType = se * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetEmailTemplateDefinitionsResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getEmailTemplateDefinitionsWithHttpInfo($tenant_id, string $contentType = self::contentTypes['getEmailTemplateDefinitions'][0]) + public function getEmailTemplateDefinitionsWithHttpInfo($tenant_id) { - $request = $this->getEmailTemplateDefinitionsRequest($tenant_id, $contentType); + $request = $this->getEmailTemplateDefinitionsRequest($tenant_id); try { $options = $this->createHttpClientOption(); @@ -19074,61 +16621,21 @@ public function getEmailTemplateDefinitionsWithHttpInfo($tenant_id, string $cont switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetEmailTemplateDefinitionsResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetEmailTemplateDefinitionsResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetEmailTemplateDefinitionsResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetEmailTemplateDefinitionsResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -19142,34 +16649,11 @@ public function getEmailTemplateDefinitionsWithHttpInfo($tenant_id, string $cont ); } - $returnType = '\FastComments\Client\Model\GetEmailTemplateDefinitionsResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetEmailTemplateDefinitionsResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -19179,7 +16663,7 @@ public function getEmailTemplateDefinitionsWithHttpInfo($tenant_id, string $cont $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -19187,8 +16671,10 @@ public function getEmailTemplateDefinitionsWithHttpInfo($tenant_id, string $cont $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -19204,9 +16690,9 @@ public function getEmailTemplateDefinitionsWithHttpInfo($tenant_id, string $cont * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEmailTemplateDefinitionsAsync($tenant_id, string $contentType = self::contentTypes['getEmailTemplateDefinitions'][0]) + public function getEmailTemplateDefinitionsAsync($tenant_id) { - return $this->getEmailTemplateDefinitionsAsyncWithHttpInfo($tenant_id, $contentType) + return $this->getEmailTemplateDefinitionsAsyncWithHttpInfo($tenant_id) ->then( function ($response) { return $response[0]; @@ -19225,10 +16711,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEmailTemplateDefinitionsAsyncWithHttpInfo($tenant_id, string $contentType = self::contentTypes['getEmailTemplateDefinitions'][0]) + public function getEmailTemplateDefinitionsAsyncWithHttpInfo($tenant_id) { $returnType = '\FastComments\Client\Model\GetEmailTemplateDefinitionsResponse'; - $request = $this->getEmailTemplateDefinitionsRequest($tenant_id, $contentType); + $request = $this->getEmailTemplateDefinitionsRequest($tenant_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -19275,9 +16761,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getEmailTemplateDefinitionsRequest($tenant_id, string $contentType = self::contentTypes['getEmailTemplateDefinitions'][0]) + public function getEmailTemplateDefinitionsRequest($tenant_id) { - + $contentType = self::contentTypes['getEmailTemplateDefinitions'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -19369,6 +16856,8 @@ public function getEmailTemplateDefinitionsRequest($tenant_id, string $contentTy * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $id id (required) * @param float|null $skip skip (optional) @@ -19378,9 +16867,9 @@ public function getEmailTemplateDefinitionsRequest($tenant_id, string $contentTy * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetEmailTemplateRenderErrorsResponse|\FastComments\Client\Model\APIError */ - public function getEmailTemplateRenderErrors($tenant_id, $id, $skip = null, string $contentType = self::contentTypes['getEmailTemplateRenderErrors'][0]) + public function getEmailTemplateRenderErrors($tenant_id, $id, $skip = null) { - list($response) = $this->getEmailTemplateRenderErrorsWithHttpInfo($tenant_id, $id, $skip, $contentType); + list($response) = $this->getEmailTemplateRenderErrorsWithHttpInfo($tenant_id, $id, $skip); return $response; } @@ -19389,6 +16878,8 @@ public function getEmailTemplateRenderErrors($tenant_id, $id, $skip = null, stri * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param float|null $skip (optional) @@ -19398,9 +16889,9 @@ public function getEmailTemplateRenderErrors($tenant_id, $id, $skip = null, stri * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetEmailTemplateRenderErrorsResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getEmailTemplateRenderErrorsWithHttpInfo($tenant_id, $id, $skip = null, string $contentType = self::contentTypes['getEmailTemplateRenderErrors'][0]) + public function getEmailTemplateRenderErrorsWithHttpInfo($tenant_id, $id, $skip = null) { - $request = $this->getEmailTemplateRenderErrorsRequest($tenant_id, $id, $skip, $contentType); + $request = $this->getEmailTemplateRenderErrorsRequest($tenant_id, $id, $skip); try { $options = $this->createHttpClientOption(); @@ -19427,61 +16918,21 @@ public function getEmailTemplateRenderErrorsWithHttpInfo($tenant_id, $id, $skip switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetEmailTemplateRenderErrorsResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetEmailTemplateRenderErrorsResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetEmailTemplateRenderErrorsResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetEmailTemplateRenderErrorsResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -19495,34 +16946,11 @@ public function getEmailTemplateRenderErrorsWithHttpInfo($tenant_id, $id, $skip ); } - $returnType = '\FastComments\Client\Model\GetEmailTemplateRenderErrorsResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetEmailTemplateRenderErrorsResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -19532,7 +16960,7 @@ public function getEmailTemplateRenderErrorsWithHttpInfo($tenant_id, $id, $skip $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -19540,8 +16968,10 @@ public function getEmailTemplateRenderErrorsWithHttpInfo($tenant_id, $id, $skip $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -19551,6 +16981,8 @@ public function getEmailTemplateRenderErrorsWithHttpInfo($tenant_id, $id, $skip * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param float|null $skip (optional) @@ -19559,9 +16991,9 @@ public function getEmailTemplateRenderErrorsWithHttpInfo($tenant_id, $id, $skip * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEmailTemplateRenderErrorsAsync($tenant_id, $id, $skip = null, string $contentType = self::contentTypes['getEmailTemplateRenderErrors'][0]) + public function getEmailTemplateRenderErrorsAsync($tenant_id, $id, $skip = null) { - return $this->getEmailTemplateRenderErrorsAsyncWithHttpInfo($tenant_id, $id, $skip, $contentType) + return $this->getEmailTemplateRenderErrorsAsyncWithHttpInfo($tenant_id, $id, $skip) ->then( function ($response) { return $response[0]; @@ -19574,6 +17006,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param float|null $skip (optional) @@ -19582,10 +17016,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEmailTemplateRenderErrorsAsyncWithHttpInfo($tenant_id, $id, $skip = null, string $contentType = self::contentTypes['getEmailTemplateRenderErrors'][0]) + public function getEmailTemplateRenderErrorsAsyncWithHttpInfo($tenant_id, $id, $skip = null) { $returnType = '\FastComments\Client\Model\GetEmailTemplateRenderErrorsResponse'; - $request = $this->getEmailTemplateRenderErrorsRequest($tenant_id, $id, $skip, $contentType); + $request = $this->getEmailTemplateRenderErrorsRequest($tenant_id, $id, $skip); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -19626,6 +17060,8 @@ function ($exception) { /** * Create request for operation 'getEmailTemplateRenderErrors' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param float|null $skip (optional) @@ -19634,9 +17070,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getEmailTemplateRenderErrorsRequest($tenant_id, $id, $skip = null, string $contentType = self::contentTypes['getEmailTemplateRenderErrors'][0]) + public function getEmailTemplateRenderErrorsRequest($tenant_id, $id, $skip = null) { - + $contentType = self::contentTypes['getEmailTemplateRenderErrors'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -19683,7 +17120,7 @@ public function getEmailTemplateRenderErrorsRequest($tenant_id, $id, $skip = nul // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -19753,6 +17190,8 @@ public function getEmailTemplateRenderErrorsRequest($tenant_id, $id, $skip = nul * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param float|null $skip skip (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmailTemplates'] to see the possible values for this operation @@ -19761,9 +17200,9 @@ public function getEmailTemplateRenderErrorsRequest($tenant_id, $id, $skip = nul * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetEmailTemplatesResponse|\FastComments\Client\Model\APIError */ - public function getEmailTemplates($tenant_id, $skip = null, string $contentType = self::contentTypes['getEmailTemplates'][0]) + public function getEmailTemplates($tenant_id, $skip = null) { - list($response) = $this->getEmailTemplatesWithHttpInfo($tenant_id, $skip, $contentType); + list($response) = $this->getEmailTemplatesWithHttpInfo($tenant_id, $skip); return $response; } @@ -19772,6 +17211,8 @@ public function getEmailTemplates($tenant_id, $skip = null, string $contentType * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param float|null $skip (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmailTemplates'] to see the possible values for this operation @@ -19780,9 +17221,9 @@ public function getEmailTemplates($tenant_id, $skip = null, string $contentType * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetEmailTemplatesResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getEmailTemplatesWithHttpInfo($tenant_id, $skip = null, string $contentType = self::contentTypes['getEmailTemplates'][0]) + public function getEmailTemplatesWithHttpInfo($tenant_id, $skip = null) { - $request = $this->getEmailTemplatesRequest($tenant_id, $skip, $contentType); + $request = $this->getEmailTemplatesRequest($tenant_id, $skip); try { $options = $this->createHttpClientOption(); @@ -19809,61 +17250,21 @@ public function getEmailTemplatesWithHttpInfo($tenant_id, $skip = null, string $ switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetEmailTemplatesResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetEmailTemplatesResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetEmailTemplatesResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetEmailTemplatesResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -19877,34 +17278,11 @@ public function getEmailTemplatesWithHttpInfo($tenant_id, $skip = null, string $ ); } - $returnType = '\FastComments\Client\Model\GetEmailTemplatesResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetEmailTemplatesResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -19914,7 +17292,7 @@ public function getEmailTemplatesWithHttpInfo($tenant_id, $skip = null, string $ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -19922,8 +17300,10 @@ public function getEmailTemplatesWithHttpInfo($tenant_id, $skip = null, string $ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -19933,6 +17313,8 @@ public function getEmailTemplatesWithHttpInfo($tenant_id, $skip = null, string $ * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param float|null $skip (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmailTemplates'] to see the possible values for this operation @@ -19940,9 +17322,9 @@ public function getEmailTemplatesWithHttpInfo($tenant_id, $skip = null, string $ * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEmailTemplatesAsync($tenant_id, $skip = null, string $contentType = self::contentTypes['getEmailTemplates'][0]) + public function getEmailTemplatesAsync($tenant_id, $skip = null) { - return $this->getEmailTemplatesAsyncWithHttpInfo($tenant_id, $skip, $contentType) + return $this->getEmailTemplatesAsyncWithHttpInfo($tenant_id, $skip) ->then( function ($response) { return $response[0]; @@ -19955,6 +17337,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param float|null $skip (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmailTemplates'] to see the possible values for this operation @@ -19962,10 +17346,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEmailTemplatesAsyncWithHttpInfo($tenant_id, $skip = null, string $contentType = self::contentTypes['getEmailTemplates'][0]) + public function getEmailTemplatesAsyncWithHttpInfo($tenant_id, $skip = null) { $returnType = '\FastComments\Client\Model\GetEmailTemplatesResponse'; - $request = $this->getEmailTemplatesRequest($tenant_id, $skip, $contentType); + $request = $this->getEmailTemplatesRequest($tenant_id, $skip); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -20006,6 +17390,8 @@ function ($exception) { /** * Create request for operation 'getEmailTemplates' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param float|null $skip (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmailTemplates'] to see the possible values for this operation @@ -20013,9 +17399,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getEmailTemplatesRequest($tenant_id, $skip = null, string $contentType = self::contentTypes['getEmailTemplates'][0]) + public function getEmailTemplatesRequest($tenant_id, $skip = null) { - + $contentType = self::contentTypes['getEmailTemplates'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -20117,6 +17504,8 @@ public function getEmailTemplatesRequest($tenant_id, $skip = null, string $conte * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string|null $after_id after_id (optional) * @param int|null $limit limit (optional) @@ -20127,9 +17516,9 @@ public function getEmailTemplatesRequest($tenant_id, $skip = null, string $conte * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetFeedPostsResponse|\FastComments\Client\Model\APIError */ - public function getFeedPosts($tenant_id, $after_id = null, $limit = null, $tags = null, string $contentType = self::contentTypes['getFeedPosts'][0]) + public function getFeedPosts($tenant_id, array $options = []) { - list($response) = $this->getFeedPostsWithHttpInfo($tenant_id, $after_id, $limit, $tags, $contentType); + list($response) = $this->getFeedPostsWithHttpInfo($tenant_id, $options); return $response; } @@ -20138,6 +17527,8 @@ public function getFeedPosts($tenant_id, $after_id = null, $limit = null, $tags * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $after_id (optional) * @param int|null $limit (optional) @@ -20148,9 +17539,9 @@ public function getFeedPosts($tenant_id, $after_id = null, $limit = null, $tags * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetFeedPostsResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getFeedPostsWithHttpInfo($tenant_id, $after_id = null, $limit = null, $tags = null, string $contentType = self::contentTypes['getFeedPosts'][0]) + public function getFeedPostsWithHttpInfo($tenant_id, array $options = []) { - $request = $this->getFeedPostsRequest($tenant_id, $after_id, $limit, $tags, $contentType); + $request = $this->getFeedPostsRequest($tenant_id, $options); try { $options = $this->createHttpClientOption(); @@ -20177,61 +17568,21 @@ public function getFeedPostsWithHttpInfo($tenant_id, $after_id = null, $limit = switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetFeedPostsResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetFeedPostsResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetFeedPostsResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetFeedPostsResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -20245,34 +17596,11 @@ public function getFeedPostsWithHttpInfo($tenant_id, $after_id = null, $limit = ); } - $returnType = '\FastComments\Client\Model\GetFeedPostsResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetFeedPostsResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -20282,7 +17610,7 @@ public function getFeedPostsWithHttpInfo($tenant_id, $after_id = null, $limit = $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -20290,8 +17618,10 @@ public function getFeedPostsWithHttpInfo($tenant_id, $after_id = null, $limit = $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -20301,6 +17631,8 @@ public function getFeedPostsWithHttpInfo($tenant_id, $after_id = null, $limit = * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $after_id (optional) * @param int|null $limit (optional) @@ -20310,9 +17642,9 @@ public function getFeedPostsWithHttpInfo($tenant_id, $after_id = null, $limit = * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getFeedPostsAsync($tenant_id, $after_id = null, $limit = null, $tags = null, string $contentType = self::contentTypes['getFeedPosts'][0]) + public function getFeedPostsAsync($tenant_id, array $options = []) { - return $this->getFeedPostsAsyncWithHttpInfo($tenant_id, $after_id, $limit, $tags, $contentType) + return $this->getFeedPostsAsyncWithHttpInfo($tenant_id, $options) ->then( function ($response) { return $response[0]; @@ -20325,6 +17657,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $after_id (optional) * @param int|null $limit (optional) @@ -20334,10 +17668,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getFeedPostsAsyncWithHttpInfo($tenant_id, $after_id = null, $limit = null, $tags = null, string $contentType = self::contentTypes['getFeedPosts'][0]) + public function getFeedPostsAsyncWithHttpInfo($tenant_id, array $options = []) { $returnType = '\FastComments\Client\Model\GetFeedPostsResponse'; - $request = $this->getFeedPostsRequest($tenant_id, $after_id, $limit, $tags, $contentType); + $request = $this->getFeedPostsRequest($tenant_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -20378,6 +17712,8 @@ function ($exception) { /** * Create request for operation 'getFeedPosts' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $after_id (optional) * @param int|null $limit (optional) @@ -20387,9 +17723,14 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getFeedPostsRequest($tenant_id, $after_id = null, $limit = null, $tags = null, string $contentType = self::contentTypes['getFeedPosts'][0]) + public function getFeedPostsRequest($tenant_id, array $options = []) { - + // unbox the optional parameters and request options from the $options array + $after_id = array_key_exists('after_id', $options) ? $options['after_id'] : null; + $limit = array_key_exists('limit', $options) ? $options['limit'] : null; + $tags = array_key_exists('tags', $options) ? $options['tags'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['getFeedPosts'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -20511,6 +17852,8 @@ public function getFeedPostsRequest($tenant_id, $after_id = null, $limit = null, * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param float|null $page page (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getHashTags'] to see the possible values for this operation @@ -20519,9 +17862,9 @@ public function getFeedPostsRequest($tenant_id, $after_id = null, $limit = null, * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetHashTagsResponse|\FastComments\Client\Model\APIError */ - public function getHashTags($tenant_id, $page = null, string $contentType = self::contentTypes['getHashTags'][0]) + public function getHashTags($tenant_id, $page = null) { - list($response) = $this->getHashTagsWithHttpInfo($tenant_id, $page, $contentType); + list($response) = $this->getHashTagsWithHttpInfo($tenant_id, $page); return $response; } @@ -20530,6 +17873,8 @@ public function getHashTags($tenant_id, $page = null, string $contentType = self * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param float|null $page (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getHashTags'] to see the possible values for this operation @@ -20538,9 +17883,9 @@ public function getHashTags($tenant_id, $page = null, string $contentType = self * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetHashTagsResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getHashTagsWithHttpInfo($tenant_id, $page = null, string $contentType = self::contentTypes['getHashTags'][0]) + public function getHashTagsWithHttpInfo($tenant_id, $page = null) { - $request = $this->getHashTagsRequest($tenant_id, $page, $contentType); + $request = $this->getHashTagsRequest($tenant_id, $page); try { $options = $this->createHttpClientOption(); @@ -20567,61 +17912,21 @@ public function getHashTagsWithHttpInfo($tenant_id, $page = null, string $conten switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetHashTagsResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetHashTagsResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetHashTagsResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetHashTagsResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -20635,34 +17940,11 @@ public function getHashTagsWithHttpInfo($tenant_id, $page = null, string $conten ); } - $returnType = '\FastComments\Client\Model\GetHashTagsResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetHashTagsResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -20672,7 +17954,7 @@ public function getHashTagsWithHttpInfo($tenant_id, $page = null, string $conten $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -20680,8 +17962,10 @@ public function getHashTagsWithHttpInfo($tenant_id, $page = null, string $conten $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -20691,6 +17975,8 @@ public function getHashTagsWithHttpInfo($tenant_id, $page = null, string $conten * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param float|null $page (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getHashTags'] to see the possible values for this operation @@ -20698,9 +17984,9 @@ public function getHashTagsWithHttpInfo($tenant_id, $page = null, string $conten * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getHashTagsAsync($tenant_id, $page = null, string $contentType = self::contentTypes['getHashTags'][0]) + public function getHashTagsAsync($tenant_id, $page = null) { - return $this->getHashTagsAsyncWithHttpInfo($tenant_id, $page, $contentType) + return $this->getHashTagsAsyncWithHttpInfo($tenant_id, $page) ->then( function ($response) { return $response[0]; @@ -20713,6 +17999,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param float|null $page (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getHashTags'] to see the possible values for this operation @@ -20720,10 +18008,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getHashTagsAsyncWithHttpInfo($tenant_id, $page = null, string $contentType = self::contentTypes['getHashTags'][0]) + public function getHashTagsAsyncWithHttpInfo($tenant_id, $page = null) { $returnType = '\FastComments\Client\Model\GetHashTagsResponse'; - $request = $this->getHashTagsRequest($tenant_id, $page, $contentType); + $request = $this->getHashTagsRequest($tenant_id, $page); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -20764,6 +18052,8 @@ function ($exception) { /** * Create request for operation 'getHashTags' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param float|null $page (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getHashTags'] to see the possible values for this operation @@ -20771,9 +18061,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getHashTagsRequest($tenant_id, $page = null, string $contentType = self::contentTypes['getHashTags'][0]) + public function getHashTagsRequest($tenant_id, $page = null) { - + $contentType = self::contentTypes['getHashTags'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -20883,9 +18174,9 @@ public function getHashTagsRequest($tenant_id, $page = null, string $contentType * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetModeratorResponse|\FastComments\Client\Model\APIError */ - public function getModerator($tenant_id, $id, string $contentType = self::contentTypes['getModerator'][0]) + public function getModerator($tenant_id, $id) { - list($response) = $this->getModeratorWithHttpInfo($tenant_id, $id, $contentType); + list($response) = $this->getModeratorWithHttpInfo($tenant_id, $id); return $response; } @@ -20902,9 +18193,9 @@ public function getModerator($tenant_id, $id, string $contentType = self::conten * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetModeratorResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getModeratorWithHttpInfo($tenant_id, $id, string $contentType = self::contentTypes['getModerator'][0]) + public function getModeratorWithHttpInfo($tenant_id, $id) { - $request = $this->getModeratorRequest($tenant_id, $id, $contentType); + $request = $this->getModeratorRequest($tenant_id, $id); try { $options = $this->createHttpClientOption(); @@ -20931,61 +18222,21 @@ public function getModeratorWithHttpInfo($tenant_id, $id, string $contentType = switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetModeratorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetModeratorResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetModeratorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetModeratorResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -20999,34 +18250,11 @@ public function getModeratorWithHttpInfo($tenant_id, $id, string $contentType = ); } - $returnType = '\FastComments\Client\Model\GetModeratorResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetModeratorResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -21036,7 +18264,7 @@ public function getModeratorWithHttpInfo($tenant_id, $id, string $contentType = $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -21044,8 +18272,10 @@ public function getModeratorWithHttpInfo($tenant_id, $id, string $contentType = $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -21062,9 +18292,9 @@ public function getModeratorWithHttpInfo($tenant_id, $id, string $contentType = * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getModeratorAsync($tenant_id, $id, string $contentType = self::contentTypes['getModerator'][0]) + public function getModeratorAsync($tenant_id, $id) { - return $this->getModeratorAsyncWithHttpInfo($tenant_id, $id, $contentType) + return $this->getModeratorAsyncWithHttpInfo($tenant_id, $id) ->then( function ($response) { return $response[0]; @@ -21084,10 +18314,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getModeratorAsyncWithHttpInfo($tenant_id, $id, string $contentType = self::contentTypes['getModerator'][0]) + public function getModeratorAsyncWithHttpInfo($tenant_id, $id) { $returnType = '\FastComments\Client\Model\GetModeratorResponse'; - $request = $this->getModeratorRequest($tenant_id, $id, $contentType); + $request = $this->getModeratorRequest($tenant_id, $id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -21135,9 +18365,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getModeratorRequest($tenant_id, $id, string $contentType = self::contentTypes['getModerator'][0]) + public function getModeratorRequest($tenant_id, $id) { - + $contentType = self::contentTypes['getModerator'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -21174,7 +18405,7 @@ public function getModeratorRequest($tenant_id, $id, string $contentType = self: // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -21244,6 +18475,8 @@ public function getModeratorRequest($tenant_id, $id, string $contentType = self: * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param float|null $skip skip (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getModerators'] to see the possible values for this operation @@ -21252,9 +18485,9 @@ public function getModeratorRequest($tenant_id, $id, string $contentType = self: * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetModeratorsResponse|\FastComments\Client\Model\APIError */ - public function getModerators($tenant_id, $skip = null, string $contentType = self::contentTypes['getModerators'][0]) + public function getModerators($tenant_id, $skip = null) { - list($response) = $this->getModeratorsWithHttpInfo($tenant_id, $skip, $contentType); + list($response) = $this->getModeratorsWithHttpInfo($tenant_id, $skip); return $response; } @@ -21263,6 +18496,8 @@ public function getModerators($tenant_id, $skip = null, string $contentType = se * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param float|null $skip (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getModerators'] to see the possible values for this operation @@ -21271,9 +18506,9 @@ public function getModerators($tenant_id, $skip = null, string $contentType = se * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetModeratorsResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getModeratorsWithHttpInfo($tenant_id, $skip = null, string $contentType = self::contentTypes['getModerators'][0]) + public function getModeratorsWithHttpInfo($tenant_id, $skip = null) { - $request = $this->getModeratorsRequest($tenant_id, $skip, $contentType); + $request = $this->getModeratorsRequest($tenant_id, $skip); try { $options = $this->createHttpClientOption(); @@ -21300,61 +18535,21 @@ public function getModeratorsWithHttpInfo($tenant_id, $skip = null, string $cont switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetModeratorsResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetModeratorsResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetModeratorsResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetModeratorsResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -21368,34 +18563,11 @@ public function getModeratorsWithHttpInfo($tenant_id, $skip = null, string $cont ); } - $returnType = '\FastComments\Client\Model\GetModeratorsResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetModeratorsResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -21405,7 +18577,7 @@ public function getModeratorsWithHttpInfo($tenant_id, $skip = null, string $cont $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -21413,8 +18585,10 @@ public function getModeratorsWithHttpInfo($tenant_id, $skip = null, string $cont $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -21424,6 +18598,8 @@ public function getModeratorsWithHttpInfo($tenant_id, $skip = null, string $cont * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param float|null $skip (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getModerators'] to see the possible values for this operation @@ -21431,9 +18607,9 @@ public function getModeratorsWithHttpInfo($tenant_id, $skip = null, string $cont * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getModeratorsAsync($tenant_id, $skip = null, string $contentType = self::contentTypes['getModerators'][0]) + public function getModeratorsAsync($tenant_id, $skip = null) { - return $this->getModeratorsAsyncWithHttpInfo($tenant_id, $skip, $contentType) + return $this->getModeratorsAsyncWithHttpInfo($tenant_id, $skip) ->then( function ($response) { return $response[0]; @@ -21446,6 +18622,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param float|null $skip (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getModerators'] to see the possible values for this operation @@ -21453,10 +18631,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getModeratorsAsyncWithHttpInfo($tenant_id, $skip = null, string $contentType = self::contentTypes['getModerators'][0]) + public function getModeratorsAsyncWithHttpInfo($tenant_id, $skip = null) { $returnType = '\FastComments\Client\Model\GetModeratorsResponse'; - $request = $this->getModeratorsRequest($tenant_id, $skip, $contentType); + $request = $this->getModeratorsRequest($tenant_id, $skip); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -21497,6 +18675,8 @@ function ($exception) { /** * Create request for operation 'getModerators' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param float|null $skip (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getModerators'] to see the possible values for this operation @@ -21504,9 +18684,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getModeratorsRequest($tenant_id, $skip = null, string $contentType = self::contentTypes['getModerators'][0]) + public function getModeratorsRequest($tenant_id, $skip = null) { - + $contentType = self::contentTypes['getModerators'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -21608,6 +18789,8 @@ public function getModeratorsRequest($tenant_id, $skip = null, string $contentTy * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string|null $user_id user_id (optional) * @param string|null $url_id url_id (optional) @@ -21620,9 +18803,9 @@ public function getModeratorsRequest($tenant_id, $skip = null, string $contentTy * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetNotificationCountResponse|\FastComments\Client\Model\APIError */ - public function getNotificationCount($tenant_id, $user_id = null, $url_id = null, $from_comment_id = null, $viewed = null, $type = null, string $contentType = self::contentTypes['getNotificationCount'][0]) + public function getNotificationCount($tenant_id, array $options = []) { - list($response) = $this->getNotificationCountWithHttpInfo($tenant_id, $user_id, $url_id, $from_comment_id, $viewed, $type, $contentType); + list($response) = $this->getNotificationCountWithHttpInfo($tenant_id, $options); return $response; } @@ -21631,6 +18814,8 @@ public function getNotificationCount($tenant_id, $user_id = null, $url_id = null * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $user_id (optional) * @param string|null $url_id (optional) @@ -21643,9 +18828,9 @@ public function getNotificationCount($tenant_id, $user_id = null, $url_id = null * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetNotificationCountResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getNotificationCountWithHttpInfo($tenant_id, $user_id = null, $url_id = null, $from_comment_id = null, $viewed = null, $type = null, string $contentType = self::contentTypes['getNotificationCount'][0]) + public function getNotificationCountWithHttpInfo($tenant_id, array $options = []) { - $request = $this->getNotificationCountRequest($tenant_id, $user_id, $url_id, $from_comment_id, $viewed, $type, $contentType); + $request = $this->getNotificationCountRequest($tenant_id, $options); try { $options = $this->createHttpClientOption(); @@ -21672,61 +18857,21 @@ public function getNotificationCountWithHttpInfo($tenant_id, $user_id = null, $u switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetNotificationCountResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetNotificationCountResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetNotificationCountResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetNotificationCountResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -21740,34 +18885,11 @@ public function getNotificationCountWithHttpInfo($tenant_id, $user_id = null, $u ); } - $returnType = '\FastComments\Client\Model\GetNotificationCountResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetNotificationCountResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -21777,7 +18899,7 @@ public function getNotificationCountWithHttpInfo($tenant_id, $user_id = null, $u $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -21785,8 +18907,10 @@ public function getNotificationCountWithHttpInfo($tenant_id, $user_id = null, $u $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -21796,6 +18920,8 @@ public function getNotificationCountWithHttpInfo($tenant_id, $user_id = null, $u * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $user_id (optional) * @param string|null $url_id (optional) @@ -21807,9 +18933,9 @@ public function getNotificationCountWithHttpInfo($tenant_id, $user_id = null, $u * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getNotificationCountAsync($tenant_id, $user_id = null, $url_id = null, $from_comment_id = null, $viewed = null, $type = null, string $contentType = self::contentTypes['getNotificationCount'][0]) + public function getNotificationCountAsync($tenant_id, array $options = []) { - return $this->getNotificationCountAsyncWithHttpInfo($tenant_id, $user_id, $url_id, $from_comment_id, $viewed, $type, $contentType) + return $this->getNotificationCountAsyncWithHttpInfo($tenant_id, $options) ->then( function ($response) { return $response[0]; @@ -21822,6 +18948,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $user_id (optional) * @param string|null $url_id (optional) @@ -21833,10 +18961,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getNotificationCountAsyncWithHttpInfo($tenant_id, $user_id = null, $url_id = null, $from_comment_id = null, $viewed = null, $type = null, string $contentType = self::contentTypes['getNotificationCount'][0]) + public function getNotificationCountAsyncWithHttpInfo($tenant_id, array $options = []) { $returnType = '\FastComments\Client\Model\GetNotificationCountResponse'; - $request = $this->getNotificationCountRequest($tenant_id, $user_id, $url_id, $from_comment_id, $viewed, $type, $contentType); + $request = $this->getNotificationCountRequest($tenant_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -21877,6 +19005,8 @@ function ($exception) { /** * Create request for operation 'getNotificationCount' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $user_id (optional) * @param string|null $url_id (optional) @@ -21888,9 +19018,16 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getNotificationCountRequest($tenant_id, $user_id = null, $url_id = null, $from_comment_id = null, $viewed = null, $type = null, string $contentType = self::contentTypes['getNotificationCount'][0]) + public function getNotificationCountRequest($tenant_id, array $options = []) { - + // unbox the optional parameters and request options from the $options array + $user_id = array_key_exists('user_id', $options) ? $options['user_id'] : null; + $url_id = array_key_exists('url_id', $options) ? $options['url_id'] : null; + $from_comment_id = array_key_exists('from_comment_id', $options) ? $options['from_comment_id'] : null; + $viewed = array_key_exists('viewed', $options) ? $options['viewed'] : null; + $type = array_key_exists('type', $options) ? $options['type'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['getNotificationCount'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -22032,6 +19169,8 @@ public function getNotificationCountRequest($tenant_id, $user_id = null, $url_id * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string|null $user_id user_id (optional) * @param string|null $url_id url_id (optional) @@ -22045,9 +19184,9 @@ public function getNotificationCountRequest($tenant_id, $user_id = null, $url_id * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetNotificationsResponse|\FastComments\Client\Model\APIError */ - public function getNotifications($tenant_id, $user_id = null, $url_id = null, $from_comment_id = null, $viewed = null, $type = null, $skip = null, string $contentType = self::contentTypes['getNotifications'][0]) + public function getNotifications($tenant_id, array $options = []) { - list($response) = $this->getNotificationsWithHttpInfo($tenant_id, $user_id, $url_id, $from_comment_id, $viewed, $type, $skip, $contentType); + list($response) = $this->getNotificationsWithHttpInfo($tenant_id, $options); return $response; } @@ -22056,6 +19195,8 @@ public function getNotifications($tenant_id, $user_id = null, $url_id = null, $f * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $user_id (optional) * @param string|null $url_id (optional) @@ -22069,9 +19210,9 @@ public function getNotifications($tenant_id, $user_id = null, $url_id = null, $f * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetNotificationsResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getNotificationsWithHttpInfo($tenant_id, $user_id = null, $url_id = null, $from_comment_id = null, $viewed = null, $type = null, $skip = null, string $contentType = self::contentTypes['getNotifications'][0]) + public function getNotificationsWithHttpInfo($tenant_id, array $options = []) { - $request = $this->getNotificationsRequest($tenant_id, $user_id, $url_id, $from_comment_id, $viewed, $type, $skip, $contentType); + $request = $this->getNotificationsRequest($tenant_id, $options); try { $options = $this->createHttpClientOption(); @@ -22098,61 +19239,21 @@ public function getNotificationsWithHttpInfo($tenant_id, $user_id = null, $url_i switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetNotificationsResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetNotificationsResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetNotificationsResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetNotificationsResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -22166,34 +19267,11 @@ public function getNotificationsWithHttpInfo($tenant_id, $user_id = null, $url_i ); } - $returnType = '\FastComments\Client\Model\GetNotificationsResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetNotificationsResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -22203,7 +19281,7 @@ public function getNotificationsWithHttpInfo($tenant_id, $user_id = null, $url_i $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -22211,8 +19289,10 @@ public function getNotificationsWithHttpInfo($tenant_id, $user_id = null, $url_i $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -22222,6 +19302,8 @@ public function getNotificationsWithHttpInfo($tenant_id, $user_id = null, $url_i * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $user_id (optional) * @param string|null $url_id (optional) @@ -22234,9 +19316,9 @@ public function getNotificationsWithHttpInfo($tenant_id, $user_id = null, $url_i * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getNotificationsAsync($tenant_id, $user_id = null, $url_id = null, $from_comment_id = null, $viewed = null, $type = null, $skip = null, string $contentType = self::contentTypes['getNotifications'][0]) + public function getNotificationsAsync($tenant_id, array $options = []) { - return $this->getNotificationsAsyncWithHttpInfo($tenant_id, $user_id, $url_id, $from_comment_id, $viewed, $type, $skip, $contentType) + return $this->getNotificationsAsyncWithHttpInfo($tenant_id, $options) ->then( function ($response) { return $response[0]; @@ -22249,6 +19331,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $user_id (optional) * @param string|null $url_id (optional) @@ -22261,10 +19345,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getNotificationsAsyncWithHttpInfo($tenant_id, $user_id = null, $url_id = null, $from_comment_id = null, $viewed = null, $type = null, $skip = null, string $contentType = self::contentTypes['getNotifications'][0]) + public function getNotificationsAsyncWithHttpInfo($tenant_id, array $options = []) { $returnType = '\FastComments\Client\Model\GetNotificationsResponse'; - $request = $this->getNotificationsRequest($tenant_id, $user_id, $url_id, $from_comment_id, $viewed, $type, $skip, $contentType); + $request = $this->getNotificationsRequest($tenant_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -22305,6 +19389,8 @@ function ($exception) { /** * Create request for operation 'getNotifications' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $user_id (optional) * @param string|null $url_id (optional) @@ -22317,9 +19403,17 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getNotificationsRequest($tenant_id, $user_id = null, $url_id = null, $from_comment_id = null, $viewed = null, $type = null, $skip = null, string $contentType = self::contentTypes['getNotifications'][0]) - { - + public function getNotificationsRequest($tenant_id, array $options = []) + { + // unbox the optional parameters and request options from the $options array + $user_id = array_key_exists('user_id', $options) ? $options['user_id'] : null; + $url_id = array_key_exists('url_id', $options) ? $options['url_id'] : null; + $from_comment_id = array_key_exists('from_comment_id', $options) ? $options['from_comment_id'] : null; + $viewed = array_key_exists('viewed', $options) ? $options['viewed'] : null; + $type = array_key_exists('type', $options) ? $options['type'] : null; + $skip = array_key_exists('skip', $options) ? $options['skip'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['getNotifications'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -22479,9 +19573,9 @@ public function getNotificationsRequest($tenant_id, $user_id = null, $url_id = n * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetPageByURLIdAPIResponse */ - public function getPageByURLId($tenant_id, $url_id, string $contentType = self::contentTypes['getPageByURLId'][0]) + public function getPageByURLId($tenant_id, $url_id) { - list($response) = $this->getPageByURLIdWithHttpInfo($tenant_id, $url_id, $contentType); + list($response) = $this->getPageByURLIdWithHttpInfo($tenant_id, $url_id); return $response; } @@ -22498,9 +19592,9 @@ public function getPageByURLId($tenant_id, $url_id, string $contentType = self:: * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetPageByURLIdAPIResponse, HTTP status code, HTTP response headers (array of strings) */ - public function getPageByURLIdWithHttpInfo($tenant_id, $url_id, string $contentType = self::contentTypes['getPageByURLId'][0]) + public function getPageByURLIdWithHttpInfo($tenant_id, $url_id) { - $request = $this->getPageByURLIdRequest($tenant_id, $url_id, $contentType); + $request = $this->getPageByURLIdRequest($tenant_id, $url_id); try { $options = $this->createHttpClientOption(); @@ -22527,34 +19621,15 @@ public function getPageByURLIdWithHttpInfo($tenant_id, $url_id, string $contentT switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetPageByURLIdAPIResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetPageByURLIdAPIResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetPageByURLIdAPIResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetPageByURLIdAPIResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -22568,34 +19643,11 @@ public function getPageByURLIdWithHttpInfo($tenant_id, $url_id, string $contentT ); } - $returnType = '\FastComments\Client\Model\GetPageByURLIdAPIResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetPageByURLIdAPIResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -22605,8 +19657,10 @@ public function getPageByURLIdWithHttpInfo($tenant_id, $url_id, string $contentT $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -22623,9 +19677,9 @@ public function getPageByURLIdWithHttpInfo($tenant_id, $url_id, string $contentT * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageByURLIdAsync($tenant_id, $url_id, string $contentType = self::contentTypes['getPageByURLId'][0]) + public function getPageByURLIdAsync($tenant_id, $url_id) { - return $this->getPageByURLIdAsyncWithHttpInfo($tenant_id, $url_id, $contentType) + return $this->getPageByURLIdAsyncWithHttpInfo($tenant_id, $url_id) ->then( function ($response) { return $response[0]; @@ -22645,10 +19699,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageByURLIdAsyncWithHttpInfo($tenant_id, $url_id, string $contentType = self::contentTypes['getPageByURLId'][0]) + public function getPageByURLIdAsyncWithHttpInfo($tenant_id, $url_id) { $returnType = '\FastComments\Client\Model\GetPageByURLIdAPIResponse'; - $request = $this->getPageByURLIdRequest($tenant_id, $url_id, $contentType); + $request = $this->getPageByURLIdRequest($tenant_id, $url_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -22696,9 +19750,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getPageByURLIdRequest($tenant_id, $url_id, string $contentType = self::contentTypes['getPageByURLId'][0]) + public function getPageByURLIdRequest($tenant_id, $url_id) { - + $contentType = self::contentTypes['getPageByURLId'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -22813,9 +19868,9 @@ public function getPageByURLIdRequest($tenant_id, $url_id, string $contentType = * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetPagesAPIResponse */ - public function getPages($tenant_id, string $contentType = self::contentTypes['getPages'][0]) + public function getPages($tenant_id) { - list($response) = $this->getPagesWithHttpInfo($tenant_id, $contentType); + list($response) = $this->getPagesWithHttpInfo($tenant_id); return $response; } @@ -22831,9 +19886,9 @@ public function getPages($tenant_id, string $contentType = self::contentTypes['g * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetPagesAPIResponse, HTTP status code, HTTP response headers (array of strings) */ - public function getPagesWithHttpInfo($tenant_id, string $contentType = self::contentTypes['getPages'][0]) + public function getPagesWithHttpInfo($tenant_id) { - $request = $this->getPagesRequest($tenant_id, $contentType); + $request = $this->getPagesRequest($tenant_id); try { $options = $this->createHttpClientOption(); @@ -22860,34 +19915,15 @@ public function getPagesWithHttpInfo($tenant_id, string $contentType = self::con switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetPagesAPIResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetPagesAPIResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetPagesAPIResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetPagesAPIResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -22901,34 +19937,11 @@ public function getPagesWithHttpInfo($tenant_id, string $contentType = self::con ); } - $returnType = '\FastComments\Client\Model\GetPagesAPIResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetPagesAPIResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -22938,8 +19951,10 @@ public function getPagesWithHttpInfo($tenant_id, string $contentType = self::con $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -22955,9 +19970,9 @@ public function getPagesWithHttpInfo($tenant_id, string $contentType = self::con * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPagesAsync($tenant_id, string $contentType = self::contentTypes['getPages'][0]) + public function getPagesAsync($tenant_id) { - return $this->getPagesAsyncWithHttpInfo($tenant_id, $contentType) + return $this->getPagesAsyncWithHttpInfo($tenant_id) ->then( function ($response) { return $response[0]; @@ -22976,10 +19991,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPagesAsyncWithHttpInfo($tenant_id, string $contentType = self::contentTypes['getPages'][0]) + public function getPagesAsyncWithHttpInfo($tenant_id) { $returnType = '\FastComments\Client\Model\GetPagesAPIResponse'; - $request = $this->getPagesRequest($tenant_id, $contentType); + $request = $this->getPagesRequest($tenant_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -23026,9 +20041,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getPagesRequest($tenant_id, string $contentType = self::contentTypes['getPages'][0]) + public function getPagesRequest($tenant_id) { - + $contentType = self::contentTypes['getPages'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -23120,6 +20136,8 @@ public function getPagesRequest($tenant_id, string $contentType = self::contentT * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string|null $comment_id comment_id (optional) * @param string|null $external_id external_id (optional) @@ -23133,9 +20151,9 @@ public function getPagesRequest($tenant_id, string $contentType = self::contentT * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetPendingWebhookEventCountResponse|\FastComments\Client\Model\APIError */ - public function getPendingWebhookEventCount($tenant_id, $comment_id = null, $external_id = null, $event_type = null, $type = null, $domain = null, $attempt_count_gt = null, string $contentType = self::contentTypes['getPendingWebhookEventCount'][0]) + public function getPendingWebhookEventCount($tenant_id, array $options = []) { - list($response) = $this->getPendingWebhookEventCountWithHttpInfo($tenant_id, $comment_id, $external_id, $event_type, $type, $domain, $attempt_count_gt, $contentType); + list($response) = $this->getPendingWebhookEventCountWithHttpInfo($tenant_id, $options); return $response; } @@ -23144,6 +20162,8 @@ public function getPendingWebhookEventCount($tenant_id, $comment_id = null, $ext * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $comment_id (optional) * @param string|null $external_id (optional) @@ -23157,9 +20177,9 @@ public function getPendingWebhookEventCount($tenant_id, $comment_id = null, $ext * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetPendingWebhookEventCountResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getPendingWebhookEventCountWithHttpInfo($tenant_id, $comment_id = null, $external_id = null, $event_type = null, $type = null, $domain = null, $attempt_count_gt = null, string $contentType = self::contentTypes['getPendingWebhookEventCount'][0]) + public function getPendingWebhookEventCountWithHttpInfo($tenant_id, array $options = []) { - $request = $this->getPendingWebhookEventCountRequest($tenant_id, $comment_id, $external_id, $event_type, $type, $domain, $attempt_count_gt, $contentType); + $request = $this->getPendingWebhookEventCountRequest($tenant_id, $options); try { $options = $this->createHttpClientOption(); @@ -23186,61 +20206,21 @@ public function getPendingWebhookEventCountWithHttpInfo($tenant_id, $comment_id switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetPendingWebhookEventCountResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetPendingWebhookEventCountResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetPendingWebhookEventCountResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetPendingWebhookEventCountResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -23254,34 +20234,11 @@ public function getPendingWebhookEventCountWithHttpInfo($tenant_id, $comment_id ); } - $returnType = '\FastComments\Client\Model\GetPendingWebhookEventCountResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetPendingWebhookEventCountResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -23291,7 +20248,7 @@ public function getPendingWebhookEventCountWithHttpInfo($tenant_id, $comment_id $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -23299,8 +20256,10 @@ public function getPendingWebhookEventCountWithHttpInfo($tenant_id, $comment_id $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -23310,6 +20269,8 @@ public function getPendingWebhookEventCountWithHttpInfo($tenant_id, $comment_id * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $comment_id (optional) * @param string|null $external_id (optional) @@ -23322,9 +20283,9 @@ public function getPendingWebhookEventCountWithHttpInfo($tenant_id, $comment_id * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPendingWebhookEventCountAsync($tenant_id, $comment_id = null, $external_id = null, $event_type = null, $type = null, $domain = null, $attempt_count_gt = null, string $contentType = self::contentTypes['getPendingWebhookEventCount'][0]) + public function getPendingWebhookEventCountAsync($tenant_id, array $options = []) { - return $this->getPendingWebhookEventCountAsyncWithHttpInfo($tenant_id, $comment_id, $external_id, $event_type, $type, $domain, $attempt_count_gt, $contentType) + return $this->getPendingWebhookEventCountAsyncWithHttpInfo($tenant_id, $options) ->then( function ($response) { return $response[0]; @@ -23337,6 +20298,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $comment_id (optional) * @param string|null $external_id (optional) @@ -23349,10 +20312,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPendingWebhookEventCountAsyncWithHttpInfo($tenant_id, $comment_id = null, $external_id = null, $event_type = null, $type = null, $domain = null, $attempt_count_gt = null, string $contentType = self::contentTypes['getPendingWebhookEventCount'][0]) + public function getPendingWebhookEventCountAsyncWithHttpInfo($tenant_id, array $options = []) { $returnType = '\FastComments\Client\Model\GetPendingWebhookEventCountResponse'; - $request = $this->getPendingWebhookEventCountRequest($tenant_id, $comment_id, $external_id, $event_type, $type, $domain, $attempt_count_gt, $contentType); + $request = $this->getPendingWebhookEventCountRequest($tenant_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -23393,6 +20356,8 @@ function ($exception) { /** * Create request for operation 'getPendingWebhookEventCount' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $comment_id (optional) * @param string|null $external_id (optional) @@ -23405,9 +20370,17 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getPendingWebhookEventCountRequest($tenant_id, $comment_id = null, $external_id = null, $event_type = null, $type = null, $domain = null, $attempt_count_gt = null, string $contentType = self::contentTypes['getPendingWebhookEventCount'][0]) - { - + public function getPendingWebhookEventCountRequest($tenant_id, array $options = []) + { + // unbox the optional parameters and request options from the $options array + $comment_id = array_key_exists('comment_id', $options) ? $options['comment_id'] : null; + $external_id = array_key_exists('external_id', $options) ? $options['external_id'] : null; + $event_type = array_key_exists('event_type', $options) ? $options['event_type'] : null; + $type = array_key_exists('type', $options) ? $options['type'] : null; + $domain = array_key_exists('domain', $options) ? $options['domain'] : null; + $attempt_count_gt = array_key_exists('attempt_count_gt', $options) ? $options['attempt_count_gt'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['getPendingWebhookEventCount'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -23559,6 +20532,8 @@ public function getPendingWebhookEventCountRequest($tenant_id, $comment_id = nul * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string|null $comment_id comment_id (optional) * @param string|null $external_id external_id (optional) @@ -23573,9 +20548,9 @@ public function getPendingWebhookEventCountRequest($tenant_id, $comment_id = nul * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetPendingWebhookEventsResponse|\FastComments\Client\Model\APIError */ - public function getPendingWebhookEvents($tenant_id, $comment_id = null, $external_id = null, $event_type = null, $type = null, $domain = null, $attempt_count_gt = null, $skip = null, string $contentType = self::contentTypes['getPendingWebhookEvents'][0]) + public function getPendingWebhookEvents($tenant_id, array $options = []) { - list($response) = $this->getPendingWebhookEventsWithHttpInfo($tenant_id, $comment_id, $external_id, $event_type, $type, $domain, $attempt_count_gt, $skip, $contentType); + list($response) = $this->getPendingWebhookEventsWithHttpInfo($tenant_id, $options); return $response; } @@ -23584,6 +20559,8 @@ public function getPendingWebhookEvents($tenant_id, $comment_id = null, $externa * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $comment_id (optional) * @param string|null $external_id (optional) @@ -23598,9 +20575,9 @@ public function getPendingWebhookEvents($tenant_id, $comment_id = null, $externa * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetPendingWebhookEventsResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getPendingWebhookEventsWithHttpInfo($tenant_id, $comment_id = null, $external_id = null, $event_type = null, $type = null, $domain = null, $attempt_count_gt = null, $skip = null, string $contentType = self::contentTypes['getPendingWebhookEvents'][0]) + public function getPendingWebhookEventsWithHttpInfo($tenant_id, array $options = []) { - $request = $this->getPendingWebhookEventsRequest($tenant_id, $comment_id, $external_id, $event_type, $type, $domain, $attempt_count_gt, $skip, $contentType); + $request = $this->getPendingWebhookEventsRequest($tenant_id, $options); try { $options = $this->createHttpClientOption(); @@ -23627,61 +20604,21 @@ public function getPendingWebhookEventsWithHttpInfo($tenant_id, $comment_id = nu switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetPendingWebhookEventsResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetPendingWebhookEventsResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetPendingWebhookEventsResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetPendingWebhookEventsResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -23695,34 +20632,11 @@ public function getPendingWebhookEventsWithHttpInfo($tenant_id, $comment_id = nu ); } - $returnType = '\FastComments\Client\Model\GetPendingWebhookEventsResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetPendingWebhookEventsResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -23732,7 +20646,7 @@ public function getPendingWebhookEventsWithHttpInfo($tenant_id, $comment_id = nu $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -23740,8 +20654,10 @@ public function getPendingWebhookEventsWithHttpInfo($tenant_id, $comment_id = nu $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -23751,6 +20667,8 @@ public function getPendingWebhookEventsWithHttpInfo($tenant_id, $comment_id = nu * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $comment_id (optional) * @param string|null $external_id (optional) @@ -23764,9 +20682,9 @@ public function getPendingWebhookEventsWithHttpInfo($tenant_id, $comment_id = nu * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPendingWebhookEventsAsync($tenant_id, $comment_id = null, $external_id = null, $event_type = null, $type = null, $domain = null, $attempt_count_gt = null, $skip = null, string $contentType = self::contentTypes['getPendingWebhookEvents'][0]) + public function getPendingWebhookEventsAsync($tenant_id, array $options = []) { - return $this->getPendingWebhookEventsAsyncWithHttpInfo($tenant_id, $comment_id, $external_id, $event_type, $type, $domain, $attempt_count_gt, $skip, $contentType) + return $this->getPendingWebhookEventsAsyncWithHttpInfo($tenant_id, $options) ->then( function ($response) { return $response[0]; @@ -23779,6 +20697,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $comment_id (optional) * @param string|null $external_id (optional) @@ -23792,10 +20712,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPendingWebhookEventsAsyncWithHttpInfo($tenant_id, $comment_id = null, $external_id = null, $event_type = null, $type = null, $domain = null, $attempt_count_gt = null, $skip = null, string $contentType = self::contentTypes['getPendingWebhookEvents'][0]) + public function getPendingWebhookEventsAsyncWithHttpInfo($tenant_id, array $options = []) { $returnType = '\FastComments\Client\Model\GetPendingWebhookEventsResponse'; - $request = $this->getPendingWebhookEventsRequest($tenant_id, $comment_id, $external_id, $event_type, $type, $domain, $attempt_count_gt, $skip, $contentType); + $request = $this->getPendingWebhookEventsRequest($tenant_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -23836,6 +20756,8 @@ function ($exception) { /** * Create request for operation 'getPendingWebhookEvents' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $comment_id (optional) * @param string|null $external_id (optional) @@ -23849,9 +20771,18 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getPendingWebhookEventsRequest($tenant_id, $comment_id = null, $external_id = null, $event_type = null, $type = null, $domain = null, $attempt_count_gt = null, $skip = null, string $contentType = self::contentTypes['getPendingWebhookEvents'][0]) - { - + public function getPendingWebhookEventsRequest($tenant_id, array $options = []) + { + // unbox the optional parameters and request options from the $options array + $comment_id = array_key_exists('comment_id', $options) ? $options['comment_id'] : null; + $external_id = array_key_exists('external_id', $options) ? $options['external_id'] : null; + $event_type = array_key_exists('event_type', $options) ? $options['event_type'] : null; + $type = array_key_exists('type', $options) ? $options['type'] : null; + $domain = array_key_exists('domain', $options) ? $options['domain'] : null; + $attempt_count_gt = array_key_exists('attempt_count_gt', $options) ? $options['attempt_count_gt'] : null; + $skip = array_key_exists('skip', $options) ? $options['skip'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['getPendingWebhookEvents'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -24021,9 +20952,9 @@ public function getPendingWebhookEventsRequest($tenant_id, $comment_id = null, $ * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetQuestionConfigResponse|\FastComments\Client\Model\APIError */ - public function getQuestionConfig($tenant_id, $id, string $contentType = self::contentTypes['getQuestionConfig'][0]) + public function getQuestionConfig($tenant_id, $id) { - list($response) = $this->getQuestionConfigWithHttpInfo($tenant_id, $id, $contentType); + list($response) = $this->getQuestionConfigWithHttpInfo($tenant_id, $id); return $response; } @@ -24040,9 +20971,9 @@ public function getQuestionConfig($tenant_id, $id, string $contentType = self::c * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetQuestionConfigResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getQuestionConfigWithHttpInfo($tenant_id, $id, string $contentType = self::contentTypes['getQuestionConfig'][0]) + public function getQuestionConfigWithHttpInfo($tenant_id, $id) { - $request = $this->getQuestionConfigRequest($tenant_id, $id, $contentType); + $request = $this->getQuestionConfigRequest($tenant_id, $id); try { $options = $this->createHttpClientOption(); @@ -24069,61 +21000,21 @@ public function getQuestionConfigWithHttpInfo($tenant_id, $id, string $contentTy switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetQuestionConfigResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetQuestionConfigResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetQuestionConfigResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetQuestionConfigResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -24137,34 +21028,11 @@ public function getQuestionConfigWithHttpInfo($tenant_id, $id, string $contentTy ); } - $returnType = '\FastComments\Client\Model\GetQuestionConfigResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetQuestionConfigResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -24174,7 +21042,7 @@ public function getQuestionConfigWithHttpInfo($tenant_id, $id, string $contentTy $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -24182,8 +21050,10 @@ public function getQuestionConfigWithHttpInfo($tenant_id, $id, string $contentTy $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -24200,9 +21070,9 @@ public function getQuestionConfigWithHttpInfo($tenant_id, $id, string $contentTy * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getQuestionConfigAsync($tenant_id, $id, string $contentType = self::contentTypes['getQuestionConfig'][0]) + public function getQuestionConfigAsync($tenant_id, $id) { - return $this->getQuestionConfigAsyncWithHttpInfo($tenant_id, $id, $contentType) + return $this->getQuestionConfigAsyncWithHttpInfo($tenant_id, $id) ->then( function ($response) { return $response[0]; @@ -24222,10 +21092,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getQuestionConfigAsyncWithHttpInfo($tenant_id, $id, string $contentType = self::contentTypes['getQuestionConfig'][0]) + public function getQuestionConfigAsyncWithHttpInfo($tenant_id, $id) { $returnType = '\FastComments\Client\Model\GetQuestionConfigResponse'; - $request = $this->getQuestionConfigRequest($tenant_id, $id, $contentType); + $request = $this->getQuestionConfigRequest($tenant_id, $id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -24273,9 +21143,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getQuestionConfigRequest($tenant_id, $id, string $contentType = self::contentTypes['getQuestionConfig'][0]) + public function getQuestionConfigRequest($tenant_id, $id) { - + $contentType = self::contentTypes['getQuestionConfig'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -24312,7 +21183,7 @@ public function getQuestionConfigRequest($tenant_id, $id, string $contentType = // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -24382,6 +21253,8 @@ public function getQuestionConfigRequest($tenant_id, $id, string $contentType = * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param float|null $skip skip (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getQuestionConfigs'] to see the possible values for this operation @@ -24390,9 +21263,9 @@ public function getQuestionConfigRequest($tenant_id, $id, string $contentType = * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetQuestionConfigsResponse|\FastComments\Client\Model\APIError */ - public function getQuestionConfigs($tenant_id, $skip = null, string $contentType = self::contentTypes['getQuestionConfigs'][0]) + public function getQuestionConfigs($tenant_id, $skip = null) { - list($response) = $this->getQuestionConfigsWithHttpInfo($tenant_id, $skip, $contentType); + list($response) = $this->getQuestionConfigsWithHttpInfo($tenant_id, $skip); return $response; } @@ -24401,6 +21274,8 @@ public function getQuestionConfigs($tenant_id, $skip = null, string $contentType * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param float|null $skip (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getQuestionConfigs'] to see the possible values for this operation @@ -24409,9 +21284,9 @@ public function getQuestionConfigs($tenant_id, $skip = null, string $contentType * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetQuestionConfigsResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getQuestionConfigsWithHttpInfo($tenant_id, $skip = null, string $contentType = self::contentTypes['getQuestionConfigs'][0]) + public function getQuestionConfigsWithHttpInfo($tenant_id, $skip = null) { - $request = $this->getQuestionConfigsRequest($tenant_id, $skip, $contentType); + $request = $this->getQuestionConfigsRequest($tenant_id, $skip); try { $options = $this->createHttpClientOption(); @@ -24438,61 +21313,21 @@ public function getQuestionConfigsWithHttpInfo($tenant_id, $skip = null, string switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetQuestionConfigsResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetQuestionConfigsResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetQuestionConfigsResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetQuestionConfigsResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -24506,34 +21341,11 @@ public function getQuestionConfigsWithHttpInfo($tenant_id, $skip = null, string ); } - $returnType = '\FastComments\Client\Model\GetQuestionConfigsResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetQuestionConfigsResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -24543,7 +21355,7 @@ public function getQuestionConfigsWithHttpInfo($tenant_id, $skip = null, string $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -24551,8 +21363,10 @@ public function getQuestionConfigsWithHttpInfo($tenant_id, $skip = null, string $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -24562,6 +21376,8 @@ public function getQuestionConfigsWithHttpInfo($tenant_id, $skip = null, string * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param float|null $skip (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getQuestionConfigs'] to see the possible values for this operation @@ -24569,9 +21385,9 @@ public function getQuestionConfigsWithHttpInfo($tenant_id, $skip = null, string * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getQuestionConfigsAsync($tenant_id, $skip = null, string $contentType = self::contentTypes['getQuestionConfigs'][0]) + public function getQuestionConfigsAsync($tenant_id, $skip = null) { - return $this->getQuestionConfigsAsyncWithHttpInfo($tenant_id, $skip, $contentType) + return $this->getQuestionConfigsAsyncWithHttpInfo($tenant_id, $skip) ->then( function ($response) { return $response[0]; @@ -24584,6 +21400,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param float|null $skip (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getQuestionConfigs'] to see the possible values for this operation @@ -24591,10 +21409,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getQuestionConfigsAsyncWithHttpInfo($tenant_id, $skip = null, string $contentType = self::contentTypes['getQuestionConfigs'][0]) + public function getQuestionConfigsAsyncWithHttpInfo($tenant_id, $skip = null) { $returnType = '\FastComments\Client\Model\GetQuestionConfigsResponse'; - $request = $this->getQuestionConfigsRequest($tenant_id, $skip, $contentType); + $request = $this->getQuestionConfigsRequest($tenant_id, $skip); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -24635,6 +21453,8 @@ function ($exception) { /** * Create request for operation 'getQuestionConfigs' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param float|null $skip (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getQuestionConfigs'] to see the possible values for this operation @@ -24642,9 +21462,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getQuestionConfigsRequest($tenant_id, $skip = null, string $contentType = self::contentTypes['getQuestionConfigs'][0]) + public function getQuestionConfigsRequest($tenant_id, $skip = null) { - + $contentType = self::contentTypes['getQuestionConfigs'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -24754,9 +21575,9 @@ public function getQuestionConfigsRequest($tenant_id, $skip = null, string $cont * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetQuestionResultResponse|\FastComments\Client\Model\APIError */ - public function getQuestionResult($tenant_id, $id, string $contentType = self::contentTypes['getQuestionResult'][0]) + public function getQuestionResult($tenant_id, $id) { - list($response) = $this->getQuestionResultWithHttpInfo($tenant_id, $id, $contentType); + list($response) = $this->getQuestionResultWithHttpInfo($tenant_id, $id); return $response; } @@ -24773,9 +21594,9 @@ public function getQuestionResult($tenant_id, $id, string $contentType = self::c * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetQuestionResultResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getQuestionResultWithHttpInfo($tenant_id, $id, string $contentType = self::contentTypes['getQuestionResult'][0]) + public function getQuestionResultWithHttpInfo($tenant_id, $id) { - $request = $this->getQuestionResultRequest($tenant_id, $id, $contentType); + $request = $this->getQuestionResultRequest($tenant_id, $id); try { $options = $this->createHttpClientOption(); @@ -24802,61 +21623,21 @@ public function getQuestionResultWithHttpInfo($tenant_id, $id, string $contentTy switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetQuestionResultResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetQuestionResultResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetQuestionResultResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetQuestionResultResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -24870,34 +21651,11 @@ public function getQuestionResultWithHttpInfo($tenant_id, $id, string $contentTy ); } - $returnType = '\FastComments\Client\Model\GetQuestionResultResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetQuestionResultResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -24907,7 +21665,7 @@ public function getQuestionResultWithHttpInfo($tenant_id, $id, string $contentTy $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -24915,8 +21673,10 @@ public function getQuestionResultWithHttpInfo($tenant_id, $id, string $contentTy $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -24933,9 +21693,9 @@ public function getQuestionResultWithHttpInfo($tenant_id, $id, string $contentTy * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getQuestionResultAsync($tenant_id, $id, string $contentType = self::contentTypes['getQuestionResult'][0]) + public function getQuestionResultAsync($tenant_id, $id) { - return $this->getQuestionResultAsyncWithHttpInfo($tenant_id, $id, $contentType) + return $this->getQuestionResultAsyncWithHttpInfo($tenant_id, $id) ->then( function ($response) { return $response[0]; @@ -24955,10 +21715,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getQuestionResultAsyncWithHttpInfo($tenant_id, $id, string $contentType = self::contentTypes['getQuestionResult'][0]) + public function getQuestionResultAsyncWithHttpInfo($tenant_id, $id) { $returnType = '\FastComments\Client\Model\GetQuestionResultResponse'; - $request = $this->getQuestionResultRequest($tenant_id, $id, $contentType); + $request = $this->getQuestionResultRequest($tenant_id, $id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -25006,9 +21766,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getQuestionResultRequest($tenant_id, $id, string $contentType = self::contentTypes['getQuestionResult'][0]) + public function getQuestionResultRequest($tenant_id, $id) { - + $contentType = self::contentTypes['getQuestionResult'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -25045,7 +21806,7 @@ public function getQuestionResultRequest($tenant_id, $id, string $contentType = // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -25115,6 +21876,8 @@ public function getQuestionResultRequest($tenant_id, $id, string $contentType = * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string|null $url_id url_id (optional) * @param string|null $user_id user_id (optional) @@ -25128,9 +21891,9 @@ public function getQuestionResultRequest($tenant_id, $id, string $contentType = * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetQuestionResultsResponse|\FastComments\Client\Model\APIError */ - public function getQuestionResults($tenant_id, $url_id = null, $user_id = null, $start_date = null, $question_id = null, $question_ids = null, $skip = null, string $contentType = self::contentTypes['getQuestionResults'][0]) + public function getQuestionResults($tenant_id, array $options = []) { - list($response) = $this->getQuestionResultsWithHttpInfo($tenant_id, $url_id, $user_id, $start_date, $question_id, $question_ids, $skip, $contentType); + list($response) = $this->getQuestionResultsWithHttpInfo($tenant_id, $options); return $response; } @@ -25139,6 +21902,8 @@ public function getQuestionResults($tenant_id, $url_id = null, $user_id = null, * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $url_id (optional) * @param string|null $user_id (optional) @@ -25152,9 +21917,9 @@ public function getQuestionResults($tenant_id, $url_id = null, $user_id = null, * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetQuestionResultsResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getQuestionResultsWithHttpInfo($tenant_id, $url_id = null, $user_id = null, $start_date = null, $question_id = null, $question_ids = null, $skip = null, string $contentType = self::contentTypes['getQuestionResults'][0]) + public function getQuestionResultsWithHttpInfo($tenant_id, array $options = []) { - $request = $this->getQuestionResultsRequest($tenant_id, $url_id, $user_id, $start_date, $question_id, $question_ids, $skip, $contentType); + $request = $this->getQuestionResultsRequest($tenant_id, $options); try { $options = $this->createHttpClientOption(); @@ -25181,61 +21946,21 @@ public function getQuestionResultsWithHttpInfo($tenant_id, $url_id = null, $user switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetQuestionResultsResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetQuestionResultsResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetQuestionResultsResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetQuestionResultsResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -25249,34 +21974,11 @@ public function getQuestionResultsWithHttpInfo($tenant_id, $url_id = null, $user ); } - $returnType = '\FastComments\Client\Model\GetQuestionResultsResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetQuestionResultsResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -25286,7 +21988,7 @@ public function getQuestionResultsWithHttpInfo($tenant_id, $url_id = null, $user $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -25294,8 +21996,10 @@ public function getQuestionResultsWithHttpInfo($tenant_id, $url_id = null, $user $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -25305,6 +22009,8 @@ public function getQuestionResultsWithHttpInfo($tenant_id, $url_id = null, $user * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $url_id (optional) * @param string|null $user_id (optional) @@ -25317,9 +22023,9 @@ public function getQuestionResultsWithHttpInfo($tenant_id, $url_id = null, $user * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getQuestionResultsAsync($tenant_id, $url_id = null, $user_id = null, $start_date = null, $question_id = null, $question_ids = null, $skip = null, string $contentType = self::contentTypes['getQuestionResults'][0]) + public function getQuestionResultsAsync($tenant_id, array $options = []) { - return $this->getQuestionResultsAsyncWithHttpInfo($tenant_id, $url_id, $user_id, $start_date, $question_id, $question_ids, $skip, $contentType) + return $this->getQuestionResultsAsyncWithHttpInfo($tenant_id, $options) ->then( function ($response) { return $response[0]; @@ -25332,6 +22038,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $url_id (optional) * @param string|null $user_id (optional) @@ -25344,10 +22052,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getQuestionResultsAsyncWithHttpInfo($tenant_id, $url_id = null, $user_id = null, $start_date = null, $question_id = null, $question_ids = null, $skip = null, string $contentType = self::contentTypes['getQuestionResults'][0]) + public function getQuestionResultsAsyncWithHttpInfo($tenant_id, array $options = []) { $returnType = '\FastComments\Client\Model\GetQuestionResultsResponse'; - $request = $this->getQuestionResultsRequest($tenant_id, $url_id, $user_id, $start_date, $question_id, $question_ids, $skip, $contentType); + $request = $this->getQuestionResultsRequest($tenant_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -25388,6 +22096,8 @@ function ($exception) { /** * Create request for operation 'getQuestionResults' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $url_id (optional) * @param string|null $user_id (optional) @@ -25400,9 +22110,17 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getQuestionResultsRequest($tenant_id, $url_id = null, $user_id = null, $start_date = null, $question_id = null, $question_ids = null, $skip = null, string $contentType = self::contentTypes['getQuestionResults'][0]) - { - + public function getQuestionResultsRequest($tenant_id, array $options = []) + { + // unbox the optional parameters and request options from the $options array + $url_id = array_key_exists('url_id', $options) ? $options['url_id'] : null; + $user_id = array_key_exists('user_id', $options) ? $options['user_id'] : null; + $start_date = array_key_exists('start_date', $options) ? $options['start_date'] : null; + $question_id = array_key_exists('question_id', $options) ? $options['question_id'] : null; + $question_ids = array_key_exists('question_ids', $options) ? $options['question_ids'] : null; + $skip = array_key_exists('skip', $options) ? $options['skip'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['getQuestionResults'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -25562,9 +22280,9 @@ public function getQuestionResultsRequest($tenant_id, $url_id = null, $user_id = * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetSSOUserByEmailAPIResponse */ - public function getSSOUserByEmail($tenant_id, $email, string $contentType = self::contentTypes['getSSOUserByEmail'][0]) + public function getSSOUserByEmail($tenant_id, $email) { - list($response) = $this->getSSOUserByEmailWithHttpInfo($tenant_id, $email, $contentType); + list($response) = $this->getSSOUserByEmailWithHttpInfo($tenant_id, $email); return $response; } @@ -25581,9 +22299,9 @@ public function getSSOUserByEmail($tenant_id, $email, string $contentType = self * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetSSOUserByEmailAPIResponse, HTTP status code, HTTP response headers (array of strings) */ - public function getSSOUserByEmailWithHttpInfo($tenant_id, $email, string $contentType = self::contentTypes['getSSOUserByEmail'][0]) + public function getSSOUserByEmailWithHttpInfo($tenant_id, $email) { - $request = $this->getSSOUserByEmailRequest($tenant_id, $email, $contentType); + $request = $this->getSSOUserByEmailRequest($tenant_id, $email); try { $options = $this->createHttpClientOption(); @@ -25610,34 +22328,15 @@ public function getSSOUserByEmailWithHttpInfo($tenant_id, $email, string $conten switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetSSOUserByEmailAPIResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetSSOUserByEmailAPIResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetSSOUserByEmailAPIResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetSSOUserByEmailAPIResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -25651,34 +22350,11 @@ public function getSSOUserByEmailWithHttpInfo($tenant_id, $email, string $conten ); } - $returnType = '\FastComments\Client\Model\GetSSOUserByEmailAPIResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetSSOUserByEmailAPIResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -25688,8 +22364,10 @@ public function getSSOUserByEmailWithHttpInfo($tenant_id, $email, string $conten $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -25706,9 +22384,9 @@ public function getSSOUserByEmailWithHttpInfo($tenant_id, $email, string $conten * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getSSOUserByEmailAsync($tenant_id, $email, string $contentType = self::contentTypes['getSSOUserByEmail'][0]) + public function getSSOUserByEmailAsync($tenant_id, $email) { - return $this->getSSOUserByEmailAsyncWithHttpInfo($tenant_id, $email, $contentType) + return $this->getSSOUserByEmailAsyncWithHttpInfo($tenant_id, $email) ->then( function ($response) { return $response[0]; @@ -25728,10 +22406,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getSSOUserByEmailAsyncWithHttpInfo($tenant_id, $email, string $contentType = self::contentTypes['getSSOUserByEmail'][0]) + public function getSSOUserByEmailAsyncWithHttpInfo($tenant_id, $email) { $returnType = '\FastComments\Client\Model\GetSSOUserByEmailAPIResponse'; - $request = $this->getSSOUserByEmailRequest($tenant_id, $email, $contentType); + $request = $this->getSSOUserByEmailRequest($tenant_id, $email); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -25779,9 +22457,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getSSOUserByEmailRequest($tenant_id, $email, string $contentType = self::contentTypes['getSSOUserByEmail'][0]) + public function getSSOUserByEmailRequest($tenant_id, $email) { - + $contentType = self::contentTypes['getSSOUserByEmail'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -25818,7 +22497,7 @@ public function getSSOUserByEmailRequest($tenant_id, $email, string $contentType // path params if ($email !== null) { $resourcePath = str_replace( - '{' . 'email' . '}', + '{email}', ObjectSerializer::toPathValue($email), $resourcePath ); @@ -25896,9 +22575,9 @@ public function getSSOUserByEmailRequest($tenant_id, $email, string $contentType * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetSSOUserByIdAPIResponse */ - public function getSSOUserById($tenant_id, $id, string $contentType = self::contentTypes['getSSOUserById'][0]) + public function getSSOUserById($tenant_id, $id) { - list($response) = $this->getSSOUserByIdWithHttpInfo($tenant_id, $id, $contentType); + list($response) = $this->getSSOUserByIdWithHttpInfo($tenant_id, $id); return $response; } @@ -25915,9 +22594,9 @@ public function getSSOUserById($tenant_id, $id, string $contentType = self::cont * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetSSOUserByIdAPIResponse, HTTP status code, HTTP response headers (array of strings) */ - public function getSSOUserByIdWithHttpInfo($tenant_id, $id, string $contentType = self::contentTypes['getSSOUserById'][0]) + public function getSSOUserByIdWithHttpInfo($tenant_id, $id) { - $request = $this->getSSOUserByIdRequest($tenant_id, $id, $contentType); + $request = $this->getSSOUserByIdRequest($tenant_id, $id); try { $options = $this->createHttpClientOption(); @@ -25944,34 +22623,15 @@ public function getSSOUserByIdWithHttpInfo($tenant_id, $id, string $contentType switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetSSOUserByIdAPIResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetSSOUserByIdAPIResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetSSOUserByIdAPIResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetSSOUserByIdAPIResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -25985,34 +22645,11 @@ public function getSSOUserByIdWithHttpInfo($tenant_id, $id, string $contentType ); } - $returnType = '\FastComments\Client\Model\GetSSOUserByIdAPIResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetSSOUserByIdAPIResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -26022,8 +22659,10 @@ public function getSSOUserByIdWithHttpInfo($tenant_id, $id, string $contentType $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -26040,9 +22679,9 @@ public function getSSOUserByIdWithHttpInfo($tenant_id, $id, string $contentType * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getSSOUserByIdAsync($tenant_id, $id, string $contentType = self::contentTypes['getSSOUserById'][0]) + public function getSSOUserByIdAsync($tenant_id, $id) { - return $this->getSSOUserByIdAsyncWithHttpInfo($tenant_id, $id, $contentType) + return $this->getSSOUserByIdAsyncWithHttpInfo($tenant_id, $id) ->then( function ($response) { return $response[0]; @@ -26062,10 +22701,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getSSOUserByIdAsyncWithHttpInfo($tenant_id, $id, string $contentType = self::contentTypes['getSSOUserById'][0]) + public function getSSOUserByIdAsyncWithHttpInfo($tenant_id, $id) { $returnType = '\FastComments\Client\Model\GetSSOUserByIdAPIResponse'; - $request = $this->getSSOUserByIdRequest($tenant_id, $id, $contentType); + $request = $this->getSSOUserByIdRequest($tenant_id, $id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -26113,9 +22752,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getSSOUserByIdRequest($tenant_id, $id, string $contentType = self::contentTypes['getSSOUserById'][0]) + public function getSSOUserByIdRequest($tenant_id, $id) { - + $contentType = self::contentTypes['getSSOUserById'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -26152,7 +22792,7 @@ public function getSSOUserByIdRequest($tenant_id, $id, string $contentType = sel // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -26222,6 +22862,8 @@ public function getSSOUserByIdRequest($tenant_id, $id, string $contentType = sel * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param int|null $skip skip (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSSOUsers'] to see the possible values for this operation @@ -26230,9 +22872,9 @@ public function getSSOUserByIdRequest($tenant_id, $id, string $contentType = sel * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetSSOUsersResponse */ - public function getSSOUsers($tenant_id, $skip = null, string $contentType = self::contentTypes['getSSOUsers'][0]) + public function getSSOUsers($tenant_id, $skip = null) { - list($response) = $this->getSSOUsersWithHttpInfo($tenant_id, $skip, $contentType); + list($response) = $this->getSSOUsersWithHttpInfo($tenant_id, $skip); return $response; } @@ -26241,6 +22883,8 @@ public function getSSOUsers($tenant_id, $skip = null, string $contentType = self * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param int|null $skip (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSSOUsers'] to see the possible values for this operation @@ -26249,9 +22893,9 @@ public function getSSOUsers($tenant_id, $skip = null, string $contentType = self * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetSSOUsersResponse, HTTP status code, HTTP response headers (array of strings) */ - public function getSSOUsersWithHttpInfo($tenant_id, $skip = null, string $contentType = self::contentTypes['getSSOUsers'][0]) + public function getSSOUsersWithHttpInfo($tenant_id, $skip = null) { - $request = $this->getSSOUsersRequest($tenant_id, $skip, $contentType); + $request = $this->getSSOUsersRequest($tenant_id, $skip); try { $options = $this->createHttpClientOption(); @@ -26278,34 +22922,15 @@ public function getSSOUsersWithHttpInfo($tenant_id, $skip = null, string $conten switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetSSOUsersResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetSSOUsersResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetSSOUsersResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetSSOUsersResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -26319,34 +22944,11 @@ public function getSSOUsersWithHttpInfo($tenant_id, $skip = null, string $conten ); } - $returnType = '\FastComments\Client\Model\GetSSOUsersResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetSSOUsersResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -26356,8 +22958,10 @@ public function getSSOUsersWithHttpInfo($tenant_id, $skip = null, string $conten $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -26367,6 +22971,8 @@ public function getSSOUsersWithHttpInfo($tenant_id, $skip = null, string $conten * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param int|null $skip (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSSOUsers'] to see the possible values for this operation @@ -26374,9 +22980,9 @@ public function getSSOUsersWithHttpInfo($tenant_id, $skip = null, string $conten * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getSSOUsersAsync($tenant_id, $skip = null, string $contentType = self::contentTypes['getSSOUsers'][0]) + public function getSSOUsersAsync($tenant_id, $skip = null) { - return $this->getSSOUsersAsyncWithHttpInfo($tenant_id, $skip, $contentType) + return $this->getSSOUsersAsyncWithHttpInfo($tenant_id, $skip) ->then( function ($response) { return $response[0]; @@ -26389,6 +22995,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param int|null $skip (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSSOUsers'] to see the possible values for this operation @@ -26396,10 +23004,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getSSOUsersAsyncWithHttpInfo($tenant_id, $skip = null, string $contentType = self::contentTypes['getSSOUsers'][0]) + public function getSSOUsersAsyncWithHttpInfo($tenant_id, $skip = null) { $returnType = '\FastComments\Client\Model\GetSSOUsersResponse'; - $request = $this->getSSOUsersRequest($tenant_id, $skip, $contentType); + $request = $this->getSSOUsersRequest($tenant_id, $skip); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -26440,6 +23048,8 @@ function ($exception) { /** * Create request for operation 'getSSOUsers' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param int|null $skip (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSSOUsers'] to see the possible values for this operation @@ -26447,9 +23057,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getSSOUsersRequest($tenant_id, $skip = null, string $contentType = self::contentTypes['getSSOUsers'][0]) + public function getSSOUsersRequest($tenant_id, $skip = null) { - + $contentType = self::contentTypes['getSSOUsers'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -26551,6 +23162,8 @@ public function getSSOUsersRequest($tenant_id, $skip = null, string $contentType * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string|null $user_id user_id (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSubscriptions'] to see the possible values for this operation @@ -26559,9 +23172,9 @@ public function getSSOUsersRequest($tenant_id, $skip = null, string $contentType * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetSubscriptionsAPIResponse */ - public function getSubscriptions($tenant_id, $user_id = null, string $contentType = self::contentTypes['getSubscriptions'][0]) + public function getSubscriptions($tenant_id, $user_id = null) { - list($response) = $this->getSubscriptionsWithHttpInfo($tenant_id, $user_id, $contentType); + list($response) = $this->getSubscriptionsWithHttpInfo($tenant_id, $user_id); return $response; } @@ -26570,6 +23183,8 @@ public function getSubscriptions($tenant_id, $user_id = null, string $contentTyp * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $user_id (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSubscriptions'] to see the possible values for this operation @@ -26578,9 +23193,9 @@ public function getSubscriptions($tenant_id, $user_id = null, string $contentTyp * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetSubscriptionsAPIResponse, HTTP status code, HTTP response headers (array of strings) */ - public function getSubscriptionsWithHttpInfo($tenant_id, $user_id = null, string $contentType = self::contentTypes['getSubscriptions'][0]) + public function getSubscriptionsWithHttpInfo($tenant_id, $user_id = null) { - $request = $this->getSubscriptionsRequest($tenant_id, $user_id, $contentType); + $request = $this->getSubscriptionsRequest($tenant_id, $user_id); try { $options = $this->createHttpClientOption(); @@ -26607,34 +23222,15 @@ public function getSubscriptionsWithHttpInfo($tenant_id, $user_id = null, string switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetSubscriptionsAPIResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetSubscriptionsAPIResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetSubscriptionsAPIResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetSubscriptionsAPIResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -26648,34 +23244,11 @@ public function getSubscriptionsWithHttpInfo($tenant_id, $user_id = null, string ); } - $returnType = '\FastComments\Client\Model\GetSubscriptionsAPIResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetSubscriptionsAPIResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -26685,8 +23258,10 @@ public function getSubscriptionsWithHttpInfo($tenant_id, $user_id = null, string $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -26696,6 +23271,8 @@ public function getSubscriptionsWithHttpInfo($tenant_id, $user_id = null, string * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $user_id (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSubscriptions'] to see the possible values for this operation @@ -26703,9 +23280,9 @@ public function getSubscriptionsWithHttpInfo($tenant_id, $user_id = null, string * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getSubscriptionsAsync($tenant_id, $user_id = null, string $contentType = self::contentTypes['getSubscriptions'][0]) + public function getSubscriptionsAsync($tenant_id, $user_id = null) { - return $this->getSubscriptionsAsyncWithHttpInfo($tenant_id, $user_id, $contentType) + return $this->getSubscriptionsAsyncWithHttpInfo($tenant_id, $user_id) ->then( function ($response) { return $response[0]; @@ -26718,6 +23295,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $user_id (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSubscriptions'] to see the possible values for this operation @@ -26725,10 +23304,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getSubscriptionsAsyncWithHttpInfo($tenant_id, $user_id = null, string $contentType = self::contentTypes['getSubscriptions'][0]) + public function getSubscriptionsAsyncWithHttpInfo($tenant_id, $user_id = null) { $returnType = '\FastComments\Client\Model\GetSubscriptionsAPIResponse'; - $request = $this->getSubscriptionsRequest($tenant_id, $user_id, $contentType); + $request = $this->getSubscriptionsRequest($tenant_id, $user_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -26769,6 +23348,8 @@ function ($exception) { /** * Create request for operation 'getSubscriptions' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $user_id (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSubscriptions'] to see the possible values for this operation @@ -26776,9 +23357,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getSubscriptionsRequest($tenant_id, $user_id = null, string $contentType = self::contentTypes['getSubscriptions'][0]) + public function getSubscriptionsRequest($tenant_id, $user_id = null) { - + $contentType = self::contentTypes['getSubscriptions'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -26888,9 +23470,9 @@ public function getSubscriptionsRequest($tenant_id, $user_id = null, string $con * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetTenantResponse|\FastComments\Client\Model\APIError */ - public function getTenant($tenant_id, $id, string $contentType = self::contentTypes['getTenant'][0]) + public function getTenant($tenant_id, $id) { - list($response) = $this->getTenantWithHttpInfo($tenant_id, $id, $contentType); + list($response) = $this->getTenantWithHttpInfo($tenant_id, $id); return $response; } @@ -26907,9 +23489,9 @@ public function getTenant($tenant_id, $id, string $contentType = self::contentTy * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetTenantResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getTenantWithHttpInfo($tenant_id, $id, string $contentType = self::contentTypes['getTenant'][0]) + public function getTenantWithHttpInfo($tenant_id, $id) { - $request = $this->getTenantRequest($tenant_id, $id, $contentType); + $request = $this->getTenantRequest($tenant_id, $id); try { $options = $this->createHttpClientOption(); @@ -26936,61 +23518,21 @@ public function getTenantWithHttpInfo($tenant_id, $id, string $contentType = sel switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetTenantResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetTenantResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetTenantResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetTenantResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -27004,34 +23546,11 @@ public function getTenantWithHttpInfo($tenant_id, $id, string $contentType = sel ); } - $returnType = '\FastComments\Client\Model\GetTenantResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetTenantResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -27041,7 +23560,7 @@ public function getTenantWithHttpInfo($tenant_id, $id, string $contentType = sel $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -27049,8 +23568,10 @@ public function getTenantWithHttpInfo($tenant_id, $id, string $contentType = sel $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -27067,9 +23588,9 @@ public function getTenantWithHttpInfo($tenant_id, $id, string $contentType = sel * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTenantAsync($tenant_id, $id, string $contentType = self::contentTypes['getTenant'][0]) + public function getTenantAsync($tenant_id, $id) { - return $this->getTenantAsyncWithHttpInfo($tenant_id, $id, $contentType) + return $this->getTenantAsyncWithHttpInfo($tenant_id, $id) ->then( function ($response) { return $response[0]; @@ -27089,10 +23610,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTenantAsyncWithHttpInfo($tenant_id, $id, string $contentType = self::contentTypes['getTenant'][0]) + public function getTenantAsyncWithHttpInfo($tenant_id, $id) { $returnType = '\FastComments\Client\Model\GetTenantResponse'; - $request = $this->getTenantRequest($tenant_id, $id, $contentType); + $request = $this->getTenantRequest($tenant_id, $id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -27140,9 +23661,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getTenantRequest($tenant_id, $id, string $contentType = self::contentTypes['getTenant'][0]) + public function getTenantRequest($tenant_id, $id) { - + $contentType = self::contentTypes['getTenant'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -27179,7 +23701,7 @@ public function getTenantRequest($tenant_id, $id, string $contentType = self::co // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -27249,6 +23771,8 @@ public function getTenantRequest($tenant_id, $id, string $contentType = self::co * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param float|null $year_number year_number (optional) * @param float|null $month_number month_number (optional) @@ -27260,9 +23784,9 @@ public function getTenantRequest($tenant_id, $id, string $contentType = self::co * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetTenantDailyUsagesResponse|\FastComments\Client\Model\APIError */ - public function getTenantDailyUsages($tenant_id, $year_number = null, $month_number = null, $day_number = null, $skip = null, string $contentType = self::contentTypes['getTenantDailyUsages'][0]) + public function getTenantDailyUsages($tenant_id, array $options = []) { - list($response) = $this->getTenantDailyUsagesWithHttpInfo($tenant_id, $year_number, $month_number, $day_number, $skip, $contentType); + list($response) = $this->getTenantDailyUsagesWithHttpInfo($tenant_id, $options); return $response; } @@ -27271,6 +23795,8 @@ public function getTenantDailyUsages($tenant_id, $year_number = null, $month_num * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param float|null $year_number (optional) * @param float|null $month_number (optional) @@ -27282,9 +23808,9 @@ public function getTenantDailyUsages($tenant_id, $year_number = null, $month_num * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetTenantDailyUsagesResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getTenantDailyUsagesWithHttpInfo($tenant_id, $year_number = null, $month_number = null, $day_number = null, $skip = null, string $contentType = self::contentTypes['getTenantDailyUsages'][0]) + public function getTenantDailyUsagesWithHttpInfo($tenant_id, array $options = []) { - $request = $this->getTenantDailyUsagesRequest($tenant_id, $year_number, $month_number, $day_number, $skip, $contentType); + $request = $this->getTenantDailyUsagesRequest($tenant_id, $options); try { $options = $this->createHttpClientOption(); @@ -27311,61 +23837,21 @@ public function getTenantDailyUsagesWithHttpInfo($tenant_id, $year_number = null switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetTenantDailyUsagesResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetTenantDailyUsagesResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetTenantDailyUsagesResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetTenantDailyUsagesResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -27379,34 +23865,11 @@ public function getTenantDailyUsagesWithHttpInfo($tenant_id, $year_number = null ); } - $returnType = '\FastComments\Client\Model\GetTenantDailyUsagesResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetTenantDailyUsagesResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -27416,7 +23879,7 @@ public function getTenantDailyUsagesWithHttpInfo($tenant_id, $year_number = null $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -27424,8 +23887,10 @@ public function getTenantDailyUsagesWithHttpInfo($tenant_id, $year_number = null $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -27435,6 +23900,8 @@ public function getTenantDailyUsagesWithHttpInfo($tenant_id, $year_number = null * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param float|null $year_number (optional) * @param float|null $month_number (optional) @@ -27445,9 +23912,9 @@ public function getTenantDailyUsagesWithHttpInfo($tenant_id, $year_number = null * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTenantDailyUsagesAsync($tenant_id, $year_number = null, $month_number = null, $day_number = null, $skip = null, string $contentType = self::contentTypes['getTenantDailyUsages'][0]) + public function getTenantDailyUsagesAsync($tenant_id, array $options = []) { - return $this->getTenantDailyUsagesAsyncWithHttpInfo($tenant_id, $year_number, $month_number, $day_number, $skip, $contentType) + return $this->getTenantDailyUsagesAsyncWithHttpInfo($tenant_id, $options) ->then( function ($response) { return $response[0]; @@ -27460,6 +23927,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param float|null $year_number (optional) * @param float|null $month_number (optional) @@ -27470,10 +23939,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTenantDailyUsagesAsyncWithHttpInfo($tenant_id, $year_number = null, $month_number = null, $day_number = null, $skip = null, string $contentType = self::contentTypes['getTenantDailyUsages'][0]) + public function getTenantDailyUsagesAsyncWithHttpInfo($tenant_id, array $options = []) { $returnType = '\FastComments\Client\Model\GetTenantDailyUsagesResponse'; - $request = $this->getTenantDailyUsagesRequest($tenant_id, $year_number, $month_number, $day_number, $skip, $contentType); + $request = $this->getTenantDailyUsagesRequest($tenant_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -27514,6 +23983,8 @@ function ($exception) { /** * Create request for operation 'getTenantDailyUsages' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param float|null $year_number (optional) * @param float|null $month_number (optional) @@ -27524,9 +23995,15 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getTenantDailyUsagesRequest($tenant_id, $year_number = null, $month_number = null, $day_number = null, $skip = null, string $contentType = self::contentTypes['getTenantDailyUsages'][0]) + public function getTenantDailyUsagesRequest($tenant_id, array $options = []) { - + // unbox the optional parameters and request options from the $options array + $year_number = array_key_exists('year_number', $options) ? $options['year_number'] : null; + $month_number = array_key_exists('month_number', $options) ? $options['month_number'] : null; + $day_number = array_key_exists('day_number', $options) ? $options['day_number'] : null; + $skip = array_key_exists('skip', $options) ? $options['skip'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['getTenantDailyUsages'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -27666,9 +24143,9 @@ public function getTenantDailyUsagesRequest($tenant_id, $year_number = null, $mo * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetTenantPackageResponse|\FastComments\Client\Model\APIError */ - public function getTenantPackage($tenant_id, $id, string $contentType = self::contentTypes['getTenantPackage'][0]) + public function getTenantPackage($tenant_id, $id) { - list($response) = $this->getTenantPackageWithHttpInfo($tenant_id, $id, $contentType); + list($response) = $this->getTenantPackageWithHttpInfo($tenant_id, $id); return $response; } @@ -27685,9 +24162,9 @@ public function getTenantPackage($tenant_id, $id, string $contentType = self::co * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetTenantPackageResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getTenantPackageWithHttpInfo($tenant_id, $id, string $contentType = self::contentTypes['getTenantPackage'][0]) + public function getTenantPackageWithHttpInfo($tenant_id, $id) { - $request = $this->getTenantPackageRequest($tenant_id, $id, $contentType); + $request = $this->getTenantPackageRequest($tenant_id, $id); try { $options = $this->createHttpClientOption(); @@ -27714,61 +24191,21 @@ public function getTenantPackageWithHttpInfo($tenant_id, $id, string $contentTyp switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetTenantPackageResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetTenantPackageResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetTenantPackageResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetTenantPackageResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -27782,34 +24219,11 @@ public function getTenantPackageWithHttpInfo($tenant_id, $id, string $contentTyp ); } - $returnType = '\FastComments\Client\Model\GetTenantPackageResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetTenantPackageResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -27819,7 +24233,7 @@ public function getTenantPackageWithHttpInfo($tenant_id, $id, string $contentTyp $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -27827,8 +24241,10 @@ public function getTenantPackageWithHttpInfo($tenant_id, $id, string $contentTyp $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -27845,9 +24261,9 @@ public function getTenantPackageWithHttpInfo($tenant_id, $id, string $contentTyp * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTenantPackageAsync($tenant_id, $id, string $contentType = self::contentTypes['getTenantPackage'][0]) + public function getTenantPackageAsync($tenant_id, $id) { - return $this->getTenantPackageAsyncWithHttpInfo($tenant_id, $id, $contentType) + return $this->getTenantPackageAsyncWithHttpInfo($tenant_id, $id) ->then( function ($response) { return $response[0]; @@ -27867,10 +24283,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTenantPackageAsyncWithHttpInfo($tenant_id, $id, string $contentType = self::contentTypes['getTenantPackage'][0]) + public function getTenantPackageAsyncWithHttpInfo($tenant_id, $id) { $returnType = '\FastComments\Client\Model\GetTenantPackageResponse'; - $request = $this->getTenantPackageRequest($tenant_id, $id, $contentType); + $request = $this->getTenantPackageRequest($tenant_id, $id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -27918,9 +24334,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getTenantPackageRequest($tenant_id, $id, string $contentType = self::contentTypes['getTenantPackage'][0]) + public function getTenantPackageRequest($tenant_id, $id) { - + $contentType = self::contentTypes['getTenantPackage'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -27957,7 +24374,7 @@ public function getTenantPackageRequest($tenant_id, $id, string $contentType = s // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -28027,6 +24444,8 @@ public function getTenantPackageRequest($tenant_id, $id, string $contentType = s * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param float|null $skip skip (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTenantPackages'] to see the possible values for this operation @@ -28035,9 +24454,9 @@ public function getTenantPackageRequest($tenant_id, $id, string $contentType = s * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetTenantPackagesResponse|\FastComments\Client\Model\APIError */ - public function getTenantPackages($tenant_id, $skip = null, string $contentType = self::contentTypes['getTenantPackages'][0]) + public function getTenantPackages($tenant_id, $skip = null) { - list($response) = $this->getTenantPackagesWithHttpInfo($tenant_id, $skip, $contentType); + list($response) = $this->getTenantPackagesWithHttpInfo($tenant_id, $skip); return $response; } @@ -28046,6 +24465,8 @@ public function getTenantPackages($tenant_id, $skip = null, string $contentType * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param float|null $skip (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTenantPackages'] to see the possible values for this operation @@ -28054,9 +24475,9 @@ public function getTenantPackages($tenant_id, $skip = null, string $contentType * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetTenantPackagesResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getTenantPackagesWithHttpInfo($tenant_id, $skip = null, string $contentType = self::contentTypes['getTenantPackages'][0]) + public function getTenantPackagesWithHttpInfo($tenant_id, $skip = null) { - $request = $this->getTenantPackagesRequest($tenant_id, $skip, $contentType); + $request = $this->getTenantPackagesRequest($tenant_id, $skip); try { $options = $this->createHttpClientOption(); @@ -28083,61 +24504,21 @@ public function getTenantPackagesWithHttpInfo($tenant_id, $skip = null, string $ switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetTenantPackagesResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetTenantPackagesResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetTenantPackagesResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetTenantPackagesResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -28151,34 +24532,11 @@ public function getTenantPackagesWithHttpInfo($tenant_id, $skip = null, string $ ); } - $returnType = '\FastComments\Client\Model\GetTenantPackagesResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetTenantPackagesResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -28188,7 +24546,7 @@ public function getTenantPackagesWithHttpInfo($tenant_id, $skip = null, string $ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -28196,8 +24554,10 @@ public function getTenantPackagesWithHttpInfo($tenant_id, $skip = null, string $ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -28207,6 +24567,8 @@ public function getTenantPackagesWithHttpInfo($tenant_id, $skip = null, string $ * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param float|null $skip (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTenantPackages'] to see the possible values for this operation @@ -28214,9 +24576,9 @@ public function getTenantPackagesWithHttpInfo($tenant_id, $skip = null, string $ * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTenantPackagesAsync($tenant_id, $skip = null, string $contentType = self::contentTypes['getTenantPackages'][0]) + public function getTenantPackagesAsync($tenant_id, $skip = null) { - return $this->getTenantPackagesAsyncWithHttpInfo($tenant_id, $skip, $contentType) + return $this->getTenantPackagesAsyncWithHttpInfo($tenant_id, $skip) ->then( function ($response) { return $response[0]; @@ -28229,6 +24591,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param float|null $skip (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTenantPackages'] to see the possible values for this operation @@ -28236,10 +24600,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTenantPackagesAsyncWithHttpInfo($tenant_id, $skip = null, string $contentType = self::contentTypes['getTenantPackages'][0]) + public function getTenantPackagesAsyncWithHttpInfo($tenant_id, $skip = null) { $returnType = '\FastComments\Client\Model\GetTenantPackagesResponse'; - $request = $this->getTenantPackagesRequest($tenant_id, $skip, $contentType); + $request = $this->getTenantPackagesRequest($tenant_id, $skip); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -28280,6 +24644,8 @@ function ($exception) { /** * Create request for operation 'getTenantPackages' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param float|null $skip (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTenantPackages'] to see the possible values for this operation @@ -28287,9 +24653,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getTenantPackagesRequest($tenant_id, $skip = null, string $contentType = self::contentTypes['getTenantPackages'][0]) + public function getTenantPackagesRequest($tenant_id, $skip = null) { - + $contentType = self::contentTypes['getTenantPackages'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -28399,9 +24766,9 @@ public function getTenantPackagesRequest($tenant_id, $skip = null, string $conte * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetTenantUserResponse|\FastComments\Client\Model\APIError */ - public function getTenantUser($tenant_id, $id, string $contentType = self::contentTypes['getTenantUser'][0]) + public function getTenantUser($tenant_id, $id) { - list($response) = $this->getTenantUserWithHttpInfo($tenant_id, $id, $contentType); + list($response) = $this->getTenantUserWithHttpInfo($tenant_id, $id); return $response; } @@ -28418,9 +24785,9 @@ public function getTenantUser($tenant_id, $id, string $contentType = self::conte * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetTenantUserResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getTenantUserWithHttpInfo($tenant_id, $id, string $contentType = self::contentTypes['getTenantUser'][0]) + public function getTenantUserWithHttpInfo($tenant_id, $id) { - $request = $this->getTenantUserRequest($tenant_id, $id, $contentType); + $request = $this->getTenantUserRequest($tenant_id, $id); try { $options = $this->createHttpClientOption(); @@ -28447,61 +24814,21 @@ public function getTenantUserWithHttpInfo($tenant_id, $id, string $contentType = switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetTenantUserResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetTenantUserResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetTenantUserResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetTenantUserResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -28515,34 +24842,11 @@ public function getTenantUserWithHttpInfo($tenant_id, $id, string $contentType = ); } - $returnType = '\FastComments\Client\Model\GetTenantUserResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetTenantUserResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -28552,7 +24856,7 @@ public function getTenantUserWithHttpInfo($tenant_id, $id, string $contentType = $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -28560,8 +24864,10 @@ public function getTenantUserWithHttpInfo($tenant_id, $id, string $contentType = $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -28578,9 +24884,9 @@ public function getTenantUserWithHttpInfo($tenant_id, $id, string $contentType = * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTenantUserAsync($tenant_id, $id, string $contentType = self::contentTypes['getTenantUser'][0]) + public function getTenantUserAsync($tenant_id, $id) { - return $this->getTenantUserAsyncWithHttpInfo($tenant_id, $id, $contentType) + return $this->getTenantUserAsyncWithHttpInfo($tenant_id, $id) ->then( function ($response) { return $response[0]; @@ -28600,10 +24906,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTenantUserAsyncWithHttpInfo($tenant_id, $id, string $contentType = self::contentTypes['getTenantUser'][0]) + public function getTenantUserAsyncWithHttpInfo($tenant_id, $id) { $returnType = '\FastComments\Client\Model\GetTenantUserResponse'; - $request = $this->getTenantUserRequest($tenant_id, $id, $contentType); + $request = $this->getTenantUserRequest($tenant_id, $id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -28651,9 +24957,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getTenantUserRequest($tenant_id, $id, string $contentType = self::contentTypes['getTenantUser'][0]) + public function getTenantUserRequest($tenant_id, $id) { - + $contentType = self::contentTypes['getTenantUser'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -28690,7 +24997,7 @@ public function getTenantUserRequest($tenant_id, $id, string $contentType = self // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -28760,6 +25067,8 @@ public function getTenantUserRequest($tenant_id, $id, string $contentType = self * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param float|null $skip skip (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTenantUsers'] to see the possible values for this operation @@ -28768,9 +25077,9 @@ public function getTenantUserRequest($tenant_id, $id, string $contentType = self * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetTenantUsersResponse|\FastComments\Client\Model\APIError */ - public function getTenantUsers($tenant_id, $skip = null, string $contentType = self::contentTypes['getTenantUsers'][0]) + public function getTenantUsers($tenant_id, $skip = null) { - list($response) = $this->getTenantUsersWithHttpInfo($tenant_id, $skip, $contentType); + list($response) = $this->getTenantUsersWithHttpInfo($tenant_id, $skip); return $response; } @@ -28779,6 +25088,8 @@ public function getTenantUsers($tenant_id, $skip = null, string $contentType = s * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param float|null $skip (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTenantUsers'] to see the possible values for this operation @@ -28787,9 +25098,9 @@ public function getTenantUsers($tenant_id, $skip = null, string $contentType = s * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetTenantUsersResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getTenantUsersWithHttpInfo($tenant_id, $skip = null, string $contentType = self::contentTypes['getTenantUsers'][0]) + public function getTenantUsersWithHttpInfo($tenant_id, $skip = null) { - $request = $this->getTenantUsersRequest($tenant_id, $skip, $contentType); + $request = $this->getTenantUsersRequest($tenant_id, $skip); try { $options = $this->createHttpClientOption(); @@ -28816,61 +25127,21 @@ public function getTenantUsersWithHttpInfo($tenant_id, $skip = null, string $con switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetTenantUsersResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetTenantUsersResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetTenantUsersResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetTenantUsersResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -28884,34 +25155,11 @@ public function getTenantUsersWithHttpInfo($tenant_id, $skip = null, string $con ); } - $returnType = '\FastComments\Client\Model\GetTenantUsersResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetTenantUsersResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -28921,7 +25169,7 @@ public function getTenantUsersWithHttpInfo($tenant_id, $skip = null, string $con $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -28929,8 +25177,10 @@ public function getTenantUsersWithHttpInfo($tenant_id, $skip = null, string $con $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -28940,6 +25190,8 @@ public function getTenantUsersWithHttpInfo($tenant_id, $skip = null, string $con * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param float|null $skip (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTenantUsers'] to see the possible values for this operation @@ -28947,9 +25199,9 @@ public function getTenantUsersWithHttpInfo($tenant_id, $skip = null, string $con * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTenantUsersAsync($tenant_id, $skip = null, string $contentType = self::contentTypes['getTenantUsers'][0]) + public function getTenantUsersAsync($tenant_id, $skip = null) { - return $this->getTenantUsersAsyncWithHttpInfo($tenant_id, $skip, $contentType) + return $this->getTenantUsersAsyncWithHttpInfo($tenant_id, $skip) ->then( function ($response) { return $response[0]; @@ -28962,6 +25214,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param float|null $skip (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTenantUsers'] to see the possible values for this operation @@ -28969,10 +25223,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTenantUsersAsyncWithHttpInfo($tenant_id, $skip = null, string $contentType = self::contentTypes['getTenantUsers'][0]) + public function getTenantUsersAsyncWithHttpInfo($tenant_id, $skip = null) { $returnType = '\FastComments\Client\Model\GetTenantUsersResponse'; - $request = $this->getTenantUsersRequest($tenant_id, $skip, $contentType); + $request = $this->getTenantUsersRequest($tenant_id, $skip); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -29013,6 +25267,8 @@ function ($exception) { /** * Create request for operation 'getTenantUsers' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param float|null $skip (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTenantUsers'] to see the possible values for this operation @@ -29020,9 +25276,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getTenantUsersRequest($tenant_id, $skip = null, string $contentType = self::contentTypes['getTenantUsers'][0]) + public function getTenantUsersRequest($tenant_id, $skip = null) { - + $contentType = self::contentTypes['getTenantUsers'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -29124,6 +25381,8 @@ public function getTenantUsersRequest($tenant_id, $skip = null, string $contentT * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string|null $meta meta (optional) * @param float|null $skip skip (optional) @@ -29133,9 +25392,9 @@ public function getTenantUsersRequest($tenant_id, $skip = null, string $contentT * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetTenantsResponse|\FastComments\Client\Model\APIError */ - public function getTenants($tenant_id, $meta = null, $skip = null, string $contentType = self::contentTypes['getTenants'][0]) + public function getTenants($tenant_id, array $options = []) { - list($response) = $this->getTenantsWithHttpInfo($tenant_id, $meta, $skip, $contentType); + list($response) = $this->getTenantsWithHttpInfo($tenant_id, $options); return $response; } @@ -29144,6 +25403,8 @@ public function getTenants($tenant_id, $meta = null, $skip = null, string $conte * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $meta (optional) * @param float|null $skip (optional) @@ -29153,9 +25414,9 @@ public function getTenants($tenant_id, $meta = null, $skip = null, string $conte * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetTenantsResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getTenantsWithHttpInfo($tenant_id, $meta = null, $skip = null, string $contentType = self::contentTypes['getTenants'][0]) + public function getTenantsWithHttpInfo($tenant_id, array $options = []) { - $request = $this->getTenantsRequest($tenant_id, $meta, $skip, $contentType); + $request = $this->getTenantsRequest($tenant_id, $options); try { $options = $this->createHttpClientOption(); @@ -29182,61 +25443,21 @@ public function getTenantsWithHttpInfo($tenant_id, $meta = null, $skip = null, s switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetTenantsResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetTenantsResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetTenantsResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetTenantsResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -29250,34 +25471,11 @@ public function getTenantsWithHttpInfo($tenant_id, $meta = null, $skip = null, s ); } - $returnType = '\FastComments\Client\Model\GetTenantsResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetTenantsResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -29287,7 +25485,7 @@ public function getTenantsWithHttpInfo($tenant_id, $meta = null, $skip = null, s $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -29295,8 +25493,10 @@ public function getTenantsWithHttpInfo($tenant_id, $meta = null, $skip = null, s $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -29306,6 +25506,8 @@ public function getTenantsWithHttpInfo($tenant_id, $meta = null, $skip = null, s * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $meta (optional) * @param float|null $skip (optional) @@ -29314,9 +25516,9 @@ public function getTenantsWithHttpInfo($tenant_id, $meta = null, $skip = null, s * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTenantsAsync($tenant_id, $meta = null, $skip = null, string $contentType = self::contentTypes['getTenants'][0]) + public function getTenantsAsync($tenant_id, array $options = []) { - return $this->getTenantsAsyncWithHttpInfo($tenant_id, $meta, $skip, $contentType) + return $this->getTenantsAsyncWithHttpInfo($tenant_id, $options) ->then( function ($response) { return $response[0]; @@ -29329,6 +25531,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $meta (optional) * @param float|null $skip (optional) @@ -29337,10 +25541,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTenantsAsyncWithHttpInfo($tenant_id, $meta = null, $skip = null, string $contentType = self::contentTypes['getTenants'][0]) + public function getTenantsAsyncWithHttpInfo($tenant_id, array $options = []) { $returnType = '\FastComments\Client\Model\GetTenantsResponse'; - $request = $this->getTenantsRequest($tenant_id, $meta, $skip, $contentType); + $request = $this->getTenantsRequest($tenant_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -29381,6 +25585,8 @@ function ($exception) { /** * Create request for operation 'getTenants' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $meta (optional) * @param float|null $skip (optional) @@ -29389,9 +25595,13 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getTenantsRequest($tenant_id, $meta = null, $skip = null, string $contentType = self::contentTypes['getTenants'][0]) + public function getTenantsRequest($tenant_id, array $options = []) { - + // unbox the optional parameters and request options from the $options array + $meta = array_key_exists('meta', $options) ? $options['meta'] : null; + $skip = array_key_exists('skip', $options) ? $options['skip'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['getTenants'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -29503,6 +25713,8 @@ public function getTenantsRequest($tenant_id, $meta = null, $skip = null, string * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $id id (required) * @param string|null $user_id user_id (optional) @@ -29512,9 +25724,9 @@ public function getTenantsRequest($tenant_id, $meta = null, $skip = null, string * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetTicketResponse|\FastComments\Client\Model\APIError */ - public function getTicket($tenant_id, $id, $user_id = null, string $contentType = self::contentTypes['getTicket'][0]) + public function getTicket($tenant_id, $id, $user_id = null) { - list($response) = $this->getTicketWithHttpInfo($tenant_id, $id, $user_id, $contentType); + list($response) = $this->getTicketWithHttpInfo($tenant_id, $id, $user_id); return $response; } @@ -29523,6 +25735,8 @@ public function getTicket($tenant_id, $id, $user_id = null, string $contentType * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param string|null $user_id (optional) @@ -29532,9 +25746,9 @@ public function getTicket($tenant_id, $id, $user_id = null, string $contentType * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetTicketResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getTicketWithHttpInfo($tenant_id, $id, $user_id = null, string $contentType = self::contentTypes['getTicket'][0]) + public function getTicketWithHttpInfo($tenant_id, $id, $user_id = null) { - $request = $this->getTicketRequest($tenant_id, $id, $user_id, $contentType); + $request = $this->getTicketRequest($tenant_id, $id, $user_id); try { $options = $this->createHttpClientOption(); @@ -29561,61 +25775,21 @@ public function getTicketWithHttpInfo($tenant_id, $id, $user_id = null, string $ switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetTicketResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetTicketResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetTicketResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetTicketResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -29629,34 +25803,11 @@ public function getTicketWithHttpInfo($tenant_id, $id, $user_id = null, string $ ); } - $returnType = '\FastComments\Client\Model\GetTicketResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetTicketResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -29666,7 +25817,7 @@ public function getTicketWithHttpInfo($tenant_id, $id, $user_id = null, string $ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -29674,8 +25825,10 @@ public function getTicketWithHttpInfo($tenant_id, $id, $user_id = null, string $ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -29685,6 +25838,8 @@ public function getTicketWithHttpInfo($tenant_id, $id, $user_id = null, string $ * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param string|null $user_id (optional) @@ -29693,9 +25848,9 @@ public function getTicketWithHttpInfo($tenant_id, $id, $user_id = null, string $ * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTicketAsync($tenant_id, $id, $user_id = null, string $contentType = self::contentTypes['getTicket'][0]) + public function getTicketAsync($tenant_id, $id, $user_id = null) { - return $this->getTicketAsyncWithHttpInfo($tenant_id, $id, $user_id, $contentType) + return $this->getTicketAsyncWithHttpInfo($tenant_id, $id, $user_id) ->then( function ($response) { return $response[0]; @@ -29708,6 +25863,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param string|null $user_id (optional) @@ -29716,10 +25873,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTicketAsyncWithHttpInfo($tenant_id, $id, $user_id = null, string $contentType = self::contentTypes['getTicket'][0]) + public function getTicketAsyncWithHttpInfo($tenant_id, $id, $user_id = null) { $returnType = '\FastComments\Client\Model\GetTicketResponse'; - $request = $this->getTicketRequest($tenant_id, $id, $user_id, $contentType); + $request = $this->getTicketRequest($tenant_id, $id, $user_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -29760,6 +25917,8 @@ function ($exception) { /** * Create request for operation 'getTicket' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param string|null $user_id (optional) @@ -29768,9 +25927,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getTicketRequest($tenant_id, $id, $user_id = null, string $contentType = self::contentTypes['getTicket'][0]) + public function getTicketRequest($tenant_id, $id, $user_id = null) { - + $contentType = self::contentTypes['getTicket'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -29817,7 +25977,7 @@ public function getTicketRequest($tenant_id, $id, $user_id = null, string $conte // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -29887,6 +26047,8 @@ public function getTicketRequest($tenant_id, $id, $user_id = null, string $conte * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string|null $user_id user_id (optional) * @param float|null $state state (optional) @@ -29898,9 +26060,9 @@ public function getTicketRequest($tenant_id, $id, $user_id = null, string $conte * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetTicketsResponse|\FastComments\Client\Model\APIError */ - public function getTickets($tenant_id, $user_id = null, $state = null, $skip = null, $limit = null, string $contentType = self::contentTypes['getTickets'][0]) + public function getTickets($tenant_id, array $options = []) { - list($response) = $this->getTicketsWithHttpInfo($tenant_id, $user_id, $state, $skip, $limit, $contentType); + list($response) = $this->getTicketsWithHttpInfo($tenant_id, $options); return $response; } @@ -29909,6 +26071,8 @@ public function getTickets($tenant_id, $user_id = null, $state = null, $skip = n * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $user_id (optional) * @param float|null $state (optional) @@ -29920,9 +26084,9 @@ public function getTickets($tenant_id, $user_id = null, $state = null, $skip = n * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetTicketsResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getTicketsWithHttpInfo($tenant_id, $user_id = null, $state = null, $skip = null, $limit = null, string $contentType = self::contentTypes['getTickets'][0]) + public function getTicketsWithHttpInfo($tenant_id, array $options = []) { - $request = $this->getTicketsRequest($tenant_id, $user_id, $state, $skip, $limit, $contentType); + $request = $this->getTicketsRequest($tenant_id, $options); try { $options = $this->createHttpClientOption(); @@ -29949,61 +26113,21 @@ public function getTicketsWithHttpInfo($tenant_id, $user_id = null, $state = nul switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetTicketsResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetTicketsResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetTicketsResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetTicketsResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -30017,34 +26141,11 @@ public function getTicketsWithHttpInfo($tenant_id, $user_id = null, $state = nul ); } - $returnType = '\FastComments\Client\Model\GetTicketsResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetTicketsResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -30054,7 +26155,7 @@ public function getTicketsWithHttpInfo($tenant_id, $user_id = null, $state = nul $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -30062,8 +26163,10 @@ public function getTicketsWithHttpInfo($tenant_id, $user_id = null, $state = nul $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -30073,6 +26176,8 @@ public function getTicketsWithHttpInfo($tenant_id, $user_id = null, $state = nul * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $user_id (optional) * @param float|null $state (optional) @@ -30083,9 +26188,9 @@ public function getTicketsWithHttpInfo($tenant_id, $user_id = null, $state = nul * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTicketsAsync($tenant_id, $user_id = null, $state = null, $skip = null, $limit = null, string $contentType = self::contentTypes['getTickets'][0]) + public function getTicketsAsync($tenant_id, array $options = []) { - return $this->getTicketsAsyncWithHttpInfo($tenant_id, $user_id, $state, $skip, $limit, $contentType) + return $this->getTicketsAsyncWithHttpInfo($tenant_id, $options) ->then( function ($response) { return $response[0]; @@ -30098,6 +26203,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $user_id (optional) * @param float|null $state (optional) @@ -30108,10 +26215,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTicketsAsyncWithHttpInfo($tenant_id, $user_id = null, $state = null, $skip = null, $limit = null, string $contentType = self::contentTypes['getTickets'][0]) + public function getTicketsAsyncWithHttpInfo($tenant_id, array $options = []) { $returnType = '\FastComments\Client\Model\GetTicketsResponse'; - $request = $this->getTicketsRequest($tenant_id, $user_id, $state, $skip, $limit, $contentType); + $request = $this->getTicketsRequest($tenant_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -30152,6 +26259,8 @@ function ($exception) { /** * Create request for operation 'getTickets' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $user_id (optional) * @param float|null $state (optional) @@ -30162,9 +26271,15 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getTicketsRequest($tenant_id, $user_id = null, $state = null, $skip = null, $limit = null, string $contentType = self::contentTypes['getTickets'][0]) + public function getTicketsRequest($tenant_id, array $options = []) { - + // unbox the optional parameters and request options from the $options array + $user_id = array_key_exists('user_id', $options) ? $options['user_id'] : null; + $state = array_key_exists('state', $options) ? $options['state'] : null; + $skip = array_key_exists('skip', $options) ? $options['skip'] : null; + $limit = array_key_exists('limit', $options) ? $options['limit'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['getTickets'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -30304,9 +26419,9 @@ public function getTicketsRequest($tenant_id, $user_id = null, $state = null, $s * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetUserResponse|\FastComments\Client\Model\APIError */ - public function getUser($tenant_id, $id, string $contentType = self::contentTypes['getUser'][0]) + public function getUser($tenant_id, $id) { - list($response) = $this->getUserWithHttpInfo($tenant_id, $id, $contentType); + list($response) = $this->getUserWithHttpInfo($tenant_id, $id); return $response; } @@ -30323,9 +26438,9 @@ public function getUser($tenant_id, $id, string $contentType = self::contentType * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetUserResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getUserWithHttpInfo($tenant_id, $id, string $contentType = self::contentTypes['getUser'][0]) + public function getUserWithHttpInfo($tenant_id, $id) { - $request = $this->getUserRequest($tenant_id, $id, $contentType); + $request = $this->getUserRequest($tenant_id, $id); try { $options = $this->createHttpClientOption(); @@ -30352,61 +26467,21 @@ public function getUserWithHttpInfo($tenant_id, $id, string $contentType = self: switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetUserResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetUserResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetUserResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetUserResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -30420,34 +26495,11 @@ public function getUserWithHttpInfo($tenant_id, $id, string $contentType = self: ); } - $returnType = '\FastComments\Client\Model\GetUserResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetUserResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -30457,7 +26509,7 @@ public function getUserWithHttpInfo($tenant_id, $id, string $contentType = self: $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -30465,8 +26517,10 @@ public function getUserWithHttpInfo($tenant_id, $id, string $contentType = self: $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -30483,9 +26537,9 @@ public function getUserWithHttpInfo($tenant_id, $id, string $contentType = self: * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getUserAsync($tenant_id, $id, string $contentType = self::contentTypes['getUser'][0]) + public function getUserAsync($tenant_id, $id) { - return $this->getUserAsyncWithHttpInfo($tenant_id, $id, $contentType) + return $this->getUserAsyncWithHttpInfo($tenant_id, $id) ->then( function ($response) { return $response[0]; @@ -30505,10 +26559,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getUserAsyncWithHttpInfo($tenant_id, $id, string $contentType = self::contentTypes['getUser'][0]) + public function getUserAsyncWithHttpInfo($tenant_id, $id) { $returnType = '\FastComments\Client\Model\GetUserResponse'; - $request = $this->getUserRequest($tenant_id, $id, $contentType); + $request = $this->getUserRequest($tenant_id, $id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -30556,9 +26610,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getUserRequest($tenant_id, $id, string $contentType = self::contentTypes['getUser'][0]) + public function getUserRequest($tenant_id, $id) { - + $contentType = self::contentTypes['getUser'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -30595,7 +26650,7 @@ public function getUserRequest($tenant_id, $id, string $contentType = self::cont // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -30673,9 +26728,9 @@ public function getUserRequest($tenant_id, $id, string $contentType = self::cont * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APIGetUserBadgeResponse|\FastComments\Client\Model\APIError */ - public function getUserBadge($tenant_id, $id, string $contentType = self::contentTypes['getUserBadge'][0]) + public function getUserBadge($tenant_id, $id) { - list($response) = $this->getUserBadgeWithHttpInfo($tenant_id, $id, $contentType); + list($response) = $this->getUserBadgeWithHttpInfo($tenant_id, $id); return $response; } @@ -30692,9 +26747,9 @@ public function getUserBadge($tenant_id, $id, string $contentType = self::conten * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APIGetUserBadgeResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getUserBadgeWithHttpInfo($tenant_id, $id, string $contentType = self::contentTypes['getUserBadge'][0]) + public function getUserBadgeWithHttpInfo($tenant_id, $id) { - $request = $this->getUserBadgeRequest($tenant_id, $id, $contentType); + $request = $this->getUserBadgeRequest($tenant_id, $id); try { $options = $this->createHttpClientOption(); @@ -30721,61 +26776,21 @@ public function getUserBadgeWithHttpInfo($tenant_id, $id, string $contentType = switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APIGetUserBadgeResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIGetUserBadgeResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIGetUserBadgeResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIGetUserBadgeResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -30789,34 +26804,11 @@ public function getUserBadgeWithHttpInfo($tenant_id, $id, string $contentType = ); } - $returnType = '\FastComments\Client\Model\APIGetUserBadgeResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIGetUserBadgeResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -30826,7 +26818,7 @@ public function getUserBadgeWithHttpInfo($tenant_id, $id, string $contentType = $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -30834,8 +26826,10 @@ public function getUserBadgeWithHttpInfo($tenant_id, $id, string $contentType = $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -30852,9 +26846,9 @@ public function getUserBadgeWithHttpInfo($tenant_id, $id, string $contentType = * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getUserBadgeAsync($tenant_id, $id, string $contentType = self::contentTypes['getUserBadge'][0]) + public function getUserBadgeAsync($tenant_id, $id) { - return $this->getUserBadgeAsyncWithHttpInfo($tenant_id, $id, $contentType) + return $this->getUserBadgeAsyncWithHttpInfo($tenant_id, $id) ->then( function ($response) { return $response[0]; @@ -30874,10 +26868,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getUserBadgeAsyncWithHttpInfo($tenant_id, $id, string $contentType = self::contentTypes['getUserBadge'][0]) + public function getUserBadgeAsyncWithHttpInfo($tenant_id, $id) { $returnType = '\FastComments\Client\Model\APIGetUserBadgeResponse'; - $request = $this->getUserBadgeRequest($tenant_id, $id, $contentType); + $request = $this->getUserBadgeRequest($tenant_id, $id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -30925,9 +26919,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getUserBadgeRequest($tenant_id, $id, string $contentType = self::contentTypes['getUserBadge'][0]) + public function getUserBadgeRequest($tenant_id, $id) { - + $contentType = self::contentTypes['getUserBadge'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -30964,7 +26959,7 @@ public function getUserBadgeRequest($tenant_id, $id, string $contentType = self: // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -31042,9 +27037,9 @@ public function getUserBadgeRequest($tenant_id, $id, string $contentType = self: * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APIGetUserBadgeProgressResponse|\FastComments\Client\Model\APIError */ - public function getUserBadgeProgressById($tenant_id, $id, string $contentType = self::contentTypes['getUserBadgeProgressById'][0]) + public function getUserBadgeProgressById($tenant_id, $id) { - list($response) = $this->getUserBadgeProgressByIdWithHttpInfo($tenant_id, $id, $contentType); + list($response) = $this->getUserBadgeProgressByIdWithHttpInfo($tenant_id, $id); return $response; } @@ -31061,9 +27056,9 @@ public function getUserBadgeProgressById($tenant_id, $id, string $contentType = * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APIGetUserBadgeProgressResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getUserBadgeProgressByIdWithHttpInfo($tenant_id, $id, string $contentType = self::contentTypes['getUserBadgeProgressById'][0]) + public function getUserBadgeProgressByIdWithHttpInfo($tenant_id, $id) { - $request = $this->getUserBadgeProgressByIdRequest($tenant_id, $id, $contentType); + $request = $this->getUserBadgeProgressByIdRequest($tenant_id, $id); try { $options = $this->createHttpClientOption(); @@ -31090,61 +27085,21 @@ public function getUserBadgeProgressByIdWithHttpInfo($tenant_id, $id, string $co switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APIGetUserBadgeProgressResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIGetUserBadgeProgressResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIGetUserBadgeProgressResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIGetUserBadgeProgressResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -31158,34 +27113,11 @@ public function getUserBadgeProgressByIdWithHttpInfo($tenant_id, $id, string $co ); } - $returnType = '\FastComments\Client\Model\APIGetUserBadgeProgressResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIGetUserBadgeProgressResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -31195,7 +27127,7 @@ public function getUserBadgeProgressByIdWithHttpInfo($tenant_id, $id, string $co $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -31203,8 +27135,10 @@ public function getUserBadgeProgressByIdWithHttpInfo($tenant_id, $id, string $co $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -31221,9 +27155,9 @@ public function getUserBadgeProgressByIdWithHttpInfo($tenant_id, $id, string $co * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getUserBadgeProgressByIdAsync($tenant_id, $id, string $contentType = self::contentTypes['getUserBadgeProgressById'][0]) + public function getUserBadgeProgressByIdAsync($tenant_id, $id) { - return $this->getUserBadgeProgressByIdAsyncWithHttpInfo($tenant_id, $id, $contentType) + return $this->getUserBadgeProgressByIdAsyncWithHttpInfo($tenant_id, $id) ->then( function ($response) { return $response[0]; @@ -31243,10 +27177,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getUserBadgeProgressByIdAsyncWithHttpInfo($tenant_id, $id, string $contentType = self::contentTypes['getUserBadgeProgressById'][0]) + public function getUserBadgeProgressByIdAsyncWithHttpInfo($tenant_id, $id) { $returnType = '\FastComments\Client\Model\APIGetUserBadgeProgressResponse'; - $request = $this->getUserBadgeProgressByIdRequest($tenant_id, $id, $contentType); + $request = $this->getUserBadgeProgressByIdRequest($tenant_id, $id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -31294,9 +27228,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getUserBadgeProgressByIdRequest($tenant_id, $id, string $contentType = self::contentTypes['getUserBadgeProgressById'][0]) + public function getUserBadgeProgressByIdRequest($tenant_id, $id) { - + $contentType = self::contentTypes['getUserBadgeProgressById'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -31333,7 +27268,7 @@ public function getUserBadgeProgressByIdRequest($tenant_id, $id, string $content // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -31411,9 +27346,9 @@ public function getUserBadgeProgressByIdRequest($tenant_id, $id, string $content * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APIGetUserBadgeProgressResponse|\FastComments\Client\Model\APIError */ - public function getUserBadgeProgressByUserId($tenant_id, $user_id, string $contentType = self::contentTypes['getUserBadgeProgressByUserId'][0]) + public function getUserBadgeProgressByUserId($tenant_id, $user_id) { - list($response) = $this->getUserBadgeProgressByUserIdWithHttpInfo($tenant_id, $user_id, $contentType); + list($response) = $this->getUserBadgeProgressByUserIdWithHttpInfo($tenant_id, $user_id); return $response; } @@ -31430,9 +27365,9 @@ public function getUserBadgeProgressByUserId($tenant_id, $user_id, string $conte * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APIGetUserBadgeProgressResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getUserBadgeProgressByUserIdWithHttpInfo($tenant_id, $user_id, string $contentType = self::contentTypes['getUserBadgeProgressByUserId'][0]) + public function getUserBadgeProgressByUserIdWithHttpInfo($tenant_id, $user_id) { - $request = $this->getUserBadgeProgressByUserIdRequest($tenant_id, $user_id, $contentType); + $request = $this->getUserBadgeProgressByUserIdRequest($tenant_id, $user_id); try { $options = $this->createHttpClientOption(); @@ -31459,61 +27394,21 @@ public function getUserBadgeProgressByUserIdWithHttpInfo($tenant_id, $user_id, s switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APIGetUserBadgeProgressResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIGetUserBadgeProgressResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIGetUserBadgeProgressResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIGetUserBadgeProgressResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -31527,34 +27422,11 @@ public function getUserBadgeProgressByUserIdWithHttpInfo($tenant_id, $user_id, s ); } - $returnType = '\FastComments\Client\Model\APIGetUserBadgeProgressResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIGetUserBadgeProgressResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -31564,7 +27436,7 @@ public function getUserBadgeProgressByUserIdWithHttpInfo($tenant_id, $user_id, s $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -31572,8 +27444,10 @@ public function getUserBadgeProgressByUserIdWithHttpInfo($tenant_id, $user_id, s $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -31590,9 +27464,9 @@ public function getUserBadgeProgressByUserIdWithHttpInfo($tenant_id, $user_id, s * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getUserBadgeProgressByUserIdAsync($tenant_id, $user_id, string $contentType = self::contentTypes['getUserBadgeProgressByUserId'][0]) + public function getUserBadgeProgressByUserIdAsync($tenant_id, $user_id) { - return $this->getUserBadgeProgressByUserIdAsyncWithHttpInfo($tenant_id, $user_id, $contentType) + return $this->getUserBadgeProgressByUserIdAsyncWithHttpInfo($tenant_id, $user_id) ->then( function ($response) { return $response[0]; @@ -31612,10 +27486,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getUserBadgeProgressByUserIdAsyncWithHttpInfo($tenant_id, $user_id, string $contentType = self::contentTypes['getUserBadgeProgressByUserId'][0]) + public function getUserBadgeProgressByUserIdAsyncWithHttpInfo($tenant_id, $user_id) { $returnType = '\FastComments\Client\Model\APIGetUserBadgeProgressResponse'; - $request = $this->getUserBadgeProgressByUserIdRequest($tenant_id, $user_id, $contentType); + $request = $this->getUserBadgeProgressByUserIdRequest($tenant_id, $user_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -31663,9 +27537,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getUserBadgeProgressByUserIdRequest($tenant_id, $user_id, string $contentType = self::contentTypes['getUserBadgeProgressByUserId'][0]) + public function getUserBadgeProgressByUserIdRequest($tenant_id, $user_id) { - + $contentType = self::contentTypes['getUserBadgeProgressByUserId'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -31702,7 +27577,7 @@ public function getUserBadgeProgressByUserIdRequest($tenant_id, $user_id, string // path params if ($user_id !== null) { $resourcePath = str_replace( - '{' . 'userId' . '}', + '{userId}', ObjectSerializer::toPathValue($user_id), $resourcePath ); @@ -31772,6 +27647,8 @@ public function getUserBadgeProgressByUserIdRequest($tenant_id, $user_id, string * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string|null $user_id user_id (optional) * @param float|null $limit limit (optional) @@ -31782,9 +27659,9 @@ public function getUserBadgeProgressByUserIdRequest($tenant_id, $user_id, string * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APIGetUserBadgeProgressListResponse|\FastComments\Client\Model\APIError */ - public function getUserBadgeProgressList($tenant_id, $user_id = null, $limit = null, $skip = null, string $contentType = self::contentTypes['getUserBadgeProgressList'][0]) + public function getUserBadgeProgressList($tenant_id, array $options = []) { - list($response) = $this->getUserBadgeProgressListWithHttpInfo($tenant_id, $user_id, $limit, $skip, $contentType); + list($response) = $this->getUserBadgeProgressListWithHttpInfo($tenant_id, $options); return $response; } @@ -31793,6 +27670,8 @@ public function getUserBadgeProgressList($tenant_id, $user_id = null, $limit = n * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $user_id (optional) * @param float|null $limit (optional) @@ -31803,9 +27682,9 @@ public function getUserBadgeProgressList($tenant_id, $user_id = null, $limit = n * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APIGetUserBadgeProgressListResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getUserBadgeProgressListWithHttpInfo($tenant_id, $user_id = null, $limit = null, $skip = null, string $contentType = self::contentTypes['getUserBadgeProgressList'][0]) + public function getUserBadgeProgressListWithHttpInfo($tenant_id, array $options = []) { - $request = $this->getUserBadgeProgressListRequest($tenant_id, $user_id, $limit, $skip, $contentType); + $request = $this->getUserBadgeProgressListRequest($tenant_id, $options); try { $options = $this->createHttpClientOption(); @@ -31832,61 +27711,21 @@ public function getUserBadgeProgressListWithHttpInfo($tenant_id, $user_id = null switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APIGetUserBadgeProgressListResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIGetUserBadgeProgressListResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIGetUserBadgeProgressListResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIGetUserBadgeProgressListResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -31900,34 +27739,11 @@ public function getUserBadgeProgressListWithHttpInfo($tenant_id, $user_id = null ); } - $returnType = '\FastComments\Client\Model\APIGetUserBadgeProgressListResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIGetUserBadgeProgressListResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -31937,7 +27753,7 @@ public function getUserBadgeProgressListWithHttpInfo($tenant_id, $user_id = null $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -31945,8 +27761,10 @@ public function getUserBadgeProgressListWithHttpInfo($tenant_id, $user_id = null $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -31956,6 +27774,8 @@ public function getUserBadgeProgressListWithHttpInfo($tenant_id, $user_id = null * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $user_id (optional) * @param float|null $limit (optional) @@ -31965,9 +27785,9 @@ public function getUserBadgeProgressListWithHttpInfo($tenant_id, $user_id = null * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getUserBadgeProgressListAsync($tenant_id, $user_id = null, $limit = null, $skip = null, string $contentType = self::contentTypes['getUserBadgeProgressList'][0]) + public function getUserBadgeProgressListAsync($tenant_id, array $options = []) { - return $this->getUserBadgeProgressListAsyncWithHttpInfo($tenant_id, $user_id, $limit, $skip, $contentType) + return $this->getUserBadgeProgressListAsyncWithHttpInfo($tenant_id, $options) ->then( function ($response) { return $response[0]; @@ -31980,6 +27800,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $user_id (optional) * @param float|null $limit (optional) @@ -31989,10 +27811,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getUserBadgeProgressListAsyncWithHttpInfo($tenant_id, $user_id = null, $limit = null, $skip = null, string $contentType = self::contentTypes['getUserBadgeProgressList'][0]) + public function getUserBadgeProgressListAsyncWithHttpInfo($tenant_id, array $options = []) { $returnType = '\FastComments\Client\Model\APIGetUserBadgeProgressListResponse'; - $request = $this->getUserBadgeProgressListRequest($tenant_id, $user_id, $limit, $skip, $contentType); + $request = $this->getUserBadgeProgressListRequest($tenant_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -32033,6 +27855,8 @@ function ($exception) { /** * Create request for operation 'getUserBadgeProgressList' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $user_id (optional) * @param float|null $limit (optional) @@ -32042,9 +27866,14 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getUserBadgeProgressListRequest($tenant_id, $user_id = null, $limit = null, $skip = null, string $contentType = self::contentTypes['getUserBadgeProgressList'][0]) + public function getUserBadgeProgressListRequest($tenant_id, array $options = []) { - + // unbox the optional parameters and request options from the $options array + $user_id = array_key_exists('user_id', $options) ? $options['user_id'] : null; + $limit = array_key_exists('limit', $options) ? $options['limit'] : null; + $skip = array_key_exists('skip', $options) ? $options['skip'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['getUserBadgeProgressList'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -32166,6 +27995,8 @@ public function getUserBadgeProgressListRequest($tenant_id, $user_id = null, $li * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string|null $user_id user_id (optional) * @param string|null $badge_id badge_id (optional) @@ -32179,9 +28010,9 @@ public function getUserBadgeProgressListRequest($tenant_id, $user_id = null, $li * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APIGetUserBadgesResponse|\FastComments\Client\Model\APIError */ - public function getUserBadges($tenant_id, $user_id = null, $badge_id = null, $type = null, $displayed_on_comments = null, $limit = null, $skip = null, string $contentType = self::contentTypes['getUserBadges'][0]) + public function getUserBadges($tenant_id, array $options = []) { - list($response) = $this->getUserBadgesWithHttpInfo($tenant_id, $user_id, $badge_id, $type, $displayed_on_comments, $limit, $skip, $contentType); + list($response) = $this->getUserBadgesWithHttpInfo($tenant_id, $options); return $response; } @@ -32190,6 +28021,8 @@ public function getUserBadges($tenant_id, $user_id = null, $badge_id = null, $ty * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $user_id (optional) * @param string|null $badge_id (optional) @@ -32203,9 +28036,9 @@ public function getUserBadges($tenant_id, $user_id = null, $badge_id = null, $ty * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APIGetUserBadgesResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getUserBadgesWithHttpInfo($tenant_id, $user_id = null, $badge_id = null, $type = null, $displayed_on_comments = null, $limit = null, $skip = null, string $contentType = self::contentTypes['getUserBadges'][0]) + public function getUserBadgesWithHttpInfo($tenant_id, array $options = []) { - $request = $this->getUserBadgesRequest($tenant_id, $user_id, $badge_id, $type, $displayed_on_comments, $limit, $skip, $contentType); + $request = $this->getUserBadgesRequest($tenant_id, $options); try { $options = $this->createHttpClientOption(); @@ -32232,61 +28065,21 @@ public function getUserBadgesWithHttpInfo($tenant_id, $user_id = null, $badge_id switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APIGetUserBadgesResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIGetUserBadgesResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIGetUserBadgesResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIGetUserBadgesResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -32300,34 +28093,11 @@ public function getUserBadgesWithHttpInfo($tenant_id, $user_id = null, $badge_id ); } - $returnType = '\FastComments\Client\Model\APIGetUserBadgesResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIGetUserBadgesResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -32337,7 +28107,7 @@ public function getUserBadgesWithHttpInfo($tenant_id, $user_id = null, $badge_id $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -32345,8 +28115,10 @@ public function getUserBadgesWithHttpInfo($tenant_id, $user_id = null, $badge_id $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -32356,6 +28128,8 @@ public function getUserBadgesWithHttpInfo($tenant_id, $user_id = null, $badge_id * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $user_id (optional) * @param string|null $badge_id (optional) @@ -32368,9 +28142,9 @@ public function getUserBadgesWithHttpInfo($tenant_id, $user_id = null, $badge_id * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getUserBadgesAsync($tenant_id, $user_id = null, $badge_id = null, $type = null, $displayed_on_comments = null, $limit = null, $skip = null, string $contentType = self::contentTypes['getUserBadges'][0]) + public function getUserBadgesAsync($tenant_id, array $options = []) { - return $this->getUserBadgesAsyncWithHttpInfo($tenant_id, $user_id, $badge_id, $type, $displayed_on_comments, $limit, $skip, $contentType) + return $this->getUserBadgesAsyncWithHttpInfo($tenant_id, $options) ->then( function ($response) { return $response[0]; @@ -32383,6 +28157,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $user_id (optional) * @param string|null $badge_id (optional) @@ -32395,10 +28171,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getUserBadgesAsyncWithHttpInfo($tenant_id, $user_id = null, $badge_id = null, $type = null, $displayed_on_comments = null, $limit = null, $skip = null, string $contentType = self::contentTypes['getUserBadges'][0]) + public function getUserBadgesAsyncWithHttpInfo($tenant_id, array $options = []) { $returnType = '\FastComments\Client\Model\APIGetUserBadgesResponse'; - $request = $this->getUserBadgesRequest($tenant_id, $user_id, $badge_id, $type, $displayed_on_comments, $limit, $skip, $contentType); + $request = $this->getUserBadgesRequest($tenant_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -32439,6 +28215,8 @@ function ($exception) { /** * Create request for operation 'getUserBadges' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $user_id (optional) * @param string|null $badge_id (optional) @@ -32451,9 +28229,17 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getUserBadgesRequest($tenant_id, $user_id = null, $badge_id = null, $type = null, $displayed_on_comments = null, $limit = null, $skip = null, string $contentType = self::contentTypes['getUserBadges'][0]) - { - + public function getUserBadgesRequest($tenant_id, array $options = []) + { + // unbox the optional parameters and request options from the $options array + $user_id = array_key_exists('user_id', $options) ? $options['user_id'] : null; + $badge_id = array_key_exists('badge_id', $options) ? $options['badge_id'] : null; + $type = array_key_exists('type', $options) ? $options['type'] : null; + $displayed_on_comments = array_key_exists('displayed_on_comments', $options) ? $options['displayed_on_comments'] : null; + $limit = array_key_exists('limit', $options) ? $options['limit'] : null; + $skip = array_key_exists('skip', $options) ? $options['skip'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['getUserBadges'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -32613,9 +28399,9 @@ public function getUserBadgesRequest($tenant_id, $user_id = null, $badge_id = nu * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetVotesResponse|\FastComments\Client\Model\APIError */ - public function getVotes($tenant_id, $url_id, string $contentType = self::contentTypes['getVotes'][0]) + public function getVotes($tenant_id, $url_id) { - list($response) = $this->getVotesWithHttpInfo($tenant_id, $url_id, $contentType); + list($response) = $this->getVotesWithHttpInfo($tenant_id, $url_id); return $response; } @@ -32632,9 +28418,9 @@ public function getVotes($tenant_id, $url_id, string $contentType = self::conten * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetVotesResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getVotesWithHttpInfo($tenant_id, $url_id, string $contentType = self::contentTypes['getVotes'][0]) + public function getVotesWithHttpInfo($tenant_id, $url_id) { - $request = $this->getVotesRequest($tenant_id, $url_id, $contentType); + $request = $this->getVotesRequest($tenant_id, $url_id); try { $options = $this->createHttpClientOption(); @@ -32661,61 +28447,21 @@ public function getVotesWithHttpInfo($tenant_id, $url_id, string $contentType = switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetVotesResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetVotesResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetVotesResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetVotesResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -32729,34 +28475,11 @@ public function getVotesWithHttpInfo($tenant_id, $url_id, string $contentType = ); } - $returnType = '\FastComments\Client\Model\GetVotesResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetVotesResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -32766,7 +28489,7 @@ public function getVotesWithHttpInfo($tenant_id, $url_id, string $contentType = $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -32774,8 +28497,10 @@ public function getVotesWithHttpInfo($tenant_id, $url_id, string $contentType = $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -32792,9 +28517,9 @@ public function getVotesWithHttpInfo($tenant_id, $url_id, string $contentType = * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getVotesAsync($tenant_id, $url_id, string $contentType = self::contentTypes['getVotes'][0]) + public function getVotesAsync($tenant_id, $url_id) { - return $this->getVotesAsyncWithHttpInfo($tenant_id, $url_id, $contentType) + return $this->getVotesAsyncWithHttpInfo($tenant_id, $url_id) ->then( function ($response) { return $response[0]; @@ -32814,10 +28539,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getVotesAsyncWithHttpInfo($tenant_id, $url_id, string $contentType = self::contentTypes['getVotes'][0]) + public function getVotesAsyncWithHttpInfo($tenant_id, $url_id) { $returnType = '\FastComments\Client\Model\GetVotesResponse'; - $request = $this->getVotesRequest($tenant_id, $url_id, $contentType); + $request = $this->getVotesRequest($tenant_id, $url_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -32865,9 +28590,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getVotesRequest($tenant_id, $url_id, string $contentType = self::contentTypes['getVotes'][0]) + public function getVotesRequest($tenant_id, $url_id) { - + $contentType = self::contentTypes['getVotes'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -32975,6 +28701,8 @@ public function getVotesRequest($tenant_id, $url_id, string $contentType = self: * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $url_id url_id (required) * @param string|null $user_id user_id (optional) @@ -32985,9 +28713,9 @@ public function getVotesRequest($tenant_id, $url_id, string $contentType = self: * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetVotesForUserResponse|\FastComments\Client\Model\APIError */ - public function getVotesForUser($tenant_id, $url_id, $user_id = null, $anon_user_id = null, string $contentType = self::contentTypes['getVotesForUser'][0]) + public function getVotesForUser($tenant_id, $url_id, array $options = []) { - list($response) = $this->getVotesForUserWithHttpInfo($tenant_id, $url_id, $user_id, $anon_user_id, $contentType); + list($response) = $this->getVotesForUserWithHttpInfo($tenant_id, $url_id, $options); return $response; } @@ -32996,6 +28724,8 @@ public function getVotesForUser($tenant_id, $url_id, $user_id = null, $anon_user * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $url_id (required) * @param string|null $user_id (optional) @@ -33006,9 +28736,9 @@ public function getVotesForUser($tenant_id, $url_id, $user_id = null, $anon_user * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetVotesForUserResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getVotesForUserWithHttpInfo($tenant_id, $url_id, $user_id = null, $anon_user_id = null, string $contentType = self::contentTypes['getVotesForUser'][0]) + public function getVotesForUserWithHttpInfo($tenant_id, $url_id, array $options = []) { - $request = $this->getVotesForUserRequest($tenant_id, $url_id, $user_id, $anon_user_id, $contentType); + $request = $this->getVotesForUserRequest($tenant_id, $url_id, $options); try { $options = $this->createHttpClientOption(); @@ -33035,61 +28765,21 @@ public function getVotesForUserWithHttpInfo($tenant_id, $url_id, $user_id = null switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetVotesForUserResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetVotesForUserResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetVotesForUserResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetVotesForUserResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -33103,34 +28793,11 @@ public function getVotesForUserWithHttpInfo($tenant_id, $url_id, $user_id = null ); } - $returnType = '\FastComments\Client\Model\GetVotesForUserResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetVotesForUserResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -33140,7 +28807,7 @@ public function getVotesForUserWithHttpInfo($tenant_id, $url_id, $user_id = null $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -33148,8 +28815,10 @@ public function getVotesForUserWithHttpInfo($tenant_id, $url_id, $user_id = null $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -33159,6 +28828,8 @@ public function getVotesForUserWithHttpInfo($tenant_id, $url_id, $user_id = null * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $url_id (required) * @param string|null $user_id (optional) @@ -33168,9 +28839,9 @@ public function getVotesForUserWithHttpInfo($tenant_id, $url_id, $user_id = null * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getVotesForUserAsync($tenant_id, $url_id, $user_id = null, $anon_user_id = null, string $contentType = self::contentTypes['getVotesForUser'][0]) + public function getVotesForUserAsync($tenant_id, $url_id, array $options = []) { - return $this->getVotesForUserAsyncWithHttpInfo($tenant_id, $url_id, $user_id, $anon_user_id, $contentType) + return $this->getVotesForUserAsyncWithHttpInfo($tenant_id, $url_id, $options) ->then( function ($response) { return $response[0]; @@ -33183,6 +28854,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $url_id (required) * @param string|null $user_id (optional) @@ -33192,10 +28865,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getVotesForUserAsyncWithHttpInfo($tenant_id, $url_id, $user_id = null, $anon_user_id = null, string $contentType = self::contentTypes['getVotesForUser'][0]) + public function getVotesForUserAsyncWithHttpInfo($tenant_id, $url_id, array $options = []) { $returnType = '\FastComments\Client\Model\GetVotesForUserResponse'; - $request = $this->getVotesForUserRequest($tenant_id, $url_id, $user_id, $anon_user_id, $contentType); + $request = $this->getVotesForUserRequest($tenant_id, $url_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -33236,6 +28909,8 @@ function ($exception) { /** * Create request for operation 'getVotesForUser' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $url_id (required) * @param string|null $user_id (optional) @@ -33245,9 +28920,13 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getVotesForUserRequest($tenant_id, $url_id, $user_id = null, $anon_user_id = null, string $contentType = self::contentTypes['getVotesForUser'][0]) + public function getVotesForUserRequest($tenant_id, $url_id, array $options = []) { - + // unbox the optional parameters and request options from the $options array + $user_id = array_key_exists('user_id', $options) ? $options['user_id'] : null; + $anon_user_id = array_key_exists('anon_user_id', $options) ? $options['anon_user_id'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['getVotesForUser'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -33384,9 +29063,9 @@ public function getVotesForUserRequest($tenant_id, $url_id, $user_id = null, $an * @throws \InvalidArgumentException * @return \FastComments\Client\Model\PatchDomainConfigResponse */ - public function patchDomainConfig($tenant_id, $domain_to_update, $patch_domain_config_params, string $contentType = self::contentTypes['patchDomainConfig'][0]) + public function patchDomainConfig($tenant_id, $domain_to_update, $patch_domain_config_params) { - list($response) = $this->patchDomainConfigWithHttpInfo($tenant_id, $domain_to_update, $patch_domain_config_params, $contentType); + list($response) = $this->patchDomainConfigWithHttpInfo($tenant_id, $domain_to_update, $patch_domain_config_params); return $response; } @@ -33404,9 +29083,9 @@ public function patchDomainConfig($tenant_id, $domain_to_update, $patch_domain_c * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\PatchDomainConfigResponse, HTTP status code, HTTP response headers (array of strings) */ - public function patchDomainConfigWithHttpInfo($tenant_id, $domain_to_update, $patch_domain_config_params, string $contentType = self::contentTypes['patchDomainConfig'][0]) + public function patchDomainConfigWithHttpInfo($tenant_id, $domain_to_update, $patch_domain_config_params) { - $request = $this->patchDomainConfigRequest($tenant_id, $domain_to_update, $patch_domain_config_params, $contentType); + $request = $this->patchDomainConfigRequest($tenant_id, $domain_to_update, $patch_domain_config_params); try { $options = $this->createHttpClientOption(); @@ -33433,34 +29112,15 @@ public function patchDomainConfigWithHttpInfo($tenant_id, $domain_to_update, $pa switch($statusCode) { case 200: - if ('\FastComments\Client\Model\PatchDomainConfigResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\PatchDomainConfigResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\PatchDomainConfigResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\PatchDomainConfigResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -33474,34 +29134,11 @@ public function patchDomainConfigWithHttpInfo($tenant_id, $domain_to_update, $pa ); } - $returnType = '\FastComments\Client\Model\PatchDomainConfigResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\PatchDomainConfigResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -33511,8 +29148,10 @@ public function patchDomainConfigWithHttpInfo($tenant_id, $domain_to_update, $pa $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -33530,9 +29169,9 @@ public function patchDomainConfigWithHttpInfo($tenant_id, $domain_to_update, $pa * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function patchDomainConfigAsync($tenant_id, $domain_to_update, $patch_domain_config_params, string $contentType = self::contentTypes['patchDomainConfig'][0]) + public function patchDomainConfigAsync($tenant_id, $domain_to_update, $patch_domain_config_params) { - return $this->patchDomainConfigAsyncWithHttpInfo($tenant_id, $domain_to_update, $patch_domain_config_params, $contentType) + return $this->patchDomainConfigAsyncWithHttpInfo($tenant_id, $domain_to_update, $patch_domain_config_params) ->then( function ($response) { return $response[0]; @@ -33553,10 +29192,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function patchDomainConfigAsyncWithHttpInfo($tenant_id, $domain_to_update, $patch_domain_config_params, string $contentType = self::contentTypes['patchDomainConfig'][0]) + public function patchDomainConfigAsyncWithHttpInfo($tenant_id, $domain_to_update, $patch_domain_config_params) { $returnType = '\FastComments\Client\Model\PatchDomainConfigResponse'; - $request = $this->patchDomainConfigRequest($tenant_id, $domain_to_update, $patch_domain_config_params, $contentType); + $request = $this->patchDomainConfigRequest($tenant_id, $domain_to_update, $patch_domain_config_params); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -33605,9 +29244,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function patchDomainConfigRequest($tenant_id, $domain_to_update, $patch_domain_config_params, string $contentType = self::contentTypes['patchDomainConfig'][0]) + public function patchDomainConfigRequest($tenant_id, $domain_to_update, $patch_domain_config_params) { - + $contentType = self::contentTypes['patchDomainConfig'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -33651,7 +29291,7 @@ public function patchDomainConfigRequest($tenant_id, $domain_to_update, $patch_d // path params if ($domain_to_update !== null) { $resourcePath = str_replace( - '{' . 'domainToUpdate' . '}', + '{domainToUpdate}', ObjectSerializer::toPathValue($domain_to_update), $resourcePath ); @@ -33728,8 +29368,8 @@ public function patchDomainConfigRequest($tenant_id, $domain_to_update, $patch_d * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * @param string $tenant_id tenant_id (required) * @param string $tag tag (required) - * @param string|null $tenant_id tenant_id (optional) * @param \FastComments\Client\Model\UpdateHashTagBody|null $update_hash_tag_body update_hash_tag_body (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['patchHashTag'] to see the possible values for this operation * @@ -33737,9 +29377,9 @@ public function patchDomainConfigRequest($tenant_id, $domain_to_update, $patch_d * @throws \InvalidArgumentException * @return \FastComments\Client\Model\UpdateHashTagResponse|\FastComments\Client\Model\APIError */ - public function patchHashTag($tag, $tenant_id = null, $update_hash_tag_body = null, string $contentType = self::contentTypes['patchHashTag'][0]) + public function patchHashTag($tenant_id, $tag, $update_hash_tag_body = null) { - list($response) = $this->patchHashTagWithHttpInfo($tag, $tenant_id, $update_hash_tag_body, $contentType); + list($response) = $this->patchHashTagWithHttpInfo($tenant_id, $tag, $update_hash_tag_body); return $response; } @@ -33748,8 +29388,8 @@ public function patchHashTag($tag, $tenant_id = null, $update_hash_tag_body = nu * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * @param string $tenant_id (required) * @param string $tag (required) - * @param string|null $tenant_id (optional) * @param \FastComments\Client\Model\UpdateHashTagBody|null $update_hash_tag_body (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['patchHashTag'] to see the possible values for this operation * @@ -33757,9 +29397,9 @@ public function patchHashTag($tag, $tenant_id = null, $update_hash_tag_body = nu * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\UpdateHashTagResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function patchHashTagWithHttpInfo($tag, $tenant_id = null, $update_hash_tag_body = null, string $contentType = self::contentTypes['patchHashTag'][0]) + public function patchHashTagWithHttpInfo($tenant_id, $tag, $update_hash_tag_body = null) { - $request = $this->patchHashTagRequest($tag, $tenant_id, $update_hash_tag_body, $contentType); + $request = $this->patchHashTagRequest($tenant_id, $tag, $update_hash_tag_body); try { $options = $this->createHttpClientOption(); @@ -33786,61 +29426,21 @@ public function patchHashTagWithHttpInfo($tag, $tenant_id = null, $update_hash_t switch($statusCode) { case 200: - if ('\FastComments\Client\Model\UpdateHashTagResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\UpdateHashTagResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\UpdateHashTagResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\UpdateHashTagResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -33854,34 +29454,11 @@ public function patchHashTagWithHttpInfo($tag, $tenant_id = null, $update_hash_t ); } - $returnType = '\FastComments\Client\Model\UpdateHashTagResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\UpdateHashTagResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -33891,7 +29468,7 @@ public function patchHashTagWithHttpInfo($tag, $tenant_id = null, $update_hash_t $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -33899,8 +29476,10 @@ public function patchHashTagWithHttpInfo($tag, $tenant_id = null, $update_hash_t $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -33910,17 +29489,17 @@ public function patchHashTagWithHttpInfo($tag, $tenant_id = null, $update_hash_t * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * @param string $tenant_id (required) * @param string $tag (required) - * @param string|null $tenant_id (optional) * @param \FastComments\Client\Model\UpdateHashTagBody|null $update_hash_tag_body (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['patchHashTag'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function patchHashTagAsync($tag, $tenant_id = null, $update_hash_tag_body = null, string $contentType = self::contentTypes['patchHashTag'][0]) + public function patchHashTagAsync($tenant_id, $tag, $update_hash_tag_body = null) { - return $this->patchHashTagAsyncWithHttpInfo($tag, $tenant_id, $update_hash_tag_body, $contentType) + return $this->patchHashTagAsyncWithHttpInfo($tenant_id, $tag, $update_hash_tag_body) ->then( function ($response) { return $response[0]; @@ -33933,18 +29512,18 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * @param string $tenant_id (required) * @param string $tag (required) - * @param string|null $tenant_id (optional) * @param \FastComments\Client\Model\UpdateHashTagBody|null $update_hash_tag_body (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['patchHashTag'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function patchHashTagAsyncWithHttpInfo($tag, $tenant_id = null, $update_hash_tag_body = null, string $contentType = self::contentTypes['patchHashTag'][0]) + public function patchHashTagAsyncWithHttpInfo($tenant_id, $tag, $update_hash_tag_body = null) { $returnType = '\FastComments\Client\Model\UpdateHashTagResponse'; - $request = $this->patchHashTagRequest($tag, $tenant_id, $update_hash_tag_body, $contentType); + $request = $this->patchHashTagRequest($tenant_id, $tag, $update_hash_tag_body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -33985,16 +29564,24 @@ function ($exception) { /** * Create request for operation 'patchHashTag' * + * @param string $tenant_id (required) * @param string $tag (required) - * @param string|null $tenant_id (optional) * @param \FastComments\Client\Model\UpdateHashTagBody|null $update_hash_tag_body (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['patchHashTag'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function patchHashTagRequest($tag, $tenant_id = null, $update_hash_tag_body = null, string $contentType = self::contentTypes['patchHashTag'][0]) + public function patchHashTagRequest($tenant_id, $tag, $update_hash_tag_body = null) { + $contentType = self::contentTypes['patchHashTag'][0]; + + // verify the required parameter 'tenant_id' is set + if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $tenant_id when calling patchHashTag' + ); + } // verify the required parameter 'tag' is set if ($tag === null || (is_array($tag) && count($tag) === 0)) { @@ -34005,7 +29592,6 @@ public function patchHashTagRequest($tag, $tenant_id = null, $update_hash_tag_bo - $resourcePath = '/api/v1/hash-tags/{tag}'; $formParams = []; $queryParams = []; @@ -34020,14 +29606,14 @@ public function patchHashTagRequest($tag, $tenant_id = null, $update_hash_tag_bo 'string', // openApiType 'form', // style true, // explode - false // required + true // required ) ?? []); // path params if ($tag !== null) { $resourcePath = str_replace( - '{' . 'tag' . '}', + '{tag}', ObjectSerializer::toPathValue($tag), $resourcePath ); @@ -34113,9 +29699,9 @@ public function patchHashTagRequest($tag, $tenant_id = null, $update_hash_tag_bo * @throws \InvalidArgumentException * @return \FastComments\Client\Model\PatchPageAPIResponse */ - public function patchPage($tenant_id, $id, $update_api_page_data, string $contentType = self::contentTypes['patchPage'][0]) + public function patchPage($tenant_id, $id, $update_api_page_data) { - list($response) = $this->patchPageWithHttpInfo($tenant_id, $id, $update_api_page_data, $contentType); + list($response) = $this->patchPageWithHttpInfo($tenant_id, $id, $update_api_page_data); return $response; } @@ -34133,9 +29719,9 @@ public function patchPage($tenant_id, $id, $update_api_page_data, string $conten * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\PatchPageAPIResponse, HTTP status code, HTTP response headers (array of strings) */ - public function patchPageWithHttpInfo($tenant_id, $id, $update_api_page_data, string $contentType = self::contentTypes['patchPage'][0]) + public function patchPageWithHttpInfo($tenant_id, $id, $update_api_page_data) { - $request = $this->patchPageRequest($tenant_id, $id, $update_api_page_data, $contentType); + $request = $this->patchPageRequest($tenant_id, $id, $update_api_page_data); try { $options = $this->createHttpClientOption(); @@ -34162,34 +29748,15 @@ public function patchPageWithHttpInfo($tenant_id, $id, $update_api_page_data, st switch($statusCode) { case 200: - if ('\FastComments\Client\Model\PatchPageAPIResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\PatchPageAPIResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\PatchPageAPIResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\PatchPageAPIResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -34203,34 +29770,11 @@ public function patchPageWithHttpInfo($tenant_id, $id, $update_api_page_data, st ); } - $returnType = '\FastComments\Client\Model\PatchPageAPIResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\PatchPageAPIResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -34240,8 +29784,10 @@ public function patchPageWithHttpInfo($tenant_id, $id, $update_api_page_data, st $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -34259,9 +29805,9 @@ public function patchPageWithHttpInfo($tenant_id, $id, $update_api_page_data, st * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function patchPageAsync($tenant_id, $id, $update_api_page_data, string $contentType = self::contentTypes['patchPage'][0]) + public function patchPageAsync($tenant_id, $id, $update_api_page_data) { - return $this->patchPageAsyncWithHttpInfo($tenant_id, $id, $update_api_page_data, $contentType) + return $this->patchPageAsyncWithHttpInfo($tenant_id, $id, $update_api_page_data) ->then( function ($response) { return $response[0]; @@ -34282,10 +29828,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function patchPageAsyncWithHttpInfo($tenant_id, $id, $update_api_page_data, string $contentType = self::contentTypes['patchPage'][0]) + public function patchPageAsyncWithHttpInfo($tenant_id, $id, $update_api_page_data) { $returnType = '\FastComments\Client\Model\PatchPageAPIResponse'; - $request = $this->patchPageRequest($tenant_id, $id, $update_api_page_data, $contentType); + $request = $this->patchPageRequest($tenant_id, $id, $update_api_page_data); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -34334,9 +29880,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function patchPageRequest($tenant_id, $id, $update_api_page_data, string $contentType = self::contentTypes['patchPage'][0]) + public function patchPageRequest($tenant_id, $id, $update_api_page_data) { - + $contentType = self::contentTypes['patchPage'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -34380,7 +29927,7 @@ public function patchPageRequest($tenant_id, $id, $update_api_page_data, string // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -34457,6 +30004,8 @@ public function patchPageRequest($tenant_id, $id, $update_api_page_data, string * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $id id (required) * @param \FastComments\Client\Model\UpdateAPISSOUserData $update_apisso_user_data update_apisso_user_data (required) @@ -34467,9 +30016,9 @@ public function patchPageRequest($tenant_id, $id, $update_api_page_data, string * @throws \InvalidArgumentException * @return \FastComments\Client\Model\PatchSSOUserAPIResponse */ - public function patchSSOUser($tenant_id, $id, $update_apisso_user_data, $update_comments = null, string $contentType = self::contentTypes['patchSSOUser'][0]) + public function patchSSOUser($tenant_id, $id, $update_apisso_user_data, $update_comments = null) { - list($response) = $this->patchSSOUserWithHttpInfo($tenant_id, $id, $update_apisso_user_data, $update_comments, $contentType); + list($response) = $this->patchSSOUserWithHttpInfo($tenant_id, $id, $update_apisso_user_data, $update_comments); return $response; } @@ -34478,6 +30027,8 @@ public function patchSSOUser($tenant_id, $id, $update_apisso_user_data, $update_ * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param \FastComments\Client\Model\UpdateAPISSOUserData $update_apisso_user_data (required) @@ -34488,9 +30039,9 @@ public function patchSSOUser($tenant_id, $id, $update_apisso_user_data, $update_ * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\PatchSSOUserAPIResponse, HTTP status code, HTTP response headers (array of strings) */ - public function patchSSOUserWithHttpInfo($tenant_id, $id, $update_apisso_user_data, $update_comments = null, string $contentType = self::contentTypes['patchSSOUser'][0]) + public function patchSSOUserWithHttpInfo($tenant_id, $id, $update_apisso_user_data, $update_comments = null) { - $request = $this->patchSSOUserRequest($tenant_id, $id, $update_apisso_user_data, $update_comments, $contentType); + $request = $this->patchSSOUserRequest($tenant_id, $id, $update_apisso_user_data, $update_comments); try { $options = $this->createHttpClientOption(); @@ -34517,34 +30068,15 @@ public function patchSSOUserWithHttpInfo($tenant_id, $id, $update_apisso_user_da switch($statusCode) { case 200: - if ('\FastComments\Client\Model\PatchSSOUserAPIResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\PatchSSOUserAPIResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\PatchSSOUserAPIResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\PatchSSOUserAPIResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -34558,34 +30090,11 @@ public function patchSSOUserWithHttpInfo($tenant_id, $id, $update_apisso_user_da ); } - $returnType = '\FastComments\Client\Model\PatchSSOUserAPIResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\PatchSSOUserAPIResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -34595,8 +30104,10 @@ public function patchSSOUserWithHttpInfo($tenant_id, $id, $update_apisso_user_da $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -34606,6 +30117,8 @@ public function patchSSOUserWithHttpInfo($tenant_id, $id, $update_apisso_user_da * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param \FastComments\Client\Model\UpdateAPISSOUserData $update_apisso_user_data (required) @@ -34615,9 +30128,9 @@ public function patchSSOUserWithHttpInfo($tenant_id, $id, $update_apisso_user_da * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function patchSSOUserAsync($tenant_id, $id, $update_apisso_user_data, $update_comments = null, string $contentType = self::contentTypes['patchSSOUser'][0]) + public function patchSSOUserAsync($tenant_id, $id, $update_apisso_user_data, $update_comments = null) { - return $this->patchSSOUserAsyncWithHttpInfo($tenant_id, $id, $update_apisso_user_data, $update_comments, $contentType) + return $this->patchSSOUserAsyncWithHttpInfo($tenant_id, $id, $update_apisso_user_data, $update_comments) ->then( function ($response) { return $response[0]; @@ -34630,6 +30143,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param \FastComments\Client\Model\UpdateAPISSOUserData $update_apisso_user_data (required) @@ -34639,10 +30154,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function patchSSOUserAsyncWithHttpInfo($tenant_id, $id, $update_apisso_user_data, $update_comments = null, string $contentType = self::contentTypes['patchSSOUser'][0]) + public function patchSSOUserAsyncWithHttpInfo($tenant_id, $id, $update_apisso_user_data, $update_comments = null) { $returnType = '\FastComments\Client\Model\PatchSSOUserAPIResponse'; - $request = $this->patchSSOUserRequest($tenant_id, $id, $update_apisso_user_data, $update_comments, $contentType); + $request = $this->patchSSOUserRequest($tenant_id, $id, $update_apisso_user_data, $update_comments); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -34683,6 +30198,8 @@ function ($exception) { /** * Create request for operation 'patchSSOUser' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param \FastComments\Client\Model\UpdateAPISSOUserData $update_apisso_user_data (required) @@ -34692,9 +30209,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function patchSSOUserRequest($tenant_id, $id, $update_apisso_user_data, $update_comments = null, string $contentType = self::contentTypes['patchSSOUser'][0]) + public function patchSSOUserRequest($tenant_id, $id, $update_apisso_user_data, $update_comments = null) { - + $contentType = self::contentTypes['patchSSOUser'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -34748,7 +30266,7 @@ public function patchSSOUserRequest($tenant_id, $id, $update_apisso_user_data, $ // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -34834,9 +30352,9 @@ public function patchSSOUserRequest($tenant_id, $id, $update_apisso_user_data, $ * @throws \InvalidArgumentException * @return \FastComments\Client\Model\PutDomainConfigResponse */ - public function putDomainConfig($tenant_id, $domain_to_update, $update_domain_config_params, string $contentType = self::contentTypes['putDomainConfig'][0]) + public function putDomainConfig($tenant_id, $domain_to_update, $update_domain_config_params) { - list($response) = $this->putDomainConfigWithHttpInfo($tenant_id, $domain_to_update, $update_domain_config_params, $contentType); + list($response) = $this->putDomainConfigWithHttpInfo($tenant_id, $domain_to_update, $update_domain_config_params); return $response; } @@ -34854,9 +30372,9 @@ public function putDomainConfig($tenant_id, $domain_to_update, $update_domain_co * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\PutDomainConfigResponse, HTTP status code, HTTP response headers (array of strings) */ - public function putDomainConfigWithHttpInfo($tenant_id, $domain_to_update, $update_domain_config_params, string $contentType = self::contentTypes['putDomainConfig'][0]) + public function putDomainConfigWithHttpInfo($tenant_id, $domain_to_update, $update_domain_config_params) { - $request = $this->putDomainConfigRequest($tenant_id, $domain_to_update, $update_domain_config_params, $contentType); + $request = $this->putDomainConfigRequest($tenant_id, $domain_to_update, $update_domain_config_params); try { $options = $this->createHttpClientOption(); @@ -34883,34 +30401,15 @@ public function putDomainConfigWithHttpInfo($tenant_id, $domain_to_update, $upda switch($statusCode) { case 200: - if ('\FastComments\Client\Model\PutDomainConfigResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\PutDomainConfigResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\PutDomainConfigResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\PutDomainConfigResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -34924,34 +30423,11 @@ public function putDomainConfigWithHttpInfo($tenant_id, $domain_to_update, $upda ); } - $returnType = '\FastComments\Client\Model\PutDomainConfigResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\PutDomainConfigResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -34961,8 +30437,10 @@ public function putDomainConfigWithHttpInfo($tenant_id, $domain_to_update, $upda $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -34980,9 +30458,9 @@ public function putDomainConfigWithHttpInfo($tenant_id, $domain_to_update, $upda * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putDomainConfigAsync($tenant_id, $domain_to_update, $update_domain_config_params, string $contentType = self::contentTypes['putDomainConfig'][0]) + public function putDomainConfigAsync($tenant_id, $domain_to_update, $update_domain_config_params) { - return $this->putDomainConfigAsyncWithHttpInfo($tenant_id, $domain_to_update, $update_domain_config_params, $contentType) + return $this->putDomainConfigAsyncWithHttpInfo($tenant_id, $domain_to_update, $update_domain_config_params) ->then( function ($response) { return $response[0]; @@ -35003,10 +30481,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putDomainConfigAsyncWithHttpInfo($tenant_id, $domain_to_update, $update_domain_config_params, string $contentType = self::contentTypes['putDomainConfig'][0]) + public function putDomainConfigAsyncWithHttpInfo($tenant_id, $domain_to_update, $update_domain_config_params) { $returnType = '\FastComments\Client\Model\PutDomainConfigResponse'; - $request = $this->putDomainConfigRequest($tenant_id, $domain_to_update, $update_domain_config_params, $contentType); + $request = $this->putDomainConfigRequest($tenant_id, $domain_to_update, $update_domain_config_params); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -35055,9 +30533,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function putDomainConfigRequest($tenant_id, $domain_to_update, $update_domain_config_params, string $contentType = self::contentTypes['putDomainConfig'][0]) + public function putDomainConfigRequest($tenant_id, $domain_to_update, $update_domain_config_params) { - + $contentType = self::contentTypes['putDomainConfig'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -35101,7 +30580,7 @@ public function putDomainConfigRequest($tenant_id, $domain_to_update, $update_do // path params if ($domain_to_update !== null) { $resourcePath = str_replace( - '{' . 'domainToUpdate' . '}', + '{domainToUpdate}', ObjectSerializer::toPathValue($domain_to_update), $resourcePath ); @@ -35178,6 +30657,8 @@ public function putDomainConfigRequest($tenant_id, $domain_to_update, $update_do * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $id id (required) * @param \FastComments\Client\Model\UpdateAPISSOUserData $update_apisso_user_data update_apisso_user_data (required) @@ -35188,9 +30669,9 @@ public function putDomainConfigRequest($tenant_id, $domain_to_update, $update_do * @throws \InvalidArgumentException * @return \FastComments\Client\Model\PutSSOUserAPIResponse */ - public function putSSOUser($tenant_id, $id, $update_apisso_user_data, $update_comments = null, string $contentType = self::contentTypes['putSSOUser'][0]) + public function putSSOUser($tenant_id, $id, $update_apisso_user_data, $update_comments = null) { - list($response) = $this->putSSOUserWithHttpInfo($tenant_id, $id, $update_apisso_user_data, $update_comments, $contentType); + list($response) = $this->putSSOUserWithHttpInfo($tenant_id, $id, $update_apisso_user_data, $update_comments); return $response; } @@ -35199,6 +30680,8 @@ public function putSSOUser($tenant_id, $id, $update_apisso_user_data, $update_co * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param \FastComments\Client\Model\UpdateAPISSOUserData $update_apisso_user_data (required) @@ -35209,9 +30692,9 @@ public function putSSOUser($tenant_id, $id, $update_apisso_user_data, $update_co * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\PutSSOUserAPIResponse, HTTP status code, HTTP response headers (array of strings) */ - public function putSSOUserWithHttpInfo($tenant_id, $id, $update_apisso_user_data, $update_comments = null, string $contentType = self::contentTypes['putSSOUser'][0]) + public function putSSOUserWithHttpInfo($tenant_id, $id, $update_apisso_user_data, $update_comments = null) { - $request = $this->putSSOUserRequest($tenant_id, $id, $update_apisso_user_data, $update_comments, $contentType); + $request = $this->putSSOUserRequest($tenant_id, $id, $update_apisso_user_data, $update_comments); try { $options = $this->createHttpClientOption(); @@ -35238,34 +30721,15 @@ public function putSSOUserWithHttpInfo($tenant_id, $id, $update_apisso_user_data switch($statusCode) { case 200: - if ('\FastComments\Client\Model\PutSSOUserAPIResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\PutSSOUserAPIResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\PutSSOUserAPIResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\PutSSOUserAPIResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -35279,34 +30743,11 @@ public function putSSOUserWithHttpInfo($tenant_id, $id, $update_apisso_user_data ); } - $returnType = '\FastComments\Client\Model\PutSSOUserAPIResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\PutSSOUserAPIResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -35316,8 +30757,10 @@ public function putSSOUserWithHttpInfo($tenant_id, $id, $update_apisso_user_data $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -35327,6 +30770,8 @@ public function putSSOUserWithHttpInfo($tenant_id, $id, $update_apisso_user_data * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param \FastComments\Client\Model\UpdateAPISSOUserData $update_apisso_user_data (required) @@ -35336,9 +30781,9 @@ public function putSSOUserWithHttpInfo($tenant_id, $id, $update_apisso_user_data * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putSSOUserAsync($tenant_id, $id, $update_apisso_user_data, $update_comments = null, string $contentType = self::contentTypes['putSSOUser'][0]) + public function putSSOUserAsync($tenant_id, $id, $update_apisso_user_data, $update_comments = null) { - return $this->putSSOUserAsyncWithHttpInfo($tenant_id, $id, $update_apisso_user_data, $update_comments, $contentType) + return $this->putSSOUserAsyncWithHttpInfo($tenant_id, $id, $update_apisso_user_data, $update_comments) ->then( function ($response) { return $response[0]; @@ -35351,6 +30796,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param \FastComments\Client\Model\UpdateAPISSOUserData $update_apisso_user_data (required) @@ -35360,10 +30807,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putSSOUserAsyncWithHttpInfo($tenant_id, $id, $update_apisso_user_data, $update_comments = null, string $contentType = self::contentTypes['putSSOUser'][0]) + public function putSSOUserAsyncWithHttpInfo($tenant_id, $id, $update_apisso_user_data, $update_comments = null) { $returnType = '\FastComments\Client\Model\PutSSOUserAPIResponse'; - $request = $this->putSSOUserRequest($tenant_id, $id, $update_apisso_user_data, $update_comments, $contentType); + $request = $this->putSSOUserRequest($tenant_id, $id, $update_apisso_user_data, $update_comments); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -35404,6 +30851,8 @@ function ($exception) { /** * Create request for operation 'putSSOUser' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param \FastComments\Client\Model\UpdateAPISSOUserData $update_apisso_user_data (required) @@ -35413,9 +30862,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function putSSOUserRequest($tenant_id, $id, $update_apisso_user_data, $update_comments = null, string $contentType = self::contentTypes['putSSOUser'][0]) + public function putSSOUserRequest($tenant_id, $id, $update_apisso_user_data, $update_comments = null) { - + $contentType = self::contentTypes['putSSOUser'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -35469,7 +30919,7 @@ public function putSSOUserRequest($tenant_id, $id, $update_apisso_user_data, $up // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -35546,6 +30996,8 @@ public function putSSOUserRequest($tenant_id, $id, $update_apisso_user_data, $up * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param \FastComments\Client\Model\RenderEmailTemplateBody $render_email_template_body render_email_template_body (required) * @param string|null $locale locale (optional) @@ -35555,9 +31007,9 @@ public function putSSOUserRequest($tenant_id, $id, $update_apisso_user_data, $up * @throws \InvalidArgumentException * @return \FastComments\Client\Model\RenderEmailTemplateResponse|\FastComments\Client\Model\APIError */ - public function renderEmailTemplate($tenant_id, $render_email_template_body, $locale = null, string $contentType = self::contentTypes['renderEmailTemplate'][0]) + public function renderEmailTemplate($tenant_id, $render_email_template_body, $locale = null) { - list($response) = $this->renderEmailTemplateWithHttpInfo($tenant_id, $render_email_template_body, $locale, $contentType); + list($response) = $this->renderEmailTemplateWithHttpInfo($tenant_id, $render_email_template_body, $locale); return $response; } @@ -35566,6 +31018,8 @@ public function renderEmailTemplate($tenant_id, $render_email_template_body, $lo * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param \FastComments\Client\Model\RenderEmailTemplateBody $render_email_template_body (required) * @param string|null $locale (optional) @@ -35575,9 +31029,9 @@ public function renderEmailTemplate($tenant_id, $render_email_template_body, $lo * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\RenderEmailTemplateResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function renderEmailTemplateWithHttpInfo($tenant_id, $render_email_template_body, $locale = null, string $contentType = self::contentTypes['renderEmailTemplate'][0]) + public function renderEmailTemplateWithHttpInfo($tenant_id, $render_email_template_body, $locale = null) { - $request = $this->renderEmailTemplateRequest($tenant_id, $render_email_template_body, $locale, $contentType); + $request = $this->renderEmailTemplateRequest($tenant_id, $render_email_template_body, $locale); try { $options = $this->createHttpClientOption(); @@ -35604,61 +31058,21 @@ public function renderEmailTemplateWithHttpInfo($tenant_id, $render_email_templa switch($statusCode) { case 200: - if ('\FastComments\Client\Model\RenderEmailTemplateResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\RenderEmailTemplateResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\RenderEmailTemplateResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\RenderEmailTemplateResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -35672,34 +31086,11 @@ public function renderEmailTemplateWithHttpInfo($tenant_id, $render_email_templa ); } - $returnType = '\FastComments\Client\Model\RenderEmailTemplateResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\RenderEmailTemplateResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -35709,7 +31100,7 @@ public function renderEmailTemplateWithHttpInfo($tenant_id, $render_email_templa $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -35717,8 +31108,10 @@ public function renderEmailTemplateWithHttpInfo($tenant_id, $render_email_templa $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -35728,6 +31121,8 @@ public function renderEmailTemplateWithHttpInfo($tenant_id, $render_email_templa * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param \FastComments\Client\Model\RenderEmailTemplateBody $render_email_template_body (required) * @param string|null $locale (optional) @@ -35736,9 +31131,9 @@ public function renderEmailTemplateWithHttpInfo($tenant_id, $render_email_templa * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function renderEmailTemplateAsync($tenant_id, $render_email_template_body, $locale = null, string $contentType = self::contentTypes['renderEmailTemplate'][0]) + public function renderEmailTemplateAsync($tenant_id, $render_email_template_body, $locale = null) { - return $this->renderEmailTemplateAsyncWithHttpInfo($tenant_id, $render_email_template_body, $locale, $contentType) + return $this->renderEmailTemplateAsyncWithHttpInfo($tenant_id, $render_email_template_body, $locale) ->then( function ($response) { return $response[0]; @@ -35751,6 +31146,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param \FastComments\Client\Model\RenderEmailTemplateBody $render_email_template_body (required) * @param string|null $locale (optional) @@ -35759,10 +31156,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function renderEmailTemplateAsyncWithHttpInfo($tenant_id, $render_email_template_body, $locale = null, string $contentType = self::contentTypes['renderEmailTemplate'][0]) + public function renderEmailTemplateAsyncWithHttpInfo($tenant_id, $render_email_template_body, $locale = null) { $returnType = '\FastComments\Client\Model\RenderEmailTemplateResponse'; - $request = $this->renderEmailTemplateRequest($tenant_id, $render_email_template_body, $locale, $contentType); + $request = $this->renderEmailTemplateRequest($tenant_id, $render_email_template_body, $locale); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -35803,6 +31200,8 @@ function ($exception) { /** * Create request for operation 'renderEmailTemplate' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param \FastComments\Client\Model\RenderEmailTemplateBody $render_email_template_body (required) * @param string|null $locale (optional) @@ -35811,9 +31210,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function renderEmailTemplateRequest($tenant_id, $render_email_template_body, $locale = null, string $contentType = self::contentTypes['renderEmailTemplate'][0]) + public function renderEmailTemplateRequest($tenant_id, $render_email_template_body, $locale = null) { - + $contentType = self::contentTypes['renderEmailTemplate'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -35938,9 +31338,9 @@ public function renderEmailTemplateRequest($tenant_id, $render_email_template_bo * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError */ - public function replaceTenantPackage($tenant_id, $id, $replace_tenant_package_body, string $contentType = self::contentTypes['replaceTenantPackage'][0]) + public function replaceTenantPackage($tenant_id, $id, $replace_tenant_package_body) { - list($response) = $this->replaceTenantPackageWithHttpInfo($tenant_id, $id, $replace_tenant_package_body, $contentType); + list($response) = $this->replaceTenantPackageWithHttpInfo($tenant_id, $id, $replace_tenant_package_body); return $response; } @@ -35958,9 +31358,9 @@ public function replaceTenantPackage($tenant_id, $id, $replace_tenant_package_bo * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function replaceTenantPackageWithHttpInfo($tenant_id, $id, $replace_tenant_package_body, string $contentType = self::contentTypes['replaceTenantPackage'][0]) + public function replaceTenantPackageWithHttpInfo($tenant_id, $id, $replace_tenant_package_body) { - $request = $this->replaceTenantPackageRequest($tenant_id, $id, $replace_tenant_package_body, $contentType); + $request = $this->replaceTenantPackageRequest($tenant_id, $id, $replace_tenant_package_body); try { $options = $this->createHttpClientOption(); @@ -35987,61 +31387,21 @@ public function replaceTenantPackageWithHttpInfo($tenant_id, $id, $replace_tenan switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APIEmptyResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIEmptyResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIEmptyResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -36055,34 +31415,11 @@ public function replaceTenantPackageWithHttpInfo($tenant_id, $id, $replace_tenan ); } - $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -36092,7 +31429,7 @@ public function replaceTenantPackageWithHttpInfo($tenant_id, $id, $replace_tenan $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -36100,8 +31437,10 @@ public function replaceTenantPackageWithHttpInfo($tenant_id, $id, $replace_tenan $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -36119,9 +31458,9 @@ public function replaceTenantPackageWithHttpInfo($tenant_id, $id, $replace_tenan * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function replaceTenantPackageAsync($tenant_id, $id, $replace_tenant_package_body, string $contentType = self::contentTypes['replaceTenantPackage'][0]) + public function replaceTenantPackageAsync($tenant_id, $id, $replace_tenant_package_body) { - return $this->replaceTenantPackageAsyncWithHttpInfo($tenant_id, $id, $replace_tenant_package_body, $contentType) + return $this->replaceTenantPackageAsyncWithHttpInfo($tenant_id, $id, $replace_tenant_package_body) ->then( function ($response) { return $response[0]; @@ -36142,10 +31481,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function replaceTenantPackageAsyncWithHttpInfo($tenant_id, $id, $replace_tenant_package_body, string $contentType = self::contentTypes['replaceTenantPackage'][0]) + public function replaceTenantPackageAsyncWithHttpInfo($tenant_id, $id, $replace_tenant_package_body) { $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - $request = $this->replaceTenantPackageRequest($tenant_id, $id, $replace_tenant_package_body, $contentType); + $request = $this->replaceTenantPackageRequest($tenant_id, $id, $replace_tenant_package_body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -36194,9 +31533,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function replaceTenantPackageRequest($tenant_id, $id, $replace_tenant_package_body, string $contentType = self::contentTypes['replaceTenantPackage'][0]) + public function replaceTenantPackageRequest($tenant_id, $id, $replace_tenant_package_body) { - + $contentType = self::contentTypes['replaceTenantPackage'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -36240,7 +31580,7 @@ public function replaceTenantPackageRequest($tenant_id, $id, $replace_tenant_pac // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -36317,6 +31657,8 @@ public function replaceTenantPackageRequest($tenant_id, $id, $replace_tenant_pac * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $id id (required) * @param \FastComments\Client\Model\ReplaceTenantUserBody $replace_tenant_user_body replace_tenant_user_body (required) @@ -36327,9 +31669,9 @@ public function replaceTenantPackageRequest($tenant_id, $id, $replace_tenant_pac * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError */ - public function replaceTenantUser($tenant_id, $id, $replace_tenant_user_body, $update_comments = null, string $contentType = self::contentTypes['replaceTenantUser'][0]) + public function replaceTenantUser($tenant_id, $id, $replace_tenant_user_body, $update_comments = null) { - list($response) = $this->replaceTenantUserWithHttpInfo($tenant_id, $id, $replace_tenant_user_body, $update_comments, $contentType); + list($response) = $this->replaceTenantUserWithHttpInfo($tenant_id, $id, $replace_tenant_user_body, $update_comments); return $response; } @@ -36338,6 +31680,8 @@ public function replaceTenantUser($tenant_id, $id, $replace_tenant_user_body, $u * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param \FastComments\Client\Model\ReplaceTenantUserBody $replace_tenant_user_body (required) @@ -36348,9 +31692,9 @@ public function replaceTenantUser($tenant_id, $id, $replace_tenant_user_body, $u * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function replaceTenantUserWithHttpInfo($tenant_id, $id, $replace_tenant_user_body, $update_comments = null, string $contentType = self::contentTypes['replaceTenantUser'][0]) + public function replaceTenantUserWithHttpInfo($tenant_id, $id, $replace_tenant_user_body, $update_comments = null) { - $request = $this->replaceTenantUserRequest($tenant_id, $id, $replace_tenant_user_body, $update_comments, $contentType); + $request = $this->replaceTenantUserRequest($tenant_id, $id, $replace_tenant_user_body, $update_comments); try { $options = $this->createHttpClientOption(); @@ -36377,61 +31721,21 @@ public function replaceTenantUserWithHttpInfo($tenant_id, $id, $replace_tenant_u switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APIEmptyResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIEmptyResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIEmptyResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -36445,34 +31749,11 @@ public function replaceTenantUserWithHttpInfo($tenant_id, $id, $replace_tenant_u ); } - $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -36482,7 +31763,7 @@ public function replaceTenantUserWithHttpInfo($tenant_id, $id, $replace_tenant_u $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -36490,8 +31771,10 @@ public function replaceTenantUserWithHttpInfo($tenant_id, $id, $replace_tenant_u $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -36501,6 +31784,8 @@ public function replaceTenantUserWithHttpInfo($tenant_id, $id, $replace_tenant_u * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param \FastComments\Client\Model\ReplaceTenantUserBody $replace_tenant_user_body (required) @@ -36510,9 +31795,9 @@ public function replaceTenantUserWithHttpInfo($tenant_id, $id, $replace_tenant_u * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function replaceTenantUserAsync($tenant_id, $id, $replace_tenant_user_body, $update_comments = null, string $contentType = self::contentTypes['replaceTenantUser'][0]) + public function replaceTenantUserAsync($tenant_id, $id, $replace_tenant_user_body, $update_comments = null) { - return $this->replaceTenantUserAsyncWithHttpInfo($tenant_id, $id, $replace_tenant_user_body, $update_comments, $contentType) + return $this->replaceTenantUserAsyncWithHttpInfo($tenant_id, $id, $replace_tenant_user_body, $update_comments) ->then( function ($response) { return $response[0]; @@ -36525,6 +31810,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param \FastComments\Client\Model\ReplaceTenantUserBody $replace_tenant_user_body (required) @@ -36534,10 +31821,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function replaceTenantUserAsyncWithHttpInfo($tenant_id, $id, $replace_tenant_user_body, $update_comments = null, string $contentType = self::contentTypes['replaceTenantUser'][0]) + public function replaceTenantUserAsyncWithHttpInfo($tenant_id, $id, $replace_tenant_user_body, $update_comments = null) { $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - $request = $this->replaceTenantUserRequest($tenant_id, $id, $replace_tenant_user_body, $update_comments, $contentType); + $request = $this->replaceTenantUserRequest($tenant_id, $id, $replace_tenant_user_body, $update_comments); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -36578,6 +31865,8 @@ function ($exception) { /** * Create request for operation 'replaceTenantUser' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param \FastComments\Client\Model\ReplaceTenantUserBody $replace_tenant_user_body (required) @@ -36587,9 +31876,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function replaceTenantUserRequest($tenant_id, $id, $replace_tenant_user_body, $update_comments = null, string $contentType = self::contentTypes['replaceTenantUser'][0]) + public function replaceTenantUserRequest($tenant_id, $id, $replace_tenant_user_body, $update_comments = null) { - + $contentType = self::contentTypes['replaceTenantUser'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -36643,7 +31933,7 @@ public function replaceTenantUserRequest($tenant_id, $id, $replace_tenant_user_b // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -36720,6 +32010,8 @@ public function replaceTenantUserRequest($tenant_id, $id, $replace_tenant_user_b * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param \FastComments\Client\Model\CreateCommentParams $create_comment_params create_comment_params (required) * @param bool|null $is_live is_live (optional) @@ -36732,9 +32024,9 @@ public function replaceTenantUserRequest($tenant_id, $id, $replace_tenant_user_b * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APISaveCommentResponse|\FastComments\Client\Model\APIError */ - public function saveComment($tenant_id, $create_comment_params, $is_live = null, $do_spam_check = null, $send_emails = null, $populate_notifications = null, string $contentType = self::contentTypes['saveComment'][0]) + public function saveComment($tenant_id, $create_comment_params, array $options = []) { - list($response) = $this->saveCommentWithHttpInfo($tenant_id, $create_comment_params, $is_live, $do_spam_check, $send_emails, $populate_notifications, $contentType); + list($response) = $this->saveCommentWithHttpInfo($tenant_id, $create_comment_params, $options); return $response; } @@ -36743,6 +32035,8 @@ public function saveComment($tenant_id, $create_comment_params, $is_live = null, * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param \FastComments\Client\Model\CreateCommentParams $create_comment_params (required) * @param bool|null $is_live (optional) @@ -36755,9 +32049,9 @@ public function saveComment($tenant_id, $create_comment_params, $is_live = null, * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APISaveCommentResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function saveCommentWithHttpInfo($tenant_id, $create_comment_params, $is_live = null, $do_spam_check = null, $send_emails = null, $populate_notifications = null, string $contentType = self::contentTypes['saveComment'][0]) + public function saveCommentWithHttpInfo($tenant_id, $create_comment_params, array $options = []) { - $request = $this->saveCommentRequest($tenant_id, $create_comment_params, $is_live, $do_spam_check, $send_emails, $populate_notifications, $contentType); + $request = $this->saveCommentRequest($tenant_id, $create_comment_params, $options); try { $options = $this->createHttpClientOption(); @@ -36784,61 +32078,21 @@ public function saveCommentWithHttpInfo($tenant_id, $create_comment_params, $is_ switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APISaveCommentResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APISaveCommentResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APISaveCommentResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APISaveCommentResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -36852,34 +32106,11 @@ public function saveCommentWithHttpInfo($tenant_id, $create_comment_params, $is_ ); } - $returnType = '\FastComments\Client\Model\APISaveCommentResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APISaveCommentResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -36889,7 +32120,7 @@ public function saveCommentWithHttpInfo($tenant_id, $create_comment_params, $is_ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -36897,8 +32128,10 @@ public function saveCommentWithHttpInfo($tenant_id, $create_comment_params, $is_ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -36908,6 +32141,8 @@ public function saveCommentWithHttpInfo($tenant_id, $create_comment_params, $is_ * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param \FastComments\Client\Model\CreateCommentParams $create_comment_params (required) * @param bool|null $is_live (optional) @@ -36919,9 +32154,9 @@ public function saveCommentWithHttpInfo($tenant_id, $create_comment_params, $is_ * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function saveCommentAsync($tenant_id, $create_comment_params, $is_live = null, $do_spam_check = null, $send_emails = null, $populate_notifications = null, string $contentType = self::contentTypes['saveComment'][0]) + public function saveCommentAsync($tenant_id, $create_comment_params, array $options = []) { - return $this->saveCommentAsyncWithHttpInfo($tenant_id, $create_comment_params, $is_live, $do_spam_check, $send_emails, $populate_notifications, $contentType) + return $this->saveCommentAsyncWithHttpInfo($tenant_id, $create_comment_params, $options) ->then( function ($response) { return $response[0]; @@ -36934,6 +32169,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param \FastComments\Client\Model\CreateCommentParams $create_comment_params (required) * @param bool|null $is_live (optional) @@ -36945,10 +32182,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function saveCommentAsyncWithHttpInfo($tenant_id, $create_comment_params, $is_live = null, $do_spam_check = null, $send_emails = null, $populate_notifications = null, string $contentType = self::contentTypes['saveComment'][0]) + public function saveCommentAsyncWithHttpInfo($tenant_id, $create_comment_params, array $options = []) { $returnType = '\FastComments\Client\Model\APISaveCommentResponse'; - $request = $this->saveCommentRequest($tenant_id, $create_comment_params, $is_live, $do_spam_check, $send_emails, $populate_notifications, $contentType); + $request = $this->saveCommentRequest($tenant_id, $create_comment_params, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -36989,6 +32226,8 @@ function ($exception) { /** * Create request for operation 'saveComment' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param \FastComments\Client\Model\CreateCommentParams $create_comment_params (required) * @param bool|null $is_live (optional) @@ -37000,9 +32239,15 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function saveCommentRequest($tenant_id, $create_comment_params, $is_live = null, $do_spam_check = null, $send_emails = null, $populate_notifications = null, string $contentType = self::contentTypes['saveComment'][0]) + public function saveCommentRequest($tenant_id, $create_comment_params, array $options = []) { - + // unbox the optional parameters and request options from the $options array + $is_live = array_key_exists('is_live', $options) ? $options['is_live'] : null; + $do_spam_check = array_key_exists('do_spam_check', $options) ? $options['do_spam_check'] : null; + $send_emails = array_key_exists('send_emails', $options) ? $options['send_emails'] : null; + $populate_notifications = array_key_exists('populate_notifications', $options) ? $options['populate_notifications'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['saveComment'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -37148,6 +32393,8 @@ public function saveCommentRequest($tenant_id, $create_comment_params, $is_live * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param \FastComments\Client\Model\CreateCommentParams[] $create_comment_params create_comment_params (required) * @param bool|null $is_live is_live (optional) @@ -37160,9 +32407,9 @@ public function saveCommentRequest($tenant_id, $create_comment_params, $is_live * @throws \InvalidArgumentException * @return \FastComments\Client\Model\SaveCommentsBulkResponse[] */ - public function saveCommentsBulk($tenant_id, $create_comment_params, $is_live = null, $do_spam_check = null, $send_emails = null, $populate_notifications = null, string $contentType = self::contentTypes['saveCommentsBulk'][0]) + public function saveCommentsBulk($tenant_id, $create_comment_params, array $options = []) { - list($response) = $this->saveCommentsBulkWithHttpInfo($tenant_id, $create_comment_params, $is_live, $do_spam_check, $send_emails, $populate_notifications, $contentType); + list($response) = $this->saveCommentsBulkWithHttpInfo($tenant_id, $create_comment_params, $options); return $response; } @@ -37171,6 +32418,8 @@ public function saveCommentsBulk($tenant_id, $create_comment_params, $is_live = * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param \FastComments\Client\Model\CreateCommentParams[] $create_comment_params (required) * @param bool|null $is_live (optional) @@ -37183,9 +32432,9 @@ public function saveCommentsBulk($tenant_id, $create_comment_params, $is_live = * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\SaveCommentsBulkResponse[], HTTP status code, HTTP response headers (array of strings) */ - public function saveCommentsBulkWithHttpInfo($tenant_id, $create_comment_params, $is_live = null, $do_spam_check = null, $send_emails = null, $populate_notifications = null, string $contentType = self::contentTypes['saveCommentsBulk'][0]) + public function saveCommentsBulkWithHttpInfo($tenant_id, $create_comment_params, array $options = []) { - $request = $this->saveCommentsBulkRequest($tenant_id, $create_comment_params, $is_live, $do_spam_check, $send_emails, $populate_notifications, $contentType); + $request = $this->saveCommentsBulkRequest($tenant_id, $create_comment_params, $options); try { $options = $this->createHttpClientOption(); @@ -37212,34 +32461,15 @@ public function saveCommentsBulkWithHttpInfo($tenant_id, $create_comment_params, switch($statusCode) { case 200: - if ('\FastComments\Client\Model\SaveCommentsBulkResponse[]' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\SaveCommentsBulkResponse[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\SaveCommentsBulkResponse[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\SaveCommentsBulkResponse[]', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -37253,34 +32483,11 @@ public function saveCommentsBulkWithHttpInfo($tenant_id, $create_comment_params, ); } - $returnType = '\FastComments\Client\Model\SaveCommentsBulkResponse[]'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\SaveCommentsBulkResponse[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -37290,8 +32497,10 @@ public function saveCommentsBulkWithHttpInfo($tenant_id, $create_comment_params, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -37301,6 +32510,8 @@ public function saveCommentsBulkWithHttpInfo($tenant_id, $create_comment_params, * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param \FastComments\Client\Model\CreateCommentParams[] $create_comment_params (required) * @param bool|null $is_live (optional) @@ -37312,9 +32523,9 @@ public function saveCommentsBulkWithHttpInfo($tenant_id, $create_comment_params, * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function saveCommentsBulkAsync($tenant_id, $create_comment_params, $is_live = null, $do_spam_check = null, $send_emails = null, $populate_notifications = null, string $contentType = self::contentTypes['saveCommentsBulk'][0]) + public function saveCommentsBulkAsync($tenant_id, $create_comment_params, array $options = []) { - return $this->saveCommentsBulkAsyncWithHttpInfo($tenant_id, $create_comment_params, $is_live, $do_spam_check, $send_emails, $populate_notifications, $contentType) + return $this->saveCommentsBulkAsyncWithHttpInfo($tenant_id, $create_comment_params, $options) ->then( function ($response) { return $response[0]; @@ -37327,6 +32538,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param \FastComments\Client\Model\CreateCommentParams[] $create_comment_params (required) * @param bool|null $is_live (optional) @@ -37338,10 +32551,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function saveCommentsBulkAsyncWithHttpInfo($tenant_id, $create_comment_params, $is_live = null, $do_spam_check = null, $send_emails = null, $populate_notifications = null, string $contentType = self::contentTypes['saveCommentsBulk'][0]) + public function saveCommentsBulkAsyncWithHttpInfo($tenant_id, $create_comment_params, array $options = []) { $returnType = '\FastComments\Client\Model\SaveCommentsBulkResponse[]'; - $request = $this->saveCommentsBulkRequest($tenant_id, $create_comment_params, $is_live, $do_spam_check, $send_emails, $populate_notifications, $contentType); + $request = $this->saveCommentsBulkRequest($tenant_id, $create_comment_params, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -37382,6 +32595,8 @@ function ($exception) { /** * Create request for operation 'saveCommentsBulk' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param \FastComments\Client\Model\CreateCommentParams[] $create_comment_params (required) * @param bool|null $is_live (optional) @@ -37393,9 +32608,15 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function saveCommentsBulkRequest($tenant_id, $create_comment_params, $is_live = null, $do_spam_check = null, $send_emails = null, $populate_notifications = null, string $contentType = self::contentTypes['saveCommentsBulk'][0]) + public function saveCommentsBulkRequest($tenant_id, $create_comment_params, array $options = []) { - + // unbox the optional parameters and request options from the $options array + $is_live = array_key_exists('is_live', $options) ? $options['is_live'] : null; + $do_spam_check = array_key_exists('do_spam_check', $options) ? $options['do_spam_check'] : null; + $send_emails = array_key_exists('send_emails', $options) ? $options['send_emails'] : null; + $populate_notifications = array_key_exists('populate_notifications', $options) ? $options['populate_notifications'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['saveCommentsBulk'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -37550,9 +32771,9 @@ public function saveCommentsBulkRequest($tenant_id, $create_comment_params, $is_ * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError */ - public function sendInvite($tenant_id, $id, $from_name, string $contentType = self::contentTypes['sendInvite'][0]) + public function sendInvite($tenant_id, $id, $from_name) { - list($response) = $this->sendInviteWithHttpInfo($tenant_id, $id, $from_name, $contentType); + list($response) = $this->sendInviteWithHttpInfo($tenant_id, $id, $from_name); return $response; } @@ -37570,9 +32791,9 @@ public function sendInvite($tenant_id, $id, $from_name, string $contentType = se * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function sendInviteWithHttpInfo($tenant_id, $id, $from_name, string $contentType = self::contentTypes['sendInvite'][0]) + public function sendInviteWithHttpInfo($tenant_id, $id, $from_name) { - $request = $this->sendInviteRequest($tenant_id, $id, $from_name, $contentType); + $request = $this->sendInviteRequest($tenant_id, $id, $from_name); try { $options = $this->createHttpClientOption(); @@ -37599,61 +32820,21 @@ public function sendInviteWithHttpInfo($tenant_id, $id, $from_name, string $cont switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APIEmptyResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIEmptyResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIEmptyResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -37667,34 +32848,11 @@ public function sendInviteWithHttpInfo($tenant_id, $id, $from_name, string $cont ); } - $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -37704,7 +32862,7 @@ public function sendInviteWithHttpInfo($tenant_id, $id, $from_name, string $cont $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -37712,8 +32870,10 @@ public function sendInviteWithHttpInfo($tenant_id, $id, $from_name, string $cont $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -37731,9 +32891,9 @@ public function sendInviteWithHttpInfo($tenant_id, $id, $from_name, string $cont * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function sendInviteAsync($tenant_id, $id, $from_name, string $contentType = self::contentTypes['sendInvite'][0]) + public function sendInviteAsync($tenant_id, $id, $from_name) { - return $this->sendInviteAsyncWithHttpInfo($tenant_id, $id, $from_name, $contentType) + return $this->sendInviteAsyncWithHttpInfo($tenant_id, $id, $from_name) ->then( function ($response) { return $response[0]; @@ -37754,10 +32914,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function sendInviteAsyncWithHttpInfo($tenant_id, $id, $from_name, string $contentType = self::contentTypes['sendInvite'][0]) + public function sendInviteAsyncWithHttpInfo($tenant_id, $id, $from_name) { $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - $request = $this->sendInviteRequest($tenant_id, $id, $from_name, $contentType); + $request = $this->sendInviteRequest($tenant_id, $id, $from_name); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -37806,9 +32966,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function sendInviteRequest($tenant_id, $id, $from_name, string $contentType = self::contentTypes['sendInvite'][0]) + public function sendInviteRequest($tenant_id, $id, $from_name) { - + $contentType = self::contentTypes['sendInvite'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -37861,7 +33022,7 @@ public function sendInviteRequest($tenant_id, $id, $from_name, string $contentTy // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -37931,6 +33092,8 @@ public function sendInviteRequest($tenant_id, $id, $from_name, string $contentTy * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $id id (required) * @param string|null $redirect_url redirect_url (optional) @@ -37940,9 +33103,9 @@ public function sendInviteRequest($tenant_id, $id, $from_name, string $contentTy * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError */ - public function sendLoginLink($tenant_id, $id, $redirect_url = null, string $contentType = self::contentTypes['sendLoginLink'][0]) + public function sendLoginLink($tenant_id, $id, $redirect_url = null) { - list($response) = $this->sendLoginLinkWithHttpInfo($tenant_id, $id, $redirect_url, $contentType); + list($response) = $this->sendLoginLinkWithHttpInfo($tenant_id, $id, $redirect_url); return $response; } @@ -37951,6 +33114,8 @@ public function sendLoginLink($tenant_id, $id, $redirect_url = null, string $con * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param string|null $redirect_url (optional) @@ -37960,9 +33125,9 @@ public function sendLoginLink($tenant_id, $id, $redirect_url = null, string $con * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function sendLoginLinkWithHttpInfo($tenant_id, $id, $redirect_url = null, string $contentType = self::contentTypes['sendLoginLink'][0]) + public function sendLoginLinkWithHttpInfo($tenant_id, $id, $redirect_url = null) { - $request = $this->sendLoginLinkRequest($tenant_id, $id, $redirect_url, $contentType); + $request = $this->sendLoginLinkRequest($tenant_id, $id, $redirect_url); try { $options = $this->createHttpClientOption(); @@ -37989,61 +33154,21 @@ public function sendLoginLinkWithHttpInfo($tenant_id, $id, $redirect_url = null, switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APIEmptyResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIEmptyResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIEmptyResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -38057,34 +33182,11 @@ public function sendLoginLinkWithHttpInfo($tenant_id, $id, $redirect_url = null, ); } - $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -38094,7 +33196,7 @@ public function sendLoginLinkWithHttpInfo($tenant_id, $id, $redirect_url = null, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -38102,8 +33204,10 @@ public function sendLoginLinkWithHttpInfo($tenant_id, $id, $redirect_url = null, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -38113,6 +33217,8 @@ public function sendLoginLinkWithHttpInfo($tenant_id, $id, $redirect_url = null, * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param string|null $redirect_url (optional) @@ -38121,9 +33227,9 @@ public function sendLoginLinkWithHttpInfo($tenant_id, $id, $redirect_url = null, * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function sendLoginLinkAsync($tenant_id, $id, $redirect_url = null, string $contentType = self::contentTypes['sendLoginLink'][0]) + public function sendLoginLinkAsync($tenant_id, $id, $redirect_url = null) { - return $this->sendLoginLinkAsyncWithHttpInfo($tenant_id, $id, $redirect_url, $contentType) + return $this->sendLoginLinkAsyncWithHttpInfo($tenant_id, $id, $redirect_url) ->then( function ($response) { return $response[0]; @@ -38136,6 +33242,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param string|null $redirect_url (optional) @@ -38144,10 +33252,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function sendLoginLinkAsyncWithHttpInfo($tenant_id, $id, $redirect_url = null, string $contentType = self::contentTypes['sendLoginLink'][0]) + public function sendLoginLinkAsyncWithHttpInfo($tenant_id, $id, $redirect_url = null) { $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - $request = $this->sendLoginLinkRequest($tenant_id, $id, $redirect_url, $contentType); + $request = $this->sendLoginLinkRequest($tenant_id, $id, $redirect_url); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -38188,6 +33296,8 @@ function ($exception) { /** * Create request for operation 'sendLoginLink' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param string|null $redirect_url (optional) @@ -38196,9 +33306,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function sendLoginLinkRequest($tenant_id, $id, $redirect_url = null, string $contentType = self::contentTypes['sendLoginLink'][0]) + public function sendLoginLinkRequest($tenant_id, $id, $redirect_url = null) { - + $contentType = self::contentTypes['sendLoginLink'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -38245,7 +33356,7 @@ public function sendLoginLinkRequest($tenant_id, $id, $redirect_url = null, stri // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -38315,6 +33426,8 @@ public function sendLoginLinkRequest($tenant_id, $id, $redirect_url = null, stri * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $id id (required) * @param \FastComments\Client\Model\UnBlockFromCommentParams $un_block_from_comment_params un_block_from_comment_params (required) @@ -38326,9 +33439,9 @@ public function sendLoginLinkRequest($tenant_id, $id, $redirect_url = null, stri * @throws \InvalidArgumentException * @return \FastComments\Client\Model\UnblockSuccess|\FastComments\Client\Model\APIError */ - public function unBlockUserFromComment($tenant_id, $id, $un_block_from_comment_params, $user_id = null, $anon_user_id = null, string $contentType = self::contentTypes['unBlockUserFromComment'][0]) + public function unBlockUserFromComment($tenant_id, $id, $un_block_from_comment_params, array $options = []) { - list($response) = $this->unBlockUserFromCommentWithHttpInfo($tenant_id, $id, $un_block_from_comment_params, $user_id, $anon_user_id, $contentType); + list($response) = $this->unBlockUserFromCommentWithHttpInfo($tenant_id, $id, $un_block_from_comment_params, $options); return $response; } @@ -38337,6 +33450,8 @@ public function unBlockUserFromComment($tenant_id, $id, $un_block_from_comment_p * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param \FastComments\Client\Model\UnBlockFromCommentParams $un_block_from_comment_params (required) @@ -38348,9 +33463,9 @@ public function unBlockUserFromComment($tenant_id, $id, $un_block_from_comment_p * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\UnblockSuccess|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function unBlockUserFromCommentWithHttpInfo($tenant_id, $id, $un_block_from_comment_params, $user_id = null, $anon_user_id = null, string $contentType = self::contentTypes['unBlockUserFromComment'][0]) + public function unBlockUserFromCommentWithHttpInfo($tenant_id, $id, $un_block_from_comment_params, array $options = []) { - $request = $this->unBlockUserFromCommentRequest($tenant_id, $id, $un_block_from_comment_params, $user_id, $anon_user_id, $contentType); + $request = $this->unBlockUserFromCommentRequest($tenant_id, $id, $un_block_from_comment_params, $options); try { $options = $this->createHttpClientOption(); @@ -38377,61 +33492,21 @@ public function unBlockUserFromCommentWithHttpInfo($tenant_id, $id, $un_block_fr switch($statusCode) { case 200: - if ('\FastComments\Client\Model\UnblockSuccess' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\UnblockSuccess' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\UnblockSuccess', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\UnblockSuccess', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -38445,34 +33520,11 @@ public function unBlockUserFromCommentWithHttpInfo($tenant_id, $id, $un_block_fr ); } - $returnType = '\FastComments\Client\Model\UnblockSuccess'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\UnblockSuccess', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -38482,7 +33534,7 @@ public function unBlockUserFromCommentWithHttpInfo($tenant_id, $id, $un_block_fr $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -38490,8 +33542,10 @@ public function unBlockUserFromCommentWithHttpInfo($tenant_id, $id, $un_block_fr $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -38501,6 +33555,8 @@ public function unBlockUserFromCommentWithHttpInfo($tenant_id, $id, $un_block_fr * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param \FastComments\Client\Model\UnBlockFromCommentParams $un_block_from_comment_params (required) @@ -38511,9 +33567,9 @@ public function unBlockUserFromCommentWithHttpInfo($tenant_id, $id, $un_block_fr * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function unBlockUserFromCommentAsync($tenant_id, $id, $un_block_from_comment_params, $user_id = null, $anon_user_id = null, string $contentType = self::contentTypes['unBlockUserFromComment'][0]) + public function unBlockUserFromCommentAsync($tenant_id, $id, $un_block_from_comment_params, array $options = []) { - return $this->unBlockUserFromCommentAsyncWithHttpInfo($tenant_id, $id, $un_block_from_comment_params, $user_id, $anon_user_id, $contentType) + return $this->unBlockUserFromCommentAsyncWithHttpInfo($tenant_id, $id, $un_block_from_comment_params, $options) ->then( function ($response) { return $response[0]; @@ -38526,6 +33582,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param \FastComments\Client\Model\UnBlockFromCommentParams $un_block_from_comment_params (required) @@ -38536,10 +33594,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function unBlockUserFromCommentAsyncWithHttpInfo($tenant_id, $id, $un_block_from_comment_params, $user_id = null, $anon_user_id = null, string $contentType = self::contentTypes['unBlockUserFromComment'][0]) + public function unBlockUserFromCommentAsyncWithHttpInfo($tenant_id, $id, $un_block_from_comment_params, array $options = []) { $returnType = '\FastComments\Client\Model\UnblockSuccess'; - $request = $this->unBlockUserFromCommentRequest($tenant_id, $id, $un_block_from_comment_params, $user_id, $anon_user_id, $contentType); + $request = $this->unBlockUserFromCommentRequest($tenant_id, $id, $un_block_from_comment_params, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -38580,6 +33638,8 @@ function ($exception) { /** * Create request for operation 'unBlockUserFromComment' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param \FastComments\Client\Model\UnBlockFromCommentParams $un_block_from_comment_params (required) @@ -38590,9 +33650,13 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function unBlockUserFromCommentRequest($tenant_id, $id, $un_block_from_comment_params, $user_id = null, $anon_user_id = null, string $contentType = self::contentTypes['unBlockUserFromComment'][0]) + public function unBlockUserFromCommentRequest($tenant_id, $id, $un_block_from_comment_params, array $options = []) { - + // unbox the optional parameters and request options from the $options array + $user_id = array_key_exists('user_id', $options) ? $options['user_id'] : null; + $anon_user_id = array_key_exists('anon_user_id', $options) ? $options['anon_user_id'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['unBlockUserFromComment'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -38656,7 +33720,7 @@ public function unBlockUserFromCommentRequest($tenant_id, $id, $un_block_from_co // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -38733,6 +33797,8 @@ public function unBlockUserFromCommentRequest($tenant_id, $id, $un_block_from_co * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $id id (required) * @param string|null $user_id user_id (optional) @@ -38743,9 +33809,9 @@ public function unBlockUserFromCommentRequest($tenant_id, $id, $un_block_from_co * @throws \InvalidArgumentException * @return \FastComments\Client\Model\FlagCommentResponse|\FastComments\Client\Model\APIError */ - public function unFlagComment($tenant_id, $id, $user_id = null, $anon_user_id = null, string $contentType = self::contentTypes['unFlagComment'][0]) + public function unFlagComment($tenant_id, $id, array $options = []) { - list($response) = $this->unFlagCommentWithHttpInfo($tenant_id, $id, $user_id, $anon_user_id, $contentType); + list($response) = $this->unFlagCommentWithHttpInfo($tenant_id, $id, $options); return $response; } @@ -38754,6 +33820,8 @@ public function unFlagComment($tenant_id, $id, $user_id = null, $anon_user_id = * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param string|null $user_id (optional) @@ -38764,9 +33832,9 @@ public function unFlagComment($tenant_id, $id, $user_id = null, $anon_user_id = * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\FlagCommentResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function unFlagCommentWithHttpInfo($tenant_id, $id, $user_id = null, $anon_user_id = null, string $contentType = self::contentTypes['unFlagComment'][0]) + public function unFlagCommentWithHttpInfo($tenant_id, $id, array $options = []) { - $request = $this->unFlagCommentRequest($tenant_id, $id, $user_id, $anon_user_id, $contentType); + $request = $this->unFlagCommentRequest($tenant_id, $id, $options); try { $options = $this->createHttpClientOption(); @@ -38793,61 +33861,21 @@ public function unFlagCommentWithHttpInfo($tenant_id, $id, $user_id = null, $ano switch($statusCode) { case 200: - if ('\FastComments\Client\Model\FlagCommentResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\FlagCommentResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\FlagCommentResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\FlagCommentResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -38861,34 +33889,11 @@ public function unFlagCommentWithHttpInfo($tenant_id, $id, $user_id = null, $ano ); } - $returnType = '\FastComments\Client\Model\FlagCommentResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\FlagCommentResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -38898,7 +33903,7 @@ public function unFlagCommentWithHttpInfo($tenant_id, $id, $user_id = null, $ano $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -38906,8 +33911,10 @@ public function unFlagCommentWithHttpInfo($tenant_id, $id, $user_id = null, $ano $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -38917,6 +33924,8 @@ public function unFlagCommentWithHttpInfo($tenant_id, $id, $user_id = null, $ano * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param string|null $user_id (optional) @@ -38926,9 +33935,9 @@ public function unFlagCommentWithHttpInfo($tenant_id, $id, $user_id = null, $ano * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function unFlagCommentAsync($tenant_id, $id, $user_id = null, $anon_user_id = null, string $contentType = self::contentTypes['unFlagComment'][0]) + public function unFlagCommentAsync($tenant_id, $id, array $options = []) { - return $this->unFlagCommentAsyncWithHttpInfo($tenant_id, $id, $user_id, $anon_user_id, $contentType) + return $this->unFlagCommentAsyncWithHttpInfo($tenant_id, $id, $options) ->then( function ($response) { return $response[0]; @@ -38941,6 +33950,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param string|null $user_id (optional) @@ -38950,10 +33961,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function unFlagCommentAsyncWithHttpInfo($tenant_id, $id, $user_id = null, $anon_user_id = null, string $contentType = self::contentTypes['unFlagComment'][0]) + public function unFlagCommentAsyncWithHttpInfo($tenant_id, $id, array $options = []) { $returnType = '\FastComments\Client\Model\FlagCommentResponse'; - $request = $this->unFlagCommentRequest($tenant_id, $id, $user_id, $anon_user_id, $contentType); + $request = $this->unFlagCommentRequest($tenant_id, $id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -38994,6 +34005,8 @@ function ($exception) { /** * Create request for operation 'unFlagComment' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param string|null $user_id (optional) @@ -39003,9 +34016,13 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function unFlagCommentRequest($tenant_id, $id, $user_id = null, $anon_user_id = null, string $contentType = self::contentTypes['unFlagComment'][0]) + public function unFlagCommentRequest($tenant_id, $id, array $options = []) { - + // unbox the optional parameters and request options from the $options array + $user_id = array_key_exists('user_id', $options) ? $options['user_id'] : null; + $anon_user_id = array_key_exists('anon_user_id', $options) ? $options['anon_user_id'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['unFlagComment'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -39062,7 +34079,7 @@ public function unFlagCommentRequest($tenant_id, $id, $user_id = null, $anon_use // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -39132,6 +34149,8 @@ public function unFlagCommentRequest($tenant_id, $id, $user_id = null, $anon_use * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $id id (required) * @param \FastComments\Client\Model\UpdatableCommentParams $updatable_comment_params updatable_comment_params (required) @@ -39144,9 +34163,9 @@ public function unFlagCommentRequest($tenant_id, $id, $user_id = null, $anon_use * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError */ - public function updateComment($tenant_id, $id, $updatable_comment_params, $context_user_id = null, $do_spam_check = null, $is_live = null, string $contentType = self::contentTypes['updateComment'][0]) + public function updateComment($tenant_id, $id, $updatable_comment_params, array $options = []) { - list($response) = $this->updateCommentWithHttpInfo($tenant_id, $id, $updatable_comment_params, $context_user_id, $do_spam_check, $is_live, $contentType); + list($response) = $this->updateCommentWithHttpInfo($tenant_id, $id, $updatable_comment_params, $options); return $response; } @@ -39155,6 +34174,8 @@ public function updateComment($tenant_id, $id, $updatable_comment_params, $conte * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param \FastComments\Client\Model\UpdatableCommentParams $updatable_comment_params (required) @@ -39167,9 +34188,9 @@ public function updateComment($tenant_id, $id, $updatable_comment_params, $conte * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function updateCommentWithHttpInfo($tenant_id, $id, $updatable_comment_params, $context_user_id = null, $do_spam_check = null, $is_live = null, string $contentType = self::contentTypes['updateComment'][0]) + public function updateCommentWithHttpInfo($tenant_id, $id, $updatable_comment_params, array $options = []) { - $request = $this->updateCommentRequest($tenant_id, $id, $updatable_comment_params, $context_user_id, $do_spam_check, $is_live, $contentType); + $request = $this->updateCommentRequest($tenant_id, $id, $updatable_comment_params, $options); try { $options = $this->createHttpClientOption(); @@ -39196,61 +34217,21 @@ public function updateCommentWithHttpInfo($tenant_id, $id, $updatable_comment_pa switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APIEmptyResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIEmptyResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIEmptyResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -39264,34 +34245,11 @@ public function updateCommentWithHttpInfo($tenant_id, $id, $updatable_comment_pa ); } - $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -39301,7 +34259,7 @@ public function updateCommentWithHttpInfo($tenant_id, $id, $updatable_comment_pa $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -39309,8 +34267,10 @@ public function updateCommentWithHttpInfo($tenant_id, $id, $updatable_comment_pa $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -39320,6 +34280,8 @@ public function updateCommentWithHttpInfo($tenant_id, $id, $updatable_comment_pa * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param \FastComments\Client\Model\UpdatableCommentParams $updatable_comment_params (required) @@ -39331,9 +34293,9 @@ public function updateCommentWithHttpInfo($tenant_id, $id, $updatable_comment_pa * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateCommentAsync($tenant_id, $id, $updatable_comment_params, $context_user_id = null, $do_spam_check = null, $is_live = null, string $contentType = self::contentTypes['updateComment'][0]) + public function updateCommentAsync($tenant_id, $id, $updatable_comment_params, array $options = []) { - return $this->updateCommentAsyncWithHttpInfo($tenant_id, $id, $updatable_comment_params, $context_user_id, $do_spam_check, $is_live, $contentType) + return $this->updateCommentAsyncWithHttpInfo($tenant_id, $id, $updatable_comment_params, $options) ->then( function ($response) { return $response[0]; @@ -39346,6 +34308,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param \FastComments\Client\Model\UpdatableCommentParams $updatable_comment_params (required) @@ -39357,10 +34321,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateCommentAsyncWithHttpInfo($tenant_id, $id, $updatable_comment_params, $context_user_id = null, $do_spam_check = null, $is_live = null, string $contentType = self::contentTypes['updateComment'][0]) + public function updateCommentAsyncWithHttpInfo($tenant_id, $id, $updatable_comment_params, array $options = []) { $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - $request = $this->updateCommentRequest($tenant_id, $id, $updatable_comment_params, $context_user_id, $do_spam_check, $is_live, $contentType); + $request = $this->updateCommentRequest($tenant_id, $id, $updatable_comment_params, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -39401,6 +34365,8 @@ function ($exception) { /** * Create request for operation 'updateComment' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param \FastComments\Client\Model\UpdatableCommentParams $updatable_comment_params (required) @@ -39412,9 +34378,14 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function updateCommentRequest($tenant_id, $id, $updatable_comment_params, $context_user_id = null, $do_spam_check = null, $is_live = null, string $contentType = self::contentTypes['updateComment'][0]) + public function updateCommentRequest($tenant_id, $id, $updatable_comment_params, array $options = []) { - + // unbox the optional parameters and request options from the $options array + $context_user_id = array_key_exists('context_user_id', $options) ? $options['context_user_id'] : null; + $do_spam_check = array_key_exists('do_spam_check', $options) ? $options['do_spam_check'] : null; + $is_live = array_key_exists('is_live', $options) ? $options['is_live'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['updateComment'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -39488,7 +34459,7 @@ public function updateCommentRequest($tenant_id, $id, $updatable_comment_params, // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -39574,9 +34545,9 @@ public function updateCommentRequest($tenant_id, $id, $updatable_comment_params, * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError */ - public function updateEmailTemplate($tenant_id, $id, $update_email_template_body, string $contentType = self::contentTypes['updateEmailTemplate'][0]) + public function updateEmailTemplate($tenant_id, $id, $update_email_template_body) { - list($response) = $this->updateEmailTemplateWithHttpInfo($tenant_id, $id, $update_email_template_body, $contentType); + list($response) = $this->updateEmailTemplateWithHttpInfo($tenant_id, $id, $update_email_template_body); return $response; } @@ -39594,9 +34565,9 @@ public function updateEmailTemplate($tenant_id, $id, $update_email_template_body * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function updateEmailTemplateWithHttpInfo($tenant_id, $id, $update_email_template_body, string $contentType = self::contentTypes['updateEmailTemplate'][0]) + public function updateEmailTemplateWithHttpInfo($tenant_id, $id, $update_email_template_body) { - $request = $this->updateEmailTemplateRequest($tenant_id, $id, $update_email_template_body, $contentType); + $request = $this->updateEmailTemplateRequest($tenant_id, $id, $update_email_template_body); try { $options = $this->createHttpClientOption(); @@ -39623,61 +34594,21 @@ public function updateEmailTemplateWithHttpInfo($tenant_id, $id, $update_email_t switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APIEmptyResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIEmptyResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIEmptyResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -39691,34 +34622,11 @@ public function updateEmailTemplateWithHttpInfo($tenant_id, $id, $update_email_t ); } - $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -39728,7 +34636,7 @@ public function updateEmailTemplateWithHttpInfo($tenant_id, $id, $update_email_t $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -39736,8 +34644,10 @@ public function updateEmailTemplateWithHttpInfo($tenant_id, $id, $update_email_t $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -39755,9 +34665,9 @@ public function updateEmailTemplateWithHttpInfo($tenant_id, $id, $update_email_t * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateEmailTemplateAsync($tenant_id, $id, $update_email_template_body, string $contentType = self::contentTypes['updateEmailTemplate'][0]) + public function updateEmailTemplateAsync($tenant_id, $id, $update_email_template_body) { - return $this->updateEmailTemplateAsyncWithHttpInfo($tenant_id, $id, $update_email_template_body, $contentType) + return $this->updateEmailTemplateAsyncWithHttpInfo($tenant_id, $id, $update_email_template_body) ->then( function ($response) { return $response[0]; @@ -39778,10 +34688,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateEmailTemplateAsyncWithHttpInfo($tenant_id, $id, $update_email_template_body, string $contentType = self::contentTypes['updateEmailTemplate'][0]) + public function updateEmailTemplateAsyncWithHttpInfo($tenant_id, $id, $update_email_template_body) { $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - $request = $this->updateEmailTemplateRequest($tenant_id, $id, $update_email_template_body, $contentType); + $request = $this->updateEmailTemplateRequest($tenant_id, $id, $update_email_template_body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -39830,9 +34740,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function updateEmailTemplateRequest($tenant_id, $id, $update_email_template_body, string $contentType = self::contentTypes['updateEmailTemplate'][0]) + public function updateEmailTemplateRequest($tenant_id, $id, $update_email_template_body) { - + $contentType = self::contentTypes['updateEmailTemplate'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -39876,7 +34787,7 @@ public function updateEmailTemplateRequest($tenant_id, $id, $update_email_templa // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -39962,9 +34873,9 @@ public function updateEmailTemplateRequest($tenant_id, $id, $update_email_templa * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError */ - public function updateFeedPost($tenant_id, $id, $feed_post, string $contentType = self::contentTypes['updateFeedPost'][0]) + public function updateFeedPost($tenant_id, $id, $feed_post) { - list($response) = $this->updateFeedPostWithHttpInfo($tenant_id, $id, $feed_post, $contentType); + list($response) = $this->updateFeedPostWithHttpInfo($tenant_id, $id, $feed_post); return $response; } @@ -39982,9 +34893,9 @@ public function updateFeedPost($tenant_id, $id, $feed_post, string $contentType * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function updateFeedPostWithHttpInfo($tenant_id, $id, $feed_post, string $contentType = self::contentTypes['updateFeedPost'][0]) + public function updateFeedPostWithHttpInfo($tenant_id, $id, $feed_post) { - $request = $this->updateFeedPostRequest($tenant_id, $id, $feed_post, $contentType); + $request = $this->updateFeedPostRequest($tenant_id, $id, $feed_post); try { $options = $this->createHttpClientOption(); @@ -40011,61 +34922,21 @@ public function updateFeedPostWithHttpInfo($tenant_id, $id, $feed_post, string $ switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APIEmptyResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIEmptyResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIEmptyResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -40079,34 +34950,11 @@ public function updateFeedPostWithHttpInfo($tenant_id, $id, $feed_post, string $ ); } - $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -40116,7 +34964,7 @@ public function updateFeedPostWithHttpInfo($tenant_id, $id, $feed_post, string $ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -40124,8 +34972,10 @@ public function updateFeedPostWithHttpInfo($tenant_id, $id, $feed_post, string $ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -40143,9 +34993,9 @@ public function updateFeedPostWithHttpInfo($tenant_id, $id, $feed_post, string $ * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateFeedPostAsync($tenant_id, $id, $feed_post, string $contentType = self::contentTypes['updateFeedPost'][0]) + public function updateFeedPostAsync($tenant_id, $id, $feed_post) { - return $this->updateFeedPostAsyncWithHttpInfo($tenant_id, $id, $feed_post, $contentType) + return $this->updateFeedPostAsyncWithHttpInfo($tenant_id, $id, $feed_post) ->then( function ($response) { return $response[0]; @@ -40166,10 +35016,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateFeedPostAsyncWithHttpInfo($tenant_id, $id, $feed_post, string $contentType = self::contentTypes['updateFeedPost'][0]) + public function updateFeedPostAsyncWithHttpInfo($tenant_id, $id, $feed_post) { $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - $request = $this->updateFeedPostRequest($tenant_id, $id, $feed_post, $contentType); + $request = $this->updateFeedPostRequest($tenant_id, $id, $feed_post); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -40218,9 +35068,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function updateFeedPostRequest($tenant_id, $id, $feed_post, string $contentType = self::contentTypes['updateFeedPost'][0]) + public function updateFeedPostRequest($tenant_id, $id, $feed_post) { - + $contentType = self::contentTypes['updateFeedPost'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -40264,7 +35115,7 @@ public function updateFeedPostRequest($tenant_id, $id, $feed_post, string $conte // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -40350,9 +35201,9 @@ public function updateFeedPostRequest($tenant_id, $id, $feed_post, string $conte * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError */ - public function updateModerator($tenant_id, $id, $update_moderator_body, string $contentType = self::contentTypes['updateModerator'][0]) + public function updateModerator($tenant_id, $id, $update_moderator_body) { - list($response) = $this->updateModeratorWithHttpInfo($tenant_id, $id, $update_moderator_body, $contentType); + list($response) = $this->updateModeratorWithHttpInfo($tenant_id, $id, $update_moderator_body); return $response; } @@ -40370,9 +35221,9 @@ public function updateModerator($tenant_id, $id, $update_moderator_body, string * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function updateModeratorWithHttpInfo($tenant_id, $id, $update_moderator_body, string $contentType = self::contentTypes['updateModerator'][0]) + public function updateModeratorWithHttpInfo($tenant_id, $id, $update_moderator_body) { - $request = $this->updateModeratorRequest($tenant_id, $id, $update_moderator_body, $contentType); + $request = $this->updateModeratorRequest($tenant_id, $id, $update_moderator_body); try { $options = $this->createHttpClientOption(); @@ -40399,61 +35250,21 @@ public function updateModeratorWithHttpInfo($tenant_id, $id, $update_moderator_b switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APIEmptyResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIEmptyResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIEmptyResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -40467,34 +35278,11 @@ public function updateModeratorWithHttpInfo($tenant_id, $id, $update_moderator_b ); } - $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -40504,7 +35292,7 @@ public function updateModeratorWithHttpInfo($tenant_id, $id, $update_moderator_b $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -40512,8 +35300,10 @@ public function updateModeratorWithHttpInfo($tenant_id, $id, $update_moderator_b $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -40531,9 +35321,9 @@ public function updateModeratorWithHttpInfo($tenant_id, $id, $update_moderator_b * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateModeratorAsync($tenant_id, $id, $update_moderator_body, string $contentType = self::contentTypes['updateModerator'][0]) + public function updateModeratorAsync($tenant_id, $id, $update_moderator_body) { - return $this->updateModeratorAsyncWithHttpInfo($tenant_id, $id, $update_moderator_body, $contentType) + return $this->updateModeratorAsyncWithHttpInfo($tenant_id, $id, $update_moderator_body) ->then( function ($response) { return $response[0]; @@ -40554,10 +35344,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateModeratorAsyncWithHttpInfo($tenant_id, $id, $update_moderator_body, string $contentType = self::contentTypes['updateModerator'][0]) + public function updateModeratorAsyncWithHttpInfo($tenant_id, $id, $update_moderator_body) { $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - $request = $this->updateModeratorRequest($tenant_id, $id, $update_moderator_body, $contentType); + $request = $this->updateModeratorRequest($tenant_id, $id, $update_moderator_body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -40606,9 +35396,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function updateModeratorRequest($tenant_id, $id, $update_moderator_body, string $contentType = self::contentTypes['updateModerator'][0]) + public function updateModeratorRequest($tenant_id, $id, $update_moderator_body) { - + $contentType = self::contentTypes['updateModerator'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -40652,7 +35443,7 @@ public function updateModeratorRequest($tenant_id, $id, $update_moderator_body, // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -40729,6 +35520,8 @@ public function updateModeratorRequest($tenant_id, $id, $update_moderator_body, * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $id id (required) * @param \FastComments\Client\Model\UpdateNotificationBody $update_notification_body update_notification_body (required) @@ -40739,9 +35532,9 @@ public function updateModeratorRequest($tenant_id, $id, $update_moderator_body, * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError */ - public function updateNotification($tenant_id, $id, $update_notification_body, $user_id = null, string $contentType = self::contentTypes['updateNotification'][0]) + public function updateNotification($tenant_id, $id, $update_notification_body, $user_id = null) { - list($response) = $this->updateNotificationWithHttpInfo($tenant_id, $id, $update_notification_body, $user_id, $contentType); + list($response) = $this->updateNotificationWithHttpInfo($tenant_id, $id, $update_notification_body, $user_id); return $response; } @@ -40750,6 +35543,8 @@ public function updateNotification($tenant_id, $id, $update_notification_body, $ * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param \FastComments\Client\Model\UpdateNotificationBody $update_notification_body (required) @@ -40760,9 +35555,9 @@ public function updateNotification($tenant_id, $id, $update_notification_body, $ * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function updateNotificationWithHttpInfo($tenant_id, $id, $update_notification_body, $user_id = null, string $contentType = self::contentTypes['updateNotification'][0]) + public function updateNotificationWithHttpInfo($tenant_id, $id, $update_notification_body, $user_id = null) { - $request = $this->updateNotificationRequest($tenant_id, $id, $update_notification_body, $user_id, $contentType); + $request = $this->updateNotificationRequest($tenant_id, $id, $update_notification_body, $user_id); try { $options = $this->createHttpClientOption(); @@ -40789,61 +35584,21 @@ public function updateNotificationWithHttpInfo($tenant_id, $id, $update_notifica switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APIEmptyResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIEmptyResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIEmptyResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -40857,34 +35612,11 @@ public function updateNotificationWithHttpInfo($tenant_id, $id, $update_notifica ); } - $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -40894,7 +35626,7 @@ public function updateNotificationWithHttpInfo($tenant_id, $id, $update_notifica $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -40902,8 +35634,10 @@ public function updateNotificationWithHttpInfo($tenant_id, $id, $update_notifica $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -40913,6 +35647,8 @@ public function updateNotificationWithHttpInfo($tenant_id, $id, $update_notifica * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param \FastComments\Client\Model\UpdateNotificationBody $update_notification_body (required) @@ -40922,9 +35658,9 @@ public function updateNotificationWithHttpInfo($tenant_id, $id, $update_notifica * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateNotificationAsync($tenant_id, $id, $update_notification_body, $user_id = null, string $contentType = self::contentTypes['updateNotification'][0]) + public function updateNotificationAsync($tenant_id, $id, $update_notification_body, $user_id = null) { - return $this->updateNotificationAsyncWithHttpInfo($tenant_id, $id, $update_notification_body, $user_id, $contentType) + return $this->updateNotificationAsyncWithHttpInfo($tenant_id, $id, $update_notification_body, $user_id) ->then( function ($response) { return $response[0]; @@ -40937,6 +35673,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param \FastComments\Client\Model\UpdateNotificationBody $update_notification_body (required) @@ -40946,10 +35684,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateNotificationAsyncWithHttpInfo($tenant_id, $id, $update_notification_body, $user_id = null, string $contentType = self::contentTypes['updateNotification'][0]) + public function updateNotificationAsyncWithHttpInfo($tenant_id, $id, $update_notification_body, $user_id = null) { $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - $request = $this->updateNotificationRequest($tenant_id, $id, $update_notification_body, $user_id, $contentType); + $request = $this->updateNotificationRequest($tenant_id, $id, $update_notification_body, $user_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -40990,6 +35728,8 @@ function ($exception) { /** * Create request for operation 'updateNotification' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param \FastComments\Client\Model\UpdateNotificationBody $update_notification_body (required) @@ -40999,9 +35739,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function updateNotificationRequest($tenant_id, $id, $update_notification_body, $user_id = null, string $contentType = self::contentTypes['updateNotification'][0]) + public function updateNotificationRequest($tenant_id, $id, $update_notification_body, $user_id = null) { - + $contentType = self::contentTypes['updateNotification'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -41055,7 +35796,7 @@ public function updateNotificationRequest($tenant_id, $id, $update_notification_ // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -41141,9 +35882,9 @@ public function updateNotificationRequest($tenant_id, $id, $update_notification_ * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError */ - public function updateQuestionConfig($tenant_id, $id, $update_question_config_body, string $contentType = self::contentTypes['updateQuestionConfig'][0]) + public function updateQuestionConfig($tenant_id, $id, $update_question_config_body) { - list($response) = $this->updateQuestionConfigWithHttpInfo($tenant_id, $id, $update_question_config_body, $contentType); + list($response) = $this->updateQuestionConfigWithHttpInfo($tenant_id, $id, $update_question_config_body); return $response; } @@ -41161,9 +35902,9 @@ public function updateQuestionConfig($tenant_id, $id, $update_question_config_bo * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function updateQuestionConfigWithHttpInfo($tenant_id, $id, $update_question_config_body, string $contentType = self::contentTypes['updateQuestionConfig'][0]) + public function updateQuestionConfigWithHttpInfo($tenant_id, $id, $update_question_config_body) { - $request = $this->updateQuestionConfigRequest($tenant_id, $id, $update_question_config_body, $contentType); + $request = $this->updateQuestionConfigRequest($tenant_id, $id, $update_question_config_body); try { $options = $this->createHttpClientOption(); @@ -41190,61 +35931,21 @@ public function updateQuestionConfigWithHttpInfo($tenant_id, $id, $update_questi switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APIEmptyResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIEmptyResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIEmptyResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -41258,34 +35959,11 @@ public function updateQuestionConfigWithHttpInfo($tenant_id, $id, $update_questi ); } - $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -41295,7 +35973,7 @@ public function updateQuestionConfigWithHttpInfo($tenant_id, $id, $update_questi $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -41303,8 +35981,10 @@ public function updateQuestionConfigWithHttpInfo($tenant_id, $id, $update_questi $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -41322,9 +36002,9 @@ public function updateQuestionConfigWithHttpInfo($tenant_id, $id, $update_questi * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateQuestionConfigAsync($tenant_id, $id, $update_question_config_body, string $contentType = self::contentTypes['updateQuestionConfig'][0]) + public function updateQuestionConfigAsync($tenant_id, $id, $update_question_config_body) { - return $this->updateQuestionConfigAsyncWithHttpInfo($tenant_id, $id, $update_question_config_body, $contentType) + return $this->updateQuestionConfigAsyncWithHttpInfo($tenant_id, $id, $update_question_config_body) ->then( function ($response) { return $response[0]; @@ -41345,10 +36025,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateQuestionConfigAsyncWithHttpInfo($tenant_id, $id, $update_question_config_body, string $contentType = self::contentTypes['updateQuestionConfig'][0]) + public function updateQuestionConfigAsyncWithHttpInfo($tenant_id, $id, $update_question_config_body) { $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - $request = $this->updateQuestionConfigRequest($tenant_id, $id, $update_question_config_body, $contentType); + $request = $this->updateQuestionConfigRequest($tenant_id, $id, $update_question_config_body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -41397,9 +36077,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function updateQuestionConfigRequest($tenant_id, $id, $update_question_config_body, string $contentType = self::contentTypes['updateQuestionConfig'][0]) + public function updateQuestionConfigRequest($tenant_id, $id, $update_question_config_body) { - + $contentType = self::contentTypes['updateQuestionConfig'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -41443,7 +36124,7 @@ public function updateQuestionConfigRequest($tenant_id, $id, $update_question_co // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -41529,9 +36210,9 @@ public function updateQuestionConfigRequest($tenant_id, $id, $update_question_co * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError */ - public function updateQuestionResult($tenant_id, $id, $update_question_result_body, string $contentType = self::contentTypes['updateQuestionResult'][0]) + public function updateQuestionResult($tenant_id, $id, $update_question_result_body) { - list($response) = $this->updateQuestionResultWithHttpInfo($tenant_id, $id, $update_question_result_body, $contentType); + list($response) = $this->updateQuestionResultWithHttpInfo($tenant_id, $id, $update_question_result_body); return $response; } @@ -41549,9 +36230,9 @@ public function updateQuestionResult($tenant_id, $id, $update_question_result_bo * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function updateQuestionResultWithHttpInfo($tenant_id, $id, $update_question_result_body, string $contentType = self::contentTypes['updateQuestionResult'][0]) + public function updateQuestionResultWithHttpInfo($tenant_id, $id, $update_question_result_body) { - $request = $this->updateQuestionResultRequest($tenant_id, $id, $update_question_result_body, $contentType); + $request = $this->updateQuestionResultRequest($tenant_id, $id, $update_question_result_body); try { $options = $this->createHttpClientOption(); @@ -41578,61 +36259,21 @@ public function updateQuestionResultWithHttpInfo($tenant_id, $id, $update_questi switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APIEmptyResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIEmptyResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIEmptyResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -41646,34 +36287,11 @@ public function updateQuestionResultWithHttpInfo($tenant_id, $id, $update_questi ); } - $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -41683,7 +36301,7 @@ public function updateQuestionResultWithHttpInfo($tenant_id, $id, $update_questi $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -41691,8 +36309,10 @@ public function updateQuestionResultWithHttpInfo($tenant_id, $id, $update_questi $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -41710,9 +36330,9 @@ public function updateQuestionResultWithHttpInfo($tenant_id, $id, $update_questi * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateQuestionResultAsync($tenant_id, $id, $update_question_result_body, string $contentType = self::contentTypes['updateQuestionResult'][0]) + public function updateQuestionResultAsync($tenant_id, $id, $update_question_result_body) { - return $this->updateQuestionResultAsyncWithHttpInfo($tenant_id, $id, $update_question_result_body, $contentType) + return $this->updateQuestionResultAsyncWithHttpInfo($tenant_id, $id, $update_question_result_body) ->then( function ($response) { return $response[0]; @@ -41733,10 +36353,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateQuestionResultAsyncWithHttpInfo($tenant_id, $id, $update_question_result_body, string $contentType = self::contentTypes['updateQuestionResult'][0]) + public function updateQuestionResultAsyncWithHttpInfo($tenant_id, $id, $update_question_result_body) { $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - $request = $this->updateQuestionResultRequest($tenant_id, $id, $update_question_result_body, $contentType); + $request = $this->updateQuestionResultRequest($tenant_id, $id, $update_question_result_body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -41785,9 +36405,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function updateQuestionResultRequest($tenant_id, $id, $update_question_result_body, string $contentType = self::contentTypes['updateQuestionResult'][0]) + public function updateQuestionResultRequest($tenant_id, $id, $update_question_result_body) { - + $contentType = self::contentTypes['updateQuestionResult'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -41831,7 +36452,7 @@ public function updateQuestionResultRequest($tenant_id, $id, $update_question_re // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -41908,6 +36529,8 @@ public function updateQuestionResultRequest($tenant_id, $id, $update_question_re * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $id id (required) * @param \FastComments\Client\Model\UpdateAPIUserSubscriptionData $update_api_user_subscription_data update_api_user_subscription_data (required) @@ -41918,9 +36541,9 @@ public function updateQuestionResultRequest($tenant_id, $id, $update_question_re * @throws \InvalidArgumentException * @return \FastComments\Client\Model\UpdateSubscriptionAPIResponse */ - public function updateSubscription($tenant_id, $id, $update_api_user_subscription_data, $user_id = null, string $contentType = self::contentTypes['updateSubscription'][0]) + public function updateSubscription($tenant_id, $id, $update_api_user_subscription_data, $user_id = null) { - list($response) = $this->updateSubscriptionWithHttpInfo($tenant_id, $id, $update_api_user_subscription_data, $user_id, $contentType); + list($response) = $this->updateSubscriptionWithHttpInfo($tenant_id, $id, $update_api_user_subscription_data, $user_id); return $response; } @@ -41929,6 +36552,8 @@ public function updateSubscription($tenant_id, $id, $update_api_user_subscriptio * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param \FastComments\Client\Model\UpdateAPIUserSubscriptionData $update_api_user_subscription_data (required) @@ -41939,9 +36564,9 @@ public function updateSubscription($tenant_id, $id, $update_api_user_subscriptio * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\UpdateSubscriptionAPIResponse, HTTP status code, HTTP response headers (array of strings) */ - public function updateSubscriptionWithHttpInfo($tenant_id, $id, $update_api_user_subscription_data, $user_id = null, string $contentType = self::contentTypes['updateSubscription'][0]) + public function updateSubscriptionWithHttpInfo($tenant_id, $id, $update_api_user_subscription_data, $user_id = null) { - $request = $this->updateSubscriptionRequest($tenant_id, $id, $update_api_user_subscription_data, $user_id, $contentType); + $request = $this->updateSubscriptionRequest($tenant_id, $id, $update_api_user_subscription_data, $user_id); try { $options = $this->createHttpClientOption(); @@ -41968,34 +36593,15 @@ public function updateSubscriptionWithHttpInfo($tenant_id, $id, $update_api_user switch($statusCode) { case 200: - if ('\FastComments\Client\Model\UpdateSubscriptionAPIResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\UpdateSubscriptionAPIResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\UpdateSubscriptionAPIResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\UpdateSubscriptionAPIResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -42009,34 +36615,11 @@ public function updateSubscriptionWithHttpInfo($tenant_id, $id, $update_api_user ); } - $returnType = '\FastComments\Client\Model\UpdateSubscriptionAPIResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\UpdateSubscriptionAPIResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -42046,8 +36629,10 @@ public function updateSubscriptionWithHttpInfo($tenant_id, $id, $update_api_user $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -42057,6 +36642,8 @@ public function updateSubscriptionWithHttpInfo($tenant_id, $id, $update_api_user * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param \FastComments\Client\Model\UpdateAPIUserSubscriptionData $update_api_user_subscription_data (required) @@ -42066,9 +36653,9 @@ public function updateSubscriptionWithHttpInfo($tenant_id, $id, $update_api_user * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateSubscriptionAsync($tenant_id, $id, $update_api_user_subscription_data, $user_id = null, string $contentType = self::contentTypes['updateSubscription'][0]) + public function updateSubscriptionAsync($tenant_id, $id, $update_api_user_subscription_data, $user_id = null) { - return $this->updateSubscriptionAsyncWithHttpInfo($tenant_id, $id, $update_api_user_subscription_data, $user_id, $contentType) + return $this->updateSubscriptionAsyncWithHttpInfo($tenant_id, $id, $update_api_user_subscription_data, $user_id) ->then( function ($response) { return $response[0]; @@ -42081,6 +36668,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param \FastComments\Client\Model\UpdateAPIUserSubscriptionData $update_api_user_subscription_data (required) @@ -42090,10 +36679,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateSubscriptionAsyncWithHttpInfo($tenant_id, $id, $update_api_user_subscription_data, $user_id = null, string $contentType = self::contentTypes['updateSubscription'][0]) + public function updateSubscriptionAsyncWithHttpInfo($tenant_id, $id, $update_api_user_subscription_data, $user_id = null) { $returnType = '\FastComments\Client\Model\UpdateSubscriptionAPIResponse'; - $request = $this->updateSubscriptionRequest($tenant_id, $id, $update_api_user_subscription_data, $user_id, $contentType); + $request = $this->updateSubscriptionRequest($tenant_id, $id, $update_api_user_subscription_data, $user_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -42134,6 +36723,8 @@ function ($exception) { /** * Create request for operation 'updateSubscription' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param \FastComments\Client\Model\UpdateAPIUserSubscriptionData $update_api_user_subscription_data (required) @@ -42143,9 +36734,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function updateSubscriptionRequest($tenant_id, $id, $update_api_user_subscription_data, $user_id = null, string $contentType = self::contentTypes['updateSubscription'][0]) + public function updateSubscriptionRequest($tenant_id, $id, $update_api_user_subscription_data, $user_id = null) { - + $contentType = self::contentTypes['updateSubscription'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -42199,7 +36791,7 @@ public function updateSubscriptionRequest($tenant_id, $id, $update_api_user_subs // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -42285,9 +36877,9 @@ public function updateSubscriptionRequest($tenant_id, $id, $update_api_user_subs * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError */ - public function updateTenant($tenant_id, $id, $update_tenant_body, string $contentType = self::contentTypes['updateTenant'][0]) + public function updateTenant($tenant_id, $id, $update_tenant_body) { - list($response) = $this->updateTenantWithHttpInfo($tenant_id, $id, $update_tenant_body, $contentType); + list($response) = $this->updateTenantWithHttpInfo($tenant_id, $id, $update_tenant_body); return $response; } @@ -42305,9 +36897,9 @@ public function updateTenant($tenant_id, $id, $update_tenant_body, string $conte * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function updateTenantWithHttpInfo($tenant_id, $id, $update_tenant_body, string $contentType = self::contentTypes['updateTenant'][0]) + public function updateTenantWithHttpInfo($tenant_id, $id, $update_tenant_body) { - $request = $this->updateTenantRequest($tenant_id, $id, $update_tenant_body, $contentType); + $request = $this->updateTenantRequest($tenant_id, $id, $update_tenant_body); try { $options = $this->createHttpClientOption(); @@ -42334,61 +36926,21 @@ public function updateTenantWithHttpInfo($tenant_id, $id, $update_tenant_body, s switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APIEmptyResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIEmptyResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIEmptyResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -42402,34 +36954,11 @@ public function updateTenantWithHttpInfo($tenant_id, $id, $update_tenant_body, s ); } - $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -42439,7 +36968,7 @@ public function updateTenantWithHttpInfo($tenant_id, $id, $update_tenant_body, s $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -42447,8 +36976,10 @@ public function updateTenantWithHttpInfo($tenant_id, $id, $update_tenant_body, s $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -42466,9 +36997,9 @@ public function updateTenantWithHttpInfo($tenant_id, $id, $update_tenant_body, s * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateTenantAsync($tenant_id, $id, $update_tenant_body, string $contentType = self::contentTypes['updateTenant'][0]) + public function updateTenantAsync($tenant_id, $id, $update_tenant_body) { - return $this->updateTenantAsyncWithHttpInfo($tenant_id, $id, $update_tenant_body, $contentType) + return $this->updateTenantAsyncWithHttpInfo($tenant_id, $id, $update_tenant_body) ->then( function ($response) { return $response[0]; @@ -42489,10 +37020,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateTenantAsyncWithHttpInfo($tenant_id, $id, $update_tenant_body, string $contentType = self::contentTypes['updateTenant'][0]) + public function updateTenantAsyncWithHttpInfo($tenant_id, $id, $update_tenant_body) { $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - $request = $this->updateTenantRequest($tenant_id, $id, $update_tenant_body, $contentType); + $request = $this->updateTenantRequest($tenant_id, $id, $update_tenant_body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -42541,9 +37072,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function updateTenantRequest($tenant_id, $id, $update_tenant_body, string $contentType = self::contentTypes['updateTenant'][0]) + public function updateTenantRequest($tenant_id, $id, $update_tenant_body) { - + $contentType = self::contentTypes['updateTenant'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -42587,7 +37119,7 @@ public function updateTenantRequest($tenant_id, $id, $update_tenant_body, string // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -42673,9 +37205,9 @@ public function updateTenantRequest($tenant_id, $id, $update_tenant_body, string * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError */ - public function updateTenantPackage($tenant_id, $id, $update_tenant_package_body, string $contentType = self::contentTypes['updateTenantPackage'][0]) + public function updateTenantPackage($tenant_id, $id, $update_tenant_package_body) { - list($response) = $this->updateTenantPackageWithHttpInfo($tenant_id, $id, $update_tenant_package_body, $contentType); + list($response) = $this->updateTenantPackageWithHttpInfo($tenant_id, $id, $update_tenant_package_body); return $response; } @@ -42693,9 +37225,9 @@ public function updateTenantPackage($tenant_id, $id, $update_tenant_package_body * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function updateTenantPackageWithHttpInfo($tenant_id, $id, $update_tenant_package_body, string $contentType = self::contentTypes['updateTenantPackage'][0]) + public function updateTenantPackageWithHttpInfo($tenant_id, $id, $update_tenant_package_body) { - $request = $this->updateTenantPackageRequest($tenant_id, $id, $update_tenant_package_body, $contentType); + $request = $this->updateTenantPackageRequest($tenant_id, $id, $update_tenant_package_body); try { $options = $this->createHttpClientOption(); @@ -42722,61 +37254,21 @@ public function updateTenantPackageWithHttpInfo($tenant_id, $id, $update_tenant_ switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APIEmptyResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIEmptyResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIEmptyResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -42790,34 +37282,11 @@ public function updateTenantPackageWithHttpInfo($tenant_id, $id, $update_tenant_ ); } - $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -42827,7 +37296,7 @@ public function updateTenantPackageWithHttpInfo($tenant_id, $id, $update_tenant_ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -42835,8 +37304,10 @@ public function updateTenantPackageWithHttpInfo($tenant_id, $id, $update_tenant_ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -42854,9 +37325,9 @@ public function updateTenantPackageWithHttpInfo($tenant_id, $id, $update_tenant_ * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateTenantPackageAsync($tenant_id, $id, $update_tenant_package_body, string $contentType = self::contentTypes['updateTenantPackage'][0]) + public function updateTenantPackageAsync($tenant_id, $id, $update_tenant_package_body) { - return $this->updateTenantPackageAsyncWithHttpInfo($tenant_id, $id, $update_tenant_package_body, $contentType) + return $this->updateTenantPackageAsyncWithHttpInfo($tenant_id, $id, $update_tenant_package_body) ->then( function ($response) { return $response[0]; @@ -42877,10 +37348,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateTenantPackageAsyncWithHttpInfo($tenant_id, $id, $update_tenant_package_body, string $contentType = self::contentTypes['updateTenantPackage'][0]) + public function updateTenantPackageAsyncWithHttpInfo($tenant_id, $id, $update_tenant_package_body) { $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - $request = $this->updateTenantPackageRequest($tenant_id, $id, $update_tenant_package_body, $contentType); + $request = $this->updateTenantPackageRequest($tenant_id, $id, $update_tenant_package_body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -42929,9 +37400,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function updateTenantPackageRequest($tenant_id, $id, $update_tenant_package_body, string $contentType = self::contentTypes['updateTenantPackage'][0]) + public function updateTenantPackageRequest($tenant_id, $id, $update_tenant_package_body) { - + $contentType = self::contentTypes['updateTenantPackage'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -42975,7 +37447,7 @@ public function updateTenantPackageRequest($tenant_id, $id, $update_tenant_packa // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -43052,6 +37524,8 @@ public function updateTenantPackageRequest($tenant_id, $id, $update_tenant_packa * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $id id (required) * @param \FastComments\Client\Model\UpdateTenantUserBody $update_tenant_user_body update_tenant_user_body (required) @@ -43062,9 +37536,9 @@ public function updateTenantPackageRequest($tenant_id, $id, $update_tenant_packa * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError */ - public function updateTenantUser($tenant_id, $id, $update_tenant_user_body, $update_comments = null, string $contentType = self::contentTypes['updateTenantUser'][0]) + public function updateTenantUser($tenant_id, $id, $update_tenant_user_body, $update_comments = null) { - list($response) = $this->updateTenantUserWithHttpInfo($tenant_id, $id, $update_tenant_user_body, $update_comments, $contentType); + list($response) = $this->updateTenantUserWithHttpInfo($tenant_id, $id, $update_tenant_user_body, $update_comments); return $response; } @@ -43073,6 +37547,8 @@ public function updateTenantUser($tenant_id, $id, $update_tenant_user_body, $upd * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param \FastComments\Client\Model\UpdateTenantUserBody $update_tenant_user_body (required) @@ -43083,9 +37559,9 @@ public function updateTenantUser($tenant_id, $id, $update_tenant_user_body, $upd * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function updateTenantUserWithHttpInfo($tenant_id, $id, $update_tenant_user_body, $update_comments = null, string $contentType = self::contentTypes['updateTenantUser'][0]) + public function updateTenantUserWithHttpInfo($tenant_id, $id, $update_tenant_user_body, $update_comments = null) { - $request = $this->updateTenantUserRequest($tenant_id, $id, $update_tenant_user_body, $update_comments, $contentType); + $request = $this->updateTenantUserRequest($tenant_id, $id, $update_tenant_user_body, $update_comments); try { $options = $this->createHttpClientOption(); @@ -43112,61 +37588,21 @@ public function updateTenantUserWithHttpInfo($tenant_id, $id, $update_tenant_use switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APIEmptyResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIEmptyResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIEmptyResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -43180,34 +37616,11 @@ public function updateTenantUserWithHttpInfo($tenant_id, $id, $update_tenant_use ); } - $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -43217,7 +37630,7 @@ public function updateTenantUserWithHttpInfo($tenant_id, $id, $update_tenant_use $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -43225,8 +37638,10 @@ public function updateTenantUserWithHttpInfo($tenant_id, $id, $update_tenant_use $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -43236,6 +37651,8 @@ public function updateTenantUserWithHttpInfo($tenant_id, $id, $update_tenant_use * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param \FastComments\Client\Model\UpdateTenantUserBody $update_tenant_user_body (required) @@ -43245,9 +37662,9 @@ public function updateTenantUserWithHttpInfo($tenant_id, $id, $update_tenant_use * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateTenantUserAsync($tenant_id, $id, $update_tenant_user_body, $update_comments = null, string $contentType = self::contentTypes['updateTenantUser'][0]) + public function updateTenantUserAsync($tenant_id, $id, $update_tenant_user_body, $update_comments = null) { - return $this->updateTenantUserAsyncWithHttpInfo($tenant_id, $id, $update_tenant_user_body, $update_comments, $contentType) + return $this->updateTenantUserAsyncWithHttpInfo($tenant_id, $id, $update_tenant_user_body, $update_comments) ->then( function ($response) { return $response[0]; @@ -43260,6 +37677,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param \FastComments\Client\Model\UpdateTenantUserBody $update_tenant_user_body (required) @@ -43269,10 +37688,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateTenantUserAsyncWithHttpInfo($tenant_id, $id, $update_tenant_user_body, $update_comments = null, string $contentType = self::contentTypes['updateTenantUser'][0]) + public function updateTenantUserAsyncWithHttpInfo($tenant_id, $id, $update_tenant_user_body, $update_comments = null) { $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - $request = $this->updateTenantUserRequest($tenant_id, $id, $update_tenant_user_body, $update_comments, $contentType); + $request = $this->updateTenantUserRequest($tenant_id, $id, $update_tenant_user_body, $update_comments); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -43313,6 +37732,8 @@ function ($exception) { /** * Create request for operation 'updateTenantUser' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $id (required) * @param \FastComments\Client\Model\UpdateTenantUserBody $update_tenant_user_body (required) @@ -43322,9 +37743,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function updateTenantUserRequest($tenant_id, $id, $update_tenant_user_body, $update_comments = null, string $contentType = self::contentTypes['updateTenantUser'][0]) + public function updateTenantUserRequest($tenant_id, $id, $update_tenant_user_body, $update_comments = null) { - + $contentType = self::contentTypes['updateTenantUser'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -43378,7 +37800,7 @@ public function updateTenantUserRequest($tenant_id, $id, $update_tenant_user_bod // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -43464,9 +37886,9 @@ public function updateTenantUserRequest($tenant_id, $id, $update_tenant_user_bod * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APIEmptySuccessResponse|\FastComments\Client\Model\APIError */ - public function updateUserBadge($tenant_id, $id, $update_user_badge_params, string $contentType = self::contentTypes['updateUserBadge'][0]) + public function updateUserBadge($tenant_id, $id, $update_user_badge_params) { - list($response) = $this->updateUserBadgeWithHttpInfo($tenant_id, $id, $update_user_badge_params, $contentType); + list($response) = $this->updateUserBadgeWithHttpInfo($tenant_id, $id, $update_user_badge_params); return $response; } @@ -43484,9 +37906,9 @@ public function updateUserBadge($tenant_id, $id, $update_user_badge_params, stri * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APIEmptySuccessResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function updateUserBadgeWithHttpInfo($tenant_id, $id, $update_user_badge_params, string $contentType = self::contentTypes['updateUserBadge'][0]) + public function updateUserBadgeWithHttpInfo($tenant_id, $id, $update_user_badge_params) { - $request = $this->updateUserBadgeRequest($tenant_id, $id, $update_user_badge_params, $contentType); + $request = $this->updateUserBadgeRequest($tenant_id, $id, $update_user_badge_params); try { $options = $this->createHttpClientOption(); @@ -43513,61 +37935,21 @@ public function updateUserBadgeWithHttpInfo($tenant_id, $id, $update_user_badge_ switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APIEmptySuccessResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIEmptySuccessResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIEmptySuccessResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptySuccessResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -43581,34 +37963,11 @@ public function updateUserBadgeWithHttpInfo($tenant_id, $id, $update_user_badge_ ); } - $returnType = '\FastComments\Client\Model\APIEmptySuccessResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptySuccessResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -43618,7 +37977,7 @@ public function updateUserBadgeWithHttpInfo($tenant_id, $id, $update_user_badge_ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -43626,8 +37985,10 @@ public function updateUserBadgeWithHttpInfo($tenant_id, $id, $update_user_badge_ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -43645,9 +38006,9 @@ public function updateUserBadgeWithHttpInfo($tenant_id, $id, $update_user_badge_ * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateUserBadgeAsync($tenant_id, $id, $update_user_badge_params, string $contentType = self::contentTypes['updateUserBadge'][0]) + public function updateUserBadgeAsync($tenant_id, $id, $update_user_badge_params) { - return $this->updateUserBadgeAsyncWithHttpInfo($tenant_id, $id, $update_user_badge_params, $contentType) + return $this->updateUserBadgeAsyncWithHttpInfo($tenant_id, $id, $update_user_badge_params) ->then( function ($response) { return $response[0]; @@ -43668,10 +38029,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateUserBadgeAsyncWithHttpInfo($tenant_id, $id, $update_user_badge_params, string $contentType = self::contentTypes['updateUserBadge'][0]) + public function updateUserBadgeAsyncWithHttpInfo($tenant_id, $id, $update_user_badge_params) { $returnType = '\FastComments\Client\Model\APIEmptySuccessResponse'; - $request = $this->updateUserBadgeRequest($tenant_id, $id, $update_user_badge_params, $contentType); + $request = $this->updateUserBadgeRequest($tenant_id, $id, $update_user_badge_params); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -43720,9 +38081,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function updateUserBadgeRequest($tenant_id, $id, $update_user_badge_params, string $contentType = self::contentTypes['updateUserBadge'][0]) + public function updateUserBadgeRequest($tenant_id, $id, $update_user_badge_params) { - + $contentType = self::contentTypes['updateUserBadge'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -43766,7 +38128,7 @@ public function updateUserBadgeRequest($tenant_id, $id, $update_user_badge_param // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{id}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -43854,6 +38216,57 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response + ): array { + if ($dataType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/lib/Api/ModerationApi.php b/lib/Api/ModerationApi.php index 1b56add..369128a 100644 --- a/lib/Api/ModerationApi.php +++ b/lib/Api/ModerationApi.php @@ -1,7 +1,7 @@ deleteModerationVoteWithHttpInfo($comment_id, $vote_id, $sso, $contentType); + list($response) = $this->deleteModerationVoteWithHttpInfo($tenant_id, $comment_id, $vote_id, $options); return $response; } @@ -274,8 +281,12 @@ public function deleteModerationVote($comment_id, $vote_id, $sso = null, string * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param string $vote_id (required) + * @param string|null $broadcast_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteModerationVote'] to see the possible values for this operation * @@ -283,9 +294,9 @@ public function deleteModerationVote($comment_id, $vote_id, $sso = null, string * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\VoteDeleteResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function deleteModerationVoteWithHttpInfo($comment_id, $vote_id, $sso = null, string $contentType = self::contentTypes['deleteModerationVote'][0]) + public function deleteModerationVoteWithHttpInfo($tenant_id, $comment_id, $vote_id, array $options = []) { - $request = $this->deleteModerationVoteRequest($comment_id, $vote_id, $sso, $contentType); + $request = $this->deleteModerationVoteRequest($tenant_id, $comment_id, $vote_id, $options); try { $options = $this->createHttpClientOption(); @@ -312,61 +323,21 @@ public function deleteModerationVoteWithHttpInfo($comment_id, $vote_id, $sso = n switch($statusCode) { case 200: - if ('\FastComments\Client\Model\VoteDeleteResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\VoteDeleteResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\VoteDeleteResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\VoteDeleteResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -380,34 +351,11 @@ public function deleteModerationVoteWithHttpInfo($comment_id, $vote_id, $sso = n ); } - $returnType = '\FastComments\Client\Model\VoteDeleteResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\VoteDeleteResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -417,7 +365,7 @@ public function deleteModerationVoteWithHttpInfo($comment_id, $vote_id, $sso = n $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -425,8 +373,10 @@ public function deleteModerationVoteWithHttpInfo($comment_id, $vote_id, $sso = n $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -436,17 +386,21 @@ public function deleteModerationVoteWithHttpInfo($comment_id, $vote_id, $sso = n * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param string $vote_id (required) + * @param string|null $broadcast_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteModerationVote'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteModerationVoteAsync($comment_id, $vote_id, $sso = null, string $contentType = self::contentTypes['deleteModerationVote'][0]) + public function deleteModerationVoteAsync($tenant_id, $comment_id, $vote_id, array $options = []) { - return $this->deleteModerationVoteAsyncWithHttpInfo($comment_id, $vote_id, $sso, $contentType) + return $this->deleteModerationVoteAsyncWithHttpInfo($tenant_id, $comment_id, $vote_id, $options) ->then( function ($response) { return $response[0]; @@ -459,18 +413,22 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param string $vote_id (required) + * @param string|null $broadcast_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteModerationVote'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteModerationVoteAsyncWithHttpInfo($comment_id, $vote_id, $sso = null, string $contentType = self::contentTypes['deleteModerationVote'][0]) + public function deleteModerationVoteAsyncWithHttpInfo($tenant_id, $comment_id, $vote_id, array $options = []) { $returnType = '\FastComments\Client\Model\VoteDeleteResponse'; - $request = $this->deleteModerationVoteRequest($comment_id, $vote_id, $sso, $contentType); + $request = $this->deleteModerationVoteRequest($tenant_id, $comment_id, $vote_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -511,16 +469,31 @@ function ($exception) { /** * Create request for operation 'deleteModerationVote' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param string $vote_id (required) + * @param string|null $broadcast_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteModerationVote'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteModerationVoteRequest($comment_id, $vote_id, $sso = null, string $contentType = self::contentTypes['deleteModerationVote'][0]) + public function deleteModerationVoteRequest($tenant_id, $comment_id, $vote_id, array $options = []) { + // unbox the optional parameters and request options from the $options array + $broadcast_id = array_key_exists('broadcast_id', $options) ? $options['broadcast_id'] : null; + $sso = array_key_exists('sso', $options) ? $options['sso'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['deleteModerationVote'][0]; + + // verify the required parameter 'tenant_id' is set + if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $tenant_id when calling deleteModerationVote' + ); + } // verify the required parameter 'comment_id' is set if ($comment_id === null || (is_array($comment_id) && count($comment_id) === 0)) { @@ -538,13 +511,32 @@ public function deleteModerationVoteRequest($comment_id, $vote_id, $sso = null, - $resourcePath = '/auth/my-account/moderate-comments/vote/{commentId}/{voteId}'; + + $resourcePath = '/auth/my-account/moderate-comments/mod_api/vote/{commentId}/{voteId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $tenant_id, + 'tenantId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $broadcast_id, + 'broadcastId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $sso, @@ -559,7 +551,7 @@ public function deleteModerationVoteRequest($comment_id, $vote_id, $sso = null, // path params if ($comment_id !== null) { $resourcePath = str_replace( - '{' . 'commentId' . '}', + '{commentId}', ObjectSerializer::toPathValue($comment_id), $resourcePath ); @@ -567,7 +559,7 @@ public function deleteModerationVoteRequest($comment_id, $vote_id, $sso = null, // path params if ($vote_id !== null) { $resourcePath = str_replace( - '{' . 'voteId' . '}', + '{voteId}', ObjectSerializer::toPathValue($vote_id), $resourcePath ); @@ -632,6 +624,9 @@ public function deleteModerationVoteRequest($comment_id, $vote_id, $sso = null, * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id tenant_id (required) * @param float|null $page page (optional) * @param float|null $count count (optional) * @param string|null $text_search text_search (optional) @@ -647,9 +642,9 @@ public function deleteModerationVoteRequest($comment_id, $vote_id, $sso = null, * @throws \InvalidArgumentException * @return \FastComments\Client\Model\ModerationAPIGetCommentsResponse|\FastComments\Client\Model\APIError */ - public function getApiComments($page = null, $count = null, $text_search = null, $by_ip_from_comment = null, $filters = null, $search_filters = null, $sorts = null, $demo = null, $sso = null, string $contentType = self::contentTypes['getApiComments'][0]) + public function getApiComments($tenant_id, array $options = []) { - list($response) = $this->getApiCommentsWithHttpInfo($page, $count, $text_search, $by_ip_from_comment, $filters, $search_filters, $sorts, $demo, $sso, $contentType); + list($response) = $this->getApiCommentsWithHttpInfo($tenant_id, $options); return $response; } @@ -658,6 +653,9 @@ public function getApiComments($page = null, $count = null, $text_search = null, * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param float|null $page (optional) * @param float|null $count (optional) * @param string|null $text_search (optional) @@ -673,9 +671,9 @@ public function getApiComments($page = null, $count = null, $text_search = null, * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\ModerationAPIGetCommentsResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getApiCommentsWithHttpInfo($page = null, $count = null, $text_search = null, $by_ip_from_comment = null, $filters = null, $search_filters = null, $sorts = null, $demo = null, $sso = null, string $contentType = self::contentTypes['getApiComments'][0]) + public function getApiCommentsWithHttpInfo($tenant_id, array $options = []) { - $request = $this->getApiCommentsRequest($page, $count, $text_search, $by_ip_from_comment, $filters, $search_filters, $sorts, $demo, $sso, $contentType); + $request = $this->getApiCommentsRequest($tenant_id, $options); try { $options = $this->createHttpClientOption(); @@ -702,61 +700,21 @@ public function getApiCommentsWithHttpInfo($page = null, $count = null, $text_se switch($statusCode) { case 200: - if ('\FastComments\Client\Model\ModerationAPIGetCommentsResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\ModerationAPIGetCommentsResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\ModerationAPIGetCommentsResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\ModerationAPIGetCommentsResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -770,34 +728,11 @@ public function getApiCommentsWithHttpInfo($page = null, $count = null, $text_se ); } - $returnType = '\FastComments\Client\Model\ModerationAPIGetCommentsResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\ModerationAPIGetCommentsResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -807,7 +742,7 @@ public function getApiCommentsWithHttpInfo($page = null, $count = null, $text_se $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -815,8 +750,10 @@ public function getApiCommentsWithHttpInfo($page = null, $count = null, $text_se $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -826,6 +763,9 @@ public function getApiCommentsWithHttpInfo($page = null, $count = null, $text_se * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param float|null $page (optional) * @param float|null $count (optional) * @param string|null $text_search (optional) @@ -840,9 +780,9 @@ public function getApiCommentsWithHttpInfo($page = null, $count = null, $text_se * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getApiCommentsAsync($page = null, $count = null, $text_search = null, $by_ip_from_comment = null, $filters = null, $search_filters = null, $sorts = null, $demo = null, $sso = null, string $contentType = self::contentTypes['getApiComments'][0]) + public function getApiCommentsAsync($tenant_id, array $options = []) { - return $this->getApiCommentsAsyncWithHttpInfo($page, $count, $text_search, $by_ip_from_comment, $filters, $search_filters, $sorts, $demo, $sso, $contentType) + return $this->getApiCommentsAsyncWithHttpInfo($tenant_id, $options) ->then( function ($response) { return $response[0]; @@ -855,6 +795,9 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param float|null $page (optional) * @param float|null $count (optional) * @param string|null $text_search (optional) @@ -869,10 +812,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getApiCommentsAsyncWithHttpInfo($page = null, $count = null, $text_search = null, $by_ip_from_comment = null, $filters = null, $search_filters = null, $sorts = null, $demo = null, $sso = null, string $contentType = self::contentTypes['getApiComments'][0]) + public function getApiCommentsAsyncWithHttpInfo($tenant_id, array $options = []) { $returnType = '\FastComments\Client\Model\ModerationAPIGetCommentsResponse'; - $request = $this->getApiCommentsRequest($page, $count, $text_search, $by_ip_from_comment, $filters, $search_filters, $sorts, $demo, $sso, $contentType); + $request = $this->getApiCommentsRequest($tenant_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -913,6 +856,9 @@ function ($exception) { /** * Create request for operation 'getApiComments' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param float|null $page (optional) * @param float|null $count (optional) * @param string|null $text_search (optional) @@ -927,8 +873,26 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getApiCommentsRequest($page = null, $count = null, $text_search = null, $by_ip_from_comment = null, $filters = null, $search_filters = null, $sorts = null, $demo = null, $sso = null, string $contentType = self::contentTypes['getApiComments'][0]) - { + public function getApiCommentsRequest($tenant_id, array $options = []) + { + // unbox the optional parameters and request options from the $options array + $page = array_key_exists('page', $options) ? $options['page'] : null; + $count = array_key_exists('count', $options) ? $options['count'] : null; + $text_search = array_key_exists('text_search', $options) ? $options['text_search'] : null; + $by_ip_from_comment = array_key_exists('by_ip_from_comment', $options) ? $options['by_ip_from_comment'] : null; + $filters = array_key_exists('filters', $options) ? $options['filters'] : null; + $search_filters = array_key_exists('search_filters', $options) ? $options['search_filters'] : null; + $sorts = array_key_exists('sorts', $options) ? $options['sorts'] : null; + $demo = array_key_exists('demo', $options) ? $options['demo'] : null; + $sso = array_key_exists('sso', $options) ? $options['sso'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['getApiComments'][0]; + + // verify the required parameter 'tenant_id' is set + if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $tenant_id when calling getApiComments' + ); + } @@ -940,13 +904,22 @@ public function getApiCommentsRequest($page = null, $count = null, $text_search - $resourcePath = '/auth/my-account/moderate-comments/api/comments'; + $resourcePath = '/auth/my-account/moderate-comments/mod_api/api/comments'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $tenant_id, + 'tenantId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $page, @@ -1090,6 +1063,9 @@ public function getApiCommentsRequest($page = null, $count = null, $text_search * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id tenant_id (required) * @param string|null $batch_job_id batch_job_id (optional) * @param string|null $sso sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getApiExportStatus'] to see the possible values for this operation @@ -1098,9 +1074,9 @@ public function getApiCommentsRequest($page = null, $count = null, $text_search * @throws \InvalidArgumentException * @return \FastComments\Client\Model\ModerationExportStatusResponse|\FastComments\Client\Model\APIError */ - public function getApiExportStatus($batch_job_id = null, $sso = null, string $contentType = self::contentTypes['getApiExportStatus'][0]) + public function getApiExportStatus($tenant_id, array $options = []) { - list($response) = $this->getApiExportStatusWithHttpInfo($batch_job_id, $sso, $contentType); + list($response) = $this->getApiExportStatusWithHttpInfo($tenant_id, $options); return $response; } @@ -1109,6 +1085,9 @@ public function getApiExportStatus($batch_job_id = null, $sso = null, string $co * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $batch_job_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getApiExportStatus'] to see the possible values for this operation @@ -1117,9 +1096,9 @@ public function getApiExportStatus($batch_job_id = null, $sso = null, string $co * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\ModerationExportStatusResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getApiExportStatusWithHttpInfo($batch_job_id = null, $sso = null, string $contentType = self::contentTypes['getApiExportStatus'][0]) + public function getApiExportStatusWithHttpInfo($tenant_id, array $options = []) { - $request = $this->getApiExportStatusRequest($batch_job_id, $sso, $contentType); + $request = $this->getApiExportStatusRequest($tenant_id, $options); try { $options = $this->createHttpClientOption(); @@ -1146,61 +1125,21 @@ public function getApiExportStatusWithHttpInfo($batch_job_id = null, $sso = null switch($statusCode) { case 200: - if ('\FastComments\Client\Model\ModerationExportStatusResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\ModerationExportStatusResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\ModerationExportStatusResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\ModerationExportStatusResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -1214,34 +1153,11 @@ public function getApiExportStatusWithHttpInfo($batch_job_id = null, $sso = null ); } - $returnType = '\FastComments\Client\Model\ModerationExportStatusResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\ModerationExportStatusResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1251,7 +1167,7 @@ public function getApiExportStatusWithHttpInfo($batch_job_id = null, $sso = null $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1259,8 +1175,10 @@ public function getApiExportStatusWithHttpInfo($batch_job_id = null, $sso = null $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -1270,6 +1188,9 @@ public function getApiExportStatusWithHttpInfo($batch_job_id = null, $sso = null * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $batch_job_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getApiExportStatus'] to see the possible values for this operation @@ -1277,9 +1198,9 @@ public function getApiExportStatusWithHttpInfo($batch_job_id = null, $sso = null * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getApiExportStatusAsync($batch_job_id = null, $sso = null, string $contentType = self::contentTypes['getApiExportStatus'][0]) + public function getApiExportStatusAsync($tenant_id, array $options = []) { - return $this->getApiExportStatusAsyncWithHttpInfo($batch_job_id, $sso, $contentType) + return $this->getApiExportStatusAsyncWithHttpInfo($tenant_id, $options) ->then( function ($response) { return $response[0]; @@ -1292,6 +1213,9 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $batch_job_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getApiExportStatus'] to see the possible values for this operation @@ -1299,10 +1223,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getApiExportStatusAsyncWithHttpInfo($batch_job_id = null, $sso = null, string $contentType = self::contentTypes['getApiExportStatus'][0]) + public function getApiExportStatusAsyncWithHttpInfo($tenant_id, array $options = []) { $returnType = '\FastComments\Client\Model\ModerationExportStatusResponse'; - $request = $this->getApiExportStatusRequest($batch_job_id, $sso, $contentType); + $request = $this->getApiExportStatusRequest($tenant_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1343,6 +1267,9 @@ function ($exception) { /** * Create request for operation 'getApiExportStatus' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $batch_job_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getApiExportStatus'] to see the possible values for this operation @@ -1350,19 +1277,39 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getApiExportStatusRequest($batch_job_id = null, $sso = null, string $contentType = self::contentTypes['getApiExportStatus'][0]) + public function getApiExportStatusRequest($tenant_id, array $options = []) { + // unbox the optional parameters and request options from the $options array + $batch_job_id = array_key_exists('batch_job_id', $options) ? $options['batch_job_id'] : null; + $sso = array_key_exists('sso', $options) ? $options['sso'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['getApiExportStatus'][0]; + + // verify the required parameter 'tenant_id' is set + if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $tenant_id when calling getApiExportStatus' + ); + } - $resourcePath = '/auth/my-account/moderate-comments/api/export/status'; + $resourcePath = '/auth/my-account/moderate-comments/mod_api/api/export/status'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $tenant_id, + 'tenantId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $batch_job_id, @@ -1443,6 +1390,9 @@ public function getApiExportStatusRequest($batch_job_id = null, $sso = null, str * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id tenant_id (required) * @param string|null $text_search text_search (optional) * @param string|null $by_ip_from_comment by_ip_from_comment (optional) * @param string|null $filters filters (optional) @@ -1456,9 +1406,9 @@ public function getApiExportStatusRequest($batch_job_id = null, $sso = null, str * @throws \InvalidArgumentException * @return \FastComments\Client\Model\ModerationAPIGetCommentIdsResponse|\FastComments\Client\Model\APIError */ - public function getApiIds($text_search = null, $by_ip_from_comment = null, $filters = null, $search_filters = null, $after_id = null, $demo = null, $sso = null, string $contentType = self::contentTypes['getApiIds'][0]) + public function getApiIds($tenant_id, array $options = []) { - list($response) = $this->getApiIdsWithHttpInfo($text_search, $by_ip_from_comment, $filters, $search_filters, $after_id, $demo, $sso, $contentType); + list($response) = $this->getApiIdsWithHttpInfo($tenant_id, $options); return $response; } @@ -1467,6 +1417,9 @@ public function getApiIds($text_search = null, $by_ip_from_comment = null, $filt * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $text_search (optional) * @param string|null $by_ip_from_comment (optional) * @param string|null $filters (optional) @@ -1480,9 +1433,9 @@ public function getApiIds($text_search = null, $by_ip_from_comment = null, $filt * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\ModerationAPIGetCommentIdsResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getApiIdsWithHttpInfo($text_search = null, $by_ip_from_comment = null, $filters = null, $search_filters = null, $after_id = null, $demo = null, $sso = null, string $contentType = self::contentTypes['getApiIds'][0]) + public function getApiIdsWithHttpInfo($tenant_id, array $options = []) { - $request = $this->getApiIdsRequest($text_search, $by_ip_from_comment, $filters, $search_filters, $after_id, $demo, $sso, $contentType); + $request = $this->getApiIdsRequest($tenant_id, $options); try { $options = $this->createHttpClientOption(); @@ -1509,61 +1462,21 @@ public function getApiIdsWithHttpInfo($text_search = null, $by_ip_from_comment = switch($statusCode) { case 200: - if ('\FastComments\Client\Model\ModerationAPIGetCommentIdsResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\ModerationAPIGetCommentIdsResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\ModerationAPIGetCommentIdsResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\ModerationAPIGetCommentIdsResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -1577,34 +1490,11 @@ public function getApiIdsWithHttpInfo($text_search = null, $by_ip_from_comment = ); } - $returnType = '\FastComments\Client\Model\ModerationAPIGetCommentIdsResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\ModerationAPIGetCommentIdsResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1614,7 +1504,7 @@ public function getApiIdsWithHttpInfo($text_search = null, $by_ip_from_comment = $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1622,8 +1512,10 @@ public function getApiIdsWithHttpInfo($text_search = null, $by_ip_from_comment = $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -1633,6 +1525,9 @@ public function getApiIdsWithHttpInfo($text_search = null, $by_ip_from_comment = * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $text_search (optional) * @param string|null $by_ip_from_comment (optional) * @param string|null $filters (optional) @@ -1645,9 +1540,9 @@ public function getApiIdsWithHttpInfo($text_search = null, $by_ip_from_comment = * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getApiIdsAsync($text_search = null, $by_ip_from_comment = null, $filters = null, $search_filters = null, $after_id = null, $demo = null, $sso = null, string $contentType = self::contentTypes['getApiIds'][0]) + public function getApiIdsAsync($tenant_id, array $options = []) { - return $this->getApiIdsAsyncWithHttpInfo($text_search, $by_ip_from_comment, $filters, $search_filters, $after_id, $demo, $sso, $contentType) + return $this->getApiIdsAsyncWithHttpInfo($tenant_id, $options) ->then( function ($response) { return $response[0]; @@ -1660,6 +1555,9 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $text_search (optional) * @param string|null $by_ip_from_comment (optional) * @param string|null $filters (optional) @@ -1672,10 +1570,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getApiIdsAsyncWithHttpInfo($text_search = null, $by_ip_from_comment = null, $filters = null, $search_filters = null, $after_id = null, $demo = null, $sso = null, string $contentType = self::contentTypes['getApiIds'][0]) + public function getApiIdsAsyncWithHttpInfo($tenant_id, array $options = []) { $returnType = '\FastComments\Client\Model\ModerationAPIGetCommentIdsResponse'; - $request = $this->getApiIdsRequest($text_search, $by_ip_from_comment, $filters, $search_filters, $after_id, $demo, $sso, $contentType); + $request = $this->getApiIdsRequest($tenant_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1716,6 +1614,9 @@ function ($exception) { /** * Create request for operation 'getApiIds' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $text_search (optional) * @param string|null $by_ip_from_comment (optional) * @param string|null $filters (optional) @@ -1728,8 +1629,24 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getApiIdsRequest($text_search = null, $by_ip_from_comment = null, $filters = null, $search_filters = null, $after_id = null, $demo = null, $sso = null, string $contentType = self::contentTypes['getApiIds'][0]) - { + public function getApiIdsRequest($tenant_id, array $options = []) + { + // unbox the optional parameters and request options from the $options array + $text_search = array_key_exists('text_search', $options) ? $options['text_search'] : null; + $by_ip_from_comment = array_key_exists('by_ip_from_comment', $options) ? $options['by_ip_from_comment'] : null; + $filters = array_key_exists('filters', $options) ? $options['filters'] : null; + $search_filters = array_key_exists('search_filters', $options) ? $options['search_filters'] : null; + $after_id = array_key_exists('after_id', $options) ? $options['after_id'] : null; + $demo = array_key_exists('demo', $options) ? $options['demo'] : null; + $sso = array_key_exists('sso', $options) ? $options['sso'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['getApiIds'][0]; + + // verify the required parameter 'tenant_id' is set + if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $tenant_id when calling getApiIds' + ); + } @@ -1739,13 +1656,22 @@ public function getApiIdsRequest($text_search = null, $by_ip_from_comment = null - $resourcePath = '/auth/my-account/moderate-comments/api/ids'; + $resourcePath = '/auth/my-account/moderate-comments/mod_api/api/ids'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $tenant_id, + 'tenantId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $text_search, @@ -1871,6 +1797,9 @@ public function getApiIdsRequest($text_search = null, $by_ip_from_comment = null * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id tenant_id (required) * @param string $comment_id comment_id (required) * @param string|null $sso sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBanUsersFromComment'] to see the possible values for this operation @@ -1879,9 +1808,9 @@ public function getApiIdsRequest($text_search = null, $by_ip_from_comment = null * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetBannedUsersFromCommentResponse|\FastComments\Client\Model\APIError */ - public function getBanUsersFromComment($comment_id, $sso = null, string $contentType = self::contentTypes['getBanUsersFromComment'][0]) + public function getBanUsersFromComment($tenant_id, $comment_id, $sso = null) { - list($response) = $this->getBanUsersFromCommentWithHttpInfo($comment_id, $sso, $contentType); + list($response) = $this->getBanUsersFromCommentWithHttpInfo($tenant_id, $comment_id, $sso); return $response; } @@ -1890,6 +1819,9 @@ public function getBanUsersFromComment($comment_id, $sso = null, string $content * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBanUsersFromComment'] to see the possible values for this operation @@ -1898,9 +1830,9 @@ public function getBanUsersFromComment($comment_id, $sso = null, string $content * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetBannedUsersFromCommentResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getBanUsersFromCommentWithHttpInfo($comment_id, $sso = null, string $contentType = self::contentTypes['getBanUsersFromComment'][0]) + public function getBanUsersFromCommentWithHttpInfo($tenant_id, $comment_id, $sso = null) { - $request = $this->getBanUsersFromCommentRequest($comment_id, $sso, $contentType); + $request = $this->getBanUsersFromCommentRequest($tenant_id, $comment_id, $sso); try { $options = $this->createHttpClientOption(); @@ -1927,61 +1859,21 @@ public function getBanUsersFromCommentWithHttpInfo($comment_id, $sso = null, str switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetBannedUsersFromCommentResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetBannedUsersFromCommentResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetBannedUsersFromCommentResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetBannedUsersFromCommentResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -1995,34 +1887,11 @@ public function getBanUsersFromCommentWithHttpInfo($comment_id, $sso = null, str ); } - $returnType = '\FastComments\Client\Model\GetBannedUsersFromCommentResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetBannedUsersFromCommentResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2032,7 +1901,7 @@ public function getBanUsersFromCommentWithHttpInfo($comment_id, $sso = null, str $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -2040,8 +1909,10 @@ public function getBanUsersFromCommentWithHttpInfo($comment_id, $sso = null, str $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -2051,6 +1922,9 @@ public function getBanUsersFromCommentWithHttpInfo($comment_id, $sso = null, str * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBanUsersFromComment'] to see the possible values for this operation @@ -2058,9 +1932,9 @@ public function getBanUsersFromCommentWithHttpInfo($comment_id, $sso = null, str * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getBanUsersFromCommentAsync($comment_id, $sso = null, string $contentType = self::contentTypes['getBanUsersFromComment'][0]) + public function getBanUsersFromCommentAsync($tenant_id, $comment_id, $sso = null) { - return $this->getBanUsersFromCommentAsyncWithHttpInfo($comment_id, $sso, $contentType) + return $this->getBanUsersFromCommentAsyncWithHttpInfo($tenant_id, $comment_id, $sso) ->then( function ($response) { return $response[0]; @@ -2073,6 +1947,9 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBanUsersFromComment'] to see the possible values for this operation @@ -2080,10 +1957,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getBanUsersFromCommentAsyncWithHttpInfo($comment_id, $sso = null, string $contentType = self::contentTypes['getBanUsersFromComment'][0]) + public function getBanUsersFromCommentAsyncWithHttpInfo($tenant_id, $comment_id, $sso = null) { $returnType = '\FastComments\Client\Model\GetBannedUsersFromCommentResponse'; - $request = $this->getBanUsersFromCommentRequest($comment_id, $sso, $contentType); + $request = $this->getBanUsersFromCommentRequest($tenant_id, $comment_id, $sso); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2124,6 +2001,9 @@ function ($exception) { /** * Create request for operation 'getBanUsersFromComment' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBanUsersFromComment'] to see the possible values for this operation @@ -2131,8 +2011,16 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getBanUsersFromCommentRequest($comment_id, $sso = null, string $contentType = self::contentTypes['getBanUsersFromComment'][0]) + public function getBanUsersFromCommentRequest($tenant_id, $comment_id, $sso = null) { + $contentType = self::contentTypes['getBanUsersFromComment'][0]; + + // verify the required parameter 'tenant_id' is set + if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $tenant_id when calling getBanUsersFromComment' + ); + } // verify the required parameter 'comment_id' is set if ($comment_id === null || (is_array($comment_id) && count($comment_id) === 0)) { @@ -2143,7 +2031,7 @@ public function getBanUsersFromCommentRequest($comment_id, $sso = null, string $ - $resourcePath = '/auth/my-account/moderate-comments/ban-users/from-comment/{commentId}'; + $resourcePath = '/auth/my-account/moderate-comments/mod_api/ban-users/from-comment/{commentId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -2152,7 +2040,16 @@ public function getBanUsersFromCommentRequest($comment_id, $sso = null, string $ // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $sso, + $tenant_id, + 'tenantId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $sso, 'sso', // param base name 'string', // openApiType 'form', // style @@ -2164,7 +2061,7 @@ public function getBanUsersFromCommentRequest($comment_id, $sso = null, string $ // path params if ($comment_id !== null) { $resourcePath = str_replace( - '{' . 'commentId' . '}', + '{commentId}', ObjectSerializer::toPathValue($comment_id), $resourcePath ); @@ -2229,6 +2126,9 @@ public function getBanUsersFromCommentRequest($comment_id, $sso = null, string $ * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id tenant_id (required) * @param string $comment_id comment_id (required) * @param string|null $sso sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getCommentBanStatus'] to see the possible values for this operation @@ -2237,9 +2137,9 @@ public function getBanUsersFromCommentRequest($comment_id, $sso = null, string $ * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetCommentBanStatusResponse|\FastComments\Client\Model\APIError */ - public function getCommentBanStatus($comment_id, $sso = null, string $contentType = self::contentTypes['getCommentBanStatus'][0]) + public function getCommentBanStatus($tenant_id, $comment_id, $sso = null) { - list($response) = $this->getCommentBanStatusWithHttpInfo($comment_id, $sso, $contentType); + list($response) = $this->getCommentBanStatusWithHttpInfo($tenant_id, $comment_id, $sso); return $response; } @@ -2248,6 +2148,9 @@ public function getCommentBanStatus($comment_id, $sso = null, string $contentTyp * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getCommentBanStatus'] to see the possible values for this operation @@ -2256,9 +2159,9 @@ public function getCommentBanStatus($comment_id, $sso = null, string $contentTyp * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetCommentBanStatusResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getCommentBanStatusWithHttpInfo($comment_id, $sso = null, string $contentType = self::contentTypes['getCommentBanStatus'][0]) + public function getCommentBanStatusWithHttpInfo($tenant_id, $comment_id, $sso = null) { - $request = $this->getCommentBanStatusRequest($comment_id, $sso, $contentType); + $request = $this->getCommentBanStatusRequest($tenant_id, $comment_id, $sso); try { $options = $this->createHttpClientOption(); @@ -2285,61 +2188,21 @@ public function getCommentBanStatusWithHttpInfo($comment_id, $sso = null, string switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetCommentBanStatusResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetCommentBanStatusResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetCommentBanStatusResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetCommentBanStatusResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -2353,34 +2216,11 @@ public function getCommentBanStatusWithHttpInfo($comment_id, $sso = null, string ); } - $returnType = '\FastComments\Client\Model\GetCommentBanStatusResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetCommentBanStatusResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2390,7 +2230,7 @@ public function getCommentBanStatusWithHttpInfo($comment_id, $sso = null, string $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -2398,8 +2238,10 @@ public function getCommentBanStatusWithHttpInfo($comment_id, $sso = null, string $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -2409,6 +2251,9 @@ public function getCommentBanStatusWithHttpInfo($comment_id, $sso = null, string * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getCommentBanStatus'] to see the possible values for this operation @@ -2416,9 +2261,9 @@ public function getCommentBanStatusWithHttpInfo($comment_id, $sso = null, string * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCommentBanStatusAsync($comment_id, $sso = null, string $contentType = self::contentTypes['getCommentBanStatus'][0]) + public function getCommentBanStatusAsync($tenant_id, $comment_id, $sso = null) { - return $this->getCommentBanStatusAsyncWithHttpInfo($comment_id, $sso, $contentType) + return $this->getCommentBanStatusAsyncWithHttpInfo($tenant_id, $comment_id, $sso) ->then( function ($response) { return $response[0]; @@ -2431,6 +2276,9 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getCommentBanStatus'] to see the possible values for this operation @@ -2438,10 +2286,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCommentBanStatusAsyncWithHttpInfo($comment_id, $sso = null, string $contentType = self::contentTypes['getCommentBanStatus'][0]) + public function getCommentBanStatusAsyncWithHttpInfo($tenant_id, $comment_id, $sso = null) { $returnType = '\FastComments\Client\Model\GetCommentBanStatusResponse'; - $request = $this->getCommentBanStatusRequest($comment_id, $sso, $contentType); + $request = $this->getCommentBanStatusRequest($tenant_id, $comment_id, $sso); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2482,6 +2330,9 @@ function ($exception) { /** * Create request for operation 'getCommentBanStatus' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getCommentBanStatus'] to see the possible values for this operation @@ -2489,8 +2340,16 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getCommentBanStatusRequest($comment_id, $sso = null, string $contentType = self::contentTypes['getCommentBanStatus'][0]) + public function getCommentBanStatusRequest($tenant_id, $comment_id, $sso = null) { + $contentType = self::contentTypes['getCommentBanStatus'][0]; + + // verify the required parameter 'tenant_id' is set + if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $tenant_id when calling getCommentBanStatus' + ); + } // verify the required parameter 'comment_id' is set if ($comment_id === null || (is_array($comment_id) && count($comment_id) === 0)) { @@ -2501,13 +2360,22 @@ public function getCommentBanStatusRequest($comment_id, $sso = null, string $con - $resourcePath = '/auth/my-account/moderate-comments/get-comment-ban-status/{commentId}'; + $resourcePath = '/auth/my-account/moderate-comments/mod_api/get-comment-ban-status/{commentId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $tenant_id, + 'tenantId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $sso, @@ -2522,7 +2390,7 @@ public function getCommentBanStatusRequest($comment_id, $sso = null, string $con // path params if ($comment_id !== null) { $resourcePath = str_replace( - '{' . 'commentId' . '}', + '{commentId}', ObjectSerializer::toPathValue($comment_id), $resourcePath ); @@ -2587,6 +2455,9 @@ public function getCommentBanStatusRequest($comment_id, $sso = null, string $con * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id tenant_id (required) * @param string $comment_id comment_id (required) * @param string|null $sso sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getCommentChildren'] to see the possible values for this operation @@ -2595,9 +2466,9 @@ public function getCommentBanStatusRequest($comment_id, $sso = null, string $con * @throws \InvalidArgumentException * @return \FastComments\Client\Model\ModerationAPIChildCommentsResponse|\FastComments\Client\Model\APIError */ - public function getCommentChildren($comment_id, $sso = null, string $contentType = self::contentTypes['getCommentChildren'][0]) + public function getCommentChildren($tenant_id, $comment_id, $sso = null) { - list($response) = $this->getCommentChildrenWithHttpInfo($comment_id, $sso, $contentType); + list($response) = $this->getCommentChildrenWithHttpInfo($tenant_id, $comment_id, $sso); return $response; } @@ -2606,6 +2477,9 @@ public function getCommentChildren($comment_id, $sso = null, string $contentType * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getCommentChildren'] to see the possible values for this operation @@ -2614,9 +2488,9 @@ public function getCommentChildren($comment_id, $sso = null, string $contentType * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\ModerationAPIChildCommentsResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getCommentChildrenWithHttpInfo($comment_id, $sso = null, string $contentType = self::contentTypes['getCommentChildren'][0]) + public function getCommentChildrenWithHttpInfo($tenant_id, $comment_id, $sso = null) { - $request = $this->getCommentChildrenRequest($comment_id, $sso, $contentType); + $request = $this->getCommentChildrenRequest($tenant_id, $comment_id, $sso); try { $options = $this->createHttpClientOption(); @@ -2643,61 +2517,21 @@ public function getCommentChildrenWithHttpInfo($comment_id, $sso = null, string switch($statusCode) { case 200: - if ('\FastComments\Client\Model\ModerationAPIChildCommentsResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\ModerationAPIChildCommentsResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\ModerationAPIChildCommentsResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\ModerationAPIChildCommentsResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -2711,34 +2545,11 @@ public function getCommentChildrenWithHttpInfo($comment_id, $sso = null, string ); } - $returnType = '\FastComments\Client\Model\ModerationAPIChildCommentsResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\ModerationAPIChildCommentsResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2748,7 +2559,7 @@ public function getCommentChildrenWithHttpInfo($comment_id, $sso = null, string $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -2756,8 +2567,10 @@ public function getCommentChildrenWithHttpInfo($comment_id, $sso = null, string $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -2767,6 +2580,9 @@ public function getCommentChildrenWithHttpInfo($comment_id, $sso = null, string * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getCommentChildren'] to see the possible values for this operation @@ -2774,9 +2590,9 @@ public function getCommentChildrenWithHttpInfo($comment_id, $sso = null, string * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCommentChildrenAsync($comment_id, $sso = null, string $contentType = self::contentTypes['getCommentChildren'][0]) + public function getCommentChildrenAsync($tenant_id, $comment_id, $sso = null) { - return $this->getCommentChildrenAsyncWithHttpInfo($comment_id, $sso, $contentType) + return $this->getCommentChildrenAsyncWithHttpInfo($tenant_id, $comment_id, $sso) ->then( function ($response) { return $response[0]; @@ -2789,6 +2605,9 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getCommentChildren'] to see the possible values for this operation @@ -2796,10 +2615,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCommentChildrenAsyncWithHttpInfo($comment_id, $sso = null, string $contentType = self::contentTypes['getCommentChildren'][0]) + public function getCommentChildrenAsyncWithHttpInfo($tenant_id, $comment_id, $sso = null) { $returnType = '\FastComments\Client\Model\ModerationAPIChildCommentsResponse'; - $request = $this->getCommentChildrenRequest($comment_id, $sso, $contentType); + $request = $this->getCommentChildrenRequest($tenant_id, $comment_id, $sso); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2840,6 +2659,9 @@ function ($exception) { /** * Create request for operation 'getCommentChildren' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getCommentChildren'] to see the possible values for this operation @@ -2847,8 +2669,16 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getCommentChildrenRequest($comment_id, $sso = null, string $contentType = self::contentTypes['getCommentChildren'][0]) + public function getCommentChildrenRequest($tenant_id, $comment_id, $sso = null) { + $contentType = self::contentTypes['getCommentChildren'][0]; + + // verify the required parameter 'tenant_id' is set + if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $tenant_id when calling getCommentChildren' + ); + } // verify the required parameter 'comment_id' is set if ($comment_id === null || (is_array($comment_id) && count($comment_id) === 0)) { @@ -2859,13 +2689,22 @@ public function getCommentChildrenRequest($comment_id, $sso = null, string $cont - $resourcePath = '/auth/my-account/moderate-comments/comment-children/{commentId}'; + $resourcePath = '/auth/my-account/moderate-comments/mod_api/comment-children/{commentId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $tenant_id, + 'tenantId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $sso, @@ -2880,7 +2719,7 @@ public function getCommentChildrenRequest($comment_id, $sso = null, string $cont // path params if ($comment_id !== null) { $resourcePath = str_replace( - '{' . 'commentId' . '}', + '{commentId}', ObjectSerializer::toPathValue($comment_id), $resourcePath ); @@ -2945,6 +2784,9 @@ public function getCommentChildrenRequest($comment_id, $sso = null, string $cont * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id tenant_id (required) * @param string|null $text_search text_search (optional) * @param string|null $by_ip_from_comment by_ip_from_comment (optional) * @param string|null $filter filter (optional) @@ -2957,9 +2799,9 @@ public function getCommentChildrenRequest($comment_id, $sso = null, string $cont * @throws \InvalidArgumentException * @return \FastComments\Client\Model\ModerationAPICountCommentsResponse|\FastComments\Client\Model\APIError */ - public function getCount($text_search = null, $by_ip_from_comment = null, $filter = null, $search_filters = null, $demo = null, $sso = null, string $contentType = self::contentTypes['getCount'][0]) + public function getCount($tenant_id, array $options = []) { - list($response) = $this->getCountWithHttpInfo($text_search, $by_ip_from_comment, $filter, $search_filters, $demo, $sso, $contentType); + list($response) = $this->getCountWithHttpInfo($tenant_id, $options); return $response; } @@ -2968,6 +2810,9 @@ public function getCount($text_search = null, $by_ip_from_comment = null, $filte * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $text_search (optional) * @param string|null $by_ip_from_comment (optional) * @param string|null $filter (optional) @@ -2980,9 +2825,9 @@ public function getCount($text_search = null, $by_ip_from_comment = null, $filte * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\ModerationAPICountCommentsResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getCountWithHttpInfo($text_search = null, $by_ip_from_comment = null, $filter = null, $search_filters = null, $demo = null, $sso = null, string $contentType = self::contentTypes['getCount'][0]) + public function getCountWithHttpInfo($tenant_id, array $options = []) { - $request = $this->getCountRequest($text_search, $by_ip_from_comment, $filter, $search_filters, $demo, $sso, $contentType); + $request = $this->getCountRequest($tenant_id, $options); try { $options = $this->createHttpClientOption(); @@ -3009,61 +2854,21 @@ public function getCountWithHttpInfo($text_search = null, $by_ip_from_comment = switch($statusCode) { case 200: - if ('\FastComments\Client\Model\ModerationAPICountCommentsResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\ModerationAPICountCommentsResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\ModerationAPICountCommentsResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\ModerationAPICountCommentsResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -3077,34 +2882,11 @@ public function getCountWithHttpInfo($text_search = null, $by_ip_from_comment = ); } - $returnType = '\FastComments\Client\Model\ModerationAPICountCommentsResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\ModerationAPICountCommentsResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3114,7 +2896,7 @@ public function getCountWithHttpInfo($text_search = null, $by_ip_from_comment = $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -3122,8 +2904,10 @@ public function getCountWithHttpInfo($text_search = null, $by_ip_from_comment = $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -3133,6 +2917,9 @@ public function getCountWithHttpInfo($text_search = null, $by_ip_from_comment = * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $text_search (optional) * @param string|null $by_ip_from_comment (optional) * @param string|null $filter (optional) @@ -3144,9 +2931,9 @@ public function getCountWithHttpInfo($text_search = null, $by_ip_from_comment = * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCountAsync($text_search = null, $by_ip_from_comment = null, $filter = null, $search_filters = null, $demo = null, $sso = null, string $contentType = self::contentTypes['getCount'][0]) + public function getCountAsync($tenant_id, array $options = []) { - return $this->getCountAsyncWithHttpInfo($text_search, $by_ip_from_comment, $filter, $search_filters, $demo, $sso, $contentType) + return $this->getCountAsyncWithHttpInfo($tenant_id, $options) ->then( function ($response) { return $response[0]; @@ -3159,6 +2946,9 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $text_search (optional) * @param string|null $by_ip_from_comment (optional) * @param string|null $filter (optional) @@ -3170,10 +2960,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCountAsyncWithHttpInfo($text_search = null, $by_ip_from_comment = null, $filter = null, $search_filters = null, $demo = null, $sso = null, string $contentType = self::contentTypes['getCount'][0]) + public function getCountAsyncWithHttpInfo($tenant_id, array $options = []) { $returnType = '\FastComments\Client\Model\ModerationAPICountCommentsResponse'; - $request = $this->getCountRequest($text_search, $by_ip_from_comment, $filter, $search_filters, $demo, $sso, $contentType); + $request = $this->getCountRequest($tenant_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3214,6 +3004,9 @@ function ($exception) { /** * Create request for operation 'getCount' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $text_search (optional) * @param string|null $by_ip_from_comment (optional) * @param string|null $filter (optional) @@ -3225,8 +3018,23 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getCountRequest($text_search = null, $by_ip_from_comment = null, $filter = null, $search_filters = null, $demo = null, $sso = null, string $contentType = self::contentTypes['getCount'][0]) - { + public function getCountRequest($tenant_id, array $options = []) + { + // unbox the optional parameters and request options from the $options array + $text_search = array_key_exists('text_search', $options) ? $options['text_search'] : null; + $by_ip_from_comment = array_key_exists('by_ip_from_comment', $options) ? $options['by_ip_from_comment'] : null; + $filter = array_key_exists('filter', $options) ? $options['filter'] : null; + $search_filters = array_key_exists('search_filters', $options) ? $options['search_filters'] : null; + $demo = array_key_exists('demo', $options) ? $options['demo'] : null; + $sso = array_key_exists('sso', $options) ? $options['sso'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['getCount'][0]; + + // verify the required parameter 'tenant_id' is set + if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $tenant_id when calling getCount' + ); + } @@ -3235,13 +3043,22 @@ public function getCountRequest($text_search = null, $by_ip_from_comment = null, - $resourcePath = '/auth/my-account/moderate-comments/count'; + $resourcePath = '/auth/my-account/moderate-comments/mod_api/count'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $tenant_id, + 'tenantId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $text_search, @@ -3358,6 +3175,9 @@ public function getCountRequest($text_search = null, $by_ip_from_comment = null, * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id tenant_id (required) * @param string|null $sso sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getCounts'] to see the possible values for this operation * @@ -3365,9 +3185,9 @@ public function getCountRequest($text_search = null, $by_ip_from_comment = null, * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetBannedUsersCountResponse|\FastComments\Client\Model\APIError */ - public function getCounts($sso = null, string $contentType = self::contentTypes['getCounts'][0]) + public function getCounts($tenant_id, $sso = null) { - list($response) = $this->getCountsWithHttpInfo($sso, $contentType); + list($response) = $this->getCountsWithHttpInfo($tenant_id, $sso); return $response; } @@ -3376,6 +3196,9 @@ public function getCounts($sso = null, string $contentType = self::contentTypes[ * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getCounts'] to see the possible values for this operation * @@ -3383,9 +3206,9 @@ public function getCounts($sso = null, string $contentType = self::contentTypes[ * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetBannedUsersCountResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getCountsWithHttpInfo($sso = null, string $contentType = self::contentTypes['getCounts'][0]) + public function getCountsWithHttpInfo($tenant_id, $sso = null) { - $request = $this->getCountsRequest($sso, $contentType); + $request = $this->getCountsRequest($tenant_id, $sso); try { $options = $this->createHttpClientOption(); @@ -3412,61 +3235,21 @@ public function getCountsWithHttpInfo($sso = null, string $contentType = self::c switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetBannedUsersCountResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetBannedUsersCountResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetBannedUsersCountResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetBannedUsersCountResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -3480,34 +3263,11 @@ public function getCountsWithHttpInfo($sso = null, string $contentType = self::c ); } - $returnType = '\FastComments\Client\Model\GetBannedUsersCountResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetBannedUsersCountResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3517,7 +3277,7 @@ public function getCountsWithHttpInfo($sso = null, string $contentType = self::c $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -3525,8 +3285,10 @@ public function getCountsWithHttpInfo($sso = null, string $contentType = self::c $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -3536,15 +3298,18 @@ public function getCountsWithHttpInfo($sso = null, string $contentType = self::c * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getCounts'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCountsAsync($sso = null, string $contentType = self::contentTypes['getCounts'][0]) + public function getCountsAsync($tenant_id, $sso = null) { - return $this->getCountsAsyncWithHttpInfo($sso, $contentType) + return $this->getCountsAsyncWithHttpInfo($tenant_id, $sso) ->then( function ($response) { return $response[0]; @@ -3557,16 +3322,19 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getCounts'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCountsAsyncWithHttpInfo($sso = null, string $contentType = self::contentTypes['getCounts'][0]) + public function getCountsAsyncWithHttpInfo($tenant_id, $sso = null) { $returnType = '\FastComments\Client\Model\GetBannedUsersCountResponse'; - $request = $this->getCountsRequest($sso, $contentType); + $request = $this->getCountsRequest($tenant_id, $sso); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3607,24 +3375,44 @@ function ($exception) { /** * Create request for operation 'getCounts' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getCounts'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getCountsRequest($sso = null, string $contentType = self::contentTypes['getCounts'][0]) + public function getCountsRequest($tenant_id, $sso = null) { + $contentType = self::contentTypes['getCounts'][0]; + + // verify the required parameter 'tenant_id' is set + if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $tenant_id when calling getCounts' + ); + } - $resourcePath = '/auth/my-account/moderate-comments/banned-users/counts'; + $resourcePath = '/auth/my-account/moderate-comments/banned-users/mod_api/counts'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $tenant_id, + 'tenantId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $sso, @@ -3696,6 +3484,9 @@ public function getCountsRequest($sso = null, string $contentType = self::conten * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id tenant_id (required) * @param string $comment_id comment_id (required) * @param string|null $sso sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getLogs'] to see the possible values for this operation @@ -3704,9 +3495,9 @@ public function getCountsRequest($sso = null, string $contentType = self::conten * @throws \InvalidArgumentException * @return \FastComments\Client\Model\ModerationAPIGetLogsResponse|\FastComments\Client\Model\APIError */ - public function getLogs($comment_id, $sso = null, string $contentType = self::contentTypes['getLogs'][0]) + public function getLogs($tenant_id, $comment_id, $sso = null) { - list($response) = $this->getLogsWithHttpInfo($comment_id, $sso, $contentType); + list($response) = $this->getLogsWithHttpInfo($tenant_id, $comment_id, $sso); return $response; } @@ -3715,6 +3506,9 @@ public function getLogs($comment_id, $sso = null, string $contentType = self::co * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getLogs'] to see the possible values for this operation @@ -3723,9 +3517,9 @@ public function getLogs($comment_id, $sso = null, string $contentType = self::co * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\ModerationAPIGetLogsResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getLogsWithHttpInfo($comment_id, $sso = null, string $contentType = self::contentTypes['getLogs'][0]) + public function getLogsWithHttpInfo($tenant_id, $comment_id, $sso = null) { - $request = $this->getLogsRequest($comment_id, $sso, $contentType); + $request = $this->getLogsRequest($tenant_id, $comment_id, $sso); try { $options = $this->createHttpClientOption(); @@ -3752,61 +3546,21 @@ public function getLogsWithHttpInfo($comment_id, $sso = null, string $contentTyp switch($statusCode) { case 200: - if ('\FastComments\Client\Model\ModerationAPIGetLogsResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\ModerationAPIGetLogsResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\ModerationAPIGetLogsResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\ModerationAPIGetLogsResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -3820,34 +3574,11 @@ public function getLogsWithHttpInfo($comment_id, $sso = null, string $contentTyp ); } - $returnType = '\FastComments\Client\Model\ModerationAPIGetLogsResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\ModerationAPIGetLogsResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3857,7 +3588,7 @@ public function getLogsWithHttpInfo($comment_id, $sso = null, string $contentTyp $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -3865,8 +3596,10 @@ public function getLogsWithHttpInfo($comment_id, $sso = null, string $contentTyp $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -3876,6 +3609,9 @@ public function getLogsWithHttpInfo($comment_id, $sso = null, string $contentTyp * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getLogs'] to see the possible values for this operation @@ -3883,9 +3619,9 @@ public function getLogsWithHttpInfo($comment_id, $sso = null, string $contentTyp * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getLogsAsync($comment_id, $sso = null, string $contentType = self::contentTypes['getLogs'][0]) + public function getLogsAsync($tenant_id, $comment_id, $sso = null) { - return $this->getLogsAsyncWithHttpInfo($comment_id, $sso, $contentType) + return $this->getLogsAsyncWithHttpInfo($tenant_id, $comment_id, $sso) ->then( function ($response) { return $response[0]; @@ -3898,6 +3634,9 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getLogs'] to see the possible values for this operation @@ -3905,10 +3644,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getLogsAsyncWithHttpInfo($comment_id, $sso = null, string $contentType = self::contentTypes['getLogs'][0]) + public function getLogsAsyncWithHttpInfo($tenant_id, $comment_id, $sso = null) { $returnType = '\FastComments\Client\Model\ModerationAPIGetLogsResponse'; - $request = $this->getLogsRequest($comment_id, $sso, $contentType); + $request = $this->getLogsRequest($tenant_id, $comment_id, $sso); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3949,6 +3688,9 @@ function ($exception) { /** * Create request for operation 'getLogs' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getLogs'] to see the possible values for this operation @@ -3956,8 +3698,16 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getLogsRequest($comment_id, $sso = null, string $contentType = self::contentTypes['getLogs'][0]) + public function getLogsRequest($tenant_id, $comment_id, $sso = null) { + $contentType = self::contentTypes['getLogs'][0]; + + // verify the required parameter 'tenant_id' is set + if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $tenant_id when calling getLogs' + ); + } // verify the required parameter 'comment_id' is set if ($comment_id === null || (is_array($comment_id) && count($comment_id) === 0)) { @@ -3968,13 +3718,22 @@ public function getLogsRequest($comment_id, $sso = null, string $contentType = s - $resourcePath = '/auth/my-account/moderate-comments/logs/{commentId}'; + $resourcePath = '/auth/my-account/moderate-comments/mod_api/logs/{commentId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $tenant_id, + 'tenantId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $sso, @@ -3989,7 +3748,7 @@ public function getLogsRequest($comment_id, $sso = null, string $contentType = s // path params if ($comment_id !== null) { $resourcePath = str_replace( - '{' . 'commentId' . '}', + '{commentId}', ObjectSerializer::toPathValue($comment_id), $resourcePath ); @@ -4054,6 +3813,9 @@ public function getLogsRequest($comment_id, $sso = null, string $contentType = s * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id tenant_id (required) * @param string|null $sso sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getManualBadges'] to see the possible values for this operation * @@ -4061,9 +3823,9 @@ public function getLogsRequest($comment_id, $sso = null, string $contentType = s * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetTenantManualBadgesResponse|\FastComments\Client\Model\APIError */ - public function getManualBadges($sso = null, string $contentType = self::contentTypes['getManualBadges'][0]) + public function getManualBadges($tenant_id, $sso = null) { - list($response) = $this->getManualBadgesWithHttpInfo($sso, $contentType); + list($response) = $this->getManualBadgesWithHttpInfo($tenant_id, $sso); return $response; } @@ -4072,6 +3834,9 @@ public function getManualBadges($sso = null, string $contentType = self::content * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getManualBadges'] to see the possible values for this operation * @@ -4079,9 +3844,9 @@ public function getManualBadges($sso = null, string $contentType = self::content * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetTenantManualBadgesResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getManualBadgesWithHttpInfo($sso = null, string $contentType = self::contentTypes['getManualBadges'][0]) + public function getManualBadgesWithHttpInfo($tenant_id, $sso = null) { - $request = $this->getManualBadgesRequest($sso, $contentType); + $request = $this->getManualBadgesRequest($tenant_id, $sso); try { $options = $this->createHttpClientOption(); @@ -4108,61 +3873,21 @@ public function getManualBadgesWithHttpInfo($sso = null, string $contentType = s switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetTenantManualBadgesResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetTenantManualBadgesResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetTenantManualBadgesResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetTenantManualBadgesResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -4176,34 +3901,11 @@ public function getManualBadgesWithHttpInfo($sso = null, string $contentType = s ); } - $returnType = '\FastComments\Client\Model\GetTenantManualBadgesResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetTenantManualBadgesResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -4213,7 +3915,7 @@ public function getManualBadgesWithHttpInfo($sso = null, string $contentType = s $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -4221,8 +3923,10 @@ public function getManualBadgesWithHttpInfo($sso = null, string $contentType = s $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -4232,15 +3936,18 @@ public function getManualBadgesWithHttpInfo($sso = null, string $contentType = s * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getManualBadges'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getManualBadgesAsync($sso = null, string $contentType = self::contentTypes['getManualBadges'][0]) + public function getManualBadgesAsync($tenant_id, $sso = null) { - return $this->getManualBadgesAsyncWithHttpInfo($sso, $contentType) + return $this->getManualBadgesAsyncWithHttpInfo($tenant_id, $sso) ->then( function ($response) { return $response[0]; @@ -4253,16 +3960,19 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getManualBadges'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getManualBadgesAsyncWithHttpInfo($sso = null, string $contentType = self::contentTypes['getManualBadges'][0]) + public function getManualBadgesAsyncWithHttpInfo($tenant_id, $sso = null) { $returnType = '\FastComments\Client\Model\GetTenantManualBadgesResponse'; - $request = $this->getManualBadgesRequest($sso, $contentType); + $request = $this->getManualBadgesRequest($tenant_id, $sso); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4303,24 +4013,44 @@ function ($exception) { /** * Create request for operation 'getManualBadges' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getManualBadges'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getManualBadgesRequest($sso = null, string $contentType = self::contentTypes['getManualBadges'][0]) + public function getManualBadgesRequest($tenant_id, $sso = null) { + $contentType = self::contentTypes['getManualBadges'][0]; + + // verify the required parameter 'tenant_id' is set + if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $tenant_id when calling getManualBadges' + ); + } - $resourcePath = '/auth/my-account/moderate-comments/get-manual-badges'; + $resourcePath = '/auth/my-account/moderate-comments/mod_api/get-manual-badges'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $tenant_id, + 'tenantId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $sso, @@ -4392,6 +4122,9 @@ public function getManualBadgesRequest($sso = null, string $contentType = self:: * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id tenant_id (required) * @param string|null $badges_user_id badges_user_id (optional) * @param string|null $comment_id comment_id (optional) * @param string|null $sso sso (optional) @@ -4401,9 +4134,9 @@ public function getManualBadgesRequest($sso = null, string $contentType = self:: * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetUserManualBadgesResponse|\FastComments\Client\Model\APIError */ - public function getManualBadgesForUser($badges_user_id = null, $comment_id = null, $sso = null, string $contentType = self::contentTypes['getManualBadgesForUser'][0]) + public function getManualBadgesForUser($tenant_id, array $options = []) { - list($response) = $this->getManualBadgesForUserWithHttpInfo($badges_user_id, $comment_id, $sso, $contentType); + list($response) = $this->getManualBadgesForUserWithHttpInfo($tenant_id, $options); return $response; } @@ -4412,6 +4145,9 @@ public function getManualBadgesForUser($badges_user_id = null, $comment_id = nul * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $badges_user_id (optional) * @param string|null $comment_id (optional) * @param string|null $sso (optional) @@ -4421,9 +4157,9 @@ public function getManualBadgesForUser($badges_user_id = null, $comment_id = nul * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetUserManualBadgesResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getManualBadgesForUserWithHttpInfo($badges_user_id = null, $comment_id = null, $sso = null, string $contentType = self::contentTypes['getManualBadgesForUser'][0]) + public function getManualBadgesForUserWithHttpInfo($tenant_id, array $options = []) { - $request = $this->getManualBadgesForUserRequest($badges_user_id, $comment_id, $sso, $contentType); + $request = $this->getManualBadgesForUserRequest($tenant_id, $options); try { $options = $this->createHttpClientOption(); @@ -4450,61 +4186,21 @@ public function getManualBadgesForUserWithHttpInfo($badges_user_id = null, $comm switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetUserManualBadgesResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetUserManualBadgesResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetUserManualBadgesResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetUserManualBadgesResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -4518,34 +4214,11 @@ public function getManualBadgesForUserWithHttpInfo($badges_user_id = null, $comm ); } - $returnType = '\FastComments\Client\Model\GetUserManualBadgesResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetUserManualBadgesResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -4555,7 +4228,7 @@ public function getManualBadgesForUserWithHttpInfo($badges_user_id = null, $comm $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -4563,8 +4236,10 @@ public function getManualBadgesForUserWithHttpInfo($badges_user_id = null, $comm $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -4574,6 +4249,9 @@ public function getManualBadgesForUserWithHttpInfo($badges_user_id = null, $comm * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $badges_user_id (optional) * @param string|null $comment_id (optional) * @param string|null $sso (optional) @@ -4582,9 +4260,9 @@ public function getManualBadgesForUserWithHttpInfo($badges_user_id = null, $comm * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getManualBadgesForUserAsync($badges_user_id = null, $comment_id = null, $sso = null, string $contentType = self::contentTypes['getManualBadgesForUser'][0]) + public function getManualBadgesForUserAsync($tenant_id, array $options = []) { - return $this->getManualBadgesForUserAsyncWithHttpInfo($badges_user_id, $comment_id, $sso, $contentType) + return $this->getManualBadgesForUserAsyncWithHttpInfo($tenant_id, $options) ->then( function ($response) { return $response[0]; @@ -4597,6 +4275,9 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $badges_user_id (optional) * @param string|null $comment_id (optional) * @param string|null $sso (optional) @@ -4605,10 +4286,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getManualBadgesForUserAsyncWithHttpInfo($badges_user_id = null, $comment_id = null, $sso = null, string $contentType = self::contentTypes['getManualBadgesForUser'][0]) + public function getManualBadgesForUserAsyncWithHttpInfo($tenant_id, array $options = []) { $returnType = '\FastComments\Client\Model\GetUserManualBadgesResponse'; - $request = $this->getManualBadgesForUserRequest($badges_user_id, $comment_id, $sso, $contentType); + $request = $this->getManualBadgesForUserRequest($tenant_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4649,6 +4330,9 @@ function ($exception) { /** * Create request for operation 'getManualBadgesForUser' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $badges_user_id (optional) * @param string|null $comment_id (optional) * @param string|null $sso (optional) @@ -4657,20 +4341,41 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getManualBadgesForUserRequest($badges_user_id = null, $comment_id = null, $sso = null, string $contentType = self::contentTypes['getManualBadgesForUser'][0]) + public function getManualBadgesForUserRequest($tenant_id, array $options = []) { + // unbox the optional parameters and request options from the $options array + $badges_user_id = array_key_exists('badges_user_id', $options) ? $options['badges_user_id'] : null; + $comment_id = array_key_exists('comment_id', $options) ? $options['comment_id'] : null; + $sso = array_key_exists('sso', $options) ? $options['sso'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['getManualBadgesForUser'][0]; + + // verify the required parameter 'tenant_id' is set + if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $tenant_id when calling getManualBadgesForUser' + ); + } - $resourcePath = '/auth/my-account/moderate-comments/get-manual-badges-for-user'; + $resourcePath = '/auth/my-account/moderate-comments/mod_api/get-manual-badges-for-user'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $tenant_id, + 'tenantId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $badges_user_id, @@ -4760,6 +4465,9 @@ public function getManualBadgesForUserRequest($badges_user_id = null, $comment_i * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id tenant_id (required) * @param string $comment_id comment_id (required) * @param bool|null $include_email include_email (optional) * @param bool|null $include_ip include_ip (optional) @@ -4770,9 +4478,9 @@ public function getManualBadgesForUserRequest($badges_user_id = null, $comment_i * @throws \InvalidArgumentException * @return \FastComments\Client\Model\ModerationAPICommentResponse|\FastComments\Client\Model\APIError */ - public function getModerationComment($comment_id, $include_email = null, $include_ip = null, $sso = null, string $contentType = self::contentTypes['getModerationComment'][0]) + public function getModerationComment($tenant_id, $comment_id, array $options = []) { - list($response) = $this->getModerationCommentWithHttpInfo($comment_id, $include_email, $include_ip, $sso, $contentType); + list($response) = $this->getModerationCommentWithHttpInfo($tenant_id, $comment_id, $options); return $response; } @@ -4781,6 +4489,9 @@ public function getModerationComment($comment_id, $include_email = null, $includ * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param bool|null $include_email (optional) * @param bool|null $include_ip (optional) @@ -4791,9 +4502,9 @@ public function getModerationComment($comment_id, $include_email = null, $includ * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\ModerationAPICommentResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getModerationCommentWithHttpInfo($comment_id, $include_email = null, $include_ip = null, $sso = null, string $contentType = self::contentTypes['getModerationComment'][0]) + public function getModerationCommentWithHttpInfo($tenant_id, $comment_id, array $options = []) { - $request = $this->getModerationCommentRequest($comment_id, $include_email, $include_ip, $sso, $contentType); + $request = $this->getModerationCommentRequest($tenant_id, $comment_id, $options); try { $options = $this->createHttpClientOption(); @@ -4820,61 +4531,21 @@ public function getModerationCommentWithHttpInfo($comment_id, $include_email = n switch($statusCode) { case 200: - if ('\FastComments\Client\Model\ModerationAPICommentResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\ModerationAPICommentResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\ModerationAPICommentResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\ModerationAPICommentResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -4888,34 +4559,11 @@ public function getModerationCommentWithHttpInfo($comment_id, $include_email = n ); } - $returnType = '\FastComments\Client\Model\ModerationAPICommentResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\ModerationAPICommentResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -4925,7 +4573,7 @@ public function getModerationCommentWithHttpInfo($comment_id, $include_email = n $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -4933,8 +4581,10 @@ public function getModerationCommentWithHttpInfo($comment_id, $include_email = n $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -4944,6 +4594,9 @@ public function getModerationCommentWithHttpInfo($comment_id, $include_email = n * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param bool|null $include_email (optional) * @param bool|null $include_ip (optional) @@ -4953,9 +4606,9 @@ public function getModerationCommentWithHttpInfo($comment_id, $include_email = n * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getModerationCommentAsync($comment_id, $include_email = null, $include_ip = null, $sso = null, string $contentType = self::contentTypes['getModerationComment'][0]) + public function getModerationCommentAsync($tenant_id, $comment_id, array $options = []) { - return $this->getModerationCommentAsyncWithHttpInfo($comment_id, $include_email, $include_ip, $sso, $contentType) + return $this->getModerationCommentAsyncWithHttpInfo($tenant_id, $comment_id, $options) ->then( function ($response) { return $response[0]; @@ -4968,6 +4621,9 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param bool|null $include_email (optional) * @param bool|null $include_ip (optional) @@ -4977,10 +4633,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getModerationCommentAsyncWithHttpInfo($comment_id, $include_email = null, $include_ip = null, $sso = null, string $contentType = self::contentTypes['getModerationComment'][0]) + public function getModerationCommentAsyncWithHttpInfo($tenant_id, $comment_id, array $options = []) { $returnType = '\FastComments\Client\Model\ModerationAPICommentResponse'; - $request = $this->getModerationCommentRequest($comment_id, $include_email, $include_ip, $sso, $contentType); + $request = $this->getModerationCommentRequest($tenant_id, $comment_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5021,6 +4677,9 @@ function ($exception) { /** * Create request for operation 'getModerationComment' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param bool|null $include_email (optional) * @param bool|null $include_ip (optional) @@ -5030,8 +4689,20 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getModerationCommentRequest($comment_id, $include_email = null, $include_ip = null, $sso = null, string $contentType = self::contentTypes['getModerationComment'][0]) + public function getModerationCommentRequest($tenant_id, $comment_id, array $options = []) { + // unbox the optional parameters and request options from the $options array + $include_email = array_key_exists('include_email', $options) ? $options['include_email'] : null; + $include_ip = array_key_exists('include_ip', $options) ? $options['include_ip'] : null; + $sso = array_key_exists('sso', $options) ? $options['sso'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['getModerationComment'][0]; + + // verify the required parameter 'tenant_id' is set + if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $tenant_id when calling getModerationComment' + ); + } // verify the required parameter 'comment_id' is set if ($comment_id === null || (is_array($comment_id) && count($comment_id) === 0)) { @@ -5044,13 +4715,22 @@ public function getModerationCommentRequest($comment_id, $include_email = null, - $resourcePath = '/auth/my-account/moderate-comments/comment/{commentId}'; + $resourcePath = '/auth/my-account/moderate-comments/mod_api/comment/{commentId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $tenant_id, + 'tenantId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $include_email, @@ -5083,7 +4763,7 @@ public function getModerationCommentRequest($comment_id, $include_email = null, // path params if ($comment_id !== null) { $resourcePath = str_replace( - '{' . 'commentId' . '}', + '{commentId}', ObjectSerializer::toPathValue($comment_id), $resourcePath ); @@ -5148,6 +4828,9 @@ public function getModerationCommentRequest($comment_id, $include_email = null, * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id tenant_id (required) * @param string $comment_id comment_id (required) * @param string|null $sso sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getModerationCommentText'] to see the possible values for this operation @@ -5156,9 +4839,9 @@ public function getModerationCommentRequest($comment_id, $include_email = null, * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetCommentTextResponse|\FastComments\Client\Model\APIError */ - public function getModerationCommentText($comment_id, $sso = null, string $contentType = self::contentTypes['getModerationCommentText'][0]) + public function getModerationCommentText($tenant_id, $comment_id, $sso = null) { - list($response) = $this->getModerationCommentTextWithHttpInfo($comment_id, $sso, $contentType); + list($response) = $this->getModerationCommentTextWithHttpInfo($tenant_id, $comment_id, $sso); return $response; } @@ -5167,6 +4850,9 @@ public function getModerationCommentText($comment_id, $sso = null, string $conte * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getModerationCommentText'] to see the possible values for this operation @@ -5175,9 +4861,9 @@ public function getModerationCommentText($comment_id, $sso = null, string $conte * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetCommentTextResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getModerationCommentTextWithHttpInfo($comment_id, $sso = null, string $contentType = self::contentTypes['getModerationCommentText'][0]) + public function getModerationCommentTextWithHttpInfo($tenant_id, $comment_id, $sso = null) { - $request = $this->getModerationCommentTextRequest($comment_id, $sso, $contentType); + $request = $this->getModerationCommentTextRequest($tenant_id, $comment_id, $sso); try { $options = $this->createHttpClientOption(); @@ -5204,61 +4890,21 @@ public function getModerationCommentTextWithHttpInfo($comment_id, $sso = null, s switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetCommentTextResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetCommentTextResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetCommentTextResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetCommentTextResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -5272,34 +4918,11 @@ public function getModerationCommentTextWithHttpInfo($comment_id, $sso = null, s ); } - $returnType = '\FastComments\Client\Model\GetCommentTextResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetCommentTextResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -5309,7 +4932,7 @@ public function getModerationCommentTextWithHttpInfo($comment_id, $sso = null, s $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -5317,8 +4940,10 @@ public function getModerationCommentTextWithHttpInfo($comment_id, $sso = null, s $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -5328,6 +4953,9 @@ public function getModerationCommentTextWithHttpInfo($comment_id, $sso = null, s * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getModerationCommentText'] to see the possible values for this operation @@ -5335,9 +4963,9 @@ public function getModerationCommentTextWithHttpInfo($comment_id, $sso = null, s * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getModerationCommentTextAsync($comment_id, $sso = null, string $contentType = self::contentTypes['getModerationCommentText'][0]) + public function getModerationCommentTextAsync($tenant_id, $comment_id, $sso = null) { - return $this->getModerationCommentTextAsyncWithHttpInfo($comment_id, $sso, $contentType) + return $this->getModerationCommentTextAsyncWithHttpInfo($tenant_id, $comment_id, $sso) ->then( function ($response) { return $response[0]; @@ -5350,6 +4978,9 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getModerationCommentText'] to see the possible values for this operation @@ -5357,10 +4988,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getModerationCommentTextAsyncWithHttpInfo($comment_id, $sso = null, string $contentType = self::contentTypes['getModerationCommentText'][0]) + public function getModerationCommentTextAsyncWithHttpInfo($tenant_id, $comment_id, $sso = null) { $returnType = '\FastComments\Client\Model\GetCommentTextResponse'; - $request = $this->getModerationCommentTextRequest($comment_id, $sso, $contentType); + $request = $this->getModerationCommentTextRequest($tenant_id, $comment_id, $sso); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5401,6 +5032,9 @@ function ($exception) { /** * Create request for operation 'getModerationCommentText' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getModerationCommentText'] to see the possible values for this operation @@ -5408,8 +5042,16 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getModerationCommentTextRequest($comment_id, $sso = null, string $contentType = self::contentTypes['getModerationCommentText'][0]) + public function getModerationCommentTextRequest($tenant_id, $comment_id, $sso = null) { + $contentType = self::contentTypes['getModerationCommentText'][0]; + + // verify the required parameter 'tenant_id' is set + if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $tenant_id when calling getModerationCommentText' + ); + } // verify the required parameter 'comment_id' is set if ($comment_id === null || (is_array($comment_id) && count($comment_id) === 0)) { @@ -5420,13 +5062,22 @@ public function getModerationCommentTextRequest($comment_id, $sso = null, string - $resourcePath = '/auth/my-account/moderate-comments/get-comment-text/{commentId}'; + $resourcePath = '/auth/my-account/moderate-comments/mod_api/get-comment-text/{commentId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $tenant_id, + 'tenantId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $sso, @@ -5441,7 +5092,7 @@ public function getModerationCommentTextRequest($comment_id, $sso = null, string // path params if ($comment_id !== null) { $resourcePath = str_replace( - '{' . 'commentId' . '}', + '{commentId}', ObjectSerializer::toPathValue($comment_id), $resourcePath ); @@ -5506,6 +5157,9 @@ public function getModerationCommentTextRequest($comment_id, $sso = null, string * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id tenant_id (required) * @param string $comment_id comment_id (required) * @param bool|null $include_by_user_id_and_email include_by_user_id_and_email (optional) * @param bool|null $include_by_ip include_by_ip (optional) @@ -5517,9 +5171,9 @@ public function getModerationCommentTextRequest($comment_id, $sso = null, string * @throws \InvalidArgumentException * @return \FastComments\Client\Model\PreBanSummary|\FastComments\Client\Model\APIError */ - public function getPreBanSummary($comment_id, $include_by_user_id_and_email = null, $include_by_ip = null, $include_by_email_domain = null, $sso = null, string $contentType = self::contentTypes['getPreBanSummary'][0]) + public function getPreBanSummary($tenant_id, $comment_id, array $options = []) { - list($response) = $this->getPreBanSummaryWithHttpInfo($comment_id, $include_by_user_id_and_email, $include_by_ip, $include_by_email_domain, $sso, $contentType); + list($response) = $this->getPreBanSummaryWithHttpInfo($tenant_id, $comment_id, $options); return $response; } @@ -5528,6 +5182,9 @@ public function getPreBanSummary($comment_id, $include_by_user_id_and_email = nu * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param bool|null $include_by_user_id_and_email (optional) * @param bool|null $include_by_ip (optional) @@ -5539,9 +5196,9 @@ public function getPreBanSummary($comment_id, $include_by_user_id_and_email = nu * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\PreBanSummary|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getPreBanSummaryWithHttpInfo($comment_id, $include_by_user_id_and_email = null, $include_by_ip = null, $include_by_email_domain = null, $sso = null, string $contentType = self::contentTypes['getPreBanSummary'][0]) + public function getPreBanSummaryWithHttpInfo($tenant_id, $comment_id, array $options = []) { - $request = $this->getPreBanSummaryRequest($comment_id, $include_by_user_id_and_email, $include_by_ip, $include_by_email_domain, $sso, $contentType); + $request = $this->getPreBanSummaryRequest($tenant_id, $comment_id, $options); try { $options = $this->createHttpClientOption(); @@ -5568,61 +5225,21 @@ public function getPreBanSummaryWithHttpInfo($comment_id, $include_by_user_id_an switch($statusCode) { case 200: - if ('\FastComments\Client\Model\PreBanSummary' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\PreBanSummary' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\PreBanSummary', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\PreBanSummary', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -5636,34 +5253,11 @@ public function getPreBanSummaryWithHttpInfo($comment_id, $include_by_user_id_an ); } - $returnType = '\FastComments\Client\Model\PreBanSummary'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\PreBanSummary', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -5673,7 +5267,7 @@ public function getPreBanSummaryWithHttpInfo($comment_id, $include_by_user_id_an $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -5681,8 +5275,10 @@ public function getPreBanSummaryWithHttpInfo($comment_id, $include_by_user_id_an $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -5692,6 +5288,9 @@ public function getPreBanSummaryWithHttpInfo($comment_id, $include_by_user_id_an * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param bool|null $include_by_user_id_and_email (optional) * @param bool|null $include_by_ip (optional) @@ -5702,9 +5301,9 @@ public function getPreBanSummaryWithHttpInfo($comment_id, $include_by_user_id_an * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPreBanSummaryAsync($comment_id, $include_by_user_id_and_email = null, $include_by_ip = null, $include_by_email_domain = null, $sso = null, string $contentType = self::contentTypes['getPreBanSummary'][0]) + public function getPreBanSummaryAsync($tenant_id, $comment_id, array $options = []) { - return $this->getPreBanSummaryAsyncWithHttpInfo($comment_id, $include_by_user_id_and_email, $include_by_ip, $include_by_email_domain, $sso, $contentType) + return $this->getPreBanSummaryAsyncWithHttpInfo($tenant_id, $comment_id, $options) ->then( function ($response) { return $response[0]; @@ -5717,6 +5316,9 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param bool|null $include_by_user_id_and_email (optional) * @param bool|null $include_by_ip (optional) @@ -5727,10 +5329,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPreBanSummaryAsyncWithHttpInfo($comment_id, $include_by_user_id_and_email = null, $include_by_ip = null, $include_by_email_domain = null, $sso = null, string $contentType = self::contentTypes['getPreBanSummary'][0]) + public function getPreBanSummaryAsyncWithHttpInfo($tenant_id, $comment_id, array $options = []) { $returnType = '\FastComments\Client\Model\PreBanSummary'; - $request = $this->getPreBanSummaryRequest($comment_id, $include_by_user_id_and_email, $include_by_ip, $include_by_email_domain, $sso, $contentType); + $request = $this->getPreBanSummaryRequest($tenant_id, $comment_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5771,6 +5373,9 @@ function ($exception) { /** * Create request for operation 'getPreBanSummary' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param bool|null $include_by_user_id_and_email (optional) * @param bool|null $include_by_ip (optional) @@ -5781,8 +5386,21 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getPreBanSummaryRequest($comment_id, $include_by_user_id_and_email = null, $include_by_ip = null, $include_by_email_domain = null, $sso = null, string $contentType = self::contentTypes['getPreBanSummary'][0]) - { + public function getPreBanSummaryRequest($tenant_id, $comment_id, array $options = []) + { + // unbox the optional parameters and request options from the $options array + $include_by_user_id_and_email = array_key_exists('include_by_user_id_and_email', $options) ? $options['include_by_user_id_and_email'] : null; + $include_by_ip = array_key_exists('include_by_ip', $options) ? $options['include_by_ip'] : null; + $include_by_email_domain = array_key_exists('include_by_email_domain', $options) ? $options['include_by_email_domain'] : null; + $sso = array_key_exists('sso', $options) ? $options['sso'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['getPreBanSummary'][0]; + + // verify the required parameter 'tenant_id' is set + if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $tenant_id when calling getPreBanSummary' + ); + } // verify the required parameter 'comment_id' is set if ($comment_id === null || (is_array($comment_id) && count($comment_id) === 0)) { @@ -5796,13 +5414,22 @@ public function getPreBanSummaryRequest($comment_id, $include_by_user_id_and_ema - $resourcePath = '/auth/my-account/moderate-comments/pre-ban-summary/{commentId}'; + $resourcePath = '/auth/my-account/moderate-comments/mod_api/pre-ban-summary/{commentId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $tenant_id, + 'tenantId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $include_by_user_id_and_email, @@ -5844,7 +5471,7 @@ public function getPreBanSummaryRequest($comment_id, $include_by_user_id_and_ema // path params if ($comment_id !== null) { $resourcePath = str_replace( - '{' . 'commentId' . '}', + '{commentId}', ObjectSerializer::toPathValue($comment_id), $resourcePath ); @@ -5909,6 +5536,9 @@ public function getPreBanSummaryRequest($comment_id, $include_by_user_id_and_ema * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id tenant_id (required) * @param string|null $value value (optional) * @param string|null $filters filters (optional) * @param string|null $search_filters search_filters (optional) @@ -5919,9 +5549,9 @@ public function getPreBanSummaryRequest($comment_id, $include_by_user_id_and_ema * @throws \InvalidArgumentException * @return \FastComments\Client\Model\ModerationCommentSearchResponse|\FastComments\Client\Model\APIError */ - public function getSearchCommentsSummary($value = null, $filters = null, $search_filters = null, $sso = null, string $contentType = self::contentTypes['getSearchCommentsSummary'][0]) + public function getSearchCommentsSummary($tenant_id, array $options = []) { - list($response) = $this->getSearchCommentsSummaryWithHttpInfo($value, $filters, $search_filters, $sso, $contentType); + list($response) = $this->getSearchCommentsSummaryWithHttpInfo($tenant_id, $options); return $response; } @@ -5930,6 +5560,9 @@ public function getSearchCommentsSummary($value = null, $filters = null, $search * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $value (optional) * @param string|null $filters (optional) * @param string|null $search_filters (optional) @@ -5940,9 +5573,9 @@ public function getSearchCommentsSummary($value = null, $filters = null, $search * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\ModerationCommentSearchResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getSearchCommentsSummaryWithHttpInfo($value = null, $filters = null, $search_filters = null, $sso = null, string $contentType = self::contentTypes['getSearchCommentsSummary'][0]) + public function getSearchCommentsSummaryWithHttpInfo($tenant_id, array $options = []) { - $request = $this->getSearchCommentsSummaryRequest($value, $filters, $search_filters, $sso, $contentType); + $request = $this->getSearchCommentsSummaryRequest($tenant_id, $options); try { $options = $this->createHttpClientOption(); @@ -5969,61 +5602,21 @@ public function getSearchCommentsSummaryWithHttpInfo($value = null, $filters = n switch($statusCode) { case 200: - if ('\FastComments\Client\Model\ModerationCommentSearchResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\ModerationCommentSearchResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\ModerationCommentSearchResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\ModerationCommentSearchResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -6037,34 +5630,11 @@ public function getSearchCommentsSummaryWithHttpInfo($value = null, $filters = n ); } - $returnType = '\FastComments\Client\Model\ModerationCommentSearchResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\ModerationCommentSearchResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -6074,7 +5644,7 @@ public function getSearchCommentsSummaryWithHttpInfo($value = null, $filters = n $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -6082,8 +5652,10 @@ public function getSearchCommentsSummaryWithHttpInfo($value = null, $filters = n $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -6093,6 +5665,9 @@ public function getSearchCommentsSummaryWithHttpInfo($value = null, $filters = n * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $value (optional) * @param string|null $filters (optional) * @param string|null $search_filters (optional) @@ -6102,9 +5677,9 @@ public function getSearchCommentsSummaryWithHttpInfo($value = null, $filters = n * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getSearchCommentsSummaryAsync($value = null, $filters = null, $search_filters = null, $sso = null, string $contentType = self::contentTypes['getSearchCommentsSummary'][0]) + public function getSearchCommentsSummaryAsync($tenant_id, array $options = []) { - return $this->getSearchCommentsSummaryAsyncWithHttpInfo($value, $filters, $search_filters, $sso, $contentType) + return $this->getSearchCommentsSummaryAsyncWithHttpInfo($tenant_id, $options) ->then( function ($response) { return $response[0]; @@ -6117,6 +5692,9 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $value (optional) * @param string|null $filters (optional) * @param string|null $search_filters (optional) @@ -6126,10 +5704,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getSearchCommentsSummaryAsyncWithHttpInfo($value = null, $filters = null, $search_filters = null, $sso = null, string $contentType = self::contentTypes['getSearchCommentsSummary'][0]) + public function getSearchCommentsSummaryAsyncWithHttpInfo($tenant_id, array $options = []) { $returnType = '\FastComments\Client\Model\ModerationCommentSearchResponse'; - $request = $this->getSearchCommentsSummaryRequest($value, $filters, $search_filters, $sso, $contentType); + $request = $this->getSearchCommentsSummaryRequest($tenant_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -6170,6 +5748,9 @@ function ($exception) { /** * Create request for operation 'getSearchCommentsSummary' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $value (optional) * @param string|null $filters (optional) * @param string|null $search_filters (optional) @@ -6179,21 +5760,43 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getSearchCommentsSummaryRequest($value = null, $filters = null, $search_filters = null, $sso = null, string $contentType = self::contentTypes['getSearchCommentsSummary'][0]) - { + public function getSearchCommentsSummaryRequest($tenant_id, array $options = []) + { + // unbox the optional parameters and request options from the $options array + $value = array_key_exists('value', $options) ? $options['value'] : null; + $filters = array_key_exists('filters', $options) ? $options['filters'] : null; + $search_filters = array_key_exists('search_filters', $options) ? $options['search_filters'] : null; + $sso = array_key_exists('sso', $options) ? $options['sso'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['getSearchCommentsSummary'][0]; + + // verify the required parameter 'tenant_id' is set + if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $tenant_id when calling getSearchCommentsSummary' + ); + } - $resourcePath = '/auth/my-account/moderate-comments/search/comments/summary'; + $resourcePath = '/auth/my-account/moderate-comments/mod_api/search/comments/summary'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $tenant_id, + 'tenantId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $value, @@ -6292,6 +5895,9 @@ public function getSearchCommentsSummaryRequest($value = null, $filters = null, * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id tenant_id (required) * @param string|null $value value (optional) * @param string|null $sso sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSearchPages'] to see the possible values for this operation @@ -6300,9 +5906,9 @@ public function getSearchCommentsSummaryRequest($value = null, $filters = null, * @throws \InvalidArgumentException * @return \FastComments\Client\Model\ModerationPageSearchResponse|\FastComments\Client\Model\APIError */ - public function getSearchPages($value = null, $sso = null, string $contentType = self::contentTypes['getSearchPages'][0]) + public function getSearchPages($tenant_id, array $options = []) { - list($response) = $this->getSearchPagesWithHttpInfo($value, $sso, $contentType); + list($response) = $this->getSearchPagesWithHttpInfo($tenant_id, $options); return $response; } @@ -6311,6 +5917,9 @@ public function getSearchPages($value = null, $sso = null, string $contentType = * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $value (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSearchPages'] to see the possible values for this operation @@ -6319,9 +5928,9 @@ public function getSearchPages($value = null, $sso = null, string $contentType = * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\ModerationPageSearchResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getSearchPagesWithHttpInfo($value = null, $sso = null, string $contentType = self::contentTypes['getSearchPages'][0]) + public function getSearchPagesWithHttpInfo($tenant_id, array $options = []) { - $request = $this->getSearchPagesRequest($value, $sso, $contentType); + $request = $this->getSearchPagesRequest($tenant_id, $options); try { $options = $this->createHttpClientOption(); @@ -6348,61 +5957,21 @@ public function getSearchPagesWithHttpInfo($value = null, $sso = null, string $c switch($statusCode) { case 200: - if ('\FastComments\Client\Model\ModerationPageSearchResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\ModerationPageSearchResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\ModerationPageSearchResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\ModerationPageSearchResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -6416,34 +5985,11 @@ public function getSearchPagesWithHttpInfo($value = null, $sso = null, string $c ); } - $returnType = '\FastComments\Client\Model\ModerationPageSearchResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\ModerationPageSearchResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -6453,7 +5999,7 @@ public function getSearchPagesWithHttpInfo($value = null, $sso = null, string $c $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -6461,8 +6007,10 @@ public function getSearchPagesWithHttpInfo($value = null, $sso = null, string $c $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -6472,6 +6020,9 @@ public function getSearchPagesWithHttpInfo($value = null, $sso = null, string $c * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $value (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSearchPages'] to see the possible values for this operation @@ -6479,9 +6030,9 @@ public function getSearchPagesWithHttpInfo($value = null, $sso = null, string $c * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getSearchPagesAsync($value = null, $sso = null, string $contentType = self::contentTypes['getSearchPages'][0]) + public function getSearchPagesAsync($tenant_id, array $options = []) { - return $this->getSearchPagesAsyncWithHttpInfo($value, $sso, $contentType) + return $this->getSearchPagesAsyncWithHttpInfo($tenant_id, $options) ->then( function ($response) { return $response[0]; @@ -6494,6 +6045,9 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $value (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSearchPages'] to see the possible values for this operation @@ -6501,10 +6055,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getSearchPagesAsyncWithHttpInfo($value = null, $sso = null, string $contentType = self::contentTypes['getSearchPages'][0]) + public function getSearchPagesAsyncWithHttpInfo($tenant_id, array $options = []) { $returnType = '\FastComments\Client\Model\ModerationPageSearchResponse'; - $request = $this->getSearchPagesRequest($value, $sso, $contentType); + $request = $this->getSearchPagesRequest($tenant_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -6545,6 +6099,9 @@ function ($exception) { /** * Create request for operation 'getSearchPages' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $value (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSearchPages'] to see the possible values for this operation @@ -6552,19 +6109,39 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getSearchPagesRequest($value = null, $sso = null, string $contentType = self::contentTypes['getSearchPages'][0]) + public function getSearchPagesRequest($tenant_id, array $options = []) { + // unbox the optional parameters and request options from the $options array + $value = array_key_exists('value', $options) ? $options['value'] : null; + $sso = array_key_exists('sso', $options) ? $options['sso'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['getSearchPages'][0]; + + // verify the required parameter 'tenant_id' is set + if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $tenant_id when calling getSearchPages' + ); + } - $resourcePath = '/auth/my-account/moderate-comments/search/pages'; + $resourcePath = '/auth/my-account/moderate-comments/mod_api/search/pages'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $tenant_id, + 'tenantId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $value, @@ -6645,6 +6222,9 @@ public function getSearchPagesRequest($value = null, $sso = null, string $conten * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id tenant_id (required) * @param string|null $value value (optional) * @param string|null $sso sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSearchSites'] to see the possible values for this operation @@ -6653,9 +6233,9 @@ public function getSearchPagesRequest($value = null, $sso = null, string $conten * @throws \InvalidArgumentException * @return \FastComments\Client\Model\ModerationSiteSearchResponse|\FastComments\Client\Model\APIError */ - public function getSearchSites($value = null, $sso = null, string $contentType = self::contentTypes['getSearchSites'][0]) + public function getSearchSites($tenant_id, array $options = []) { - list($response) = $this->getSearchSitesWithHttpInfo($value, $sso, $contentType); + list($response) = $this->getSearchSitesWithHttpInfo($tenant_id, $options); return $response; } @@ -6664,6 +6244,9 @@ public function getSearchSites($value = null, $sso = null, string $contentType = * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $value (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSearchSites'] to see the possible values for this operation @@ -6672,9 +6255,9 @@ public function getSearchSites($value = null, $sso = null, string $contentType = * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\ModerationSiteSearchResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getSearchSitesWithHttpInfo($value = null, $sso = null, string $contentType = self::contentTypes['getSearchSites'][0]) + public function getSearchSitesWithHttpInfo($tenant_id, array $options = []) { - $request = $this->getSearchSitesRequest($value, $sso, $contentType); + $request = $this->getSearchSitesRequest($tenant_id, $options); try { $options = $this->createHttpClientOption(); @@ -6701,61 +6284,21 @@ public function getSearchSitesWithHttpInfo($value = null, $sso = null, string $c switch($statusCode) { case 200: - if ('\FastComments\Client\Model\ModerationSiteSearchResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\ModerationSiteSearchResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\ModerationSiteSearchResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\ModerationSiteSearchResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -6769,34 +6312,11 @@ public function getSearchSitesWithHttpInfo($value = null, $sso = null, string $c ); } - $returnType = '\FastComments\Client\Model\ModerationSiteSearchResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\ModerationSiteSearchResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -6806,7 +6326,7 @@ public function getSearchSitesWithHttpInfo($value = null, $sso = null, string $c $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -6814,8 +6334,10 @@ public function getSearchSitesWithHttpInfo($value = null, $sso = null, string $c $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -6825,6 +6347,9 @@ public function getSearchSitesWithHttpInfo($value = null, $sso = null, string $c * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $value (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSearchSites'] to see the possible values for this operation @@ -6832,9 +6357,9 @@ public function getSearchSitesWithHttpInfo($value = null, $sso = null, string $c * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getSearchSitesAsync($value = null, $sso = null, string $contentType = self::contentTypes['getSearchSites'][0]) + public function getSearchSitesAsync($tenant_id, array $options = []) { - return $this->getSearchSitesAsyncWithHttpInfo($value, $sso, $contentType) + return $this->getSearchSitesAsyncWithHttpInfo($tenant_id, $options) ->then( function ($response) { return $response[0]; @@ -6847,6 +6372,9 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $value (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSearchSites'] to see the possible values for this operation @@ -6854,10 +6382,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getSearchSitesAsyncWithHttpInfo($value = null, $sso = null, string $contentType = self::contentTypes['getSearchSites'][0]) + public function getSearchSitesAsyncWithHttpInfo($tenant_id, array $options = []) { $returnType = '\FastComments\Client\Model\ModerationSiteSearchResponse'; - $request = $this->getSearchSitesRequest($value, $sso, $contentType); + $request = $this->getSearchSitesRequest($tenant_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -6898,6 +6426,9 @@ function ($exception) { /** * Create request for operation 'getSearchSites' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $value (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSearchSites'] to see the possible values for this operation @@ -6905,19 +6436,39 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getSearchSitesRequest($value = null, $sso = null, string $contentType = self::contentTypes['getSearchSites'][0]) + public function getSearchSitesRequest($tenant_id, array $options = []) { + // unbox the optional parameters and request options from the $options array + $value = array_key_exists('value', $options) ? $options['value'] : null; + $sso = array_key_exists('sso', $options) ? $options['sso'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['getSearchSites'][0]; + + // verify the required parameter 'tenant_id' is set + if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $tenant_id when calling getSearchSites' + ); + } - $resourcePath = '/auth/my-account/moderate-comments/search/sites'; + $resourcePath = '/auth/my-account/moderate-comments/mod_api/search/sites'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $tenant_id, + 'tenantId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $value, @@ -6998,6 +6549,9 @@ public function getSearchSitesRequest($value = null, $sso = null, string $conten * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id tenant_id (required) * @param string|null $text_search text_search (optional) * @param string|null $sso sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSearchSuggest'] to see the possible values for this operation @@ -7006,9 +6560,9 @@ public function getSearchSitesRequest($value = null, $sso = null, string $conten * @throws \InvalidArgumentException * @return \FastComments\Client\Model\ModerationSuggestResponse|\FastComments\Client\Model\APIError */ - public function getSearchSuggest($text_search = null, $sso = null, string $contentType = self::contentTypes['getSearchSuggest'][0]) + public function getSearchSuggest($tenant_id, array $options = []) { - list($response) = $this->getSearchSuggestWithHttpInfo($text_search, $sso, $contentType); + list($response) = $this->getSearchSuggestWithHttpInfo($tenant_id, $options); return $response; } @@ -7017,6 +6571,9 @@ public function getSearchSuggest($text_search = null, $sso = null, string $conte * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $text_search (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSearchSuggest'] to see the possible values for this operation @@ -7025,9 +6582,9 @@ public function getSearchSuggest($text_search = null, $sso = null, string $conte * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\ModerationSuggestResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getSearchSuggestWithHttpInfo($text_search = null, $sso = null, string $contentType = self::contentTypes['getSearchSuggest'][0]) + public function getSearchSuggestWithHttpInfo($tenant_id, array $options = []) { - $request = $this->getSearchSuggestRequest($text_search, $sso, $contentType); + $request = $this->getSearchSuggestRequest($tenant_id, $options); try { $options = $this->createHttpClientOption(); @@ -7054,61 +6611,21 @@ public function getSearchSuggestWithHttpInfo($text_search = null, $sso = null, s switch($statusCode) { case 200: - if ('\FastComments\Client\Model\ModerationSuggestResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\ModerationSuggestResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\ModerationSuggestResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\ModerationSuggestResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -7122,34 +6639,11 @@ public function getSearchSuggestWithHttpInfo($text_search = null, $sso = null, s ); } - $returnType = '\FastComments\Client\Model\ModerationSuggestResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\ModerationSuggestResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -7159,7 +6653,7 @@ public function getSearchSuggestWithHttpInfo($text_search = null, $sso = null, s $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -7167,8 +6661,10 @@ public function getSearchSuggestWithHttpInfo($text_search = null, $sso = null, s $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -7178,6 +6674,9 @@ public function getSearchSuggestWithHttpInfo($text_search = null, $sso = null, s * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $text_search (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSearchSuggest'] to see the possible values for this operation @@ -7185,9 +6684,9 @@ public function getSearchSuggestWithHttpInfo($text_search = null, $sso = null, s * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getSearchSuggestAsync($text_search = null, $sso = null, string $contentType = self::contentTypes['getSearchSuggest'][0]) + public function getSearchSuggestAsync($tenant_id, array $options = []) { - return $this->getSearchSuggestAsyncWithHttpInfo($text_search, $sso, $contentType) + return $this->getSearchSuggestAsyncWithHttpInfo($tenant_id, $options) ->then( function ($response) { return $response[0]; @@ -7200,6 +6699,9 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $text_search (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSearchSuggest'] to see the possible values for this operation @@ -7207,10 +6709,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getSearchSuggestAsyncWithHttpInfo($text_search = null, $sso = null, string $contentType = self::contentTypes['getSearchSuggest'][0]) + public function getSearchSuggestAsyncWithHttpInfo($tenant_id, array $options = []) { $returnType = '\FastComments\Client\Model\ModerationSuggestResponse'; - $request = $this->getSearchSuggestRequest($text_search, $sso, $contentType); + $request = $this->getSearchSuggestRequest($tenant_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -7251,6 +6753,9 @@ function ($exception) { /** * Create request for operation 'getSearchSuggest' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $text_search (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSearchSuggest'] to see the possible values for this operation @@ -7258,19 +6763,39 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getSearchSuggestRequest($text_search = null, $sso = null, string $contentType = self::contentTypes['getSearchSuggest'][0]) + public function getSearchSuggestRequest($tenant_id, array $options = []) { + // unbox the optional parameters and request options from the $options array + $text_search = array_key_exists('text_search', $options) ? $options['text_search'] : null; + $sso = array_key_exists('sso', $options) ? $options['sso'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['getSearchSuggest'][0]; + + // verify the required parameter 'tenant_id' is set + if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $tenant_id when calling getSearchSuggest' + ); + } - $resourcePath = '/auth/my-account/moderate-comments/search/suggest'; + $resourcePath = '/auth/my-account/moderate-comments/mod_api/search/suggest'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $tenant_id, + 'tenantId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $text_search, @@ -7351,6 +6876,9 @@ public function getSearchSuggestRequest($text_search = null, $sso = null, string * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id tenant_id (required) * @param string|null $value value (optional) * @param string|null $sso sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSearchUsers'] to see the possible values for this operation @@ -7359,9 +6887,9 @@ public function getSearchSuggestRequest($text_search = null, $sso = null, string * @throws \InvalidArgumentException * @return \FastComments\Client\Model\ModerationUserSearchResponse|\FastComments\Client\Model\APIError */ - public function getSearchUsers($value = null, $sso = null, string $contentType = self::contentTypes['getSearchUsers'][0]) + public function getSearchUsers($tenant_id, array $options = []) { - list($response) = $this->getSearchUsersWithHttpInfo($value, $sso, $contentType); + list($response) = $this->getSearchUsersWithHttpInfo($tenant_id, $options); return $response; } @@ -7370,6 +6898,9 @@ public function getSearchUsers($value = null, $sso = null, string $contentType = * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $value (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSearchUsers'] to see the possible values for this operation @@ -7378,9 +6909,9 @@ public function getSearchUsers($value = null, $sso = null, string $contentType = * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\ModerationUserSearchResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getSearchUsersWithHttpInfo($value = null, $sso = null, string $contentType = self::contentTypes['getSearchUsers'][0]) + public function getSearchUsersWithHttpInfo($tenant_id, array $options = []) { - $request = $this->getSearchUsersRequest($value, $sso, $contentType); + $request = $this->getSearchUsersRequest($tenant_id, $options); try { $options = $this->createHttpClientOption(); @@ -7407,61 +6938,21 @@ public function getSearchUsersWithHttpInfo($value = null, $sso = null, string $c switch($statusCode) { case 200: - if ('\FastComments\Client\Model\ModerationUserSearchResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\ModerationUserSearchResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\ModerationUserSearchResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\ModerationUserSearchResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -7475,34 +6966,11 @@ public function getSearchUsersWithHttpInfo($value = null, $sso = null, string $c ); } - $returnType = '\FastComments\Client\Model\ModerationUserSearchResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\ModerationUserSearchResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -7512,7 +6980,7 @@ public function getSearchUsersWithHttpInfo($value = null, $sso = null, string $c $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -7520,8 +6988,10 @@ public function getSearchUsersWithHttpInfo($value = null, $sso = null, string $c $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -7531,6 +7001,9 @@ public function getSearchUsersWithHttpInfo($value = null, $sso = null, string $c * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $value (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSearchUsers'] to see the possible values for this operation @@ -7538,9 +7011,9 @@ public function getSearchUsersWithHttpInfo($value = null, $sso = null, string $c * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getSearchUsersAsync($value = null, $sso = null, string $contentType = self::contentTypes['getSearchUsers'][0]) + public function getSearchUsersAsync($tenant_id, array $options = []) { - return $this->getSearchUsersAsyncWithHttpInfo($value, $sso, $contentType) + return $this->getSearchUsersAsyncWithHttpInfo($tenant_id, $options) ->then( function ($response) { return $response[0]; @@ -7553,6 +7026,9 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $value (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSearchUsers'] to see the possible values for this operation @@ -7560,10 +7036,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getSearchUsersAsyncWithHttpInfo($value = null, $sso = null, string $contentType = self::contentTypes['getSearchUsers'][0]) + public function getSearchUsersAsyncWithHttpInfo($tenant_id, array $options = []) { $returnType = '\FastComments\Client\Model\ModerationUserSearchResponse'; - $request = $this->getSearchUsersRequest($value, $sso, $contentType); + $request = $this->getSearchUsersRequest($tenant_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -7604,6 +7080,9 @@ function ($exception) { /** * Create request for operation 'getSearchUsers' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $value (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSearchUsers'] to see the possible values for this operation @@ -7611,19 +7090,39 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getSearchUsersRequest($value = null, $sso = null, string $contentType = self::contentTypes['getSearchUsers'][0]) + public function getSearchUsersRequest($tenant_id, array $options = []) { + // unbox the optional parameters and request options from the $options array + $value = array_key_exists('value', $options) ? $options['value'] : null; + $sso = array_key_exists('sso', $options) ? $options['sso'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['getSearchUsers'][0]; + + // verify the required parameter 'tenant_id' is set + if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $tenant_id when calling getSearchUsers' + ); + } - $resourcePath = '/auth/my-account/moderate-comments/search/users'; + $resourcePath = '/auth/my-account/moderate-comments/mod_api/search/users'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $tenant_id, + 'tenantId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $value, @@ -7704,6 +7203,9 @@ public function getSearchUsersRequest($value = null, $sso = null, string $conten * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id tenant_id (required) * @param string|null $user_id user_id (optional) * @param string|null $sso sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTrustFactor'] to see the possible values for this operation @@ -7712,9 +7214,9 @@ public function getSearchUsersRequest($value = null, $sso = null, string $conten * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetUserTrustFactorResponse|\FastComments\Client\Model\APIError */ - public function getTrustFactor($user_id = null, $sso = null, string $contentType = self::contentTypes['getTrustFactor'][0]) + public function getTrustFactor($tenant_id, array $options = []) { - list($response) = $this->getTrustFactorWithHttpInfo($user_id, $sso, $contentType); + list($response) = $this->getTrustFactorWithHttpInfo($tenant_id, $options); return $response; } @@ -7723,6 +7225,9 @@ public function getTrustFactor($user_id = null, $sso = null, string $contentType * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $user_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTrustFactor'] to see the possible values for this operation @@ -7731,9 +7236,9 @@ public function getTrustFactor($user_id = null, $sso = null, string $contentType * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetUserTrustFactorResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getTrustFactorWithHttpInfo($user_id = null, $sso = null, string $contentType = self::contentTypes['getTrustFactor'][0]) + public function getTrustFactorWithHttpInfo($tenant_id, array $options = []) { - $request = $this->getTrustFactorRequest($user_id, $sso, $contentType); + $request = $this->getTrustFactorRequest($tenant_id, $options); try { $options = $this->createHttpClientOption(); @@ -7760,60 +7265,20 @@ public function getTrustFactorWithHttpInfo($user_id = null, $sso = null, string switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetUserTrustFactorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetUserTrustFactorResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetUserTrustFactorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetUserTrustFactorResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -7828,34 +7293,11 @@ public function getTrustFactorWithHttpInfo($user_id = null, $sso = null, string ); } - $returnType = '\FastComments\Client\Model\GetUserTrustFactorResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetUserTrustFactorResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -7865,7 +7307,7 @@ public function getTrustFactorWithHttpInfo($user_id = null, $sso = null, string $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -7873,8 +7315,10 @@ public function getTrustFactorWithHttpInfo($user_id = null, $sso = null, string $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -7884,6 +7328,9 @@ public function getTrustFactorWithHttpInfo($user_id = null, $sso = null, string * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $user_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTrustFactor'] to see the possible values for this operation @@ -7891,9 +7338,9 @@ public function getTrustFactorWithHttpInfo($user_id = null, $sso = null, string * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTrustFactorAsync($user_id = null, $sso = null, string $contentType = self::contentTypes['getTrustFactor'][0]) + public function getTrustFactorAsync($tenant_id, array $options = []) { - return $this->getTrustFactorAsyncWithHttpInfo($user_id, $sso, $contentType) + return $this->getTrustFactorAsyncWithHttpInfo($tenant_id, $options) ->then( function ($response) { return $response[0]; @@ -7906,6 +7353,9 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $user_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTrustFactor'] to see the possible values for this operation @@ -7913,10 +7363,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTrustFactorAsyncWithHttpInfo($user_id = null, $sso = null, string $contentType = self::contentTypes['getTrustFactor'][0]) + public function getTrustFactorAsyncWithHttpInfo($tenant_id, array $options = []) { $returnType = '\FastComments\Client\Model\GetUserTrustFactorResponse'; - $request = $this->getTrustFactorRequest($user_id, $sso, $contentType); + $request = $this->getTrustFactorRequest($tenant_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -7957,6 +7407,9 @@ function ($exception) { /** * Create request for operation 'getTrustFactor' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $user_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTrustFactor'] to see the possible values for this operation @@ -7964,19 +7417,39 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getTrustFactorRequest($user_id = null, $sso = null, string $contentType = self::contentTypes['getTrustFactor'][0]) + public function getTrustFactorRequest($tenant_id, array $options = []) { + // unbox the optional parameters and request options from the $options array + $user_id = array_key_exists('user_id', $options) ? $options['user_id'] : null; + $sso = array_key_exists('sso', $options) ? $options['sso'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['getTrustFactor'][0]; + + // verify the required parameter 'tenant_id' is set + if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $tenant_id when calling getTrustFactor' + ); + } - $resourcePath = '/auth/my-account/moderate-comments/get-trust-factor'; + $resourcePath = '/auth/my-account/moderate-comments/mod_api/get-trust-factor'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $tenant_id, + 'tenantId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $user_id, @@ -8057,6 +7530,9 @@ public function getTrustFactorRequest($user_id = null, $sso = null, string $cont * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id tenant_id (required) * @param string|null $sso sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUserBanPreference'] to see the possible values for this operation * @@ -8064,9 +7540,9 @@ public function getTrustFactorRequest($user_id = null, $sso = null, string $cont * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APIModerateGetUserBanPreferencesResponse|\FastComments\Client\Model\APIError */ - public function getUserBanPreference($sso = null, string $contentType = self::contentTypes['getUserBanPreference'][0]) + public function getUserBanPreference($tenant_id, $sso = null) { - list($response) = $this->getUserBanPreferenceWithHttpInfo($sso, $contentType); + list($response) = $this->getUserBanPreferenceWithHttpInfo($tenant_id, $sso); return $response; } @@ -8075,6 +7551,9 @@ public function getUserBanPreference($sso = null, string $contentType = self::co * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUserBanPreference'] to see the possible values for this operation * @@ -8082,9 +7561,9 @@ public function getUserBanPreference($sso = null, string $contentType = self::co * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APIModerateGetUserBanPreferencesResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getUserBanPreferenceWithHttpInfo($sso = null, string $contentType = self::contentTypes['getUserBanPreference'][0]) + public function getUserBanPreferenceWithHttpInfo($tenant_id, $sso = null) { - $request = $this->getUserBanPreferenceRequest($sso, $contentType); + $request = $this->getUserBanPreferenceRequest($tenant_id, $sso); try { $options = $this->createHttpClientOption(); @@ -8111,61 +7590,21 @@ public function getUserBanPreferenceWithHttpInfo($sso = null, string $contentTyp switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APIModerateGetUserBanPreferencesResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIModerateGetUserBanPreferencesResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIModerateGetUserBanPreferencesResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIModerateGetUserBanPreferencesResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -8179,34 +7618,11 @@ public function getUserBanPreferenceWithHttpInfo($sso = null, string $contentTyp ); } - $returnType = '\FastComments\Client\Model\APIModerateGetUserBanPreferencesResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIModerateGetUserBanPreferencesResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -8216,7 +7632,7 @@ public function getUserBanPreferenceWithHttpInfo($sso = null, string $contentTyp $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -8224,8 +7640,10 @@ public function getUserBanPreferenceWithHttpInfo($sso = null, string $contentTyp $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -8235,15 +7653,18 @@ public function getUserBanPreferenceWithHttpInfo($sso = null, string $contentTyp * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUserBanPreference'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getUserBanPreferenceAsync($sso = null, string $contentType = self::contentTypes['getUserBanPreference'][0]) + public function getUserBanPreferenceAsync($tenant_id, $sso = null) { - return $this->getUserBanPreferenceAsyncWithHttpInfo($sso, $contentType) + return $this->getUserBanPreferenceAsyncWithHttpInfo($tenant_id, $sso) ->then( function ($response) { return $response[0]; @@ -8256,16 +7677,19 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUserBanPreference'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getUserBanPreferenceAsyncWithHttpInfo($sso = null, string $contentType = self::contentTypes['getUserBanPreference'][0]) + public function getUserBanPreferenceAsyncWithHttpInfo($tenant_id, $sso = null) { $returnType = '\FastComments\Client\Model\APIModerateGetUserBanPreferencesResponse'; - $request = $this->getUserBanPreferenceRequest($sso, $contentType); + $request = $this->getUserBanPreferenceRequest($tenant_id, $sso); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -8306,24 +7730,44 @@ function ($exception) { /** * Create request for operation 'getUserBanPreference' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUserBanPreference'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getUserBanPreferenceRequest($sso = null, string $contentType = self::contentTypes['getUserBanPreference'][0]) + public function getUserBanPreferenceRequest($tenant_id, $sso = null) { + $contentType = self::contentTypes['getUserBanPreference'][0]; + + // verify the required parameter 'tenant_id' is set + if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $tenant_id when calling getUserBanPreference' + ); + } - $resourcePath = '/auth/my-account/moderate-comments/user-ban-preference'; + $resourcePath = '/auth/my-account/moderate-comments/mod_api/user-ban-preference'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $tenant_id, + 'tenantId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $sso, @@ -8395,6 +7839,9 @@ public function getUserBanPreferenceRequest($sso = null, string $contentType = s * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id tenant_id (required) * @param string|null $comment_id comment_id (optional) * @param string|null $sso sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUserInternalProfile'] to see the possible values for this operation @@ -8403,9 +7850,9 @@ public function getUserBanPreferenceRequest($sso = null, string $contentType = s * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetUserInternalProfileResponse|\FastComments\Client\Model\APIError */ - public function getUserInternalProfile($comment_id = null, $sso = null, string $contentType = self::contentTypes['getUserInternalProfile'][0]) + public function getUserInternalProfile($tenant_id, array $options = []) { - list($response) = $this->getUserInternalProfileWithHttpInfo($comment_id, $sso, $contentType); + list($response) = $this->getUserInternalProfileWithHttpInfo($tenant_id, $options); return $response; } @@ -8414,6 +7861,9 @@ public function getUserInternalProfile($comment_id = null, $sso = null, string $ * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $comment_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUserInternalProfile'] to see the possible values for this operation @@ -8422,9 +7872,9 @@ public function getUserInternalProfile($comment_id = null, $sso = null, string $ * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetUserInternalProfileResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getUserInternalProfileWithHttpInfo($comment_id = null, $sso = null, string $contentType = self::contentTypes['getUserInternalProfile'][0]) + public function getUserInternalProfileWithHttpInfo($tenant_id, array $options = []) { - $request = $this->getUserInternalProfileRequest($comment_id, $sso, $contentType); + $request = $this->getUserInternalProfileRequest($tenant_id, $options); try { $options = $this->createHttpClientOption(); @@ -8451,61 +7901,21 @@ public function getUserInternalProfileWithHttpInfo($comment_id = null, $sso = nu switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetUserInternalProfileResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetUserInternalProfileResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetUserInternalProfileResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetUserInternalProfileResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -8519,34 +7929,11 @@ public function getUserInternalProfileWithHttpInfo($comment_id = null, $sso = nu ); } - $returnType = '\FastComments\Client\Model\GetUserInternalProfileResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetUserInternalProfileResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -8556,7 +7943,7 @@ public function getUserInternalProfileWithHttpInfo($comment_id = null, $sso = nu $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -8564,8 +7951,10 @@ public function getUserInternalProfileWithHttpInfo($comment_id = null, $sso = nu $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -8575,6 +7964,9 @@ public function getUserInternalProfileWithHttpInfo($comment_id = null, $sso = nu * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $comment_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUserInternalProfile'] to see the possible values for this operation @@ -8582,9 +7974,9 @@ public function getUserInternalProfileWithHttpInfo($comment_id = null, $sso = nu * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getUserInternalProfileAsync($comment_id = null, $sso = null, string $contentType = self::contentTypes['getUserInternalProfile'][0]) + public function getUserInternalProfileAsync($tenant_id, array $options = []) { - return $this->getUserInternalProfileAsyncWithHttpInfo($comment_id, $sso, $contentType) + return $this->getUserInternalProfileAsyncWithHttpInfo($tenant_id, $options) ->then( function ($response) { return $response[0]; @@ -8597,6 +7989,9 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $comment_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUserInternalProfile'] to see the possible values for this operation @@ -8604,10 +7999,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getUserInternalProfileAsyncWithHttpInfo($comment_id = null, $sso = null, string $contentType = self::contentTypes['getUserInternalProfile'][0]) + public function getUserInternalProfileAsyncWithHttpInfo($tenant_id, array $options = []) { $returnType = '\FastComments\Client\Model\GetUserInternalProfileResponse'; - $request = $this->getUserInternalProfileRequest($comment_id, $sso, $contentType); + $request = $this->getUserInternalProfileRequest($tenant_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -8648,6 +8043,9 @@ function ($exception) { /** * Create request for operation 'getUserInternalProfile' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $comment_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUserInternalProfile'] to see the possible values for this operation @@ -8655,19 +8053,39 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getUserInternalProfileRequest($comment_id = null, $sso = null, string $contentType = self::contentTypes['getUserInternalProfile'][0]) + public function getUserInternalProfileRequest($tenant_id, array $options = []) { + // unbox the optional parameters and request options from the $options array + $comment_id = array_key_exists('comment_id', $options) ? $options['comment_id'] : null; + $sso = array_key_exists('sso', $options) ? $options['sso'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['getUserInternalProfile'][0]; + + // verify the required parameter 'tenant_id' is set + if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $tenant_id when calling getUserInternalProfile' + ); + } - $resourcePath = '/auth/my-account/moderate-comments/get-user-internal-profile'; + $resourcePath = '/auth/my-account/moderate-comments/mod_api/get-user-internal-profile'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $tenant_id, + 'tenantId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $comment_id, @@ -8748,8 +8166,12 @@ public function getUserInternalProfileRequest($comment_id = null, $sso = null, s * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id tenant_id (required) * @param string $comment_id comment_id (required) * @param \FastComments\Client\Model\AdjustCommentVotesParams $adjust_comment_votes_params adjust_comment_votes_params (required) + * @param string|null $broadcast_id broadcast_id (optional) * @param string|null $sso sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postAdjustCommentVotes'] to see the possible values for this operation * @@ -8757,9 +8179,9 @@ public function getUserInternalProfileRequest($comment_id = null, $sso = null, s * @throws \InvalidArgumentException * @return \FastComments\Client\Model\AdjustVotesResponse|\FastComments\Client\Model\APIError */ - public function postAdjustCommentVotes($comment_id, $adjust_comment_votes_params, $sso = null, string $contentType = self::contentTypes['postAdjustCommentVotes'][0]) + public function postAdjustCommentVotes($tenant_id, $comment_id, $adjust_comment_votes_params, array $options = []) { - list($response) = $this->postAdjustCommentVotesWithHttpInfo($comment_id, $adjust_comment_votes_params, $sso, $contentType); + list($response) = $this->postAdjustCommentVotesWithHttpInfo($tenant_id, $comment_id, $adjust_comment_votes_params, $options); return $response; } @@ -8768,8 +8190,12 @@ public function postAdjustCommentVotes($comment_id, $adjust_comment_votes_params * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param \FastComments\Client\Model\AdjustCommentVotesParams $adjust_comment_votes_params (required) + * @param string|null $broadcast_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postAdjustCommentVotes'] to see the possible values for this operation * @@ -8777,9 +8203,9 @@ public function postAdjustCommentVotes($comment_id, $adjust_comment_votes_params * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\AdjustVotesResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function postAdjustCommentVotesWithHttpInfo($comment_id, $adjust_comment_votes_params, $sso = null, string $contentType = self::contentTypes['postAdjustCommentVotes'][0]) + public function postAdjustCommentVotesWithHttpInfo($tenant_id, $comment_id, $adjust_comment_votes_params, array $options = []) { - $request = $this->postAdjustCommentVotesRequest($comment_id, $adjust_comment_votes_params, $sso, $contentType); + $request = $this->postAdjustCommentVotesRequest($tenant_id, $comment_id, $adjust_comment_votes_params, $options); try { $options = $this->createHttpClientOption(); @@ -8806,61 +8232,21 @@ public function postAdjustCommentVotesWithHttpInfo($comment_id, $adjust_comment_ switch($statusCode) { case 200: - if ('\FastComments\Client\Model\AdjustVotesResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\AdjustVotesResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\AdjustVotesResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\AdjustVotesResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -8874,34 +8260,11 @@ public function postAdjustCommentVotesWithHttpInfo($comment_id, $adjust_comment_ ); } - $returnType = '\FastComments\Client\Model\AdjustVotesResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\AdjustVotesResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -8911,7 +8274,7 @@ public function postAdjustCommentVotesWithHttpInfo($comment_id, $adjust_comment_ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -8919,8 +8282,10 @@ public function postAdjustCommentVotesWithHttpInfo($comment_id, $adjust_comment_ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -8930,17 +8295,21 @@ public function postAdjustCommentVotesWithHttpInfo($comment_id, $adjust_comment_ * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param \FastComments\Client\Model\AdjustCommentVotesParams $adjust_comment_votes_params (required) + * @param string|null $broadcast_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postAdjustCommentVotes'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postAdjustCommentVotesAsync($comment_id, $adjust_comment_votes_params, $sso = null, string $contentType = self::contentTypes['postAdjustCommentVotes'][0]) + public function postAdjustCommentVotesAsync($tenant_id, $comment_id, $adjust_comment_votes_params, array $options = []) { - return $this->postAdjustCommentVotesAsyncWithHttpInfo($comment_id, $adjust_comment_votes_params, $sso, $contentType) + return $this->postAdjustCommentVotesAsyncWithHttpInfo($tenant_id, $comment_id, $adjust_comment_votes_params, $options) ->then( function ($response) { return $response[0]; @@ -8953,18 +8322,22 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param \FastComments\Client\Model\AdjustCommentVotesParams $adjust_comment_votes_params (required) + * @param string|null $broadcast_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postAdjustCommentVotes'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postAdjustCommentVotesAsyncWithHttpInfo($comment_id, $adjust_comment_votes_params, $sso = null, string $contentType = self::contentTypes['postAdjustCommentVotes'][0]) + public function postAdjustCommentVotesAsyncWithHttpInfo($tenant_id, $comment_id, $adjust_comment_votes_params, array $options = []) { $returnType = '\FastComments\Client\Model\AdjustVotesResponse'; - $request = $this->postAdjustCommentVotesRequest($comment_id, $adjust_comment_votes_params, $sso, $contentType); + $request = $this->postAdjustCommentVotesRequest($tenant_id, $comment_id, $adjust_comment_votes_params, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -9005,16 +8378,31 @@ function ($exception) { /** * Create request for operation 'postAdjustCommentVotes' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param \FastComments\Client\Model\AdjustCommentVotesParams $adjust_comment_votes_params (required) + * @param string|null $broadcast_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postAdjustCommentVotes'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function postAdjustCommentVotesRequest($comment_id, $adjust_comment_votes_params, $sso = null, string $contentType = self::contentTypes['postAdjustCommentVotes'][0]) + public function postAdjustCommentVotesRequest($tenant_id, $comment_id, $adjust_comment_votes_params, array $options = []) { + // unbox the optional parameters and request options from the $options array + $broadcast_id = array_key_exists('broadcast_id', $options) ? $options['broadcast_id'] : null; + $sso = array_key_exists('sso', $options) ? $options['sso'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['postAdjustCommentVotes'][0]; + + // verify the required parameter 'tenant_id' is set + if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $tenant_id when calling postAdjustCommentVotes' + ); + } // verify the required parameter 'comment_id' is set if ($comment_id === null || (is_array($comment_id) && count($comment_id) === 0)) { @@ -9032,13 +8420,32 @@ public function postAdjustCommentVotesRequest($comment_id, $adjust_comment_votes - $resourcePath = '/auth/my-account/moderate-comments/adjust-comment-votes/{commentId}'; + + $resourcePath = '/auth/my-account/moderate-comments/mod_api/adjust-comment-votes/{commentId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $tenant_id, + 'tenantId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $broadcast_id, + 'broadcastId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $sso, @@ -9053,7 +8460,7 @@ public function postAdjustCommentVotesRequest($comment_id, $adjust_comment_votes // path params if ($comment_id !== null) { $resourcePath = str_replace( - '{' . 'commentId' . '}', + '{commentId}', ObjectSerializer::toPathValue($comment_id), $resourcePath ); @@ -9125,6 +8532,9 @@ public function postAdjustCommentVotesRequest($comment_id, $adjust_comment_votes * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id tenant_id (required) * @param string|null $text_search text_search (optional) * @param string|null $by_ip_from_comment by_ip_from_comment (optional) * @param string|null $filters filters (optional) @@ -9137,9 +8547,9 @@ public function postAdjustCommentVotesRequest($comment_id, $adjust_comment_votes * @throws \InvalidArgumentException * @return \FastComments\Client\Model\ModerationExportResponse|\FastComments\Client\Model\APIError */ - public function postApiExport($text_search = null, $by_ip_from_comment = null, $filters = null, $search_filters = null, $sorts = null, $sso = null, string $contentType = self::contentTypes['postApiExport'][0]) + public function postApiExport($tenant_id, array $options = []) { - list($response) = $this->postApiExportWithHttpInfo($text_search, $by_ip_from_comment, $filters, $search_filters, $sorts, $sso, $contentType); + list($response) = $this->postApiExportWithHttpInfo($tenant_id, $options); return $response; } @@ -9148,6 +8558,9 @@ public function postApiExport($text_search = null, $by_ip_from_comment = null, $ * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $text_search (optional) * @param string|null $by_ip_from_comment (optional) * @param string|null $filters (optional) @@ -9160,9 +8573,9 @@ public function postApiExport($text_search = null, $by_ip_from_comment = null, $ * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\ModerationExportResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function postApiExportWithHttpInfo($text_search = null, $by_ip_from_comment = null, $filters = null, $search_filters = null, $sorts = null, $sso = null, string $contentType = self::contentTypes['postApiExport'][0]) + public function postApiExportWithHttpInfo($tenant_id, array $options = []) { - $request = $this->postApiExportRequest($text_search, $by_ip_from_comment, $filters, $search_filters, $sorts, $sso, $contentType); + $request = $this->postApiExportRequest($tenant_id, $options); try { $options = $this->createHttpClientOption(); @@ -9189,61 +8602,21 @@ public function postApiExportWithHttpInfo($text_search = null, $by_ip_from_comme switch($statusCode) { case 200: - if ('\FastComments\Client\Model\ModerationExportResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\ModerationExportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\ModerationExportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\ModerationExportResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -9257,34 +8630,11 @@ public function postApiExportWithHttpInfo($text_search = null, $by_ip_from_comme ); } - $returnType = '\FastComments\Client\Model\ModerationExportResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\ModerationExportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -9294,7 +8644,7 @@ public function postApiExportWithHttpInfo($text_search = null, $by_ip_from_comme $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -9302,8 +8652,10 @@ public function postApiExportWithHttpInfo($text_search = null, $by_ip_from_comme $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -9313,6 +8665,9 @@ public function postApiExportWithHttpInfo($text_search = null, $by_ip_from_comme * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $text_search (optional) * @param string|null $by_ip_from_comment (optional) * @param string|null $filters (optional) @@ -9324,9 +8679,9 @@ public function postApiExportWithHttpInfo($text_search = null, $by_ip_from_comme * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postApiExportAsync($text_search = null, $by_ip_from_comment = null, $filters = null, $search_filters = null, $sorts = null, $sso = null, string $contentType = self::contentTypes['postApiExport'][0]) + public function postApiExportAsync($tenant_id, array $options = []) { - return $this->postApiExportAsyncWithHttpInfo($text_search, $by_ip_from_comment, $filters, $search_filters, $sorts, $sso, $contentType) + return $this->postApiExportAsyncWithHttpInfo($tenant_id, $options) ->then( function ($response) { return $response[0]; @@ -9339,6 +8694,9 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $text_search (optional) * @param string|null $by_ip_from_comment (optional) * @param string|null $filters (optional) @@ -9350,10 +8708,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postApiExportAsyncWithHttpInfo($text_search = null, $by_ip_from_comment = null, $filters = null, $search_filters = null, $sorts = null, $sso = null, string $contentType = self::contentTypes['postApiExport'][0]) + public function postApiExportAsyncWithHttpInfo($tenant_id, array $options = []) { $returnType = '\FastComments\Client\Model\ModerationExportResponse'; - $request = $this->postApiExportRequest($text_search, $by_ip_from_comment, $filters, $search_filters, $sorts, $sso, $contentType); + $request = $this->postApiExportRequest($tenant_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -9394,6 +8752,9 @@ function ($exception) { /** * Create request for operation 'postApiExport' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $text_search (optional) * @param string|null $by_ip_from_comment (optional) * @param string|null $filters (optional) @@ -9405,8 +8766,23 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function postApiExportRequest($text_search = null, $by_ip_from_comment = null, $filters = null, $search_filters = null, $sorts = null, $sso = null, string $contentType = self::contentTypes['postApiExport'][0]) - { + public function postApiExportRequest($tenant_id, array $options = []) + { + // unbox the optional parameters and request options from the $options array + $text_search = array_key_exists('text_search', $options) ? $options['text_search'] : null; + $by_ip_from_comment = array_key_exists('by_ip_from_comment', $options) ? $options['by_ip_from_comment'] : null; + $filters = array_key_exists('filters', $options) ? $options['filters'] : null; + $search_filters = array_key_exists('search_filters', $options) ? $options['search_filters'] : null; + $sorts = array_key_exists('sorts', $options) ? $options['sorts'] : null; + $sso = array_key_exists('sso', $options) ? $options['sso'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['postApiExport'][0]; + + // verify the required parameter 'tenant_id' is set + if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $tenant_id when calling postApiExport' + ); + } @@ -9415,13 +8791,22 @@ public function postApiExportRequest($text_search = null, $by_ip_from_comment = - $resourcePath = '/auth/my-account/moderate-comments/api/export'; + $resourcePath = '/auth/my-account/moderate-comments/mod_api/api/export'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $tenant_id, + 'tenantId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $text_search, @@ -9538,6 +8923,9 @@ public function postApiExportRequest($text_search = null, $by_ip_from_comment = * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id tenant_id (required) * @param string $comment_id comment_id (required) * @param bool|null $ban_email ban_email (optional) * @param bool|null $ban_email_domain ban_email_domain (optional) @@ -9554,9 +8942,9 @@ public function postApiExportRequest($text_search = null, $by_ip_from_comment = * @throws \InvalidArgumentException * @return \FastComments\Client\Model\BanUserFromCommentResult|\FastComments\Client\Model\APIError */ - public function postBanUserFromComment($comment_id, $ban_email = null, $ban_email_domain = null, $ban_ip = null, $delete_all_users_comments = null, $banned_until = null, $is_shadow_ban = null, $update_id = null, $ban_reason = null, $sso = null, string $contentType = self::contentTypes['postBanUserFromComment'][0]) + public function postBanUserFromComment($tenant_id, $comment_id, array $options = []) { - list($response) = $this->postBanUserFromCommentWithHttpInfo($comment_id, $ban_email, $ban_email_domain, $ban_ip, $delete_all_users_comments, $banned_until, $is_shadow_ban, $update_id, $ban_reason, $sso, $contentType); + list($response) = $this->postBanUserFromCommentWithHttpInfo($tenant_id, $comment_id, $options); return $response; } @@ -9565,6 +8953,9 @@ public function postBanUserFromComment($comment_id, $ban_email = null, $ban_emai * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param bool|null $ban_email (optional) * @param bool|null $ban_email_domain (optional) @@ -9581,9 +8972,9 @@ public function postBanUserFromComment($comment_id, $ban_email = null, $ban_emai * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\BanUserFromCommentResult|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function postBanUserFromCommentWithHttpInfo($comment_id, $ban_email = null, $ban_email_domain = null, $ban_ip = null, $delete_all_users_comments = null, $banned_until = null, $is_shadow_ban = null, $update_id = null, $ban_reason = null, $sso = null, string $contentType = self::contentTypes['postBanUserFromComment'][0]) + public function postBanUserFromCommentWithHttpInfo($tenant_id, $comment_id, array $options = []) { - $request = $this->postBanUserFromCommentRequest($comment_id, $ban_email, $ban_email_domain, $ban_ip, $delete_all_users_comments, $banned_until, $is_shadow_ban, $update_id, $ban_reason, $sso, $contentType); + $request = $this->postBanUserFromCommentRequest($tenant_id, $comment_id, $options); try { $options = $this->createHttpClientOption(); @@ -9610,61 +9001,21 @@ public function postBanUserFromCommentWithHttpInfo($comment_id, $ban_email = nul switch($statusCode) { case 200: - if ('\FastComments\Client\Model\BanUserFromCommentResult' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\BanUserFromCommentResult' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\BanUserFromCommentResult', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\BanUserFromCommentResult', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -9678,34 +9029,11 @@ public function postBanUserFromCommentWithHttpInfo($comment_id, $ban_email = nul ); } - $returnType = '\FastComments\Client\Model\BanUserFromCommentResult'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\BanUserFromCommentResult', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -9715,7 +9043,7 @@ public function postBanUserFromCommentWithHttpInfo($comment_id, $ban_email = nul $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -9723,8 +9051,10 @@ public function postBanUserFromCommentWithHttpInfo($comment_id, $ban_email = nul $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -9734,6 +9064,9 @@ public function postBanUserFromCommentWithHttpInfo($comment_id, $ban_email = nul * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param bool|null $ban_email (optional) * @param bool|null $ban_email_domain (optional) @@ -9749,9 +9082,9 @@ public function postBanUserFromCommentWithHttpInfo($comment_id, $ban_email = nul * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postBanUserFromCommentAsync($comment_id, $ban_email = null, $ban_email_domain = null, $ban_ip = null, $delete_all_users_comments = null, $banned_until = null, $is_shadow_ban = null, $update_id = null, $ban_reason = null, $sso = null, string $contentType = self::contentTypes['postBanUserFromComment'][0]) + public function postBanUserFromCommentAsync($tenant_id, $comment_id, array $options = []) { - return $this->postBanUserFromCommentAsyncWithHttpInfo($comment_id, $ban_email, $ban_email_domain, $ban_ip, $delete_all_users_comments, $banned_until, $is_shadow_ban, $update_id, $ban_reason, $sso, $contentType) + return $this->postBanUserFromCommentAsyncWithHttpInfo($tenant_id, $comment_id, $options) ->then( function ($response) { return $response[0]; @@ -9764,6 +9097,9 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param bool|null $ban_email (optional) * @param bool|null $ban_email_domain (optional) @@ -9779,10 +9115,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postBanUserFromCommentAsyncWithHttpInfo($comment_id, $ban_email = null, $ban_email_domain = null, $ban_ip = null, $delete_all_users_comments = null, $banned_until = null, $is_shadow_ban = null, $update_id = null, $ban_reason = null, $sso = null, string $contentType = self::contentTypes['postBanUserFromComment'][0]) + public function postBanUserFromCommentAsyncWithHttpInfo($tenant_id, $comment_id, array $options = []) { $returnType = '\FastComments\Client\Model\BanUserFromCommentResult'; - $request = $this->postBanUserFromCommentRequest($comment_id, $ban_email, $ban_email_domain, $ban_ip, $delete_all_users_comments, $banned_until, $is_shadow_ban, $update_id, $ban_reason, $sso, $contentType); + $request = $this->postBanUserFromCommentRequest($tenant_id, $comment_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -9823,6 +9159,9 @@ function ($exception) { /** * Create request for operation 'postBanUserFromComment' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param bool|null $ban_email (optional) * @param bool|null $ban_email_domain (optional) @@ -9838,8 +9177,26 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function postBanUserFromCommentRequest($comment_id, $ban_email = null, $ban_email_domain = null, $ban_ip = null, $delete_all_users_comments = null, $banned_until = null, $is_shadow_ban = null, $update_id = null, $ban_reason = null, $sso = null, string $contentType = self::contentTypes['postBanUserFromComment'][0]) - { + public function postBanUserFromCommentRequest($tenant_id, $comment_id, array $options = []) + { + // unbox the optional parameters and request options from the $options array + $ban_email = array_key_exists('ban_email', $options) ? $options['ban_email'] : null; + $ban_email_domain = array_key_exists('ban_email_domain', $options) ? $options['ban_email_domain'] : null; + $ban_ip = array_key_exists('ban_ip', $options) ? $options['ban_ip'] : null; + $delete_all_users_comments = array_key_exists('delete_all_users_comments', $options) ? $options['delete_all_users_comments'] : null; + $banned_until = array_key_exists('banned_until', $options) ? $options['banned_until'] : null; + $is_shadow_ban = array_key_exists('is_shadow_ban', $options) ? $options['is_shadow_ban'] : null; + $update_id = array_key_exists('update_id', $options) ? $options['update_id'] : null; + $ban_reason = array_key_exists('ban_reason', $options) ? $options['ban_reason'] : null; + $sso = array_key_exists('sso', $options) ? $options['sso'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['postBanUserFromComment'][0]; + + // verify the required parameter 'tenant_id' is set + if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $tenant_id when calling postBanUserFromComment' + ); + } // verify the required parameter 'comment_id' is set if ($comment_id === null || (is_array($comment_id) && count($comment_id) === 0)) { @@ -9858,13 +9215,22 @@ public function postBanUserFromCommentRequest($comment_id, $ban_email = null, $b - $resourcePath = '/auth/my-account/moderate-comments/ban-user/from-comment/{commentId}'; + $resourcePath = '/auth/my-account/moderate-comments/mod_api/ban-user/from-comment/{commentId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $tenant_id, + 'tenantId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $ban_email, @@ -9951,7 +9317,7 @@ public function postBanUserFromCommentRequest($comment_id, $ban_email = null, $b // path params if ($comment_id !== null) { $resourcePath = str_replace( - '{' . 'commentId' . '}', + '{commentId}', ObjectSerializer::toPathValue($comment_id), $resourcePath ); @@ -10016,6 +9382,9 @@ public function postBanUserFromCommentRequest($comment_id, $ban_email = null, $b * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id tenant_id (required) * @param \FastComments\Client\Model\BanUserUndoParams $ban_user_undo_params ban_user_undo_params (required) * @param string|null $sso sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postBanUserUndo'] to see the possible values for this operation @@ -10024,9 +9393,9 @@ public function postBanUserFromCommentRequest($comment_id, $ban_email = null, $b * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError */ - public function postBanUserUndo($ban_user_undo_params, $sso = null, string $contentType = self::contentTypes['postBanUserUndo'][0]) + public function postBanUserUndo($tenant_id, $ban_user_undo_params, $sso = null) { - list($response) = $this->postBanUserUndoWithHttpInfo($ban_user_undo_params, $sso, $contentType); + list($response) = $this->postBanUserUndoWithHttpInfo($tenant_id, $ban_user_undo_params, $sso); return $response; } @@ -10035,6 +9404,9 @@ public function postBanUserUndo($ban_user_undo_params, $sso = null, string $cont * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param \FastComments\Client\Model\BanUserUndoParams $ban_user_undo_params (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postBanUserUndo'] to see the possible values for this operation @@ -10043,9 +9415,9 @@ public function postBanUserUndo($ban_user_undo_params, $sso = null, string $cont * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function postBanUserUndoWithHttpInfo($ban_user_undo_params, $sso = null, string $contentType = self::contentTypes['postBanUserUndo'][0]) + public function postBanUserUndoWithHttpInfo($tenant_id, $ban_user_undo_params, $sso = null) { - $request = $this->postBanUserUndoRequest($ban_user_undo_params, $sso, $contentType); + $request = $this->postBanUserUndoRequest($tenant_id, $ban_user_undo_params, $sso); try { $options = $this->createHttpClientOption(); @@ -10072,61 +9444,21 @@ public function postBanUserUndoWithHttpInfo($ban_user_undo_params, $sso = null, switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APIEmptyResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIEmptyResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIEmptyResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -10140,34 +9472,11 @@ public function postBanUserUndoWithHttpInfo($ban_user_undo_params, $sso = null, ); } - $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -10177,7 +9486,7 @@ public function postBanUserUndoWithHttpInfo($ban_user_undo_params, $sso = null, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -10185,8 +9494,10 @@ public function postBanUserUndoWithHttpInfo($ban_user_undo_params, $sso = null, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -10196,6 +9507,9 @@ public function postBanUserUndoWithHttpInfo($ban_user_undo_params, $sso = null, * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param \FastComments\Client\Model\BanUserUndoParams $ban_user_undo_params (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postBanUserUndo'] to see the possible values for this operation @@ -10203,9 +9517,9 @@ public function postBanUserUndoWithHttpInfo($ban_user_undo_params, $sso = null, * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postBanUserUndoAsync($ban_user_undo_params, $sso = null, string $contentType = self::contentTypes['postBanUserUndo'][0]) + public function postBanUserUndoAsync($tenant_id, $ban_user_undo_params, $sso = null) { - return $this->postBanUserUndoAsyncWithHttpInfo($ban_user_undo_params, $sso, $contentType) + return $this->postBanUserUndoAsyncWithHttpInfo($tenant_id, $ban_user_undo_params, $sso) ->then( function ($response) { return $response[0]; @@ -10218,6 +9532,9 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param \FastComments\Client\Model\BanUserUndoParams $ban_user_undo_params (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postBanUserUndo'] to see the possible values for this operation @@ -10225,10 +9542,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postBanUserUndoAsyncWithHttpInfo($ban_user_undo_params, $sso = null, string $contentType = self::contentTypes['postBanUserUndo'][0]) + public function postBanUserUndoAsyncWithHttpInfo($tenant_id, $ban_user_undo_params, $sso = null) { $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - $request = $this->postBanUserUndoRequest($ban_user_undo_params, $sso, $contentType); + $request = $this->postBanUserUndoRequest($tenant_id, $ban_user_undo_params, $sso); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -10269,6 +9586,9 @@ function ($exception) { /** * Create request for operation 'postBanUserUndo' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param \FastComments\Client\Model\BanUserUndoParams $ban_user_undo_params (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postBanUserUndo'] to see the possible values for this operation @@ -10276,8 +9596,16 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function postBanUserUndoRequest($ban_user_undo_params, $sso = null, string $contentType = self::contentTypes['postBanUserUndo'][0]) + public function postBanUserUndoRequest($tenant_id, $ban_user_undo_params, $sso = null) { + $contentType = self::contentTypes['postBanUserUndo'][0]; + + // verify the required parameter 'tenant_id' is set + if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $tenant_id when calling postBanUserUndo' + ); + } // verify the required parameter 'ban_user_undo_params' is set if ($ban_user_undo_params === null || (is_array($ban_user_undo_params) && count($ban_user_undo_params) === 0)) { @@ -10288,13 +9616,22 @@ public function postBanUserUndoRequest($ban_user_undo_params, $sso = null, strin - $resourcePath = '/auth/my-account/moderate-comments/ban-user/undo'; + $resourcePath = '/auth/my-account/moderate-comments/mod_api/ban-user/undo'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $tenant_id, + 'tenantId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $sso, @@ -10373,6 +9710,9 @@ public function postBanUserUndoRequest($ban_user_undo_params, $sso = null, strin * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id tenant_id (required) * @param \FastComments\Client\Model\BulkPreBanParams $bulk_pre_ban_params bulk_pre_ban_params (required) * @param bool|null $include_by_user_id_and_email include_by_user_id_and_email (optional) * @param bool|null $include_by_ip include_by_ip (optional) @@ -10384,9 +9724,9 @@ public function postBanUserUndoRequest($ban_user_undo_params, $sso = null, strin * @throws \InvalidArgumentException * @return \FastComments\Client\Model\BulkPreBanSummary|\FastComments\Client\Model\APIError */ - public function postBulkPreBanSummary($bulk_pre_ban_params, $include_by_user_id_and_email = null, $include_by_ip = null, $include_by_email_domain = null, $sso = null, string $contentType = self::contentTypes['postBulkPreBanSummary'][0]) + public function postBulkPreBanSummary($tenant_id, $bulk_pre_ban_params, array $options = []) { - list($response) = $this->postBulkPreBanSummaryWithHttpInfo($bulk_pre_ban_params, $include_by_user_id_and_email, $include_by_ip, $include_by_email_domain, $sso, $contentType); + list($response) = $this->postBulkPreBanSummaryWithHttpInfo($tenant_id, $bulk_pre_ban_params, $options); return $response; } @@ -10395,6 +9735,9 @@ public function postBulkPreBanSummary($bulk_pre_ban_params, $include_by_user_id_ * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param \FastComments\Client\Model\BulkPreBanParams $bulk_pre_ban_params (required) * @param bool|null $include_by_user_id_and_email (optional) * @param bool|null $include_by_ip (optional) @@ -10406,9 +9749,9 @@ public function postBulkPreBanSummary($bulk_pre_ban_params, $include_by_user_id_ * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\BulkPreBanSummary|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function postBulkPreBanSummaryWithHttpInfo($bulk_pre_ban_params, $include_by_user_id_and_email = null, $include_by_ip = null, $include_by_email_domain = null, $sso = null, string $contentType = self::contentTypes['postBulkPreBanSummary'][0]) + public function postBulkPreBanSummaryWithHttpInfo($tenant_id, $bulk_pre_ban_params, array $options = []) { - $request = $this->postBulkPreBanSummaryRequest($bulk_pre_ban_params, $include_by_user_id_and_email, $include_by_ip, $include_by_email_domain, $sso, $contentType); + $request = $this->postBulkPreBanSummaryRequest($tenant_id, $bulk_pre_ban_params, $options); try { $options = $this->createHttpClientOption(); @@ -10435,61 +9778,21 @@ public function postBulkPreBanSummaryWithHttpInfo($bulk_pre_ban_params, $include switch($statusCode) { case 200: - if ('\FastComments\Client\Model\BulkPreBanSummary' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\BulkPreBanSummary' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\BulkPreBanSummary', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\BulkPreBanSummary', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -10503,34 +9806,11 @@ public function postBulkPreBanSummaryWithHttpInfo($bulk_pre_ban_params, $include ); } - $returnType = '\FastComments\Client\Model\BulkPreBanSummary'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\BulkPreBanSummary', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -10540,7 +9820,7 @@ public function postBulkPreBanSummaryWithHttpInfo($bulk_pre_ban_params, $include $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -10548,8 +9828,10 @@ public function postBulkPreBanSummaryWithHttpInfo($bulk_pre_ban_params, $include $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -10559,6 +9841,9 @@ public function postBulkPreBanSummaryWithHttpInfo($bulk_pre_ban_params, $include * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param \FastComments\Client\Model\BulkPreBanParams $bulk_pre_ban_params (required) * @param bool|null $include_by_user_id_and_email (optional) * @param bool|null $include_by_ip (optional) @@ -10569,9 +9854,9 @@ public function postBulkPreBanSummaryWithHttpInfo($bulk_pre_ban_params, $include * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postBulkPreBanSummaryAsync($bulk_pre_ban_params, $include_by_user_id_and_email = null, $include_by_ip = null, $include_by_email_domain = null, $sso = null, string $contentType = self::contentTypes['postBulkPreBanSummary'][0]) + public function postBulkPreBanSummaryAsync($tenant_id, $bulk_pre_ban_params, array $options = []) { - return $this->postBulkPreBanSummaryAsyncWithHttpInfo($bulk_pre_ban_params, $include_by_user_id_and_email, $include_by_ip, $include_by_email_domain, $sso, $contentType) + return $this->postBulkPreBanSummaryAsyncWithHttpInfo($tenant_id, $bulk_pre_ban_params, $options) ->then( function ($response) { return $response[0]; @@ -10584,6 +9869,9 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param \FastComments\Client\Model\BulkPreBanParams $bulk_pre_ban_params (required) * @param bool|null $include_by_user_id_and_email (optional) * @param bool|null $include_by_ip (optional) @@ -10594,10 +9882,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postBulkPreBanSummaryAsyncWithHttpInfo($bulk_pre_ban_params, $include_by_user_id_and_email = null, $include_by_ip = null, $include_by_email_domain = null, $sso = null, string $contentType = self::contentTypes['postBulkPreBanSummary'][0]) + public function postBulkPreBanSummaryAsyncWithHttpInfo($tenant_id, $bulk_pre_ban_params, array $options = []) { $returnType = '\FastComments\Client\Model\BulkPreBanSummary'; - $request = $this->postBulkPreBanSummaryRequest($bulk_pre_ban_params, $include_by_user_id_and_email, $include_by_ip, $include_by_email_domain, $sso, $contentType); + $request = $this->postBulkPreBanSummaryRequest($tenant_id, $bulk_pre_ban_params, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -10638,6 +9926,9 @@ function ($exception) { /** * Create request for operation 'postBulkPreBanSummary' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param \FastComments\Client\Model\BulkPreBanParams $bulk_pre_ban_params (required) * @param bool|null $include_by_user_id_and_email (optional) * @param bool|null $include_by_ip (optional) @@ -10648,8 +9939,21 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function postBulkPreBanSummaryRequest($bulk_pre_ban_params, $include_by_user_id_and_email = null, $include_by_ip = null, $include_by_email_domain = null, $sso = null, string $contentType = self::contentTypes['postBulkPreBanSummary'][0]) - { + public function postBulkPreBanSummaryRequest($tenant_id, $bulk_pre_ban_params, array $options = []) + { + // unbox the optional parameters and request options from the $options array + $include_by_user_id_and_email = array_key_exists('include_by_user_id_and_email', $options) ? $options['include_by_user_id_and_email'] : null; + $include_by_ip = array_key_exists('include_by_ip', $options) ? $options['include_by_ip'] : null; + $include_by_email_domain = array_key_exists('include_by_email_domain', $options) ? $options['include_by_email_domain'] : null; + $sso = array_key_exists('sso', $options) ? $options['sso'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['postBulkPreBanSummary'][0]; + + // verify the required parameter 'tenant_id' is set + if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $tenant_id when calling postBulkPreBanSummary' + ); + } // verify the required parameter 'bulk_pre_ban_params' is set if ($bulk_pre_ban_params === null || (is_array($bulk_pre_ban_params) && count($bulk_pre_ban_params) === 0)) { @@ -10663,13 +9967,22 @@ public function postBulkPreBanSummaryRequest($bulk_pre_ban_params, $include_by_u - $resourcePath = '/auth/my-account/moderate-comments/bulk-pre-ban-summary'; + $resourcePath = '/auth/my-account/moderate-comments/mod_api/bulk-pre-ban-summary'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $tenant_id, + 'tenantId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $include_by_user_id_and_email, @@ -10775,6 +10088,9 @@ public function postBulkPreBanSummaryRequest($bulk_pre_ban_params, $include_by_u * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id tenant_id (required) * @param \FastComments\Client\Model\CommentsByIdsParams $comments_by_ids_params comments_by_ids_params (required) * @param string|null $sso sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postCommentsByIds'] to see the possible values for this operation @@ -10783,9 +10099,9 @@ public function postBulkPreBanSummaryRequest($bulk_pre_ban_params, $include_by_u * @throws \InvalidArgumentException * @return \FastComments\Client\Model\ModerationAPIChildCommentsResponse|\FastComments\Client\Model\APIError */ - public function postCommentsByIds($comments_by_ids_params, $sso = null, string $contentType = self::contentTypes['postCommentsByIds'][0]) + public function postCommentsByIds($tenant_id, $comments_by_ids_params, $sso = null) { - list($response) = $this->postCommentsByIdsWithHttpInfo($comments_by_ids_params, $sso, $contentType); + list($response) = $this->postCommentsByIdsWithHttpInfo($tenant_id, $comments_by_ids_params, $sso); return $response; } @@ -10794,6 +10110,9 @@ public function postCommentsByIds($comments_by_ids_params, $sso = null, string $ * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param \FastComments\Client\Model\CommentsByIdsParams $comments_by_ids_params (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postCommentsByIds'] to see the possible values for this operation @@ -10802,9 +10121,9 @@ public function postCommentsByIds($comments_by_ids_params, $sso = null, string $ * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\ModerationAPIChildCommentsResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function postCommentsByIdsWithHttpInfo($comments_by_ids_params, $sso = null, string $contentType = self::contentTypes['postCommentsByIds'][0]) + public function postCommentsByIdsWithHttpInfo($tenant_id, $comments_by_ids_params, $sso = null) { - $request = $this->postCommentsByIdsRequest($comments_by_ids_params, $sso, $contentType); + $request = $this->postCommentsByIdsRequest($tenant_id, $comments_by_ids_params, $sso); try { $options = $this->createHttpClientOption(); @@ -10831,61 +10150,21 @@ public function postCommentsByIdsWithHttpInfo($comments_by_ids_params, $sso = nu switch($statusCode) { case 200: - if ('\FastComments\Client\Model\ModerationAPIChildCommentsResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\ModerationAPIChildCommentsResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\ModerationAPIChildCommentsResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\ModerationAPIChildCommentsResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -10899,34 +10178,11 @@ public function postCommentsByIdsWithHttpInfo($comments_by_ids_params, $sso = nu ); } - $returnType = '\FastComments\Client\Model\ModerationAPIChildCommentsResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\ModerationAPIChildCommentsResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -10936,7 +10192,7 @@ public function postCommentsByIdsWithHttpInfo($comments_by_ids_params, $sso = nu $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -10944,8 +10200,10 @@ public function postCommentsByIdsWithHttpInfo($comments_by_ids_params, $sso = nu $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -10955,6 +10213,9 @@ public function postCommentsByIdsWithHttpInfo($comments_by_ids_params, $sso = nu * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param \FastComments\Client\Model\CommentsByIdsParams $comments_by_ids_params (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postCommentsByIds'] to see the possible values for this operation @@ -10962,9 +10223,9 @@ public function postCommentsByIdsWithHttpInfo($comments_by_ids_params, $sso = nu * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postCommentsByIdsAsync($comments_by_ids_params, $sso = null, string $contentType = self::contentTypes['postCommentsByIds'][0]) + public function postCommentsByIdsAsync($tenant_id, $comments_by_ids_params, $sso = null) { - return $this->postCommentsByIdsAsyncWithHttpInfo($comments_by_ids_params, $sso, $contentType) + return $this->postCommentsByIdsAsyncWithHttpInfo($tenant_id, $comments_by_ids_params, $sso) ->then( function ($response) { return $response[0]; @@ -10977,6 +10238,9 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param \FastComments\Client\Model\CommentsByIdsParams $comments_by_ids_params (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postCommentsByIds'] to see the possible values for this operation @@ -10984,10 +10248,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postCommentsByIdsAsyncWithHttpInfo($comments_by_ids_params, $sso = null, string $contentType = self::contentTypes['postCommentsByIds'][0]) + public function postCommentsByIdsAsyncWithHttpInfo($tenant_id, $comments_by_ids_params, $sso = null) { $returnType = '\FastComments\Client\Model\ModerationAPIChildCommentsResponse'; - $request = $this->postCommentsByIdsRequest($comments_by_ids_params, $sso, $contentType); + $request = $this->postCommentsByIdsRequest($tenant_id, $comments_by_ids_params, $sso); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -11028,6 +10292,9 @@ function ($exception) { /** * Create request for operation 'postCommentsByIds' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param \FastComments\Client\Model\CommentsByIdsParams $comments_by_ids_params (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postCommentsByIds'] to see the possible values for this operation @@ -11035,8 +10302,16 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function postCommentsByIdsRequest($comments_by_ids_params, $sso = null, string $contentType = self::contentTypes['postCommentsByIds'][0]) + public function postCommentsByIdsRequest($tenant_id, $comments_by_ids_params, $sso = null) { + $contentType = self::contentTypes['postCommentsByIds'][0]; + + // verify the required parameter 'tenant_id' is set + if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $tenant_id when calling postCommentsByIds' + ); + } // verify the required parameter 'comments_by_ids_params' is set if ($comments_by_ids_params === null || (is_array($comments_by_ids_params) && count($comments_by_ids_params) === 0)) { @@ -11047,13 +10322,22 @@ public function postCommentsByIdsRequest($comments_by_ids_params, $sso = null, s - $resourcePath = '/auth/my-account/moderate-comments/comments-by-ids'; + $resourcePath = '/auth/my-account/moderate-comments/mod_api/comments-by-ids'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $tenant_id, + 'tenantId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $sso, @@ -11132,7 +10416,11 @@ public function postCommentsByIdsRequest($comments_by_ids_params, $sso = null, s * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id tenant_id (required) * @param string $comment_id comment_id (required) + * @param string|null $broadcast_id broadcast_id (optional) * @param string|null $sso sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postFlagComment'] to see the possible values for this operation * @@ -11140,9 +10428,9 @@ public function postCommentsByIdsRequest($comments_by_ids_params, $sso = null, s * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError */ - public function postFlagComment($comment_id, $sso = null, string $contentType = self::contentTypes['postFlagComment'][0]) + public function postFlagComment($tenant_id, $comment_id, array $options = []) { - list($response) = $this->postFlagCommentWithHttpInfo($comment_id, $sso, $contentType); + list($response) = $this->postFlagCommentWithHttpInfo($tenant_id, $comment_id, $options); return $response; } @@ -11151,7 +10439,11 @@ public function postFlagComment($comment_id, $sso = null, string $contentType = * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) + * @param string|null $broadcast_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postFlagComment'] to see the possible values for this operation * @@ -11159,9 +10451,9 @@ public function postFlagComment($comment_id, $sso = null, string $contentType = * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function postFlagCommentWithHttpInfo($comment_id, $sso = null, string $contentType = self::contentTypes['postFlagComment'][0]) + public function postFlagCommentWithHttpInfo($tenant_id, $comment_id, array $options = []) { - $request = $this->postFlagCommentRequest($comment_id, $sso, $contentType); + $request = $this->postFlagCommentRequest($tenant_id, $comment_id, $options); try { $options = $this->createHttpClientOption(); @@ -11188,61 +10480,21 @@ public function postFlagCommentWithHttpInfo($comment_id, $sso = null, string $co switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APIEmptyResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIEmptyResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIEmptyResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -11256,34 +10508,11 @@ public function postFlagCommentWithHttpInfo($comment_id, $sso = null, string $co ); } - $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -11293,7 +10522,7 @@ public function postFlagCommentWithHttpInfo($comment_id, $sso = null, string $co $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -11301,8 +10530,10 @@ public function postFlagCommentWithHttpInfo($comment_id, $sso = null, string $co $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -11312,16 +10543,20 @@ public function postFlagCommentWithHttpInfo($comment_id, $sso = null, string $co * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) + * @param string|null $broadcast_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postFlagComment'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postFlagCommentAsync($comment_id, $sso = null, string $contentType = self::contentTypes['postFlagComment'][0]) + public function postFlagCommentAsync($tenant_id, $comment_id, array $options = []) { - return $this->postFlagCommentAsyncWithHttpInfo($comment_id, $sso, $contentType) + return $this->postFlagCommentAsyncWithHttpInfo($tenant_id, $comment_id, $options) ->then( function ($response) { return $response[0]; @@ -11334,17 +10569,21 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) + * @param string|null $broadcast_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postFlagComment'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postFlagCommentAsyncWithHttpInfo($comment_id, $sso = null, string $contentType = self::contentTypes['postFlagComment'][0]) + public function postFlagCommentAsyncWithHttpInfo($tenant_id, $comment_id, array $options = []) { $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - $request = $this->postFlagCommentRequest($comment_id, $sso, $contentType); + $request = $this->postFlagCommentRequest($tenant_id, $comment_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -11385,15 +10624,30 @@ function ($exception) { /** * Create request for operation 'postFlagComment' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) + * @param string|null $broadcast_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postFlagComment'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function postFlagCommentRequest($comment_id, $sso = null, string $contentType = self::contentTypes['postFlagComment'][0]) + public function postFlagCommentRequest($tenant_id, $comment_id, array $options = []) { + // unbox the optional parameters and request options from the $options array + $broadcast_id = array_key_exists('broadcast_id', $options) ? $options['broadcast_id'] : null; + $sso = array_key_exists('sso', $options) ? $options['sso'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['postFlagComment'][0]; + + // verify the required parameter 'tenant_id' is set + if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $tenant_id when calling postFlagComment' + ); + } // verify the required parameter 'comment_id' is set if ($comment_id === null || (is_array($comment_id) && count($comment_id) === 0)) { @@ -11404,13 +10658,32 @@ public function postFlagCommentRequest($comment_id, $sso = null, string $content - $resourcePath = '/auth/my-account/moderate-comments/flag-comment/{commentId}'; + + $resourcePath = '/auth/my-account/moderate-comments/mod_api/flag-comment/{commentId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $tenant_id, + 'tenantId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $broadcast_id, + 'broadcastId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $sso, @@ -11425,7 +10698,7 @@ public function postFlagCommentRequest($comment_id, $sso = null, string $content // path params if ($comment_id !== null) { $resourcePath = str_replace( - '{' . 'commentId' . '}', + '{commentId}', ObjectSerializer::toPathValue($comment_id), $resourcePath ); @@ -11490,17 +10763,21 @@ public function postFlagCommentRequest($comment_id, $sso = null, string $content * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id tenant_id (required) * @param string $comment_id comment_id (required) + * @param string|null $broadcast_id broadcast_id (optional) * @param string|null $sso sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postRemoveComment'] to see the possible values for this operation * * @throws \FastComments\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \FastComments\Client\Model\PostRemoveCommentResponse|\FastComments\Client\Model\APIError + * @return \FastComments\Client\Model\PostRemoveCommentApiResponse|\FastComments\Client\Model\APIError */ - public function postRemoveComment($comment_id, $sso = null, string $contentType = self::contentTypes['postRemoveComment'][0]) + public function postRemoveComment($tenant_id, $comment_id, array $options = []) { - list($response) = $this->postRemoveCommentWithHttpInfo($comment_id, $sso, $contentType); + list($response) = $this->postRemoveCommentWithHttpInfo($tenant_id, $comment_id, $options); return $response; } @@ -11509,17 +10786,21 @@ public function postRemoveComment($comment_id, $sso = null, string $contentType * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) + * @param string|null $broadcast_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postRemoveComment'] to see the possible values for this operation * * @throws \FastComments\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \FastComments\Client\Model\PostRemoveCommentResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) + * @return array of \FastComments\Client\Model\PostRemoveCommentApiResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function postRemoveCommentWithHttpInfo($comment_id, $sso = null, string $contentType = self::contentTypes['postRemoveComment'][0]) + public function postRemoveCommentWithHttpInfo($tenant_id, $comment_id, array $options = []) { - $request = $this->postRemoveCommentRequest($comment_id, $sso, $contentType); + $request = $this->postRemoveCommentRequest($tenant_id, $comment_id, $options); try { $options = $this->createHttpClientOption(); @@ -11546,61 +10827,21 @@ public function postRemoveCommentWithHttpInfo($comment_id, $sso = null, string $ switch($statusCode) { case 200: - if ('\FastComments\Client\Model\PostRemoveCommentResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\PostRemoveCommentResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\PostRemoveCommentResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\PostRemoveCommentApiResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -11614,44 +10855,21 @@ public function postRemoveCommentWithHttpInfo($comment_id, $sso = null, string $ ); } - $returnType = '\FastComments\Client\Model\PostRemoveCommentResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\PostRemoveCommentApiResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\FastComments\Client\Model\PostRemoveCommentResponse', + '\FastComments\Client\Model\PostRemoveCommentApiResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -11659,8 +10877,10 @@ public function postRemoveCommentWithHttpInfo($comment_id, $sso = null, string $ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -11670,16 +10890,20 @@ public function postRemoveCommentWithHttpInfo($comment_id, $sso = null, string $ * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) + * @param string|null $broadcast_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postRemoveComment'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postRemoveCommentAsync($comment_id, $sso = null, string $contentType = self::contentTypes['postRemoveComment'][0]) + public function postRemoveCommentAsync($tenant_id, $comment_id, array $options = []) { - return $this->postRemoveCommentAsyncWithHttpInfo($comment_id, $sso, $contentType) + return $this->postRemoveCommentAsyncWithHttpInfo($tenant_id, $comment_id, $options) ->then( function ($response) { return $response[0]; @@ -11692,17 +10916,21 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) + * @param string|null $broadcast_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postRemoveComment'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postRemoveCommentAsyncWithHttpInfo($comment_id, $sso = null, string $contentType = self::contentTypes['postRemoveComment'][0]) + public function postRemoveCommentAsyncWithHttpInfo($tenant_id, $comment_id, array $options = []) { - $returnType = '\FastComments\Client\Model\PostRemoveCommentResponse'; - $request = $this->postRemoveCommentRequest($comment_id, $sso, $contentType); + $returnType = '\FastComments\Client\Model\PostRemoveCommentApiResponse'; + $request = $this->postRemoveCommentRequest($tenant_id, $comment_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -11743,15 +10971,30 @@ function ($exception) { /** * Create request for operation 'postRemoveComment' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) + * @param string|null $broadcast_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postRemoveComment'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function postRemoveCommentRequest($comment_id, $sso = null, string $contentType = self::contentTypes['postRemoveComment'][0]) + public function postRemoveCommentRequest($tenant_id, $comment_id, array $options = []) { + // unbox the optional parameters and request options from the $options array + $broadcast_id = array_key_exists('broadcast_id', $options) ? $options['broadcast_id'] : null; + $sso = array_key_exists('sso', $options) ? $options['sso'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['postRemoveComment'][0]; + + // verify the required parameter 'tenant_id' is set + if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $tenant_id when calling postRemoveComment' + ); + } // verify the required parameter 'comment_id' is set if ($comment_id === null || (is_array($comment_id) && count($comment_id) === 0)) { @@ -11762,13 +11005,32 @@ public function postRemoveCommentRequest($comment_id, $sso = null, string $conte - $resourcePath = '/auth/my-account/moderate-comments/remove-comment/{commentId}'; + + $resourcePath = '/auth/my-account/moderate-comments/mod_api/remove-comment/{commentId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $tenant_id, + 'tenantId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $broadcast_id, + 'broadcastId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $sso, @@ -11783,7 +11045,7 @@ public function postRemoveCommentRequest($comment_id, $sso = null, string $conte // path params if ($comment_id !== null) { $resourcePath = str_replace( - '{' . 'commentId' . '}', + '{commentId}', ObjectSerializer::toPathValue($comment_id), $resourcePath ); @@ -11848,7 +11110,11 @@ public function postRemoveCommentRequest($comment_id, $sso = null, string $conte * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id tenant_id (required) * @param string $comment_id comment_id (required) + * @param string|null $broadcast_id broadcast_id (optional) * @param string|null $sso sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postRestoreDeletedComment'] to see the possible values for this operation * @@ -11856,9 +11122,9 @@ public function postRemoveCommentRequest($comment_id, $sso = null, string $conte * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError */ - public function postRestoreDeletedComment($comment_id, $sso = null, string $contentType = self::contentTypes['postRestoreDeletedComment'][0]) + public function postRestoreDeletedComment($tenant_id, $comment_id, array $options = []) { - list($response) = $this->postRestoreDeletedCommentWithHttpInfo($comment_id, $sso, $contentType); + list($response) = $this->postRestoreDeletedCommentWithHttpInfo($tenant_id, $comment_id, $options); return $response; } @@ -11867,7 +11133,11 @@ public function postRestoreDeletedComment($comment_id, $sso = null, string $cont * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) + * @param string|null $broadcast_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postRestoreDeletedComment'] to see the possible values for this operation * @@ -11875,9 +11145,9 @@ public function postRestoreDeletedComment($comment_id, $sso = null, string $cont * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function postRestoreDeletedCommentWithHttpInfo($comment_id, $sso = null, string $contentType = self::contentTypes['postRestoreDeletedComment'][0]) + public function postRestoreDeletedCommentWithHttpInfo($tenant_id, $comment_id, array $options = []) { - $request = $this->postRestoreDeletedCommentRequest($comment_id, $sso, $contentType); + $request = $this->postRestoreDeletedCommentRequest($tenant_id, $comment_id, $options); try { $options = $this->createHttpClientOption(); @@ -11904,61 +11174,21 @@ public function postRestoreDeletedCommentWithHttpInfo($comment_id, $sso = null, switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APIEmptyResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIEmptyResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIEmptyResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -11972,34 +11202,11 @@ public function postRestoreDeletedCommentWithHttpInfo($comment_id, $sso = null, ); } - $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -12009,7 +11216,7 @@ public function postRestoreDeletedCommentWithHttpInfo($comment_id, $sso = null, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -12017,8 +11224,10 @@ public function postRestoreDeletedCommentWithHttpInfo($comment_id, $sso = null, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -12028,16 +11237,20 @@ public function postRestoreDeletedCommentWithHttpInfo($comment_id, $sso = null, * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) + * @param string|null $broadcast_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postRestoreDeletedComment'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postRestoreDeletedCommentAsync($comment_id, $sso = null, string $contentType = self::contentTypes['postRestoreDeletedComment'][0]) + public function postRestoreDeletedCommentAsync($tenant_id, $comment_id, array $options = []) { - return $this->postRestoreDeletedCommentAsyncWithHttpInfo($comment_id, $sso, $contentType) + return $this->postRestoreDeletedCommentAsyncWithHttpInfo($tenant_id, $comment_id, $options) ->then( function ($response) { return $response[0]; @@ -12050,17 +11263,21 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) + * @param string|null $broadcast_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postRestoreDeletedComment'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postRestoreDeletedCommentAsyncWithHttpInfo($comment_id, $sso = null, string $contentType = self::contentTypes['postRestoreDeletedComment'][0]) + public function postRestoreDeletedCommentAsyncWithHttpInfo($tenant_id, $comment_id, array $options = []) { $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - $request = $this->postRestoreDeletedCommentRequest($comment_id, $sso, $contentType); + $request = $this->postRestoreDeletedCommentRequest($tenant_id, $comment_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -12101,15 +11318,30 @@ function ($exception) { /** * Create request for operation 'postRestoreDeletedComment' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) + * @param string|null $broadcast_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postRestoreDeletedComment'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function postRestoreDeletedCommentRequest($comment_id, $sso = null, string $contentType = self::contentTypes['postRestoreDeletedComment'][0]) + public function postRestoreDeletedCommentRequest($tenant_id, $comment_id, array $options = []) { + // unbox the optional parameters and request options from the $options array + $broadcast_id = array_key_exists('broadcast_id', $options) ? $options['broadcast_id'] : null; + $sso = array_key_exists('sso', $options) ? $options['sso'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['postRestoreDeletedComment'][0]; + + // verify the required parameter 'tenant_id' is set + if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $tenant_id when calling postRestoreDeletedComment' + ); + } // verify the required parameter 'comment_id' is set if ($comment_id === null || (is_array($comment_id) && count($comment_id) === 0)) { @@ -12120,13 +11352,32 @@ public function postRestoreDeletedCommentRequest($comment_id, $sso = null, strin - $resourcePath = '/auth/my-account/moderate-comments/restore-deleted-comment/{commentId}'; + + $resourcePath = '/auth/my-account/moderate-comments/mod_api/restore-deleted-comment/{commentId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $tenant_id, + 'tenantId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $broadcast_id, + 'broadcastId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $sso, @@ -12141,7 +11392,7 @@ public function postRestoreDeletedCommentRequest($comment_id, $sso = null, strin // path params if ($comment_id !== null) { $resourcePath = str_replace( - '{' . 'commentId' . '}', + '{commentId}', ObjectSerializer::toPathValue($comment_id), $resourcePath ); @@ -12206,8 +11457,12 @@ public function postRestoreDeletedCommentRequest($comment_id, $sso = null, strin * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id tenant_id (required) * @param string $comment_id comment_id (required) * @param bool|null $approved approved (optional) + * @param string|null $broadcast_id broadcast_id (optional) * @param string|null $sso sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postSetCommentApprovalStatus'] to see the possible values for this operation * @@ -12215,9 +11470,9 @@ public function postRestoreDeletedCommentRequest($comment_id, $sso = null, strin * @throws \InvalidArgumentException * @return \FastComments\Client\Model\SetCommentApprovedResponse|\FastComments\Client\Model\APIError */ - public function postSetCommentApprovalStatus($comment_id, $approved = null, $sso = null, string $contentType = self::contentTypes['postSetCommentApprovalStatus'][0]) + public function postSetCommentApprovalStatus($tenant_id, $comment_id, array $options = []) { - list($response) = $this->postSetCommentApprovalStatusWithHttpInfo($comment_id, $approved, $sso, $contentType); + list($response) = $this->postSetCommentApprovalStatusWithHttpInfo($tenant_id, $comment_id, $options); return $response; } @@ -12226,8 +11481,12 @@ public function postSetCommentApprovalStatus($comment_id, $approved = null, $sso * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param bool|null $approved (optional) + * @param string|null $broadcast_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postSetCommentApprovalStatus'] to see the possible values for this operation * @@ -12235,9 +11494,9 @@ public function postSetCommentApprovalStatus($comment_id, $approved = null, $sso * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\SetCommentApprovedResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function postSetCommentApprovalStatusWithHttpInfo($comment_id, $approved = null, $sso = null, string $contentType = self::contentTypes['postSetCommentApprovalStatus'][0]) + public function postSetCommentApprovalStatusWithHttpInfo($tenant_id, $comment_id, array $options = []) { - $request = $this->postSetCommentApprovalStatusRequest($comment_id, $approved, $sso, $contentType); + $request = $this->postSetCommentApprovalStatusRequest($tenant_id, $comment_id, $options); try { $options = $this->createHttpClientOption(); @@ -12264,61 +11523,21 @@ public function postSetCommentApprovalStatusWithHttpInfo($comment_id, $approved switch($statusCode) { case 200: - if ('\FastComments\Client\Model\SetCommentApprovedResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\SetCommentApprovedResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\SetCommentApprovedResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\SetCommentApprovedResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -12332,34 +11551,11 @@ public function postSetCommentApprovalStatusWithHttpInfo($comment_id, $approved ); } - $returnType = '\FastComments\Client\Model\SetCommentApprovedResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\SetCommentApprovedResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -12369,7 +11565,7 @@ public function postSetCommentApprovalStatusWithHttpInfo($comment_id, $approved $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -12377,8 +11573,10 @@ public function postSetCommentApprovalStatusWithHttpInfo($comment_id, $approved $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -12388,17 +11586,21 @@ public function postSetCommentApprovalStatusWithHttpInfo($comment_id, $approved * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param bool|null $approved (optional) + * @param string|null $broadcast_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postSetCommentApprovalStatus'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postSetCommentApprovalStatusAsync($comment_id, $approved = null, $sso = null, string $contentType = self::contentTypes['postSetCommentApprovalStatus'][0]) + public function postSetCommentApprovalStatusAsync($tenant_id, $comment_id, array $options = []) { - return $this->postSetCommentApprovalStatusAsyncWithHttpInfo($comment_id, $approved, $sso, $contentType) + return $this->postSetCommentApprovalStatusAsyncWithHttpInfo($tenant_id, $comment_id, $options) ->then( function ($response) { return $response[0]; @@ -12411,18 +11613,22 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param bool|null $approved (optional) + * @param string|null $broadcast_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postSetCommentApprovalStatus'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postSetCommentApprovalStatusAsyncWithHttpInfo($comment_id, $approved = null, $sso = null, string $contentType = self::contentTypes['postSetCommentApprovalStatus'][0]) + public function postSetCommentApprovalStatusAsyncWithHttpInfo($tenant_id, $comment_id, array $options = []) { $returnType = '\FastComments\Client\Model\SetCommentApprovedResponse'; - $request = $this->postSetCommentApprovalStatusRequest($comment_id, $approved, $sso, $contentType); + $request = $this->postSetCommentApprovalStatusRequest($tenant_id, $comment_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -12463,16 +11669,32 @@ function ($exception) { /** * Create request for operation 'postSetCommentApprovalStatus' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param bool|null $approved (optional) + * @param string|null $broadcast_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postSetCommentApprovalStatus'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function postSetCommentApprovalStatusRequest($comment_id, $approved = null, $sso = null, string $contentType = self::contentTypes['postSetCommentApprovalStatus'][0]) + public function postSetCommentApprovalStatusRequest($tenant_id, $comment_id, array $options = []) { + // unbox the optional parameters and request options from the $options array + $approved = array_key_exists('approved', $options) ? $options['approved'] : null; + $broadcast_id = array_key_exists('broadcast_id', $options) ? $options['broadcast_id'] : null; + $sso = array_key_exists('sso', $options) ? $options['sso'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['postSetCommentApprovalStatus'][0]; + + // verify the required parameter 'tenant_id' is set + if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $tenant_id when calling postSetCommentApprovalStatus' + ); + } // verify the required parameter 'comment_id' is set if ($comment_id === null || (is_array($comment_id) && count($comment_id) === 0)) { @@ -12484,13 +11706,23 @@ public function postSetCommentApprovalStatusRequest($comment_id, $approved = nul - $resourcePath = '/auth/my-account/moderate-comments/set-comment-approval-status/{commentId}'; + + $resourcePath = '/auth/my-account/moderate-comments/mod_api/set-comment-approval-status/{commentId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $tenant_id, + 'tenantId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $approved, @@ -12501,6 +11733,15 @@ public function postSetCommentApprovalStatusRequest($comment_id, $approved = nul false // required ) ?? []); // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $broadcast_id, + 'broadcastId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $sso, 'sso', // param base name @@ -12514,7 +11755,7 @@ public function postSetCommentApprovalStatusRequest($comment_id, $approved = nul // path params if ($comment_id !== null) { $resourcePath = str_replace( - '{' . 'commentId' . '}', + '{commentId}', ObjectSerializer::toPathValue($comment_id), $resourcePath ); @@ -12579,8 +11820,12 @@ public function postSetCommentApprovalStatusRequest($comment_id, $approved = nul * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id tenant_id (required) * @param string $comment_id comment_id (required) * @param bool|null $reviewed reviewed (optional) + * @param string|null $broadcast_id broadcast_id (optional) * @param string|null $sso sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postSetCommentReviewStatus'] to see the possible values for this operation * @@ -12588,9 +11833,9 @@ public function postSetCommentApprovalStatusRequest($comment_id, $approved = nul * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError */ - public function postSetCommentReviewStatus($comment_id, $reviewed = null, $sso = null, string $contentType = self::contentTypes['postSetCommentReviewStatus'][0]) + public function postSetCommentReviewStatus($tenant_id, $comment_id, array $options = []) { - list($response) = $this->postSetCommentReviewStatusWithHttpInfo($comment_id, $reviewed, $sso, $contentType); + list($response) = $this->postSetCommentReviewStatusWithHttpInfo($tenant_id, $comment_id, $options); return $response; } @@ -12599,8 +11844,12 @@ public function postSetCommentReviewStatus($comment_id, $reviewed = null, $sso = * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param bool|null $reviewed (optional) + * @param string|null $broadcast_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postSetCommentReviewStatus'] to see the possible values for this operation * @@ -12608,9 +11857,9 @@ public function postSetCommentReviewStatus($comment_id, $reviewed = null, $sso = * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function postSetCommentReviewStatusWithHttpInfo($comment_id, $reviewed = null, $sso = null, string $contentType = self::contentTypes['postSetCommentReviewStatus'][0]) + public function postSetCommentReviewStatusWithHttpInfo($tenant_id, $comment_id, array $options = []) { - $request = $this->postSetCommentReviewStatusRequest($comment_id, $reviewed, $sso, $contentType); + $request = $this->postSetCommentReviewStatusRequest($tenant_id, $comment_id, $options); try { $options = $this->createHttpClientOption(); @@ -12637,61 +11886,21 @@ public function postSetCommentReviewStatusWithHttpInfo($comment_id, $reviewed = switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APIEmptyResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIEmptyResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIEmptyResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -12705,34 +11914,11 @@ public function postSetCommentReviewStatusWithHttpInfo($comment_id, $reviewed = ); } - $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -12742,7 +11928,7 @@ public function postSetCommentReviewStatusWithHttpInfo($comment_id, $reviewed = $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -12750,8 +11936,10 @@ public function postSetCommentReviewStatusWithHttpInfo($comment_id, $reviewed = $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -12761,17 +11949,21 @@ public function postSetCommentReviewStatusWithHttpInfo($comment_id, $reviewed = * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param bool|null $reviewed (optional) + * @param string|null $broadcast_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postSetCommentReviewStatus'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postSetCommentReviewStatusAsync($comment_id, $reviewed = null, $sso = null, string $contentType = self::contentTypes['postSetCommentReviewStatus'][0]) + public function postSetCommentReviewStatusAsync($tenant_id, $comment_id, array $options = []) { - return $this->postSetCommentReviewStatusAsyncWithHttpInfo($comment_id, $reviewed, $sso, $contentType) + return $this->postSetCommentReviewStatusAsyncWithHttpInfo($tenant_id, $comment_id, $options) ->then( function ($response) { return $response[0]; @@ -12784,18 +11976,22 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param bool|null $reviewed (optional) + * @param string|null $broadcast_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postSetCommentReviewStatus'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postSetCommentReviewStatusAsyncWithHttpInfo($comment_id, $reviewed = null, $sso = null, string $contentType = self::contentTypes['postSetCommentReviewStatus'][0]) + public function postSetCommentReviewStatusAsyncWithHttpInfo($tenant_id, $comment_id, array $options = []) { $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - $request = $this->postSetCommentReviewStatusRequest($comment_id, $reviewed, $sso, $contentType); + $request = $this->postSetCommentReviewStatusRequest($tenant_id, $comment_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -12836,16 +12032,32 @@ function ($exception) { /** * Create request for operation 'postSetCommentReviewStatus' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param bool|null $reviewed (optional) + * @param string|null $broadcast_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postSetCommentReviewStatus'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function postSetCommentReviewStatusRequest($comment_id, $reviewed = null, $sso = null, string $contentType = self::contentTypes['postSetCommentReviewStatus'][0]) + public function postSetCommentReviewStatusRequest($tenant_id, $comment_id, array $options = []) { + // unbox the optional parameters and request options from the $options array + $reviewed = array_key_exists('reviewed', $options) ? $options['reviewed'] : null; + $broadcast_id = array_key_exists('broadcast_id', $options) ? $options['broadcast_id'] : null; + $sso = array_key_exists('sso', $options) ? $options['sso'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['postSetCommentReviewStatus'][0]; + + // verify the required parameter 'tenant_id' is set + if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $tenant_id when calling postSetCommentReviewStatus' + ); + } // verify the required parameter 'comment_id' is set if ($comment_id === null || (is_array($comment_id) && count($comment_id) === 0)) { @@ -12857,13 +12069,23 @@ public function postSetCommentReviewStatusRequest($comment_id, $reviewed = null, - $resourcePath = '/auth/my-account/moderate-comments/set-comment-review-status/{commentId}'; + + $resourcePath = '/auth/my-account/moderate-comments/mod_api/set-comment-review-status/{commentId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $tenant_id, + 'tenantId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $reviewed, @@ -12874,6 +12096,15 @@ public function postSetCommentReviewStatusRequest($comment_id, $reviewed = null, false // required ) ?? []); // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $broadcast_id, + 'broadcastId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $sso, 'sso', // param base name @@ -12887,7 +12118,7 @@ public function postSetCommentReviewStatusRequest($comment_id, $reviewed = null, // path params if ($comment_id !== null) { $resourcePath = str_replace( - '{' . 'commentId' . '}', + '{commentId}', ObjectSerializer::toPathValue($comment_id), $resourcePath ); @@ -12952,9 +12183,13 @@ public function postSetCommentReviewStatusRequest($comment_id, $reviewed = null, * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id tenant_id (required) * @param string $comment_id comment_id (required) * @param bool|null $spam spam (optional) * @param bool|null $perm_not_spam perm_not_spam (optional) + * @param string|null $broadcast_id broadcast_id (optional) * @param string|null $sso sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postSetCommentSpamStatus'] to see the possible values for this operation * @@ -12962,9 +12197,9 @@ public function postSetCommentReviewStatusRequest($comment_id, $reviewed = null, * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError */ - public function postSetCommentSpamStatus($comment_id, $spam = null, $perm_not_spam = null, $sso = null, string $contentType = self::contentTypes['postSetCommentSpamStatus'][0]) + public function postSetCommentSpamStatus($tenant_id, $comment_id, array $options = []) { - list($response) = $this->postSetCommentSpamStatusWithHttpInfo($comment_id, $spam, $perm_not_spam, $sso, $contentType); + list($response) = $this->postSetCommentSpamStatusWithHttpInfo($tenant_id, $comment_id, $options); return $response; } @@ -12973,9 +12208,13 @@ public function postSetCommentSpamStatus($comment_id, $spam = null, $perm_not_sp * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param bool|null $spam (optional) * @param bool|null $perm_not_spam (optional) + * @param string|null $broadcast_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postSetCommentSpamStatus'] to see the possible values for this operation * @@ -12983,9 +12222,9 @@ public function postSetCommentSpamStatus($comment_id, $spam = null, $perm_not_sp * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function postSetCommentSpamStatusWithHttpInfo($comment_id, $spam = null, $perm_not_spam = null, $sso = null, string $contentType = self::contentTypes['postSetCommentSpamStatus'][0]) + public function postSetCommentSpamStatusWithHttpInfo($tenant_id, $comment_id, array $options = []) { - $request = $this->postSetCommentSpamStatusRequest($comment_id, $spam, $perm_not_spam, $sso, $contentType); + $request = $this->postSetCommentSpamStatusRequest($tenant_id, $comment_id, $options); try { $options = $this->createHttpClientOption(); @@ -13012,61 +12251,21 @@ public function postSetCommentSpamStatusWithHttpInfo($comment_id, $spam = null, switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APIEmptyResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIEmptyResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIEmptyResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -13080,34 +12279,11 @@ public function postSetCommentSpamStatusWithHttpInfo($comment_id, $spam = null, ); } - $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -13117,7 +12293,7 @@ public function postSetCommentSpamStatusWithHttpInfo($comment_id, $spam = null, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -13125,8 +12301,10 @@ public function postSetCommentSpamStatusWithHttpInfo($comment_id, $spam = null, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -13136,18 +12314,22 @@ public function postSetCommentSpamStatusWithHttpInfo($comment_id, $spam = null, * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param bool|null $spam (optional) * @param bool|null $perm_not_spam (optional) + * @param string|null $broadcast_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postSetCommentSpamStatus'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postSetCommentSpamStatusAsync($comment_id, $spam = null, $perm_not_spam = null, $sso = null, string $contentType = self::contentTypes['postSetCommentSpamStatus'][0]) + public function postSetCommentSpamStatusAsync($tenant_id, $comment_id, array $options = []) { - return $this->postSetCommentSpamStatusAsyncWithHttpInfo($comment_id, $spam, $perm_not_spam, $sso, $contentType) + return $this->postSetCommentSpamStatusAsyncWithHttpInfo($tenant_id, $comment_id, $options) ->then( function ($response) { return $response[0]; @@ -13160,19 +12342,23 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param bool|null $spam (optional) * @param bool|null $perm_not_spam (optional) + * @param string|null $broadcast_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postSetCommentSpamStatus'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postSetCommentSpamStatusAsyncWithHttpInfo($comment_id, $spam = null, $perm_not_spam = null, $sso = null, string $contentType = self::contentTypes['postSetCommentSpamStatus'][0]) + public function postSetCommentSpamStatusAsyncWithHttpInfo($tenant_id, $comment_id, array $options = []) { $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - $request = $this->postSetCommentSpamStatusRequest($comment_id, $spam, $perm_not_spam, $sso, $contentType); + $request = $this->postSetCommentSpamStatusRequest($tenant_id, $comment_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -13213,17 +12399,34 @@ function ($exception) { /** * Create request for operation 'postSetCommentSpamStatus' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param bool|null $spam (optional) * @param bool|null $perm_not_spam (optional) + * @param string|null $broadcast_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postSetCommentSpamStatus'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function postSetCommentSpamStatusRequest($comment_id, $spam = null, $perm_not_spam = null, $sso = null, string $contentType = self::contentTypes['postSetCommentSpamStatus'][0]) - { + public function postSetCommentSpamStatusRequest($tenant_id, $comment_id, array $options = []) + { + // unbox the optional parameters and request options from the $options array + $spam = array_key_exists('spam', $options) ? $options['spam'] : null; + $perm_not_spam = array_key_exists('perm_not_spam', $options) ? $options['perm_not_spam'] : null; + $broadcast_id = array_key_exists('broadcast_id', $options) ? $options['broadcast_id'] : null; + $sso = array_key_exists('sso', $options) ? $options['sso'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['postSetCommentSpamStatus'][0]; + + // verify the required parameter 'tenant_id' is set + if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $tenant_id when calling postSetCommentSpamStatus' + ); + } // verify the required parameter 'comment_id' is set if ($comment_id === null || (is_array($comment_id) && count($comment_id) === 0)) { @@ -13236,13 +12439,23 @@ public function postSetCommentSpamStatusRequest($comment_id, $spam = null, $perm - $resourcePath = '/auth/my-account/moderate-comments/set-comment-spam-status/{commentId}'; + + $resourcePath = '/auth/my-account/moderate-comments/mod_api/set-comment-spam-status/{commentId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $tenant_id, + 'tenantId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $spam, @@ -13262,6 +12475,15 @@ public function postSetCommentSpamStatusRequest($comment_id, $spam = null, $perm false // required ) ?? []); // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $broadcast_id, + 'broadcastId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $sso, 'sso', // param base name @@ -13275,7 +12497,7 @@ public function postSetCommentSpamStatusRequest($comment_id, $spam = null, $perm // path params if ($comment_id !== null) { $resourcePath = str_replace( - '{' . 'commentId' . '}', + '{commentId}', ObjectSerializer::toPathValue($comment_id), $resourcePath ); @@ -13340,8 +12562,12 @@ public function postSetCommentSpamStatusRequest($comment_id, $spam = null, $perm * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id tenant_id (required) * @param string $comment_id comment_id (required) * @param \FastComments\Client\Model\SetCommentTextParams $set_comment_text_params set_comment_text_params (required) + * @param string|null $broadcast_id broadcast_id (optional) * @param string|null $sso sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postSetCommentText'] to see the possible values for this operation * @@ -13349,9 +12575,9 @@ public function postSetCommentSpamStatusRequest($comment_id, $spam = null, $perm * @throws \InvalidArgumentException * @return \FastComments\Client\Model\SetCommentTextResponse|\FastComments\Client\Model\APIError */ - public function postSetCommentText($comment_id, $set_comment_text_params, $sso = null, string $contentType = self::contentTypes['postSetCommentText'][0]) + public function postSetCommentText($tenant_id, $comment_id, $set_comment_text_params, array $options = []) { - list($response) = $this->postSetCommentTextWithHttpInfo($comment_id, $set_comment_text_params, $sso, $contentType); + list($response) = $this->postSetCommentTextWithHttpInfo($tenant_id, $comment_id, $set_comment_text_params, $options); return $response; } @@ -13360,8 +12586,12 @@ public function postSetCommentText($comment_id, $set_comment_text_params, $sso = * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param \FastComments\Client\Model\SetCommentTextParams $set_comment_text_params (required) + * @param string|null $broadcast_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postSetCommentText'] to see the possible values for this operation * @@ -13369,9 +12599,9 @@ public function postSetCommentText($comment_id, $set_comment_text_params, $sso = * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\SetCommentTextResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function postSetCommentTextWithHttpInfo($comment_id, $set_comment_text_params, $sso = null, string $contentType = self::contentTypes['postSetCommentText'][0]) + public function postSetCommentTextWithHttpInfo($tenant_id, $comment_id, $set_comment_text_params, array $options = []) { - $request = $this->postSetCommentTextRequest($comment_id, $set_comment_text_params, $sso, $contentType); + $request = $this->postSetCommentTextRequest($tenant_id, $comment_id, $set_comment_text_params, $options); try { $options = $this->createHttpClientOption(); @@ -13398,61 +12628,21 @@ public function postSetCommentTextWithHttpInfo($comment_id, $set_comment_text_pa switch($statusCode) { case 200: - if ('\FastComments\Client\Model\SetCommentTextResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\SetCommentTextResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\SetCommentTextResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\SetCommentTextResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -13466,34 +12656,11 @@ public function postSetCommentTextWithHttpInfo($comment_id, $set_comment_text_pa ); } - $returnType = '\FastComments\Client\Model\SetCommentTextResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\SetCommentTextResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -13503,7 +12670,7 @@ public function postSetCommentTextWithHttpInfo($comment_id, $set_comment_text_pa $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -13511,8 +12678,10 @@ public function postSetCommentTextWithHttpInfo($comment_id, $set_comment_text_pa $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -13522,17 +12691,21 @@ public function postSetCommentTextWithHttpInfo($comment_id, $set_comment_text_pa * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param \FastComments\Client\Model\SetCommentTextParams $set_comment_text_params (required) + * @param string|null $broadcast_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postSetCommentText'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postSetCommentTextAsync($comment_id, $set_comment_text_params, $sso = null, string $contentType = self::contentTypes['postSetCommentText'][0]) + public function postSetCommentTextAsync($tenant_id, $comment_id, $set_comment_text_params, array $options = []) { - return $this->postSetCommentTextAsyncWithHttpInfo($comment_id, $set_comment_text_params, $sso, $contentType) + return $this->postSetCommentTextAsyncWithHttpInfo($tenant_id, $comment_id, $set_comment_text_params, $options) ->then( function ($response) { return $response[0]; @@ -13545,18 +12718,22 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param \FastComments\Client\Model\SetCommentTextParams $set_comment_text_params (required) + * @param string|null $broadcast_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postSetCommentText'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postSetCommentTextAsyncWithHttpInfo($comment_id, $set_comment_text_params, $sso = null, string $contentType = self::contentTypes['postSetCommentText'][0]) + public function postSetCommentTextAsyncWithHttpInfo($tenant_id, $comment_id, $set_comment_text_params, array $options = []) { $returnType = '\FastComments\Client\Model\SetCommentTextResponse'; - $request = $this->postSetCommentTextRequest($comment_id, $set_comment_text_params, $sso, $contentType); + $request = $this->postSetCommentTextRequest($tenant_id, $comment_id, $set_comment_text_params, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -13597,16 +12774,31 @@ function ($exception) { /** * Create request for operation 'postSetCommentText' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param \FastComments\Client\Model\SetCommentTextParams $set_comment_text_params (required) + * @param string|null $broadcast_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postSetCommentText'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function postSetCommentTextRequest($comment_id, $set_comment_text_params, $sso = null, string $contentType = self::contentTypes['postSetCommentText'][0]) + public function postSetCommentTextRequest($tenant_id, $comment_id, $set_comment_text_params, array $options = []) { + // unbox the optional parameters and request options from the $options array + $broadcast_id = array_key_exists('broadcast_id', $options) ? $options['broadcast_id'] : null; + $sso = array_key_exists('sso', $options) ? $options['sso'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['postSetCommentText'][0]; + + // verify the required parameter 'tenant_id' is set + if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $tenant_id when calling postSetCommentText' + ); + } // verify the required parameter 'comment_id' is set if ($comment_id === null || (is_array($comment_id) && count($comment_id) === 0)) { @@ -13624,13 +12816,32 @@ public function postSetCommentTextRequest($comment_id, $set_comment_text_params, - $resourcePath = '/auth/my-account/moderate-comments/set-comment-text/{commentId}'; + + $resourcePath = '/auth/my-account/moderate-comments/mod_api/set-comment-text/{commentId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $tenant_id, + 'tenantId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $broadcast_id, + 'broadcastId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $sso, @@ -13645,7 +12856,7 @@ public function postSetCommentTextRequest($comment_id, $set_comment_text_params, // path params if ($comment_id !== null) { $resourcePath = str_replace( - '{' . 'commentId' . '}', + '{commentId}', ObjectSerializer::toPathValue($comment_id), $resourcePath ); @@ -13717,7 +12928,11 @@ public function postSetCommentTextRequest($comment_id, $set_comment_text_params, * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id tenant_id (required) * @param string $comment_id comment_id (required) + * @param string|null $broadcast_id broadcast_id (optional) * @param string|null $sso sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postUnFlagComment'] to see the possible values for this operation * @@ -13725,9 +12940,9 @@ public function postSetCommentTextRequest($comment_id, $set_comment_text_params, * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError */ - public function postUnFlagComment($comment_id, $sso = null, string $contentType = self::contentTypes['postUnFlagComment'][0]) + public function postUnFlagComment($tenant_id, $comment_id, array $options = []) { - list($response) = $this->postUnFlagCommentWithHttpInfo($comment_id, $sso, $contentType); + list($response) = $this->postUnFlagCommentWithHttpInfo($tenant_id, $comment_id, $options); return $response; } @@ -13736,7 +12951,11 @@ public function postUnFlagComment($comment_id, $sso = null, string $contentType * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) + * @param string|null $broadcast_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postUnFlagComment'] to see the possible values for this operation * @@ -13744,9 +12963,9 @@ public function postUnFlagComment($comment_id, $sso = null, string $contentType * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function postUnFlagCommentWithHttpInfo($comment_id, $sso = null, string $contentType = self::contentTypes['postUnFlagComment'][0]) + public function postUnFlagCommentWithHttpInfo($tenant_id, $comment_id, array $options = []) { - $request = $this->postUnFlagCommentRequest($comment_id, $sso, $contentType); + $request = $this->postUnFlagCommentRequest($tenant_id, $comment_id, $options); try { $options = $this->createHttpClientOption(); @@ -13773,61 +12992,21 @@ public function postUnFlagCommentWithHttpInfo($comment_id, $sso = null, string $ switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APIEmptyResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIEmptyResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIEmptyResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -13841,34 +13020,11 @@ public function postUnFlagCommentWithHttpInfo($comment_id, $sso = null, string $ ); } - $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -13878,7 +13034,7 @@ public function postUnFlagCommentWithHttpInfo($comment_id, $sso = null, string $ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -13886,8 +13042,10 @@ public function postUnFlagCommentWithHttpInfo($comment_id, $sso = null, string $ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -13897,16 +13055,20 @@ public function postUnFlagCommentWithHttpInfo($comment_id, $sso = null, string $ * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) + * @param string|null $broadcast_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postUnFlagComment'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postUnFlagCommentAsync($comment_id, $sso = null, string $contentType = self::contentTypes['postUnFlagComment'][0]) + public function postUnFlagCommentAsync($tenant_id, $comment_id, array $options = []) { - return $this->postUnFlagCommentAsyncWithHttpInfo($comment_id, $sso, $contentType) + return $this->postUnFlagCommentAsyncWithHttpInfo($tenant_id, $comment_id, $options) ->then( function ($response) { return $response[0]; @@ -13919,17 +13081,21 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) + * @param string|null $broadcast_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postUnFlagComment'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postUnFlagCommentAsyncWithHttpInfo($comment_id, $sso = null, string $contentType = self::contentTypes['postUnFlagComment'][0]) + public function postUnFlagCommentAsyncWithHttpInfo($tenant_id, $comment_id, array $options = []) { $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - $request = $this->postUnFlagCommentRequest($comment_id, $sso, $contentType); + $request = $this->postUnFlagCommentRequest($tenant_id, $comment_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -13970,15 +13136,30 @@ function ($exception) { /** * Create request for operation 'postUnFlagComment' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) + * @param string|null $broadcast_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postUnFlagComment'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function postUnFlagCommentRequest($comment_id, $sso = null, string $contentType = self::contentTypes['postUnFlagComment'][0]) + public function postUnFlagCommentRequest($tenant_id, $comment_id, array $options = []) { + // unbox the optional parameters and request options from the $options array + $broadcast_id = array_key_exists('broadcast_id', $options) ? $options['broadcast_id'] : null; + $sso = array_key_exists('sso', $options) ? $options['sso'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['postUnFlagComment'][0]; + + // verify the required parameter 'tenant_id' is set + if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $tenant_id when calling postUnFlagComment' + ); + } // verify the required parameter 'comment_id' is set if ($comment_id === null || (is_array($comment_id) && count($comment_id) === 0)) { @@ -13989,13 +13170,32 @@ public function postUnFlagCommentRequest($comment_id, $sso = null, string $conte - $resourcePath = '/auth/my-account/moderate-comments/un-flag-comment/{commentId}'; + + $resourcePath = '/auth/my-account/moderate-comments/mod_api/un-flag-comment/{commentId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $tenant_id, + 'tenantId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $broadcast_id, + 'broadcastId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $sso, @@ -14010,7 +13210,7 @@ public function postUnFlagCommentRequest($comment_id, $sso = null, string $conte // path params if ($comment_id !== null) { $resourcePath = str_replace( - '{' . 'commentId' . '}', + '{commentId}', ObjectSerializer::toPathValue($comment_id), $resourcePath ); @@ -14075,8 +13275,12 @@ public function postUnFlagCommentRequest($comment_id, $sso = null, string $conte * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id tenant_id (required) * @param string $comment_id comment_id (required) * @param string|null $direction direction (optional) + * @param string|null $broadcast_id broadcast_id (optional) * @param string|null $sso sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postVote'] to see the possible values for this operation * @@ -14084,9 +13288,9 @@ public function postUnFlagCommentRequest($comment_id, $sso = null, string $conte * @throws \InvalidArgumentException * @return \FastComments\Client\Model\VoteResponse|\FastComments\Client\Model\APIError */ - public function postVote($comment_id, $direction = null, $sso = null, string $contentType = self::contentTypes['postVote'][0]) + public function postVote($tenant_id, $comment_id, array $options = []) { - list($response) = $this->postVoteWithHttpInfo($comment_id, $direction, $sso, $contentType); + list($response) = $this->postVoteWithHttpInfo($tenant_id, $comment_id, $options); return $response; } @@ -14095,8 +13299,12 @@ public function postVote($comment_id, $direction = null, $sso = null, string $co * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param string|null $direction (optional) + * @param string|null $broadcast_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postVote'] to see the possible values for this operation * @@ -14104,9 +13312,9 @@ public function postVote($comment_id, $direction = null, $sso = null, string $co * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\VoteResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function postVoteWithHttpInfo($comment_id, $direction = null, $sso = null, string $contentType = self::contentTypes['postVote'][0]) + public function postVoteWithHttpInfo($tenant_id, $comment_id, array $options = []) { - $request = $this->postVoteRequest($comment_id, $direction, $sso, $contentType); + $request = $this->postVoteRequest($tenant_id, $comment_id, $options); try { $options = $this->createHttpClientOption(); @@ -14133,61 +13341,21 @@ public function postVoteWithHttpInfo($comment_id, $direction = null, $sso = null switch($statusCode) { case 200: - if ('\FastComments\Client\Model\VoteResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\VoteResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\VoteResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\VoteResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -14201,34 +13369,11 @@ public function postVoteWithHttpInfo($comment_id, $direction = null, $sso = null ); } - $returnType = '\FastComments\Client\Model\VoteResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\VoteResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -14238,7 +13383,7 @@ public function postVoteWithHttpInfo($comment_id, $direction = null, $sso = null $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -14246,8 +13391,10 @@ public function postVoteWithHttpInfo($comment_id, $direction = null, $sso = null $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -14257,17 +13404,21 @@ public function postVoteWithHttpInfo($comment_id, $direction = null, $sso = null * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param string|null $direction (optional) + * @param string|null $broadcast_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postVote'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postVoteAsync($comment_id, $direction = null, $sso = null, string $contentType = self::contentTypes['postVote'][0]) + public function postVoteAsync($tenant_id, $comment_id, array $options = []) { - return $this->postVoteAsyncWithHttpInfo($comment_id, $direction, $sso, $contentType) + return $this->postVoteAsyncWithHttpInfo($tenant_id, $comment_id, $options) ->then( function ($response) { return $response[0]; @@ -14280,18 +13431,22 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param string|null $direction (optional) + * @param string|null $broadcast_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postVote'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postVoteAsyncWithHttpInfo($comment_id, $direction = null, $sso = null, string $contentType = self::contentTypes['postVote'][0]) + public function postVoteAsyncWithHttpInfo($tenant_id, $comment_id, array $options = []) { $returnType = '\FastComments\Client\Model\VoteResponse'; - $request = $this->postVoteRequest($comment_id, $direction, $sso, $contentType); + $request = $this->postVoteRequest($tenant_id, $comment_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -14332,16 +13487,32 @@ function ($exception) { /** * Create request for operation 'postVote' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $comment_id (required) * @param string|null $direction (optional) + * @param string|null $broadcast_id (optional) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postVote'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function postVoteRequest($comment_id, $direction = null, $sso = null, string $contentType = self::contentTypes['postVote'][0]) + public function postVoteRequest($tenant_id, $comment_id, array $options = []) { + // unbox the optional parameters and request options from the $options array + $direction = array_key_exists('direction', $options) ? $options['direction'] : null; + $broadcast_id = array_key_exists('broadcast_id', $options) ? $options['broadcast_id'] : null; + $sso = array_key_exists('sso', $options) ? $options['sso'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['postVote'][0]; + + // verify the required parameter 'tenant_id' is set + if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $tenant_id when calling postVote' + ); + } // verify the required parameter 'comment_id' is set if ($comment_id === null || (is_array($comment_id) && count($comment_id) === 0)) { @@ -14353,13 +13524,23 @@ public function postVoteRequest($comment_id, $direction = null, $sso = null, str - $resourcePath = '/auth/my-account/moderate-comments/vote/{commentId}'; + + $resourcePath = '/auth/my-account/moderate-comments/mod_api/vote/{commentId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $tenant_id, + 'tenantId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $direction, @@ -14370,6 +13551,15 @@ public function postVoteRequest($comment_id, $direction = null, $sso = null, str false // required ) ?? []); // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $broadcast_id, + 'broadcastId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $sso, 'sso', // param base name @@ -14383,7 +13573,7 @@ public function postVoteRequest($comment_id, $direction = null, $sso = null, str // path params if ($comment_id !== null) { $resourcePath = str_replace( - '{' . 'commentId' . '}', + '{commentId}', ObjectSerializer::toPathValue($comment_id), $resourcePath ); @@ -14448,6 +13638,9 @@ public function postVoteRequest($comment_id, $direction = null, $sso = null, str * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id tenant_id (required) * @param string $badge_id badge_id (required) * @param string|null $user_id user_id (optional) * @param string|null $comment_id comment_id (optional) @@ -14459,9 +13652,9 @@ public function postVoteRequest($comment_id, $direction = null, $sso = null, str * @throws \InvalidArgumentException * @return \FastComments\Client\Model\AwardUserBadgeResponse|\FastComments\Client\Model\APIError */ - public function putAwardBadge($badge_id, $user_id = null, $comment_id = null, $broadcast_id = null, $sso = null, string $contentType = self::contentTypes['putAwardBadge'][0]) + public function putAwardBadge($tenant_id, $badge_id, array $options = []) { - list($response) = $this->putAwardBadgeWithHttpInfo($badge_id, $user_id, $comment_id, $broadcast_id, $sso, $contentType); + list($response) = $this->putAwardBadgeWithHttpInfo($tenant_id, $badge_id, $options); return $response; } @@ -14470,6 +13663,9 @@ public function putAwardBadge($badge_id, $user_id = null, $comment_id = null, $b * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $badge_id (required) * @param string|null $user_id (optional) * @param string|null $comment_id (optional) @@ -14481,9 +13677,9 @@ public function putAwardBadge($badge_id, $user_id = null, $comment_id = null, $b * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\AwardUserBadgeResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function putAwardBadgeWithHttpInfo($badge_id, $user_id = null, $comment_id = null, $broadcast_id = null, $sso = null, string $contentType = self::contentTypes['putAwardBadge'][0]) + public function putAwardBadgeWithHttpInfo($tenant_id, $badge_id, array $options = []) { - $request = $this->putAwardBadgeRequest($badge_id, $user_id, $comment_id, $broadcast_id, $sso, $contentType); + $request = $this->putAwardBadgeRequest($tenant_id, $badge_id, $options); try { $options = $this->createHttpClientOption(); @@ -14502,69 +13698,29 @@ public function putAwardBadgeWithHttpInfo($badge_id, $user_id = null, $comment_i (int) $e->getCode(), null, null - ); - } - - $statusCode = $response->getStatusCode(); - - - switch($statusCode) { - case 200: - if ('\FastComments\Client\Model\AwardUserBadgeResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\AwardUserBadgeResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\AwardUserBadgeResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } + ); + } - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\AwardUserBadgeResponse', + $request, + $response, + ); + default: + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -14578,34 +13734,11 @@ public function putAwardBadgeWithHttpInfo($badge_id, $user_id = null, $comment_i ); } - $returnType = '\FastComments\Client\Model\AwardUserBadgeResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\AwardUserBadgeResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -14615,7 +13748,7 @@ public function putAwardBadgeWithHttpInfo($badge_id, $user_id = null, $comment_i $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -14623,8 +13756,10 @@ public function putAwardBadgeWithHttpInfo($badge_id, $user_id = null, $comment_i $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -14634,6 +13769,9 @@ public function putAwardBadgeWithHttpInfo($badge_id, $user_id = null, $comment_i * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $badge_id (required) * @param string|null $user_id (optional) * @param string|null $comment_id (optional) @@ -14644,9 +13782,9 @@ public function putAwardBadgeWithHttpInfo($badge_id, $user_id = null, $comment_i * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putAwardBadgeAsync($badge_id, $user_id = null, $comment_id = null, $broadcast_id = null, $sso = null, string $contentType = self::contentTypes['putAwardBadge'][0]) + public function putAwardBadgeAsync($tenant_id, $badge_id, array $options = []) { - return $this->putAwardBadgeAsyncWithHttpInfo($badge_id, $user_id, $comment_id, $broadcast_id, $sso, $contentType) + return $this->putAwardBadgeAsyncWithHttpInfo($tenant_id, $badge_id, $options) ->then( function ($response) { return $response[0]; @@ -14659,6 +13797,9 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $badge_id (required) * @param string|null $user_id (optional) * @param string|null $comment_id (optional) @@ -14669,10 +13810,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putAwardBadgeAsyncWithHttpInfo($badge_id, $user_id = null, $comment_id = null, $broadcast_id = null, $sso = null, string $contentType = self::contentTypes['putAwardBadge'][0]) + public function putAwardBadgeAsyncWithHttpInfo($tenant_id, $badge_id, array $options = []) { $returnType = '\FastComments\Client\Model\AwardUserBadgeResponse'; - $request = $this->putAwardBadgeRequest($badge_id, $user_id, $comment_id, $broadcast_id, $sso, $contentType); + $request = $this->putAwardBadgeRequest($tenant_id, $badge_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -14713,6 +13854,9 @@ function ($exception) { /** * Create request for operation 'putAwardBadge' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $badge_id (required) * @param string|null $user_id (optional) * @param string|null $comment_id (optional) @@ -14723,8 +13867,21 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function putAwardBadgeRequest($badge_id, $user_id = null, $comment_id = null, $broadcast_id = null, $sso = null, string $contentType = self::contentTypes['putAwardBadge'][0]) - { + public function putAwardBadgeRequest($tenant_id, $badge_id, array $options = []) + { + // unbox the optional parameters and request options from the $options array + $user_id = array_key_exists('user_id', $options) ? $options['user_id'] : null; + $comment_id = array_key_exists('comment_id', $options) ? $options['comment_id'] : null; + $broadcast_id = array_key_exists('broadcast_id', $options) ? $options['broadcast_id'] : null; + $sso = array_key_exists('sso', $options) ? $options['sso'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['putAwardBadge'][0]; + + // verify the required parameter 'tenant_id' is set + if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $tenant_id when calling putAwardBadge' + ); + } // verify the required parameter 'badge_id' is set if ($badge_id === null || (is_array($badge_id) && count($badge_id) === 0)) { @@ -14738,13 +13895,22 @@ public function putAwardBadgeRequest($badge_id, $user_id = null, $comment_id = n - $resourcePath = '/auth/my-account/moderate-comments/award-badge'; + $resourcePath = '/auth/my-account/moderate-comments/mod_api/award-badge'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $tenant_id, + 'tenantId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $badge_id, @@ -14852,6 +14018,9 @@ public function putAwardBadgeRequest($badge_id, $user_id = null, $comment_id = n * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id tenant_id (required) * @param string $url_id url_id (required) * @param string|null $sso sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putCloseThread'] to see the possible values for this operation @@ -14860,9 +14029,9 @@ public function putAwardBadgeRequest($badge_id, $user_id = null, $comment_id = n * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError */ - public function putCloseThread($url_id, $sso = null, string $contentType = self::contentTypes['putCloseThread'][0]) + public function putCloseThread($tenant_id, $url_id, $sso = null) { - list($response) = $this->putCloseThreadWithHttpInfo($url_id, $sso, $contentType); + list($response) = $this->putCloseThreadWithHttpInfo($tenant_id, $url_id, $sso); return $response; } @@ -14871,6 +14040,9 @@ public function putCloseThread($url_id, $sso = null, string $contentType = self: * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $url_id (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putCloseThread'] to see the possible values for this operation @@ -14879,9 +14051,9 @@ public function putCloseThread($url_id, $sso = null, string $contentType = self: * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function putCloseThreadWithHttpInfo($url_id, $sso = null, string $contentType = self::contentTypes['putCloseThread'][0]) + public function putCloseThreadWithHttpInfo($tenant_id, $url_id, $sso = null) { - $request = $this->putCloseThreadRequest($url_id, $sso, $contentType); + $request = $this->putCloseThreadRequest($tenant_id, $url_id, $sso); try { $options = $this->createHttpClientOption(); @@ -14908,61 +14080,21 @@ public function putCloseThreadWithHttpInfo($url_id, $sso = null, string $content switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APIEmptyResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIEmptyResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIEmptyResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -14976,34 +14108,11 @@ public function putCloseThreadWithHttpInfo($url_id, $sso = null, string $content ); } - $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -15013,7 +14122,7 @@ public function putCloseThreadWithHttpInfo($url_id, $sso = null, string $content $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -15021,8 +14130,10 @@ public function putCloseThreadWithHttpInfo($url_id, $sso = null, string $content $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -15032,6 +14143,9 @@ public function putCloseThreadWithHttpInfo($url_id, $sso = null, string $content * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $url_id (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putCloseThread'] to see the possible values for this operation @@ -15039,9 +14153,9 @@ public function putCloseThreadWithHttpInfo($url_id, $sso = null, string $content * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putCloseThreadAsync($url_id, $sso = null, string $contentType = self::contentTypes['putCloseThread'][0]) + public function putCloseThreadAsync($tenant_id, $url_id, $sso = null) { - return $this->putCloseThreadAsyncWithHttpInfo($url_id, $sso, $contentType) + return $this->putCloseThreadAsyncWithHttpInfo($tenant_id, $url_id, $sso) ->then( function ($response) { return $response[0]; @@ -15054,6 +14168,9 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $url_id (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putCloseThread'] to see the possible values for this operation @@ -15061,10 +14178,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putCloseThreadAsyncWithHttpInfo($url_id, $sso = null, string $contentType = self::contentTypes['putCloseThread'][0]) + public function putCloseThreadAsyncWithHttpInfo($tenant_id, $url_id, $sso = null) { $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - $request = $this->putCloseThreadRequest($url_id, $sso, $contentType); + $request = $this->putCloseThreadRequest($tenant_id, $url_id, $sso); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -15105,6 +14222,9 @@ function ($exception) { /** * Create request for operation 'putCloseThread' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $url_id (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putCloseThread'] to see the possible values for this operation @@ -15112,8 +14232,16 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function putCloseThreadRequest($url_id, $sso = null, string $contentType = self::contentTypes['putCloseThread'][0]) + public function putCloseThreadRequest($tenant_id, $url_id, $sso = null) { + $contentType = self::contentTypes['putCloseThread'][0]; + + // verify the required parameter 'tenant_id' is set + if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $tenant_id when calling putCloseThread' + ); + } // verify the required parameter 'url_id' is set if ($url_id === null || (is_array($url_id) && count($url_id) === 0)) { @@ -15124,13 +14252,22 @@ public function putCloseThreadRequest($url_id, $sso = null, string $contentType - $resourcePath = '/auth/my-account/moderate-comments/close-thread'; + $resourcePath = '/auth/my-account/moderate-comments/mod_api/close-thread'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $tenant_id, + 'tenantId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $url_id, @@ -15211,6 +14348,9 @@ public function putCloseThreadRequest($url_id, $sso = null, string $contentType * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id tenant_id (required) * @param string $badge_id badge_id (required) * @param string|null $user_id user_id (optional) * @param string|null $comment_id comment_id (optional) @@ -15222,9 +14362,9 @@ public function putCloseThreadRequest($url_id, $sso = null, string $contentType * @throws \InvalidArgumentException * @return \FastComments\Client\Model\RemoveUserBadgeResponse|\FastComments\Client\Model\APIError */ - public function putRemoveBadge($badge_id, $user_id = null, $comment_id = null, $broadcast_id = null, $sso = null, string $contentType = self::contentTypes['putRemoveBadge'][0]) + public function putRemoveBadge($tenant_id, $badge_id, array $options = []) { - list($response) = $this->putRemoveBadgeWithHttpInfo($badge_id, $user_id, $comment_id, $broadcast_id, $sso, $contentType); + list($response) = $this->putRemoveBadgeWithHttpInfo($tenant_id, $badge_id, $options); return $response; } @@ -15233,6 +14373,9 @@ public function putRemoveBadge($badge_id, $user_id = null, $comment_id = null, $ * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $badge_id (required) * @param string|null $user_id (optional) * @param string|null $comment_id (optional) @@ -15244,9 +14387,9 @@ public function putRemoveBadge($badge_id, $user_id = null, $comment_id = null, $ * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\RemoveUserBadgeResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function putRemoveBadgeWithHttpInfo($badge_id, $user_id = null, $comment_id = null, $broadcast_id = null, $sso = null, string $contentType = self::contentTypes['putRemoveBadge'][0]) + public function putRemoveBadgeWithHttpInfo($tenant_id, $badge_id, array $options = []) { - $request = $this->putRemoveBadgeRequest($badge_id, $user_id, $comment_id, $broadcast_id, $sso, $contentType); + $request = $this->putRemoveBadgeRequest($tenant_id, $badge_id, $options); try { $options = $this->createHttpClientOption(); @@ -15273,61 +14416,21 @@ public function putRemoveBadgeWithHttpInfo($badge_id, $user_id = null, $comment_ switch($statusCode) { case 200: - if ('\FastComments\Client\Model\RemoveUserBadgeResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\RemoveUserBadgeResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\RemoveUserBadgeResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\RemoveUserBadgeResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -15341,34 +14444,11 @@ public function putRemoveBadgeWithHttpInfo($badge_id, $user_id = null, $comment_ ); } - $returnType = '\FastComments\Client\Model\RemoveUserBadgeResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\RemoveUserBadgeResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -15378,7 +14458,7 @@ public function putRemoveBadgeWithHttpInfo($badge_id, $user_id = null, $comment_ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -15386,8 +14466,10 @@ public function putRemoveBadgeWithHttpInfo($badge_id, $user_id = null, $comment_ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -15397,6 +14479,9 @@ public function putRemoveBadgeWithHttpInfo($badge_id, $user_id = null, $comment_ * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $badge_id (required) * @param string|null $user_id (optional) * @param string|null $comment_id (optional) @@ -15407,9 +14492,9 @@ public function putRemoveBadgeWithHttpInfo($badge_id, $user_id = null, $comment_ * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putRemoveBadgeAsync($badge_id, $user_id = null, $comment_id = null, $broadcast_id = null, $sso = null, string $contentType = self::contentTypes['putRemoveBadge'][0]) + public function putRemoveBadgeAsync($tenant_id, $badge_id, array $options = []) { - return $this->putRemoveBadgeAsyncWithHttpInfo($badge_id, $user_id, $comment_id, $broadcast_id, $sso, $contentType) + return $this->putRemoveBadgeAsyncWithHttpInfo($tenant_id, $badge_id, $options) ->then( function ($response) { return $response[0]; @@ -15422,6 +14507,9 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $badge_id (required) * @param string|null $user_id (optional) * @param string|null $comment_id (optional) @@ -15432,10 +14520,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putRemoveBadgeAsyncWithHttpInfo($badge_id, $user_id = null, $comment_id = null, $broadcast_id = null, $sso = null, string $contentType = self::contentTypes['putRemoveBadge'][0]) + public function putRemoveBadgeAsyncWithHttpInfo($tenant_id, $badge_id, array $options = []) { $returnType = '\FastComments\Client\Model\RemoveUserBadgeResponse'; - $request = $this->putRemoveBadgeRequest($badge_id, $user_id, $comment_id, $broadcast_id, $sso, $contentType); + $request = $this->putRemoveBadgeRequest($tenant_id, $badge_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -15476,6 +14564,9 @@ function ($exception) { /** * Create request for operation 'putRemoveBadge' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $badge_id (required) * @param string|null $user_id (optional) * @param string|null $comment_id (optional) @@ -15486,8 +14577,21 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function putRemoveBadgeRequest($badge_id, $user_id = null, $comment_id = null, $broadcast_id = null, $sso = null, string $contentType = self::contentTypes['putRemoveBadge'][0]) - { + public function putRemoveBadgeRequest($tenant_id, $badge_id, array $options = []) + { + // unbox the optional parameters and request options from the $options array + $user_id = array_key_exists('user_id', $options) ? $options['user_id'] : null; + $comment_id = array_key_exists('comment_id', $options) ? $options['comment_id'] : null; + $broadcast_id = array_key_exists('broadcast_id', $options) ? $options['broadcast_id'] : null; + $sso = array_key_exists('sso', $options) ? $options['sso'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['putRemoveBadge'][0]; + + // verify the required parameter 'tenant_id' is set + if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $tenant_id when calling putRemoveBadge' + ); + } // verify the required parameter 'badge_id' is set if ($badge_id === null || (is_array($badge_id) && count($badge_id) === 0)) { @@ -15501,13 +14605,22 @@ public function putRemoveBadgeRequest($badge_id, $user_id = null, $comment_id = - $resourcePath = '/auth/my-account/moderate-comments/remove-badge'; + $resourcePath = '/auth/my-account/moderate-comments/mod_api/remove-badge'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $tenant_id, + 'tenantId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $badge_id, @@ -15615,6 +14728,9 @@ public function putRemoveBadgeRequest($badge_id, $user_id = null, $comment_id = * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id tenant_id (required) * @param string $url_id url_id (required) * @param string|null $sso sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putReopenThread'] to see the possible values for this operation @@ -15623,9 +14739,9 @@ public function putRemoveBadgeRequest($badge_id, $user_id = null, $comment_id = * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError */ - public function putReopenThread($url_id, $sso = null, string $contentType = self::contentTypes['putReopenThread'][0]) + public function putReopenThread($tenant_id, $url_id, $sso = null) { - list($response) = $this->putReopenThreadWithHttpInfo($url_id, $sso, $contentType); + list($response) = $this->putReopenThreadWithHttpInfo($tenant_id, $url_id, $sso); return $response; } @@ -15634,6 +14750,9 @@ public function putReopenThread($url_id, $sso = null, string $contentType = self * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $url_id (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putReopenThread'] to see the possible values for this operation @@ -15642,9 +14761,9 @@ public function putReopenThread($url_id, $sso = null, string $contentType = self * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function putReopenThreadWithHttpInfo($url_id, $sso = null, string $contentType = self::contentTypes['putReopenThread'][0]) + public function putReopenThreadWithHttpInfo($tenant_id, $url_id, $sso = null) { - $request = $this->putReopenThreadRequest($url_id, $sso, $contentType); + $request = $this->putReopenThreadRequest($tenant_id, $url_id, $sso); try { $options = $this->createHttpClientOption(); @@ -15671,61 +14790,21 @@ public function putReopenThreadWithHttpInfo($url_id, $sso = null, string $conten switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APIEmptyResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIEmptyResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIEmptyResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -15739,34 +14818,11 @@ public function putReopenThreadWithHttpInfo($url_id, $sso = null, string $conten ); } - $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -15776,7 +14832,7 @@ public function putReopenThreadWithHttpInfo($url_id, $sso = null, string $conten $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -15784,8 +14840,10 @@ public function putReopenThreadWithHttpInfo($url_id, $sso = null, string $conten $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -15795,6 +14853,9 @@ public function putReopenThreadWithHttpInfo($url_id, $sso = null, string $conten * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $url_id (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putReopenThread'] to see the possible values for this operation @@ -15802,9 +14863,9 @@ public function putReopenThreadWithHttpInfo($url_id, $sso = null, string $conten * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putReopenThreadAsync($url_id, $sso = null, string $contentType = self::contentTypes['putReopenThread'][0]) + public function putReopenThreadAsync($tenant_id, $url_id, $sso = null) { - return $this->putReopenThreadAsyncWithHttpInfo($url_id, $sso, $contentType) + return $this->putReopenThreadAsyncWithHttpInfo($tenant_id, $url_id, $sso) ->then( function ($response) { return $response[0]; @@ -15817,6 +14878,9 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $url_id (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putReopenThread'] to see the possible values for this operation @@ -15824,10 +14888,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putReopenThreadAsyncWithHttpInfo($url_id, $sso = null, string $contentType = self::contentTypes['putReopenThread'][0]) + public function putReopenThreadAsyncWithHttpInfo($tenant_id, $url_id, $sso = null) { $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - $request = $this->putReopenThreadRequest($url_id, $sso, $contentType); + $request = $this->putReopenThreadRequest($tenant_id, $url_id, $sso); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -15868,6 +14932,9 @@ function ($exception) { /** * Create request for operation 'putReopenThread' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string $url_id (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putReopenThread'] to see the possible values for this operation @@ -15875,8 +14942,16 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function putReopenThreadRequest($url_id, $sso = null, string $contentType = self::contentTypes['putReopenThread'][0]) + public function putReopenThreadRequest($tenant_id, $url_id, $sso = null) { + $contentType = self::contentTypes['putReopenThread'][0]; + + // verify the required parameter 'tenant_id' is set + if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $tenant_id when calling putReopenThread' + ); + } // verify the required parameter 'url_id' is set if ($url_id === null || (is_array($url_id) && count($url_id) === 0)) { @@ -15887,13 +14962,22 @@ public function putReopenThreadRequest($url_id, $sso = null, string $contentType - $resourcePath = '/auth/my-account/moderate-comments/reopen-thread'; + $resourcePath = '/auth/my-account/moderate-comments/mod_api/reopen-thread'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $tenant_id, + 'tenantId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $url_id, @@ -15974,6 +15058,9 @@ public function putReopenThreadRequest($url_id, $sso = null, string $contentType * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id tenant_id (required) * @param string|null $user_id user_id (optional) * @param string|null $trust_factor trust_factor (optional) * @param string|null $sso sso (optional) @@ -15983,9 +15070,9 @@ public function putReopenThreadRequest($url_id, $sso = null, string $contentType * @throws \InvalidArgumentException * @return \FastComments\Client\Model\SetUserTrustFactorResponse|\FastComments\Client\Model\APIError */ - public function setTrustFactor($user_id = null, $trust_factor = null, $sso = null, string $contentType = self::contentTypes['setTrustFactor'][0]) + public function setTrustFactor($tenant_id, array $options = []) { - list($response) = $this->setTrustFactorWithHttpInfo($user_id, $trust_factor, $sso, $contentType); + list($response) = $this->setTrustFactorWithHttpInfo($tenant_id, $options); return $response; } @@ -15994,6 +15081,9 @@ public function setTrustFactor($user_id = null, $trust_factor = null, $sso = nul * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $user_id (optional) * @param string|null $trust_factor (optional) * @param string|null $sso (optional) @@ -16003,9 +15093,9 @@ public function setTrustFactor($user_id = null, $trust_factor = null, $sso = nul * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\SetUserTrustFactorResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function setTrustFactorWithHttpInfo($user_id = null, $trust_factor = null, $sso = null, string $contentType = self::contentTypes['setTrustFactor'][0]) + public function setTrustFactorWithHttpInfo($tenant_id, array $options = []) { - $request = $this->setTrustFactorRequest($user_id, $trust_factor, $sso, $contentType); + $request = $this->setTrustFactorRequest($tenant_id, $options); try { $options = $this->createHttpClientOption(); @@ -16032,61 +15122,21 @@ public function setTrustFactorWithHttpInfo($user_id = null, $trust_factor = null switch($statusCode) { case 200: - if ('\FastComments\Client\Model\SetUserTrustFactorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\SetUserTrustFactorResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\SetUserTrustFactorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\SetUserTrustFactorResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -16100,34 +15150,11 @@ public function setTrustFactorWithHttpInfo($user_id = null, $trust_factor = null ); } - $returnType = '\FastComments\Client\Model\SetUserTrustFactorResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\SetUserTrustFactorResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -16137,7 +15164,7 @@ public function setTrustFactorWithHttpInfo($user_id = null, $trust_factor = null $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -16145,8 +15172,10 @@ public function setTrustFactorWithHttpInfo($user_id = null, $trust_factor = null $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -16156,6 +15185,9 @@ public function setTrustFactorWithHttpInfo($user_id = null, $trust_factor = null * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $user_id (optional) * @param string|null $trust_factor (optional) * @param string|null $sso (optional) @@ -16164,9 +15196,9 @@ public function setTrustFactorWithHttpInfo($user_id = null, $trust_factor = null * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function setTrustFactorAsync($user_id = null, $trust_factor = null, $sso = null, string $contentType = self::contentTypes['setTrustFactor'][0]) + public function setTrustFactorAsync($tenant_id, array $options = []) { - return $this->setTrustFactorAsyncWithHttpInfo($user_id, $trust_factor, $sso, $contentType) + return $this->setTrustFactorAsyncWithHttpInfo($tenant_id, $options) ->then( function ($response) { return $response[0]; @@ -16179,6 +15211,9 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $user_id (optional) * @param string|null $trust_factor (optional) * @param string|null $sso (optional) @@ -16187,10 +15222,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function setTrustFactorAsyncWithHttpInfo($user_id = null, $trust_factor = null, $sso = null, string $contentType = self::contentTypes['setTrustFactor'][0]) + public function setTrustFactorAsyncWithHttpInfo($tenant_id, array $options = []) { $returnType = '\FastComments\Client\Model\SetUserTrustFactorResponse'; - $request = $this->setTrustFactorRequest($user_id, $trust_factor, $sso, $contentType); + $request = $this->setTrustFactorRequest($tenant_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -16231,6 +15266,9 @@ function ($exception) { /** * Create request for operation 'setTrustFactor' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * + * @param string $tenant_id (required) * @param string|null $user_id (optional) * @param string|null $trust_factor (optional) * @param string|null $sso (optional) @@ -16239,20 +15277,41 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function setTrustFactorRequest($user_id = null, $trust_factor = null, $sso = null, string $contentType = self::contentTypes['setTrustFactor'][0]) + public function setTrustFactorRequest($tenant_id, array $options = []) { + // unbox the optional parameters and request options from the $options array + $user_id = array_key_exists('user_id', $options) ? $options['user_id'] : null; + $trust_factor = array_key_exists('trust_factor', $options) ? $options['trust_factor'] : null; + $sso = array_key_exists('sso', $options) ? $options['sso'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['setTrustFactor'][0]; + + // verify the required parameter 'tenant_id' is set + if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $tenant_id when calling setTrustFactor' + ); + } - $resourcePath = '/auth/my-account/moderate-comments/set-trust-factor'; + $resourcePath = '/auth/my-account/moderate-comments/mod_api/set-trust-factor'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $tenant_id, + 'tenantId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $user_id, @@ -16353,6 +15412,57 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response + ): array { + if ($dataType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/lib/Api/PublicApi.php b/lib/Api/PublicApi.php index 7f804fd..30bc7c5 100644 --- a/lib/Api/PublicApi.php +++ b/lib/Api/PublicApi.php @@ -1,7 +1,7 @@ blockFromCommentPublicWithHttpInfo($tenant_id, $comment_id, $public_block_from_comment_params, $sso, $contentType); + list($response) = $this->blockFromCommentPublicWithHttpInfo($tenant_id, $comment_id, $public_block_from_comment_params, $sso); return $response; } @@ -302,6 +307,8 @@ public function blockFromCommentPublic($tenant_id, $comment_id, $public_block_fr * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param \FastComments\Client\Model\PublicBlockFromCommentParams $public_block_from_comment_params (required) @@ -312,9 +319,9 @@ public function blockFromCommentPublic($tenant_id, $comment_id, $public_block_fr * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\BlockSuccess|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function blockFromCommentPublicWithHttpInfo($tenant_id, $comment_id, $public_block_from_comment_params, $sso = null, string $contentType = self::contentTypes['blockFromCommentPublic'][0]) + public function blockFromCommentPublicWithHttpInfo($tenant_id, $comment_id, $public_block_from_comment_params, $sso = null) { - $request = $this->blockFromCommentPublicRequest($tenant_id, $comment_id, $public_block_from_comment_params, $sso, $contentType); + $request = $this->blockFromCommentPublicRequest($tenant_id, $comment_id, $public_block_from_comment_params, $sso); try { $options = $this->createHttpClientOption(); @@ -341,61 +348,21 @@ public function blockFromCommentPublicWithHttpInfo($tenant_id, $comment_id, $pub switch($statusCode) { case 200: - if ('\FastComments\Client\Model\BlockSuccess' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\BlockSuccess' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\BlockSuccess', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\BlockSuccess', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -409,34 +376,11 @@ public function blockFromCommentPublicWithHttpInfo($tenant_id, $comment_id, $pub ); } - $returnType = '\FastComments\Client\Model\BlockSuccess'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\BlockSuccess', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -446,7 +390,7 @@ public function blockFromCommentPublicWithHttpInfo($tenant_id, $comment_id, $pub $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -454,8 +398,10 @@ public function blockFromCommentPublicWithHttpInfo($tenant_id, $comment_id, $pub $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -465,6 +411,8 @@ public function blockFromCommentPublicWithHttpInfo($tenant_id, $comment_id, $pub * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param \FastComments\Client\Model\PublicBlockFromCommentParams $public_block_from_comment_params (required) @@ -474,9 +422,9 @@ public function blockFromCommentPublicWithHttpInfo($tenant_id, $comment_id, $pub * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function blockFromCommentPublicAsync($tenant_id, $comment_id, $public_block_from_comment_params, $sso = null, string $contentType = self::contentTypes['blockFromCommentPublic'][0]) + public function blockFromCommentPublicAsync($tenant_id, $comment_id, $public_block_from_comment_params, $sso = null) { - return $this->blockFromCommentPublicAsyncWithHttpInfo($tenant_id, $comment_id, $public_block_from_comment_params, $sso, $contentType) + return $this->blockFromCommentPublicAsyncWithHttpInfo($tenant_id, $comment_id, $public_block_from_comment_params, $sso) ->then( function ($response) { return $response[0]; @@ -489,6 +437,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param \FastComments\Client\Model\PublicBlockFromCommentParams $public_block_from_comment_params (required) @@ -498,10 +448,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function blockFromCommentPublicAsyncWithHttpInfo($tenant_id, $comment_id, $public_block_from_comment_params, $sso = null, string $contentType = self::contentTypes['blockFromCommentPublic'][0]) + public function blockFromCommentPublicAsyncWithHttpInfo($tenant_id, $comment_id, $public_block_from_comment_params, $sso = null) { $returnType = '\FastComments\Client\Model\BlockSuccess'; - $request = $this->blockFromCommentPublicRequest($tenant_id, $comment_id, $public_block_from_comment_params, $sso, $contentType); + $request = $this->blockFromCommentPublicRequest($tenant_id, $comment_id, $public_block_from_comment_params, $sso); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -542,6 +492,8 @@ function ($exception) { /** * Create request for operation 'blockFromCommentPublic' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param \FastComments\Client\Model\PublicBlockFromCommentParams $public_block_from_comment_params (required) @@ -551,9 +503,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function blockFromCommentPublicRequest($tenant_id, $comment_id, $public_block_from_comment_params, $sso = null, string $contentType = self::contentTypes['blockFromCommentPublic'][0]) + public function blockFromCommentPublicRequest($tenant_id, $comment_id, $public_block_from_comment_params, $sso = null) { - + $contentType = self::contentTypes['blockFromCommentPublic'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -607,7 +560,7 @@ public function blockFromCommentPublicRequest($tenant_id, $comment_id, $public_b // path params if ($comment_id !== null) { $resourcePath = str_replace( - '{' . 'commentId' . '}', + '{commentId}', ObjectSerializer::toPathValue($comment_id), $resourcePath ); @@ -679,6 +632,8 @@ public function blockFromCommentPublicRequest($tenant_id, $comment_id, $public_b * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $comment_ids A comma separated list of comment ids. (required) * @param string|null $sso sso (optional) @@ -688,9 +643,9 @@ public function blockFromCommentPublicRequest($tenant_id, $comment_id, $public_b * @throws \InvalidArgumentException * @return \FastComments\Client\Model\CheckBlockedCommentsResponse|\FastComments\Client\Model\APIError */ - public function checkedCommentsForBlocked($tenant_id, $comment_ids, $sso = null, string $contentType = self::contentTypes['checkedCommentsForBlocked'][0]) + public function checkedCommentsForBlocked($tenant_id, $comment_ids, $sso = null) { - list($response) = $this->checkedCommentsForBlockedWithHttpInfo($tenant_id, $comment_ids, $sso, $contentType); + list($response) = $this->checkedCommentsForBlockedWithHttpInfo($tenant_id, $comment_ids, $sso); return $response; } @@ -699,6 +654,8 @@ public function checkedCommentsForBlocked($tenant_id, $comment_ids, $sso = null, * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_ids A comma separated list of comment ids. (required) * @param string|null $sso (optional) @@ -708,9 +665,9 @@ public function checkedCommentsForBlocked($tenant_id, $comment_ids, $sso = null, * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\CheckBlockedCommentsResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function checkedCommentsForBlockedWithHttpInfo($tenant_id, $comment_ids, $sso = null, string $contentType = self::contentTypes['checkedCommentsForBlocked'][0]) + public function checkedCommentsForBlockedWithHttpInfo($tenant_id, $comment_ids, $sso = null) { - $request = $this->checkedCommentsForBlockedRequest($tenant_id, $comment_ids, $sso, $contentType); + $request = $this->checkedCommentsForBlockedRequest($tenant_id, $comment_ids, $sso); try { $options = $this->createHttpClientOption(); @@ -737,61 +694,21 @@ public function checkedCommentsForBlockedWithHttpInfo($tenant_id, $comment_ids, switch($statusCode) { case 200: - if ('\FastComments\Client\Model\CheckBlockedCommentsResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\CheckBlockedCommentsResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\CheckBlockedCommentsResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\CheckBlockedCommentsResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -805,34 +722,11 @@ public function checkedCommentsForBlockedWithHttpInfo($tenant_id, $comment_ids, ); } - $returnType = '\FastComments\Client\Model\CheckBlockedCommentsResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\CheckBlockedCommentsResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -842,7 +736,7 @@ public function checkedCommentsForBlockedWithHttpInfo($tenant_id, $comment_ids, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -850,8 +744,10 @@ public function checkedCommentsForBlockedWithHttpInfo($tenant_id, $comment_ids, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -861,6 +757,8 @@ public function checkedCommentsForBlockedWithHttpInfo($tenant_id, $comment_ids, * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_ids A comma separated list of comment ids. (required) * @param string|null $sso (optional) @@ -869,9 +767,9 @@ public function checkedCommentsForBlockedWithHttpInfo($tenant_id, $comment_ids, * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function checkedCommentsForBlockedAsync($tenant_id, $comment_ids, $sso = null, string $contentType = self::contentTypes['checkedCommentsForBlocked'][0]) + public function checkedCommentsForBlockedAsync($tenant_id, $comment_ids, $sso = null) { - return $this->checkedCommentsForBlockedAsyncWithHttpInfo($tenant_id, $comment_ids, $sso, $contentType) + return $this->checkedCommentsForBlockedAsyncWithHttpInfo($tenant_id, $comment_ids, $sso) ->then( function ($response) { return $response[0]; @@ -884,6 +782,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_ids A comma separated list of comment ids. (required) * @param string|null $sso (optional) @@ -892,10 +792,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function checkedCommentsForBlockedAsyncWithHttpInfo($tenant_id, $comment_ids, $sso = null, string $contentType = self::contentTypes['checkedCommentsForBlocked'][0]) + public function checkedCommentsForBlockedAsyncWithHttpInfo($tenant_id, $comment_ids, $sso = null) { $returnType = '\FastComments\Client\Model\CheckBlockedCommentsResponse'; - $request = $this->checkedCommentsForBlockedRequest($tenant_id, $comment_ids, $sso, $contentType); + $request = $this->checkedCommentsForBlockedRequest($tenant_id, $comment_ids, $sso); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -936,6 +836,8 @@ function ($exception) { /** * Create request for operation 'checkedCommentsForBlocked' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_ids A comma separated list of comment ids. (required) * @param string|null $sso (optional) @@ -944,9 +846,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function checkedCommentsForBlockedRequest($tenant_id, $comment_ids, $sso = null, string $contentType = self::contentTypes['checkedCommentsForBlocked'][0]) + public function checkedCommentsForBlockedRequest($tenant_id, $comment_ids, $sso = null) { - + $contentType = self::contentTypes['checkedCommentsForBlocked'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -1059,6 +962,8 @@ public function checkedCommentsForBlockedRequest($tenant_id, $comment_ids, $sso * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $url_id url_id (required) * @param string $broadcast_id broadcast_id (required) @@ -1071,9 +976,9 @@ public function checkedCommentsForBlockedRequest($tenant_id, $comment_ids, $sso * @throws \InvalidArgumentException * @return \FastComments\Client\Model\SaveCommentsResponseWithPresence|\FastComments\Client\Model\APIError */ - public function createCommentPublic($tenant_id, $url_id, $broadcast_id, $comment_data, $session_id = null, $sso = null, string $contentType = self::contentTypes['createCommentPublic'][0]) + public function createCommentPublic($tenant_id, $url_id, $broadcast_id, $comment_data, array $options = []) { - list($response) = $this->createCommentPublicWithHttpInfo($tenant_id, $url_id, $broadcast_id, $comment_data, $session_id, $sso, $contentType); + list($response) = $this->createCommentPublicWithHttpInfo($tenant_id, $url_id, $broadcast_id, $comment_data, $options); return $response; } @@ -1082,6 +987,8 @@ public function createCommentPublic($tenant_id, $url_id, $broadcast_id, $comment * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $url_id (required) * @param string $broadcast_id (required) @@ -1094,9 +1001,9 @@ public function createCommentPublic($tenant_id, $url_id, $broadcast_id, $comment * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\SaveCommentsResponseWithPresence|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function createCommentPublicWithHttpInfo($tenant_id, $url_id, $broadcast_id, $comment_data, $session_id = null, $sso = null, string $contentType = self::contentTypes['createCommentPublic'][0]) + public function createCommentPublicWithHttpInfo($tenant_id, $url_id, $broadcast_id, $comment_data, array $options = []) { - $request = $this->createCommentPublicRequest($tenant_id, $url_id, $broadcast_id, $comment_data, $session_id, $sso, $contentType); + $request = $this->createCommentPublicRequest($tenant_id, $url_id, $broadcast_id, $comment_data, $options); try { $options = $this->createHttpClientOption(); @@ -1123,61 +1030,21 @@ public function createCommentPublicWithHttpInfo($tenant_id, $url_id, $broadcast_ switch($statusCode) { case 200: - if ('\FastComments\Client\Model\SaveCommentsResponseWithPresence' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\SaveCommentsResponseWithPresence' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\SaveCommentsResponseWithPresence', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\SaveCommentsResponseWithPresence', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -1191,34 +1058,11 @@ public function createCommentPublicWithHttpInfo($tenant_id, $url_id, $broadcast_ ); } - $returnType = '\FastComments\Client\Model\SaveCommentsResponseWithPresence'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\SaveCommentsResponseWithPresence', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1228,7 +1072,7 @@ public function createCommentPublicWithHttpInfo($tenant_id, $url_id, $broadcast_ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1236,8 +1080,10 @@ public function createCommentPublicWithHttpInfo($tenant_id, $url_id, $broadcast_ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -1247,6 +1093,8 @@ public function createCommentPublicWithHttpInfo($tenant_id, $url_id, $broadcast_ * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $url_id (required) * @param string $broadcast_id (required) @@ -1258,9 +1106,9 @@ public function createCommentPublicWithHttpInfo($tenant_id, $url_id, $broadcast_ * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createCommentPublicAsync($tenant_id, $url_id, $broadcast_id, $comment_data, $session_id = null, $sso = null, string $contentType = self::contentTypes['createCommentPublic'][0]) + public function createCommentPublicAsync($tenant_id, $url_id, $broadcast_id, $comment_data, array $options = []) { - return $this->createCommentPublicAsyncWithHttpInfo($tenant_id, $url_id, $broadcast_id, $comment_data, $session_id, $sso, $contentType) + return $this->createCommentPublicAsyncWithHttpInfo($tenant_id, $url_id, $broadcast_id, $comment_data, $options) ->then( function ($response) { return $response[0]; @@ -1273,6 +1121,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $url_id (required) * @param string $broadcast_id (required) @@ -1284,10 +1134,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createCommentPublicAsyncWithHttpInfo($tenant_id, $url_id, $broadcast_id, $comment_data, $session_id = null, $sso = null, string $contentType = self::contentTypes['createCommentPublic'][0]) + public function createCommentPublicAsyncWithHttpInfo($tenant_id, $url_id, $broadcast_id, $comment_data, array $options = []) { $returnType = '\FastComments\Client\Model\SaveCommentsResponseWithPresence'; - $request = $this->createCommentPublicRequest($tenant_id, $url_id, $broadcast_id, $comment_data, $session_id, $sso, $contentType); + $request = $this->createCommentPublicRequest($tenant_id, $url_id, $broadcast_id, $comment_data, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1328,6 +1178,8 @@ function ($exception) { /** * Create request for operation 'createCommentPublic' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $url_id (required) * @param string $broadcast_id (required) @@ -1339,9 +1191,13 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function createCommentPublicRequest($tenant_id, $url_id, $broadcast_id, $comment_data, $session_id = null, $sso = null, string $contentType = self::contentTypes['createCommentPublic'][0]) + public function createCommentPublicRequest($tenant_id, $url_id, $broadcast_id, $comment_data, array $options = []) { - + // unbox the optional parameters and request options from the $options array + $session_id = array_key_exists('session_id', $options) ? $options['session_id'] : null; + $sso = array_key_exists('sso', $options) ? $options['sso'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['createCommentPublic'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -1421,7 +1277,7 @@ public function createCommentPublicRequest($tenant_id, $url_id, $broadcast_id, $ // path params if ($tenant_id !== null) { $resourcePath = str_replace( - '{' . 'tenantId' . '}', + '{tenantId}', ObjectSerializer::toPathValue($tenant_id), $resourcePath ); @@ -1493,6 +1349,8 @@ public function createCommentPublicRequest($tenant_id, $url_id, $broadcast_id, $ * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param \FastComments\Client\Model\CreateFeedPostParams $create_feed_post_params create_feed_post_params (required) * @param string|null $broadcast_id broadcast_id (optional) @@ -1503,9 +1361,9 @@ public function createCommentPublicRequest($tenant_id, $url_id, $broadcast_id, $ * @throws \InvalidArgumentException * @return \FastComments\Client\Model\CreateFeedPostResponse|\FastComments\Client\Model\APIError */ - public function createFeedPostPublic($tenant_id, $create_feed_post_params, $broadcast_id = null, $sso = null, string $contentType = self::contentTypes['createFeedPostPublic'][0]) + public function createFeedPostPublic($tenant_id, $create_feed_post_params, array $options = []) { - list($response) = $this->createFeedPostPublicWithHttpInfo($tenant_id, $create_feed_post_params, $broadcast_id, $sso, $contentType); + list($response) = $this->createFeedPostPublicWithHttpInfo($tenant_id, $create_feed_post_params, $options); return $response; } @@ -1514,6 +1372,8 @@ public function createFeedPostPublic($tenant_id, $create_feed_post_params, $broa * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param \FastComments\Client\Model\CreateFeedPostParams $create_feed_post_params (required) * @param string|null $broadcast_id (optional) @@ -1524,9 +1384,9 @@ public function createFeedPostPublic($tenant_id, $create_feed_post_params, $broa * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\CreateFeedPostResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function createFeedPostPublicWithHttpInfo($tenant_id, $create_feed_post_params, $broadcast_id = null, $sso = null, string $contentType = self::contentTypes['createFeedPostPublic'][0]) + public function createFeedPostPublicWithHttpInfo($tenant_id, $create_feed_post_params, array $options = []) { - $request = $this->createFeedPostPublicRequest($tenant_id, $create_feed_post_params, $broadcast_id, $sso, $contentType); + $request = $this->createFeedPostPublicRequest($tenant_id, $create_feed_post_params, $options); try { $options = $this->createHttpClientOption(); @@ -1553,61 +1413,21 @@ public function createFeedPostPublicWithHttpInfo($tenant_id, $create_feed_post_p switch($statusCode) { case 200: - if ('\FastComments\Client\Model\CreateFeedPostResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\CreateFeedPostResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\CreateFeedPostResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\CreateFeedPostResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -1621,34 +1441,11 @@ public function createFeedPostPublicWithHttpInfo($tenant_id, $create_feed_post_p ); } - $returnType = '\FastComments\Client\Model\CreateFeedPostResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\CreateFeedPostResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1658,7 +1455,7 @@ public function createFeedPostPublicWithHttpInfo($tenant_id, $create_feed_post_p $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1666,8 +1463,10 @@ public function createFeedPostPublicWithHttpInfo($tenant_id, $create_feed_post_p $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -1677,6 +1476,8 @@ public function createFeedPostPublicWithHttpInfo($tenant_id, $create_feed_post_p * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param \FastComments\Client\Model\CreateFeedPostParams $create_feed_post_params (required) * @param string|null $broadcast_id (optional) @@ -1686,9 +1487,9 @@ public function createFeedPostPublicWithHttpInfo($tenant_id, $create_feed_post_p * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createFeedPostPublicAsync($tenant_id, $create_feed_post_params, $broadcast_id = null, $sso = null, string $contentType = self::contentTypes['createFeedPostPublic'][0]) + public function createFeedPostPublicAsync($tenant_id, $create_feed_post_params, array $options = []) { - return $this->createFeedPostPublicAsyncWithHttpInfo($tenant_id, $create_feed_post_params, $broadcast_id, $sso, $contentType) + return $this->createFeedPostPublicAsyncWithHttpInfo($tenant_id, $create_feed_post_params, $options) ->then( function ($response) { return $response[0]; @@ -1701,6 +1502,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param \FastComments\Client\Model\CreateFeedPostParams $create_feed_post_params (required) * @param string|null $broadcast_id (optional) @@ -1710,10 +1513,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createFeedPostPublicAsyncWithHttpInfo($tenant_id, $create_feed_post_params, $broadcast_id = null, $sso = null, string $contentType = self::contentTypes['createFeedPostPublic'][0]) + public function createFeedPostPublicAsyncWithHttpInfo($tenant_id, $create_feed_post_params, array $options = []) { $returnType = '\FastComments\Client\Model\CreateFeedPostResponse'; - $request = $this->createFeedPostPublicRequest($tenant_id, $create_feed_post_params, $broadcast_id, $sso, $contentType); + $request = $this->createFeedPostPublicRequest($tenant_id, $create_feed_post_params, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1754,6 +1557,8 @@ function ($exception) { /** * Create request for operation 'createFeedPostPublic' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param \FastComments\Client\Model\CreateFeedPostParams $create_feed_post_params (required) * @param string|null $broadcast_id (optional) @@ -1763,9 +1568,13 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function createFeedPostPublicRequest($tenant_id, $create_feed_post_params, $broadcast_id = null, $sso = null, string $contentType = self::contentTypes['createFeedPostPublic'][0]) + public function createFeedPostPublicRequest($tenant_id, $create_feed_post_params, array $options = []) { - + // unbox the optional parameters and request options from the $options array + $broadcast_id = array_key_exists('broadcast_id', $options) ? $options['broadcast_id'] : null; + $sso = array_key_exists('sso', $options) ? $options['sso'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['createFeedPostPublic'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -1813,7 +1622,7 @@ public function createFeedPostPublicRequest($tenant_id, $create_feed_post_params // path params if ($tenant_id !== null) { $resourcePath = str_replace( - '{' . 'tenantId' . '}', + '{tenantId}', ObjectSerializer::toPathValue($tenant_id), $resourcePath ); @@ -1885,6 +1694,8 @@ public function createFeedPostPublicRequest($tenant_id, $create_feed_post_params * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $url_id url_id (required) * @param string|null $title title (optional) @@ -1894,9 +1705,9 @@ public function createFeedPostPublicRequest($tenant_id, $create_feed_post_params * @throws \InvalidArgumentException * @return \FastComments\Client\Model\CreateV1PageReact|\FastComments\Client\Model\APIError */ - public function createV1PageReact($tenant_id, $url_id, $title = null, string $contentType = self::contentTypes['createV1PageReact'][0]) + public function createV1PageReact($tenant_id, $url_id, $title = null) { - list($response) = $this->createV1PageReactWithHttpInfo($tenant_id, $url_id, $title, $contentType); + list($response) = $this->createV1PageReactWithHttpInfo($tenant_id, $url_id, $title); return $response; } @@ -1905,6 +1716,8 @@ public function createV1PageReact($tenant_id, $url_id, $title = null, string $co * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $url_id (required) * @param string|null $title (optional) @@ -1914,9 +1727,9 @@ public function createV1PageReact($tenant_id, $url_id, $title = null, string $co * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\CreateV1PageReact|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function createV1PageReactWithHttpInfo($tenant_id, $url_id, $title = null, string $contentType = self::contentTypes['createV1PageReact'][0]) + public function createV1PageReactWithHttpInfo($tenant_id, $url_id, $title = null) { - $request = $this->createV1PageReactRequest($tenant_id, $url_id, $title, $contentType); + $request = $this->createV1PageReactRequest($tenant_id, $url_id, $title); try { $options = $this->createHttpClientOption(); @@ -1943,61 +1756,21 @@ public function createV1PageReactWithHttpInfo($tenant_id, $url_id, $title = null switch($statusCode) { case 200: - if ('\FastComments\Client\Model\CreateV1PageReact' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\CreateV1PageReact' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\CreateV1PageReact', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\CreateV1PageReact', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -2011,34 +1784,11 @@ public function createV1PageReactWithHttpInfo($tenant_id, $url_id, $title = null ); } - $returnType = '\FastComments\Client\Model\CreateV1PageReact'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\CreateV1PageReact', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2048,7 +1798,7 @@ public function createV1PageReactWithHttpInfo($tenant_id, $url_id, $title = null $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -2056,8 +1806,10 @@ public function createV1PageReactWithHttpInfo($tenant_id, $url_id, $title = null $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -2067,6 +1819,8 @@ public function createV1PageReactWithHttpInfo($tenant_id, $url_id, $title = null * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $url_id (required) * @param string|null $title (optional) @@ -2075,9 +1829,9 @@ public function createV1PageReactWithHttpInfo($tenant_id, $url_id, $title = null * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createV1PageReactAsync($tenant_id, $url_id, $title = null, string $contentType = self::contentTypes['createV1PageReact'][0]) + public function createV1PageReactAsync($tenant_id, $url_id, $title = null) { - return $this->createV1PageReactAsyncWithHttpInfo($tenant_id, $url_id, $title, $contentType) + return $this->createV1PageReactAsyncWithHttpInfo($tenant_id, $url_id, $title) ->then( function ($response) { return $response[0]; @@ -2090,6 +1844,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $url_id (required) * @param string|null $title (optional) @@ -2098,10 +1854,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createV1PageReactAsyncWithHttpInfo($tenant_id, $url_id, $title = null, string $contentType = self::contentTypes['createV1PageReact'][0]) + public function createV1PageReactAsyncWithHttpInfo($tenant_id, $url_id, $title = null) { $returnType = '\FastComments\Client\Model\CreateV1PageReact'; - $request = $this->createV1PageReactRequest($tenant_id, $url_id, $title, $contentType); + $request = $this->createV1PageReactRequest($tenant_id, $url_id, $title); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2142,6 +1898,8 @@ function ($exception) { /** * Create request for operation 'createV1PageReact' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $url_id (required) * @param string|null $title (optional) @@ -2150,9 +1908,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function createV1PageReactRequest($tenant_id, $url_id, $title = null, string $contentType = self::contentTypes['createV1PageReact'][0]) + public function createV1PageReactRequest($tenant_id, $url_id, $title = null) { - + $contentType = self::contentTypes['createV1PageReact'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -2199,7 +1958,7 @@ public function createV1PageReactRequest($tenant_id, $url_id, $title = null, str // path params if ($tenant_id !== null) { $resourcePath = str_replace( - '{' . 'tenantId' . '}', + '{tenantId}', ObjectSerializer::toPathValue($tenant_id), $resourcePath ); @@ -2264,6 +2023,8 @@ public function createV1PageReactRequest($tenant_id, $url_id, $title = null, str * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $url_id url_id (required) * @param string $id id (required) @@ -2274,9 +2035,9 @@ public function createV1PageReactRequest($tenant_id, $url_id, $title = null, str * @throws \InvalidArgumentException * @return \FastComments\Client\Model\CreateV1PageReact|\FastComments\Client\Model\APIError */ - public function createV2PageReact($tenant_id, $url_id, $id, $title = null, string $contentType = self::contentTypes['createV2PageReact'][0]) + public function createV2PageReact($tenant_id, $url_id, $id, $title = null) { - list($response) = $this->createV2PageReactWithHttpInfo($tenant_id, $url_id, $id, $title, $contentType); + list($response) = $this->createV2PageReactWithHttpInfo($tenant_id, $url_id, $id, $title); return $response; } @@ -2285,6 +2046,8 @@ public function createV2PageReact($tenant_id, $url_id, $id, $title = null, strin * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $url_id (required) * @param string $id (required) @@ -2295,9 +2058,9 @@ public function createV2PageReact($tenant_id, $url_id, $id, $title = null, strin * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\CreateV1PageReact|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function createV2PageReactWithHttpInfo($tenant_id, $url_id, $id, $title = null, string $contentType = self::contentTypes['createV2PageReact'][0]) + public function createV2PageReactWithHttpInfo($tenant_id, $url_id, $id, $title = null) { - $request = $this->createV2PageReactRequest($tenant_id, $url_id, $id, $title, $contentType); + $request = $this->createV2PageReactRequest($tenant_id, $url_id, $id, $title); try { $options = $this->createHttpClientOption(); @@ -2324,61 +2087,21 @@ public function createV2PageReactWithHttpInfo($tenant_id, $url_id, $id, $title = switch($statusCode) { case 200: - if ('\FastComments\Client\Model\CreateV1PageReact' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\CreateV1PageReact' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\CreateV1PageReact', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\CreateV1PageReact', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -2392,34 +2115,11 @@ public function createV2PageReactWithHttpInfo($tenant_id, $url_id, $id, $title = ); } - $returnType = '\FastComments\Client\Model\CreateV1PageReact'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\CreateV1PageReact', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2429,7 +2129,7 @@ public function createV2PageReactWithHttpInfo($tenant_id, $url_id, $id, $title = $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -2437,8 +2137,10 @@ public function createV2PageReactWithHttpInfo($tenant_id, $url_id, $id, $title = $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -2448,6 +2150,8 @@ public function createV2PageReactWithHttpInfo($tenant_id, $url_id, $id, $title = * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $url_id (required) * @param string $id (required) @@ -2457,9 +2161,9 @@ public function createV2PageReactWithHttpInfo($tenant_id, $url_id, $id, $title = * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createV2PageReactAsync($tenant_id, $url_id, $id, $title = null, string $contentType = self::contentTypes['createV2PageReact'][0]) + public function createV2PageReactAsync($tenant_id, $url_id, $id, $title = null) { - return $this->createV2PageReactAsyncWithHttpInfo($tenant_id, $url_id, $id, $title, $contentType) + return $this->createV2PageReactAsyncWithHttpInfo($tenant_id, $url_id, $id, $title) ->then( function ($response) { return $response[0]; @@ -2472,6 +2176,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $url_id (required) * @param string $id (required) @@ -2481,10 +2187,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createV2PageReactAsyncWithHttpInfo($tenant_id, $url_id, $id, $title = null, string $contentType = self::contentTypes['createV2PageReact'][0]) + public function createV2PageReactAsyncWithHttpInfo($tenant_id, $url_id, $id, $title = null) { $returnType = '\FastComments\Client\Model\CreateV1PageReact'; - $request = $this->createV2PageReactRequest($tenant_id, $url_id, $id, $title, $contentType); + $request = $this->createV2PageReactRequest($tenant_id, $url_id, $id, $title); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2525,6 +2231,8 @@ function ($exception) { /** * Create request for operation 'createV2PageReact' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $url_id (required) * @param string $id (required) @@ -2534,9 +2242,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function createV2PageReactRequest($tenant_id, $url_id, $id, $title = null, string $contentType = self::contentTypes['createV2PageReact'][0]) + public function createV2PageReactRequest($tenant_id, $url_id, $id, $title = null) { - + $contentType = self::contentTypes['createV2PageReact'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -2599,7 +2308,7 @@ public function createV2PageReactRequest($tenant_id, $url_id, $id, $title = null // path params if ($tenant_id !== null) { $resourcePath = str_replace( - '{' . 'tenantId' . '}', + '{tenantId}', ObjectSerializer::toPathValue($tenant_id), $resourcePath ); @@ -2664,6 +2373,8 @@ public function createV2PageReactRequest($tenant_id, $url_id, $id, $title = null * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $comment_id comment_id (required) * @param string $broadcast_id broadcast_id (required) @@ -2675,9 +2386,9 @@ public function createV2PageReactRequest($tenant_id, $url_id, $id, $title = null * @throws \InvalidArgumentException * @return \FastComments\Client\Model\PublicAPIDeleteCommentResponse|\FastComments\Client\Model\APIError */ - public function deleteCommentPublic($tenant_id, $comment_id, $broadcast_id, $edit_key = null, $sso = null, string $contentType = self::contentTypes['deleteCommentPublic'][0]) + public function deleteCommentPublic($tenant_id, $comment_id, $broadcast_id, array $options = []) { - list($response) = $this->deleteCommentPublicWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $edit_key, $sso, $contentType); + list($response) = $this->deleteCommentPublicWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $options); return $response; } @@ -2686,6 +2397,8 @@ public function deleteCommentPublic($tenant_id, $comment_id, $broadcast_id, $edi * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param string $broadcast_id (required) @@ -2697,9 +2410,9 @@ public function deleteCommentPublic($tenant_id, $comment_id, $broadcast_id, $edi * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\PublicAPIDeleteCommentResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function deleteCommentPublicWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $edit_key = null, $sso = null, string $contentType = self::contentTypes['deleteCommentPublic'][0]) + public function deleteCommentPublicWithHttpInfo($tenant_id, $comment_id, $broadcast_id, array $options = []) { - $request = $this->deleteCommentPublicRequest($tenant_id, $comment_id, $broadcast_id, $edit_key, $sso, $contentType); + $request = $this->deleteCommentPublicRequest($tenant_id, $comment_id, $broadcast_id, $options); try { $options = $this->createHttpClientOption(); @@ -2726,61 +2439,21 @@ public function deleteCommentPublicWithHttpInfo($tenant_id, $comment_id, $broadc switch($statusCode) { case 200: - if ('\FastComments\Client\Model\PublicAPIDeleteCommentResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\PublicAPIDeleteCommentResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\PublicAPIDeleteCommentResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\PublicAPIDeleteCommentResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -2794,34 +2467,11 @@ public function deleteCommentPublicWithHttpInfo($tenant_id, $comment_id, $broadc ); } - $returnType = '\FastComments\Client\Model\PublicAPIDeleteCommentResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\PublicAPIDeleteCommentResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2831,7 +2481,7 @@ public function deleteCommentPublicWithHttpInfo($tenant_id, $comment_id, $broadc $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -2839,8 +2489,10 @@ public function deleteCommentPublicWithHttpInfo($tenant_id, $comment_id, $broadc $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -2850,6 +2502,8 @@ public function deleteCommentPublicWithHttpInfo($tenant_id, $comment_id, $broadc * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param string $broadcast_id (required) @@ -2860,9 +2514,9 @@ public function deleteCommentPublicWithHttpInfo($tenant_id, $comment_id, $broadc * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteCommentPublicAsync($tenant_id, $comment_id, $broadcast_id, $edit_key = null, $sso = null, string $contentType = self::contentTypes['deleteCommentPublic'][0]) + public function deleteCommentPublicAsync($tenant_id, $comment_id, $broadcast_id, array $options = []) { - return $this->deleteCommentPublicAsyncWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $edit_key, $sso, $contentType) + return $this->deleteCommentPublicAsyncWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $options) ->then( function ($response) { return $response[0]; @@ -2875,6 +2529,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param string $broadcast_id (required) @@ -2885,10 +2541,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteCommentPublicAsyncWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $edit_key = null, $sso = null, string $contentType = self::contentTypes['deleteCommentPublic'][0]) + public function deleteCommentPublicAsyncWithHttpInfo($tenant_id, $comment_id, $broadcast_id, array $options = []) { $returnType = '\FastComments\Client\Model\PublicAPIDeleteCommentResponse'; - $request = $this->deleteCommentPublicRequest($tenant_id, $comment_id, $broadcast_id, $edit_key, $sso, $contentType); + $request = $this->deleteCommentPublicRequest($tenant_id, $comment_id, $broadcast_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2929,6 +2585,8 @@ function ($exception) { /** * Create request for operation 'deleteCommentPublic' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param string $broadcast_id (required) @@ -2939,9 +2597,13 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteCommentPublicRequest($tenant_id, $comment_id, $broadcast_id, $edit_key = null, $sso = null, string $contentType = self::contentTypes['deleteCommentPublic'][0]) + public function deleteCommentPublicRequest($tenant_id, $comment_id, $broadcast_id, array $options = []) { - + // unbox the optional parameters and request options from the $options array + $edit_key = array_key_exists('edit_key', $options) ? $options['edit_key'] : null; + $sso = array_key_exists('sso', $options) ? $options['sso'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['deleteCommentPublic'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -3005,7 +2667,7 @@ public function deleteCommentPublicRequest($tenant_id, $comment_id, $broadcast_i // path params if ($tenant_id !== null) { $resourcePath = str_replace( - '{' . 'tenantId' . '}', + '{tenantId}', ObjectSerializer::toPathValue($tenant_id), $resourcePath ); @@ -3013,7 +2675,7 @@ public function deleteCommentPublicRequest($tenant_id, $comment_id, $broadcast_i // path params if ($comment_id !== null) { $resourcePath = str_replace( - '{' . 'commentId' . '}', + '{commentId}', ObjectSerializer::toPathValue($comment_id), $resourcePath ); @@ -3078,6 +2740,8 @@ public function deleteCommentPublicRequest($tenant_id, $comment_id, $broadcast_i * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $comment_id comment_id (required) * @param string $vote_id vote_id (required) @@ -3091,9 +2755,9 @@ public function deleteCommentPublicRequest($tenant_id, $comment_id, $broadcast_i * @throws \InvalidArgumentException * @return \FastComments\Client\Model\VoteDeleteResponse|\FastComments\Client\Model\APIError */ - public function deleteCommentVote($tenant_id, $comment_id, $vote_id, $url_id, $broadcast_id, $edit_key = null, $sso = null, string $contentType = self::contentTypes['deleteCommentVote'][0]) + public function deleteCommentVote($tenant_id, $comment_id, $vote_id, $url_id, $broadcast_id, array $options = []) { - list($response) = $this->deleteCommentVoteWithHttpInfo($tenant_id, $comment_id, $vote_id, $url_id, $broadcast_id, $edit_key, $sso, $contentType); + list($response) = $this->deleteCommentVoteWithHttpInfo($tenant_id, $comment_id, $vote_id, $url_id, $broadcast_id, $options); return $response; } @@ -3102,6 +2766,8 @@ public function deleteCommentVote($tenant_id, $comment_id, $vote_id, $url_id, $b * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param string $vote_id (required) @@ -3115,9 +2781,9 @@ public function deleteCommentVote($tenant_id, $comment_id, $vote_id, $url_id, $b * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\VoteDeleteResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function deleteCommentVoteWithHttpInfo($tenant_id, $comment_id, $vote_id, $url_id, $broadcast_id, $edit_key = null, $sso = null, string $contentType = self::contentTypes['deleteCommentVote'][0]) + public function deleteCommentVoteWithHttpInfo($tenant_id, $comment_id, $vote_id, $url_id, $broadcast_id, array $options = []) { - $request = $this->deleteCommentVoteRequest($tenant_id, $comment_id, $vote_id, $url_id, $broadcast_id, $edit_key, $sso, $contentType); + $request = $this->deleteCommentVoteRequest($tenant_id, $comment_id, $vote_id, $url_id, $broadcast_id, $options); try { $options = $this->createHttpClientOption(); @@ -3144,61 +2810,21 @@ public function deleteCommentVoteWithHttpInfo($tenant_id, $comment_id, $vote_id, switch($statusCode) { case 200: - if ('\FastComments\Client\Model\VoteDeleteResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\VoteDeleteResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\VoteDeleteResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\VoteDeleteResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -3212,34 +2838,11 @@ public function deleteCommentVoteWithHttpInfo($tenant_id, $comment_id, $vote_id, ); } - $returnType = '\FastComments\Client\Model\VoteDeleteResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\VoteDeleteResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3249,7 +2852,7 @@ public function deleteCommentVoteWithHttpInfo($tenant_id, $comment_id, $vote_id, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -3257,8 +2860,10 @@ public function deleteCommentVoteWithHttpInfo($tenant_id, $comment_id, $vote_id, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -3268,6 +2873,8 @@ public function deleteCommentVoteWithHttpInfo($tenant_id, $comment_id, $vote_id, * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param string $vote_id (required) @@ -3280,9 +2887,9 @@ public function deleteCommentVoteWithHttpInfo($tenant_id, $comment_id, $vote_id, * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteCommentVoteAsync($tenant_id, $comment_id, $vote_id, $url_id, $broadcast_id, $edit_key = null, $sso = null, string $contentType = self::contentTypes['deleteCommentVote'][0]) + public function deleteCommentVoteAsync($tenant_id, $comment_id, $vote_id, $url_id, $broadcast_id, array $options = []) { - return $this->deleteCommentVoteAsyncWithHttpInfo($tenant_id, $comment_id, $vote_id, $url_id, $broadcast_id, $edit_key, $sso, $contentType) + return $this->deleteCommentVoteAsyncWithHttpInfo($tenant_id, $comment_id, $vote_id, $url_id, $broadcast_id, $options) ->then( function ($response) { return $response[0]; @@ -3295,6 +2902,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param string $vote_id (required) @@ -3307,10 +2916,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteCommentVoteAsyncWithHttpInfo($tenant_id, $comment_id, $vote_id, $url_id, $broadcast_id, $edit_key = null, $sso = null, string $contentType = self::contentTypes['deleteCommentVote'][0]) + public function deleteCommentVoteAsyncWithHttpInfo($tenant_id, $comment_id, $vote_id, $url_id, $broadcast_id, array $options = []) { $returnType = '\FastComments\Client\Model\VoteDeleteResponse'; - $request = $this->deleteCommentVoteRequest($tenant_id, $comment_id, $vote_id, $url_id, $broadcast_id, $edit_key, $sso, $contentType); + $request = $this->deleteCommentVoteRequest($tenant_id, $comment_id, $vote_id, $url_id, $broadcast_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3351,6 +2960,8 @@ function ($exception) { /** * Create request for operation 'deleteCommentVote' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param string $vote_id (required) @@ -3363,9 +2974,13 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteCommentVoteRequest($tenant_id, $comment_id, $vote_id, $url_id, $broadcast_id, $edit_key = null, $sso = null, string $contentType = self::contentTypes['deleteCommentVote'][0]) + public function deleteCommentVoteRequest($tenant_id, $comment_id, $vote_id, $url_id, $broadcast_id, array $options = []) { - + // unbox the optional parameters and request options from the $options array + $edit_key = array_key_exists('edit_key', $options) ? $options['edit_key'] : null; + $sso = array_key_exists('sso', $options) ? $options['sso'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['deleteCommentVote'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -3452,7 +3067,7 @@ public function deleteCommentVoteRequest($tenant_id, $comment_id, $vote_id, $url // path params if ($tenant_id !== null) { $resourcePath = str_replace( - '{' . 'tenantId' . '}', + '{tenantId}', ObjectSerializer::toPathValue($tenant_id), $resourcePath ); @@ -3460,7 +3075,7 @@ public function deleteCommentVoteRequest($tenant_id, $comment_id, $vote_id, $url // path params if ($comment_id !== null) { $resourcePath = str_replace( - '{' . 'commentId' . '}', + '{commentId}', ObjectSerializer::toPathValue($comment_id), $resourcePath ); @@ -3468,7 +3083,7 @@ public function deleteCommentVoteRequest($tenant_id, $comment_id, $vote_id, $url // path params if ($vote_id !== null) { $resourcePath = str_replace( - '{' . 'voteId' . '}', + '{voteId}', ObjectSerializer::toPathValue($vote_id), $resourcePath ); @@ -3533,6 +3148,8 @@ public function deleteCommentVoteRequest($tenant_id, $comment_id, $vote_id, $url * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $post_id post_id (required) * @param string|null $broadcast_id broadcast_id (optional) @@ -3543,9 +3160,9 @@ public function deleteCommentVoteRequest($tenant_id, $comment_id, $vote_id, $url * @throws \InvalidArgumentException * @return \FastComments\Client\Model\DeleteFeedPostPublicResponse|\FastComments\Client\Model\APIError */ - public function deleteFeedPostPublic($tenant_id, $post_id, $broadcast_id = null, $sso = null, string $contentType = self::contentTypes['deleteFeedPostPublic'][0]) + public function deleteFeedPostPublic($tenant_id, $post_id, array $options = []) { - list($response) = $this->deleteFeedPostPublicWithHttpInfo($tenant_id, $post_id, $broadcast_id, $sso, $contentType); + list($response) = $this->deleteFeedPostPublicWithHttpInfo($tenant_id, $post_id, $options); return $response; } @@ -3554,6 +3171,8 @@ public function deleteFeedPostPublic($tenant_id, $post_id, $broadcast_id = null, * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $post_id (required) * @param string|null $broadcast_id (optional) @@ -3564,9 +3183,9 @@ public function deleteFeedPostPublic($tenant_id, $post_id, $broadcast_id = null, * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\DeleteFeedPostPublicResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function deleteFeedPostPublicWithHttpInfo($tenant_id, $post_id, $broadcast_id = null, $sso = null, string $contentType = self::contentTypes['deleteFeedPostPublic'][0]) + public function deleteFeedPostPublicWithHttpInfo($tenant_id, $post_id, array $options = []) { - $request = $this->deleteFeedPostPublicRequest($tenant_id, $post_id, $broadcast_id, $sso, $contentType); + $request = $this->deleteFeedPostPublicRequest($tenant_id, $post_id, $options); try { $options = $this->createHttpClientOption(); @@ -3593,61 +3212,21 @@ public function deleteFeedPostPublicWithHttpInfo($tenant_id, $post_id, $broadcas switch($statusCode) { case 200: - if ('\FastComments\Client\Model\DeleteFeedPostPublicResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\DeleteFeedPostPublicResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\DeleteFeedPostPublicResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\DeleteFeedPostPublicResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -3661,34 +3240,11 @@ public function deleteFeedPostPublicWithHttpInfo($tenant_id, $post_id, $broadcas ); } - $returnType = '\FastComments\Client\Model\DeleteFeedPostPublicResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\DeleteFeedPostPublicResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3698,7 +3254,7 @@ public function deleteFeedPostPublicWithHttpInfo($tenant_id, $post_id, $broadcas $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -3706,8 +3262,10 @@ public function deleteFeedPostPublicWithHttpInfo($tenant_id, $post_id, $broadcas $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -3717,6 +3275,8 @@ public function deleteFeedPostPublicWithHttpInfo($tenant_id, $post_id, $broadcas * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $post_id (required) * @param string|null $broadcast_id (optional) @@ -3726,9 +3286,9 @@ public function deleteFeedPostPublicWithHttpInfo($tenant_id, $post_id, $broadcas * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteFeedPostPublicAsync($tenant_id, $post_id, $broadcast_id = null, $sso = null, string $contentType = self::contentTypes['deleteFeedPostPublic'][0]) + public function deleteFeedPostPublicAsync($tenant_id, $post_id, array $options = []) { - return $this->deleteFeedPostPublicAsyncWithHttpInfo($tenant_id, $post_id, $broadcast_id, $sso, $contentType) + return $this->deleteFeedPostPublicAsyncWithHttpInfo($tenant_id, $post_id, $options) ->then( function ($response) { return $response[0]; @@ -3741,6 +3301,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $post_id (required) * @param string|null $broadcast_id (optional) @@ -3750,10 +3312,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteFeedPostPublicAsyncWithHttpInfo($tenant_id, $post_id, $broadcast_id = null, $sso = null, string $contentType = self::contentTypes['deleteFeedPostPublic'][0]) + public function deleteFeedPostPublicAsyncWithHttpInfo($tenant_id, $post_id, array $options = []) { $returnType = '\FastComments\Client\Model\DeleteFeedPostPublicResponse'; - $request = $this->deleteFeedPostPublicRequest($tenant_id, $post_id, $broadcast_id, $sso, $contentType); + $request = $this->deleteFeedPostPublicRequest($tenant_id, $post_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3794,6 +3356,8 @@ function ($exception) { /** * Create request for operation 'deleteFeedPostPublic' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $post_id (required) * @param string|null $broadcast_id (optional) @@ -3803,9 +3367,13 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteFeedPostPublicRequest($tenant_id, $post_id, $broadcast_id = null, $sso = null, string $contentType = self::contentTypes['deleteFeedPostPublic'][0]) + public function deleteFeedPostPublicRequest($tenant_id, $post_id, array $options = []) { - + // unbox the optional parameters and request options from the $options array + $broadcast_id = array_key_exists('broadcast_id', $options) ? $options['broadcast_id'] : null; + $sso = array_key_exists('sso', $options) ? $options['sso'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['deleteFeedPostPublic'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -3853,7 +3421,7 @@ public function deleteFeedPostPublicRequest($tenant_id, $post_id, $broadcast_id // path params if ($tenant_id !== null) { $resourcePath = str_replace( - '{' . 'tenantId' . '}', + '{tenantId}', ObjectSerializer::toPathValue($tenant_id), $resourcePath ); @@ -3861,7 +3429,7 @@ public function deleteFeedPostPublicRequest($tenant_id, $post_id, $broadcast_id // path params if ($post_id !== null) { $resourcePath = str_replace( - '{' . 'postId' . '}', + '{postId}', ObjectSerializer::toPathValue($post_id), $resourcePath ); @@ -3934,9 +3502,9 @@ public function deleteFeedPostPublicRequest($tenant_id, $post_id, $broadcast_id * @throws \InvalidArgumentException * @return \FastComments\Client\Model\CreateV1PageReact|\FastComments\Client\Model\APIError */ - public function deleteV1PageReact($tenant_id, $url_id, string $contentType = self::contentTypes['deleteV1PageReact'][0]) + public function deleteV1PageReact($tenant_id, $url_id) { - list($response) = $this->deleteV1PageReactWithHttpInfo($tenant_id, $url_id, $contentType); + list($response) = $this->deleteV1PageReactWithHttpInfo($tenant_id, $url_id); return $response; } @@ -3953,9 +3521,9 @@ public function deleteV1PageReact($tenant_id, $url_id, string $contentType = sel * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\CreateV1PageReact|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function deleteV1PageReactWithHttpInfo($tenant_id, $url_id, string $contentType = self::contentTypes['deleteV1PageReact'][0]) + public function deleteV1PageReactWithHttpInfo($tenant_id, $url_id) { - $request = $this->deleteV1PageReactRequest($tenant_id, $url_id, $contentType); + $request = $this->deleteV1PageReactRequest($tenant_id, $url_id); try { $options = $this->createHttpClientOption(); @@ -3982,61 +3550,21 @@ public function deleteV1PageReactWithHttpInfo($tenant_id, $url_id, string $conte switch($statusCode) { case 200: - if ('\FastComments\Client\Model\CreateV1PageReact' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\CreateV1PageReact' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\CreateV1PageReact', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\CreateV1PageReact', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -4050,34 +3578,11 @@ public function deleteV1PageReactWithHttpInfo($tenant_id, $url_id, string $conte ); } - $returnType = '\FastComments\Client\Model\CreateV1PageReact'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\CreateV1PageReact', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -4087,7 +3592,7 @@ public function deleteV1PageReactWithHttpInfo($tenant_id, $url_id, string $conte $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -4095,8 +3600,10 @@ public function deleteV1PageReactWithHttpInfo($tenant_id, $url_id, string $conte $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -4113,9 +3620,9 @@ public function deleteV1PageReactWithHttpInfo($tenant_id, $url_id, string $conte * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteV1PageReactAsync($tenant_id, $url_id, string $contentType = self::contentTypes['deleteV1PageReact'][0]) + public function deleteV1PageReactAsync($tenant_id, $url_id) { - return $this->deleteV1PageReactAsyncWithHttpInfo($tenant_id, $url_id, $contentType) + return $this->deleteV1PageReactAsyncWithHttpInfo($tenant_id, $url_id) ->then( function ($response) { return $response[0]; @@ -4135,10 +3642,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteV1PageReactAsyncWithHttpInfo($tenant_id, $url_id, string $contentType = self::contentTypes['deleteV1PageReact'][0]) + public function deleteV1PageReactAsyncWithHttpInfo($tenant_id, $url_id) { $returnType = '\FastComments\Client\Model\CreateV1PageReact'; - $request = $this->deleteV1PageReactRequest($tenant_id, $url_id, $contentType); + $request = $this->deleteV1PageReactRequest($tenant_id, $url_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4186,9 +3693,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteV1PageReactRequest($tenant_id, $url_id, string $contentType = self::contentTypes['deleteV1PageReact'][0]) + public function deleteV1PageReactRequest($tenant_id, $url_id) { - + $contentType = self::contentTypes['deleteV1PageReact'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -4225,7 +3733,7 @@ public function deleteV1PageReactRequest($tenant_id, $url_id, string $contentTyp // path params if ($tenant_id !== null) { $resourcePath = str_replace( - '{' . 'tenantId' . '}', + '{tenantId}', ObjectSerializer::toPathValue($tenant_id), $resourcePath ); @@ -4299,9 +3807,9 @@ public function deleteV1PageReactRequest($tenant_id, $url_id, string $contentTyp * @throws \InvalidArgumentException * @return \FastComments\Client\Model\CreateV1PageReact|\FastComments\Client\Model\APIError */ - public function deleteV2PageReact($tenant_id, $url_id, $id, string $contentType = self::contentTypes['deleteV2PageReact'][0]) + public function deleteV2PageReact($tenant_id, $url_id, $id) { - list($response) = $this->deleteV2PageReactWithHttpInfo($tenant_id, $url_id, $id, $contentType); + list($response) = $this->deleteV2PageReactWithHttpInfo($tenant_id, $url_id, $id); return $response; } @@ -4319,9 +3827,9 @@ public function deleteV2PageReact($tenant_id, $url_id, $id, string $contentType * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\CreateV1PageReact|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function deleteV2PageReactWithHttpInfo($tenant_id, $url_id, $id, string $contentType = self::contentTypes['deleteV2PageReact'][0]) + public function deleteV2PageReactWithHttpInfo($tenant_id, $url_id, $id) { - $request = $this->deleteV2PageReactRequest($tenant_id, $url_id, $id, $contentType); + $request = $this->deleteV2PageReactRequest($tenant_id, $url_id, $id); try { $options = $this->createHttpClientOption(); @@ -4348,61 +3856,21 @@ public function deleteV2PageReactWithHttpInfo($tenant_id, $url_id, $id, string $ switch($statusCode) { case 200: - if ('\FastComments\Client\Model\CreateV1PageReact' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\CreateV1PageReact' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\CreateV1PageReact', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\CreateV1PageReact', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -4416,34 +3884,11 @@ public function deleteV2PageReactWithHttpInfo($tenant_id, $url_id, $id, string $ ); } - $returnType = '\FastComments\Client\Model\CreateV1PageReact'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\CreateV1PageReact', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -4453,7 +3898,7 @@ public function deleteV2PageReactWithHttpInfo($tenant_id, $url_id, $id, string $ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -4461,8 +3906,10 @@ public function deleteV2PageReactWithHttpInfo($tenant_id, $url_id, $id, string $ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -4480,9 +3927,9 @@ public function deleteV2PageReactWithHttpInfo($tenant_id, $url_id, $id, string $ * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteV2PageReactAsync($tenant_id, $url_id, $id, string $contentType = self::contentTypes['deleteV2PageReact'][0]) + public function deleteV2PageReactAsync($tenant_id, $url_id, $id) { - return $this->deleteV2PageReactAsyncWithHttpInfo($tenant_id, $url_id, $id, $contentType) + return $this->deleteV2PageReactAsyncWithHttpInfo($tenant_id, $url_id, $id) ->then( function ($response) { return $response[0]; @@ -4503,10 +3950,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteV2PageReactAsyncWithHttpInfo($tenant_id, $url_id, $id, string $contentType = self::contentTypes['deleteV2PageReact'][0]) + public function deleteV2PageReactAsyncWithHttpInfo($tenant_id, $url_id, $id) { $returnType = '\FastComments\Client\Model\CreateV1PageReact'; - $request = $this->deleteV2PageReactRequest($tenant_id, $url_id, $id, $contentType); + $request = $this->deleteV2PageReactRequest($tenant_id, $url_id, $id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4555,9 +4002,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteV2PageReactRequest($tenant_id, $url_id, $id, string $contentType = self::contentTypes['deleteV2PageReact'][0]) + public function deleteV2PageReactRequest($tenant_id, $url_id, $id) { - + $contentType = self::contentTypes['deleteV2PageReact'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -4610,7 +4058,7 @@ public function deleteV2PageReactRequest($tenant_id, $url_id, $id, string $conte // path params if ($tenant_id !== null) { $resourcePath = str_replace( - '{' . 'tenantId' . '}', + '{tenantId}', ObjectSerializer::toPathValue($tenant_id), $resourcePath ); @@ -4675,6 +4123,8 @@ public function deleteV2PageReactRequest($tenant_id, $url_id, $id, string $conte * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $comment_id comment_id (required) * @param bool $is_flagged is_flagged (required) @@ -4685,9 +4135,9 @@ public function deleteV2PageReactRequest($tenant_id, $url_id, $id, string $conte * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError */ - public function flagCommentPublic($tenant_id, $comment_id, $is_flagged, $sso = null, string $contentType = self::contentTypes['flagCommentPublic'][0]) + public function flagCommentPublic($tenant_id, $comment_id, $is_flagged, $sso = null) { - list($response) = $this->flagCommentPublicWithHttpInfo($tenant_id, $comment_id, $is_flagged, $sso, $contentType); + list($response) = $this->flagCommentPublicWithHttpInfo($tenant_id, $comment_id, $is_flagged, $sso); return $response; } @@ -4696,6 +4146,8 @@ public function flagCommentPublic($tenant_id, $comment_id, $is_flagged, $sso = n * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param bool $is_flagged (required) @@ -4706,9 +4158,9 @@ public function flagCommentPublic($tenant_id, $comment_id, $is_flagged, $sso = n * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function flagCommentPublicWithHttpInfo($tenant_id, $comment_id, $is_flagged, $sso = null, string $contentType = self::contentTypes['flagCommentPublic'][0]) + public function flagCommentPublicWithHttpInfo($tenant_id, $comment_id, $is_flagged, $sso = null) { - $request = $this->flagCommentPublicRequest($tenant_id, $comment_id, $is_flagged, $sso, $contentType); + $request = $this->flagCommentPublicRequest($tenant_id, $comment_id, $is_flagged, $sso); try { $options = $this->createHttpClientOption(); @@ -4735,61 +4187,21 @@ public function flagCommentPublicWithHttpInfo($tenant_id, $comment_id, $is_flagg switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APIEmptyResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIEmptyResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIEmptyResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -4803,34 +4215,11 @@ public function flagCommentPublicWithHttpInfo($tenant_id, $comment_id, $is_flagg ); } - $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -4840,7 +4229,7 @@ public function flagCommentPublicWithHttpInfo($tenant_id, $comment_id, $is_flagg $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -4848,8 +4237,10 @@ public function flagCommentPublicWithHttpInfo($tenant_id, $comment_id, $is_flagg $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -4859,6 +4250,8 @@ public function flagCommentPublicWithHttpInfo($tenant_id, $comment_id, $is_flagg * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param bool $is_flagged (required) @@ -4868,9 +4261,9 @@ public function flagCommentPublicWithHttpInfo($tenant_id, $comment_id, $is_flagg * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function flagCommentPublicAsync($tenant_id, $comment_id, $is_flagged, $sso = null, string $contentType = self::contentTypes['flagCommentPublic'][0]) + public function flagCommentPublicAsync($tenant_id, $comment_id, $is_flagged, $sso = null) { - return $this->flagCommentPublicAsyncWithHttpInfo($tenant_id, $comment_id, $is_flagged, $sso, $contentType) + return $this->flagCommentPublicAsyncWithHttpInfo($tenant_id, $comment_id, $is_flagged, $sso) ->then( function ($response) { return $response[0]; @@ -4883,6 +4276,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param bool $is_flagged (required) @@ -4892,10 +4287,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function flagCommentPublicAsyncWithHttpInfo($tenant_id, $comment_id, $is_flagged, $sso = null, string $contentType = self::contentTypes['flagCommentPublic'][0]) + public function flagCommentPublicAsyncWithHttpInfo($tenant_id, $comment_id, $is_flagged, $sso = null) { $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - $request = $this->flagCommentPublicRequest($tenant_id, $comment_id, $is_flagged, $sso, $contentType); + $request = $this->flagCommentPublicRequest($tenant_id, $comment_id, $is_flagged, $sso); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4936,6 +4331,8 @@ function ($exception) { /** * Create request for operation 'flagCommentPublic' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param bool $is_flagged (required) @@ -4945,9 +4342,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function flagCommentPublicRequest($tenant_id, $comment_id, $is_flagged, $sso = null, string $contentType = self::contentTypes['flagCommentPublic'][0]) + public function flagCommentPublicRequest($tenant_id, $comment_id, $is_flagged, $sso = null) { - + $contentType = self::contentTypes['flagCommentPublic'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -5010,7 +4408,7 @@ public function flagCommentPublicRequest($tenant_id, $comment_id, $is_flagged, $ // path params if ($comment_id !== null) { $resourcePath = str_replace( - '{' . 'commentId' . '}', + '{commentId}', ObjectSerializer::toPathValue($comment_id), $resourcePath ); @@ -5075,6 +4473,8 @@ public function flagCommentPublicRequest($tenant_id, $comment_id, $is_flagged, $ * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $comment_id comment_id (required) * @param string|null $edit_key edit_key (optional) @@ -5085,9 +4485,9 @@ public function flagCommentPublicRequest($tenant_id, $comment_id, $is_flagged, $ * @throws \InvalidArgumentException * @return \FastComments\Client\Model\PublicAPIGetCommentTextResponse|\FastComments\Client\Model\APIError */ - public function getCommentText($tenant_id, $comment_id, $edit_key = null, $sso = null, string $contentType = self::contentTypes['getCommentText'][0]) + public function getCommentText($tenant_id, $comment_id, array $options = []) { - list($response) = $this->getCommentTextWithHttpInfo($tenant_id, $comment_id, $edit_key, $sso, $contentType); + list($response) = $this->getCommentTextWithHttpInfo($tenant_id, $comment_id, $options); return $response; } @@ -5096,6 +4496,8 @@ public function getCommentText($tenant_id, $comment_id, $edit_key = null, $sso = * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param string|null $edit_key (optional) @@ -5106,9 +4508,9 @@ public function getCommentText($tenant_id, $comment_id, $edit_key = null, $sso = * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\PublicAPIGetCommentTextResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getCommentTextWithHttpInfo($tenant_id, $comment_id, $edit_key = null, $sso = null, string $contentType = self::contentTypes['getCommentText'][0]) + public function getCommentTextWithHttpInfo($tenant_id, $comment_id, array $options = []) { - $request = $this->getCommentTextRequest($tenant_id, $comment_id, $edit_key, $sso, $contentType); + $request = $this->getCommentTextRequest($tenant_id, $comment_id, $options); try { $options = $this->createHttpClientOption(); @@ -5135,61 +4537,21 @@ public function getCommentTextWithHttpInfo($tenant_id, $comment_id, $edit_key = switch($statusCode) { case 200: - if ('\FastComments\Client\Model\PublicAPIGetCommentTextResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\PublicAPIGetCommentTextResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\PublicAPIGetCommentTextResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\PublicAPIGetCommentTextResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -5203,34 +4565,11 @@ public function getCommentTextWithHttpInfo($tenant_id, $comment_id, $edit_key = ); } - $returnType = '\FastComments\Client\Model\PublicAPIGetCommentTextResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\PublicAPIGetCommentTextResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -5240,7 +4579,7 @@ public function getCommentTextWithHttpInfo($tenant_id, $comment_id, $edit_key = $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -5248,8 +4587,10 @@ public function getCommentTextWithHttpInfo($tenant_id, $comment_id, $edit_key = $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -5259,6 +4600,8 @@ public function getCommentTextWithHttpInfo($tenant_id, $comment_id, $edit_key = * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param string|null $edit_key (optional) @@ -5268,9 +4611,9 @@ public function getCommentTextWithHttpInfo($tenant_id, $comment_id, $edit_key = * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCommentTextAsync($tenant_id, $comment_id, $edit_key = null, $sso = null, string $contentType = self::contentTypes['getCommentText'][0]) + public function getCommentTextAsync($tenant_id, $comment_id, array $options = []) { - return $this->getCommentTextAsyncWithHttpInfo($tenant_id, $comment_id, $edit_key, $sso, $contentType) + return $this->getCommentTextAsyncWithHttpInfo($tenant_id, $comment_id, $options) ->then( function ($response) { return $response[0]; @@ -5283,6 +4626,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param string|null $edit_key (optional) @@ -5292,10 +4637,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCommentTextAsyncWithHttpInfo($tenant_id, $comment_id, $edit_key = null, $sso = null, string $contentType = self::contentTypes['getCommentText'][0]) + public function getCommentTextAsyncWithHttpInfo($tenant_id, $comment_id, array $options = []) { $returnType = '\FastComments\Client\Model\PublicAPIGetCommentTextResponse'; - $request = $this->getCommentTextRequest($tenant_id, $comment_id, $edit_key, $sso, $contentType); + $request = $this->getCommentTextRequest($tenant_id, $comment_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5336,6 +4681,8 @@ function ($exception) { /** * Create request for operation 'getCommentText' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param string|null $edit_key (optional) @@ -5345,9 +4692,13 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getCommentTextRequest($tenant_id, $comment_id, $edit_key = null, $sso = null, string $contentType = self::contentTypes['getCommentText'][0]) + public function getCommentTextRequest($tenant_id, $comment_id, array $options = []) { - + // unbox the optional parameters and request options from the $options array + $edit_key = array_key_exists('edit_key', $options) ? $options['edit_key'] : null; + $sso = array_key_exists('sso', $options) ? $options['sso'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['getCommentText'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -5395,7 +4746,7 @@ public function getCommentTextRequest($tenant_id, $comment_id, $edit_key = null, // path params if ($tenant_id !== null) { $resourcePath = str_replace( - '{' . 'tenantId' . '}', + '{tenantId}', ObjectSerializer::toPathValue($tenant_id), $resourcePath ); @@ -5403,7 +4754,7 @@ public function getCommentTextRequest($tenant_id, $comment_id, $edit_key = null, // path params if ($comment_id !== null) { $resourcePath = str_replace( - '{' . 'commentId' . '}', + '{commentId}', ObjectSerializer::toPathValue($comment_id), $resourcePath ); @@ -5468,6 +4819,8 @@ public function getCommentTextRequest($tenant_id, $comment_id, $edit_key = null, * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $comment_id comment_id (required) * @param int $dir dir (required) @@ -5478,9 +4831,9 @@ public function getCommentTextRequest($tenant_id, $comment_id, $edit_key = null, * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetCommentVoteUserNamesSuccessResponse|\FastComments\Client\Model\APIError */ - public function getCommentVoteUserNames($tenant_id, $comment_id, $dir, $sso = null, string $contentType = self::contentTypes['getCommentVoteUserNames'][0]) + public function getCommentVoteUserNames($tenant_id, $comment_id, $dir, $sso = null) { - list($response) = $this->getCommentVoteUserNamesWithHttpInfo($tenant_id, $comment_id, $dir, $sso, $contentType); + list($response) = $this->getCommentVoteUserNamesWithHttpInfo($tenant_id, $comment_id, $dir, $sso); return $response; } @@ -5489,6 +4842,8 @@ public function getCommentVoteUserNames($tenant_id, $comment_id, $dir, $sso = nu * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param int $dir (required) @@ -5499,9 +4854,9 @@ public function getCommentVoteUserNames($tenant_id, $comment_id, $dir, $sso = nu * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetCommentVoteUserNamesSuccessResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getCommentVoteUserNamesWithHttpInfo($tenant_id, $comment_id, $dir, $sso = null, string $contentType = self::contentTypes['getCommentVoteUserNames'][0]) + public function getCommentVoteUserNamesWithHttpInfo($tenant_id, $comment_id, $dir, $sso = null) { - $request = $this->getCommentVoteUserNamesRequest($tenant_id, $comment_id, $dir, $sso, $contentType); + $request = $this->getCommentVoteUserNamesRequest($tenant_id, $comment_id, $dir, $sso); try { $options = $this->createHttpClientOption(); @@ -5528,61 +4883,21 @@ public function getCommentVoteUserNamesWithHttpInfo($tenant_id, $comment_id, $di switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetCommentVoteUserNamesSuccessResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetCommentVoteUserNamesSuccessResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetCommentVoteUserNamesSuccessResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetCommentVoteUserNamesSuccessResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -5596,34 +4911,11 @@ public function getCommentVoteUserNamesWithHttpInfo($tenant_id, $comment_id, $di ); } - $returnType = '\FastComments\Client\Model\GetCommentVoteUserNamesSuccessResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetCommentVoteUserNamesSuccessResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -5633,7 +4925,7 @@ public function getCommentVoteUserNamesWithHttpInfo($tenant_id, $comment_id, $di $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -5641,8 +4933,10 @@ public function getCommentVoteUserNamesWithHttpInfo($tenant_id, $comment_id, $di $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -5652,6 +4946,8 @@ public function getCommentVoteUserNamesWithHttpInfo($tenant_id, $comment_id, $di * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param int $dir (required) @@ -5661,9 +4957,9 @@ public function getCommentVoteUserNamesWithHttpInfo($tenant_id, $comment_id, $di * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCommentVoteUserNamesAsync($tenant_id, $comment_id, $dir, $sso = null, string $contentType = self::contentTypes['getCommentVoteUserNames'][0]) + public function getCommentVoteUserNamesAsync($tenant_id, $comment_id, $dir, $sso = null) { - return $this->getCommentVoteUserNamesAsyncWithHttpInfo($tenant_id, $comment_id, $dir, $sso, $contentType) + return $this->getCommentVoteUserNamesAsyncWithHttpInfo($tenant_id, $comment_id, $dir, $sso) ->then( function ($response) { return $response[0]; @@ -5676,6 +4972,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param int $dir (required) @@ -5685,10 +4983,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCommentVoteUserNamesAsyncWithHttpInfo($tenant_id, $comment_id, $dir, $sso = null, string $contentType = self::contentTypes['getCommentVoteUserNames'][0]) + public function getCommentVoteUserNamesAsyncWithHttpInfo($tenant_id, $comment_id, $dir, $sso = null) { $returnType = '\FastComments\Client\Model\GetCommentVoteUserNamesSuccessResponse'; - $request = $this->getCommentVoteUserNamesRequest($tenant_id, $comment_id, $dir, $sso, $contentType); + $request = $this->getCommentVoteUserNamesRequest($tenant_id, $comment_id, $dir, $sso); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5729,6 +5027,8 @@ function ($exception) { /** * Create request for operation 'getCommentVoteUserNames' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param int $dir (required) @@ -5738,9 +5038,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getCommentVoteUserNamesRequest($tenant_id, $comment_id, $dir, $sso = null, string $contentType = self::contentTypes['getCommentVoteUserNames'][0]) + public function getCommentVoteUserNamesRequest($tenant_id, $comment_id, $dir, $sso = null) { - + $contentType = self::contentTypes['getCommentVoteUserNames'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -5794,7 +5095,7 @@ public function getCommentVoteUserNamesRequest($tenant_id, $comment_id, $dir, $s // path params if ($tenant_id !== null) { $resourcePath = str_replace( - '{' . 'tenantId' . '}', + '{tenantId}', ObjectSerializer::toPathValue($tenant_id), $resourcePath ); @@ -5802,7 +5103,7 @@ public function getCommentVoteUserNamesRequest($tenant_id, $comment_id, $dir, $s // path params if ($comment_id !== null) { $resourcePath = str_replace( - '{' . 'commentId' . '}', + '{commentId}', ObjectSerializer::toPathValue($comment_id), $resourcePath ); @@ -5867,6 +5168,8 @@ public function getCommentVoteUserNamesRequest($tenant_id, $comment_id, $dir, $s * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string|null $user_id user_id (optional) * @param \FastComments\Client\Model\SortDirections|null $direction direction (optional) * @param string|null $replies_to_user_id replies_to_user_id (optional) @@ -5880,9 +5183,9 @@ public function getCommentVoteUserNamesRequest($tenant_id, $comment_id, $dir, $s * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetCommentsForUserResponse|\FastComments\Client\Model\APIError */ - public function getCommentsForUser($user_id = null, $direction = null, $replies_to_user_id = null, $page = null, $includei10n = null, $locale = null, $is_crawler = null, string $contentType = self::contentTypes['getCommentsForUser'][0]) + public function getCommentsForUser(array $options = []) { - list($response) = $this->getCommentsForUserWithHttpInfo($user_id, $direction, $replies_to_user_id, $page, $includei10n, $locale, $is_crawler, $contentType); + list($response) = $this->getCommentsForUserWithHttpInfo($options); return $response; } @@ -5891,6 +5194,8 @@ public function getCommentsForUser($user_id = null, $direction = null, $replies_ * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string|null $user_id (optional) * @param \FastComments\Client\Model\SortDirections|null $direction (optional) * @param string|null $replies_to_user_id (optional) @@ -5904,9 +5209,9 @@ public function getCommentsForUser($user_id = null, $direction = null, $replies_ * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetCommentsForUserResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getCommentsForUserWithHttpInfo($user_id = null, $direction = null, $replies_to_user_id = null, $page = null, $includei10n = null, $locale = null, $is_crawler = null, string $contentType = self::contentTypes['getCommentsForUser'][0]) + public function getCommentsForUserWithHttpInfo(array $options = []) { - $request = $this->getCommentsForUserRequest($user_id, $direction, $replies_to_user_id, $page, $includei10n, $locale, $is_crawler, $contentType); + $request = $this->getCommentsForUserRequest($options); try { $options = $this->createHttpClientOption(); @@ -5933,61 +5238,21 @@ public function getCommentsForUserWithHttpInfo($user_id = null, $direction = nul switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetCommentsForUserResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetCommentsForUserResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetCommentsForUserResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetCommentsForUserResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -6001,34 +5266,11 @@ public function getCommentsForUserWithHttpInfo($user_id = null, $direction = nul ); } - $returnType = '\FastComments\Client\Model\GetCommentsForUserResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetCommentsForUserResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -6038,7 +5280,7 @@ public function getCommentsForUserWithHttpInfo($user_id = null, $direction = nul $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -6046,8 +5288,10 @@ public function getCommentsForUserWithHttpInfo($user_id = null, $direction = nul $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -6057,6 +5301,8 @@ public function getCommentsForUserWithHttpInfo($user_id = null, $direction = nul * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string|null $user_id (optional) * @param \FastComments\Client\Model\SortDirections|null $direction (optional) * @param string|null $replies_to_user_id (optional) @@ -6069,9 +5315,9 @@ public function getCommentsForUserWithHttpInfo($user_id = null, $direction = nul * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCommentsForUserAsync($user_id = null, $direction = null, $replies_to_user_id = null, $page = null, $includei10n = null, $locale = null, $is_crawler = null, string $contentType = self::contentTypes['getCommentsForUser'][0]) + public function getCommentsForUserAsync(array $options = []) { - return $this->getCommentsForUserAsyncWithHttpInfo($user_id, $direction, $replies_to_user_id, $page, $includei10n, $locale, $is_crawler, $contentType) + return $this->getCommentsForUserAsyncWithHttpInfo($options) ->then( function ($response) { return $response[0]; @@ -6084,6 +5330,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string|null $user_id (optional) * @param \FastComments\Client\Model\SortDirections|null $direction (optional) * @param string|null $replies_to_user_id (optional) @@ -6096,10 +5344,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCommentsForUserAsyncWithHttpInfo($user_id = null, $direction = null, $replies_to_user_id = null, $page = null, $includei10n = null, $locale = null, $is_crawler = null, string $contentType = self::contentTypes['getCommentsForUser'][0]) + public function getCommentsForUserAsyncWithHttpInfo(array $options = []) { $returnType = '\FastComments\Client\Model\GetCommentsForUserResponse'; - $request = $this->getCommentsForUserRequest($user_id, $direction, $replies_to_user_id, $page, $includei10n, $locale, $is_crawler, $contentType); + $request = $this->getCommentsForUserRequest($options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -6140,6 +5388,8 @@ function ($exception) { /** * Create request for operation 'getCommentsForUser' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string|null $user_id (optional) * @param \FastComments\Client\Model\SortDirections|null $direction (optional) * @param string|null $replies_to_user_id (optional) @@ -6152,9 +5402,18 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getCommentsForUserRequest($user_id = null, $direction = null, $replies_to_user_id = null, $page = null, $includei10n = null, $locale = null, $is_crawler = null, string $contentType = self::contentTypes['getCommentsForUser'][0]) + public function getCommentsForUserRequest(array $options = []) { - + // unbox the optional parameters and request options from the $options array + $user_id = array_key_exists('user_id', $options) ? $options['user_id'] : null; + $direction = array_key_exists('direction', $options) ? $options['direction'] : null; + $replies_to_user_id = array_key_exists('replies_to_user_id', $options) ? $options['replies_to_user_id'] : null; + $page = array_key_exists('page', $options) ? $options['page'] : null; + $includei10n = array_key_exists('includei10n', $options) ? $options['includei10n'] : null; + $locale = array_key_exists('locale', $options) ? $options['locale'] : null; + $is_crawler = array_key_exists('is_crawler', $options) ? $options['is_crawler'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['getCommentsForUser'][0]; + @@ -6295,6 +5554,8 @@ public function getCommentsForUserRequest($user_id = null, $direction = null, $r * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $url_id url_id (required) * @param int|null $page page (optional) @@ -6329,9 +5590,9 @@ public function getCommentsForUserRequest($user_id = null, $direction = null, $r * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetCommentsResponseWithPresencePublicComment|\FastComments\Client\Model\APIError */ - public function getCommentsPublic($tenant_id, $url_id, $page = null, $direction = null, $sso = null, $skip = null, $skip_children = null, $limit = null, $limit_children = null, $count_children = null, $fetch_page_for_comment_id = null, $include_config = null, $count_all = null, $includei10n = null, $locale = null, $modules = null, $is_crawler = null, $include_notification_count = null, $as_tree = null, $max_tree_depth = null, $use_full_translation_ids = null, $parent_id = null, $search_text = null, $hash_tags = null, $user_id = null, $custom_config_str = null, $after_comment_id = null, $before_comment_id = null, string $contentType = self::contentTypes['getCommentsPublic'][0]) + public function getCommentsPublic($tenant_id, $url_id, array $options = []) { - list($response) = $this->getCommentsPublicWithHttpInfo($tenant_id, $url_id, $page, $direction, $sso, $skip, $skip_children, $limit, $limit_children, $count_children, $fetch_page_for_comment_id, $include_config, $count_all, $includei10n, $locale, $modules, $is_crawler, $include_notification_count, $as_tree, $max_tree_depth, $use_full_translation_ids, $parent_id, $search_text, $hash_tags, $user_id, $custom_config_str, $after_comment_id, $before_comment_id, $contentType); + list($response) = $this->getCommentsPublicWithHttpInfo($tenant_id, $url_id, $options); return $response; } @@ -6340,6 +5601,8 @@ public function getCommentsPublic($tenant_id, $url_id, $page = null, $direction * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $url_id (required) * @param int|null $page (optional) @@ -6374,9 +5637,9 @@ public function getCommentsPublic($tenant_id, $url_id, $page = null, $direction * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetCommentsResponseWithPresencePublicComment|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getCommentsPublicWithHttpInfo($tenant_id, $url_id, $page = null, $direction = null, $sso = null, $skip = null, $skip_children = null, $limit = null, $limit_children = null, $count_children = null, $fetch_page_for_comment_id = null, $include_config = null, $count_all = null, $includei10n = null, $locale = null, $modules = null, $is_crawler = null, $include_notification_count = null, $as_tree = null, $max_tree_depth = null, $use_full_translation_ids = null, $parent_id = null, $search_text = null, $hash_tags = null, $user_id = null, $custom_config_str = null, $after_comment_id = null, $before_comment_id = null, string $contentType = self::contentTypes['getCommentsPublic'][0]) + public function getCommentsPublicWithHttpInfo($tenant_id, $url_id, array $options = []) { - $request = $this->getCommentsPublicRequest($tenant_id, $url_id, $page, $direction, $sso, $skip, $skip_children, $limit, $limit_children, $count_children, $fetch_page_for_comment_id, $include_config, $count_all, $includei10n, $locale, $modules, $is_crawler, $include_notification_count, $as_tree, $max_tree_depth, $use_full_translation_ids, $parent_id, $search_text, $hash_tags, $user_id, $custom_config_str, $after_comment_id, $before_comment_id, $contentType); + $request = $this->getCommentsPublicRequest($tenant_id, $url_id, $options); try { $options = $this->createHttpClientOption(); @@ -6403,61 +5666,21 @@ public function getCommentsPublicWithHttpInfo($tenant_id, $url_id, $page = null, switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetCommentsResponseWithPresencePublicComment' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetCommentsResponseWithPresencePublicComment' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetCommentsResponseWithPresencePublicComment', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetCommentsResponseWithPresencePublicComment', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -6471,34 +5694,11 @@ public function getCommentsPublicWithHttpInfo($tenant_id, $url_id, $page = null, ); } - $returnType = '\FastComments\Client\Model\GetCommentsResponseWithPresencePublicComment'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetCommentsResponseWithPresencePublicComment', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -6508,7 +5708,7 @@ public function getCommentsPublicWithHttpInfo($tenant_id, $url_id, $page = null, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -6516,8 +5716,10 @@ public function getCommentsPublicWithHttpInfo($tenant_id, $url_id, $page = null, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -6527,6 +5729,8 @@ public function getCommentsPublicWithHttpInfo($tenant_id, $url_id, $page = null, * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $url_id (required) * @param int|null $page (optional) @@ -6560,9 +5764,9 @@ public function getCommentsPublicWithHttpInfo($tenant_id, $url_id, $page = null, * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCommentsPublicAsync($tenant_id, $url_id, $page = null, $direction = null, $sso = null, $skip = null, $skip_children = null, $limit = null, $limit_children = null, $count_children = null, $fetch_page_for_comment_id = null, $include_config = null, $count_all = null, $includei10n = null, $locale = null, $modules = null, $is_crawler = null, $include_notification_count = null, $as_tree = null, $max_tree_depth = null, $use_full_translation_ids = null, $parent_id = null, $search_text = null, $hash_tags = null, $user_id = null, $custom_config_str = null, $after_comment_id = null, $before_comment_id = null, string $contentType = self::contentTypes['getCommentsPublic'][0]) + public function getCommentsPublicAsync($tenant_id, $url_id, array $options = []) { - return $this->getCommentsPublicAsyncWithHttpInfo($tenant_id, $url_id, $page, $direction, $sso, $skip, $skip_children, $limit, $limit_children, $count_children, $fetch_page_for_comment_id, $include_config, $count_all, $includei10n, $locale, $modules, $is_crawler, $include_notification_count, $as_tree, $max_tree_depth, $use_full_translation_ids, $parent_id, $search_text, $hash_tags, $user_id, $custom_config_str, $after_comment_id, $before_comment_id, $contentType) + return $this->getCommentsPublicAsyncWithHttpInfo($tenant_id, $url_id, $options) ->then( function ($response) { return $response[0]; @@ -6575,6 +5779,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $url_id (required) * @param int|null $page (optional) @@ -6608,10 +5814,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCommentsPublicAsyncWithHttpInfo($tenant_id, $url_id, $page = null, $direction = null, $sso = null, $skip = null, $skip_children = null, $limit = null, $limit_children = null, $count_children = null, $fetch_page_for_comment_id = null, $include_config = null, $count_all = null, $includei10n = null, $locale = null, $modules = null, $is_crawler = null, $include_notification_count = null, $as_tree = null, $max_tree_depth = null, $use_full_translation_ids = null, $parent_id = null, $search_text = null, $hash_tags = null, $user_id = null, $custom_config_str = null, $after_comment_id = null, $before_comment_id = null, string $contentType = self::contentTypes['getCommentsPublic'][0]) + public function getCommentsPublicAsyncWithHttpInfo($tenant_id, $url_id, array $options = []) { $returnType = '\FastComments\Client\Model\GetCommentsResponseWithPresencePublicComment'; - $request = $this->getCommentsPublicRequest($tenant_id, $url_id, $page, $direction, $sso, $skip, $skip_children, $limit, $limit_children, $count_children, $fetch_page_for_comment_id, $include_config, $count_all, $includei10n, $locale, $modules, $is_crawler, $include_notification_count, $as_tree, $max_tree_depth, $use_full_translation_ids, $parent_id, $search_text, $hash_tags, $user_id, $custom_config_str, $after_comment_id, $before_comment_id, $contentType); + $request = $this->getCommentsPublicRequest($tenant_id, $url_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -6652,6 +5858,8 @@ function ($exception) { /** * Create request for operation 'getCommentsPublic' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $url_id (required) * @param int|null $page (optional) @@ -6685,9 +5893,37 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getCommentsPublicRequest($tenant_id, $url_id, $page = null, $direction = null, $sso = null, $skip = null, $skip_children = null, $limit = null, $limit_children = null, $count_children = null, $fetch_page_for_comment_id = null, $include_config = null, $count_all = null, $includei10n = null, $locale = null, $modules = null, $is_crawler = null, $include_notification_count = null, $as_tree = null, $max_tree_depth = null, $use_full_translation_ids = null, $parent_id = null, $search_text = null, $hash_tags = null, $user_id = null, $custom_config_str = null, $after_comment_id = null, $before_comment_id = null, string $contentType = self::contentTypes['getCommentsPublic'][0]) - { - + public function getCommentsPublicRequest($tenant_id, $url_id, array $options = []) + { + // unbox the optional parameters and request options from the $options array + $page = array_key_exists('page', $options) ? $options['page'] : null; + $direction = array_key_exists('direction', $options) ? $options['direction'] : null; + $sso = array_key_exists('sso', $options) ? $options['sso'] : null; + $skip = array_key_exists('skip', $options) ? $options['skip'] : null; + $skip_children = array_key_exists('skip_children', $options) ? $options['skip_children'] : null; + $limit = array_key_exists('limit', $options) ? $options['limit'] : null; + $limit_children = array_key_exists('limit_children', $options) ? $options['limit_children'] : null; + $count_children = array_key_exists('count_children', $options) ? $options['count_children'] : null; + $fetch_page_for_comment_id = array_key_exists('fetch_page_for_comment_id', $options) ? $options['fetch_page_for_comment_id'] : null; + $include_config = array_key_exists('include_config', $options) ? $options['include_config'] : null; + $count_all = array_key_exists('count_all', $options) ? $options['count_all'] : null; + $includei10n = array_key_exists('includei10n', $options) ? $options['includei10n'] : null; + $locale = array_key_exists('locale', $options) ? $options['locale'] : null; + $modules = array_key_exists('modules', $options) ? $options['modules'] : null; + $is_crawler = array_key_exists('is_crawler', $options) ? $options['is_crawler'] : null; + $include_notification_count = array_key_exists('include_notification_count', $options) ? $options['include_notification_count'] : null; + $as_tree = array_key_exists('as_tree', $options) ? $options['as_tree'] : null; + $max_tree_depth = array_key_exists('max_tree_depth', $options) ? $options['max_tree_depth'] : null; + $use_full_translation_ids = array_key_exists('use_full_translation_ids', $options) ? $options['use_full_translation_ids'] : null; + $parent_id = array_key_exists('parent_id', $options) ? $options['parent_id'] : null; + $search_text = array_key_exists('search_text', $options) ? $options['search_text'] : null; + $hash_tags = array_key_exists('hash_tags', $options) ? $options['hash_tags'] : null; + $user_id = array_key_exists('user_id', $options) ? $options['user_id'] : null; + $custom_config_str = array_key_exists('custom_config_str', $options) ? $options['custom_config_str'] : null; + $after_comment_id = array_key_exists('after_comment_id', $options) ? $options['after_comment_id'] : null; + $before_comment_id = array_key_exists('before_comment_id', $options) ? $options['before_comment_id'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['getCommentsPublic'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -6984,7 +6220,7 @@ public function getCommentsPublicRequest($tenant_id, $url_id, $page = null, $dir // path params if ($tenant_id !== null) { $resourcePath = str_replace( - '{' . 'tenantId' . '}', + '{tenantId}', ObjectSerializer::toPathValue($tenant_id), $resourcePath ); @@ -7049,6 +6285,8 @@ public function getCommentsPublicRequest($tenant_id, $url_id, $page = null, $dir * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $url_id url_id (required) * @param string $user_id_ws user_id_ws (required) @@ -7060,9 +6298,9 @@ public function getCommentsPublicRequest($tenant_id, $url_id, $page = null, $dir * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetEventLogResponse|\FastComments\Client\Model\APIError */ - public function getEventLog($tenant_id, $url_id, $user_id_ws, $start_time, $end_time = null, string $contentType = self::contentTypes['getEventLog'][0]) + public function getEventLog($tenant_id, $url_id, $user_id_ws, $start_time, $end_time = null) { - list($response) = $this->getEventLogWithHttpInfo($tenant_id, $url_id, $user_id_ws, $start_time, $end_time, $contentType); + list($response) = $this->getEventLogWithHttpInfo($tenant_id, $url_id, $user_id_ws, $start_time, $end_time); return $response; } @@ -7071,6 +6309,8 @@ public function getEventLog($tenant_id, $url_id, $user_id_ws, $start_time, $end_ * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $url_id (required) * @param string $user_id_ws (required) @@ -7082,9 +6322,9 @@ public function getEventLog($tenant_id, $url_id, $user_id_ws, $start_time, $end_ * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetEventLogResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getEventLogWithHttpInfo($tenant_id, $url_id, $user_id_ws, $start_time, $end_time = null, string $contentType = self::contentTypes['getEventLog'][0]) + public function getEventLogWithHttpInfo($tenant_id, $url_id, $user_id_ws, $start_time, $end_time = null) { - $request = $this->getEventLogRequest($tenant_id, $url_id, $user_id_ws, $start_time, $end_time, $contentType); + $request = $this->getEventLogRequest($tenant_id, $url_id, $user_id_ws, $start_time, $end_time); try { $options = $this->createHttpClientOption(); @@ -7111,61 +6351,21 @@ public function getEventLogWithHttpInfo($tenant_id, $url_id, $user_id_ws, $start switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetEventLogResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetEventLogResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetEventLogResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetEventLogResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -7179,34 +6379,11 @@ public function getEventLogWithHttpInfo($tenant_id, $url_id, $user_id_ws, $start ); } - $returnType = '\FastComments\Client\Model\GetEventLogResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetEventLogResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -7216,7 +6393,7 @@ public function getEventLogWithHttpInfo($tenant_id, $url_id, $user_id_ws, $start $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -7224,8 +6401,10 @@ public function getEventLogWithHttpInfo($tenant_id, $url_id, $user_id_ws, $start $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -7235,6 +6414,8 @@ public function getEventLogWithHttpInfo($tenant_id, $url_id, $user_id_ws, $start * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $url_id (required) * @param string $user_id_ws (required) @@ -7245,9 +6426,9 @@ public function getEventLogWithHttpInfo($tenant_id, $url_id, $user_id_ws, $start * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEventLogAsync($tenant_id, $url_id, $user_id_ws, $start_time, $end_time = null, string $contentType = self::contentTypes['getEventLog'][0]) + public function getEventLogAsync($tenant_id, $url_id, $user_id_ws, $start_time, $end_time = null) { - return $this->getEventLogAsyncWithHttpInfo($tenant_id, $url_id, $user_id_ws, $start_time, $end_time, $contentType) + return $this->getEventLogAsyncWithHttpInfo($tenant_id, $url_id, $user_id_ws, $start_time, $end_time) ->then( function ($response) { return $response[0]; @@ -7260,6 +6441,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $url_id (required) * @param string $user_id_ws (required) @@ -7270,10 +6453,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEventLogAsyncWithHttpInfo($tenant_id, $url_id, $user_id_ws, $start_time, $end_time = null, string $contentType = self::contentTypes['getEventLog'][0]) + public function getEventLogAsyncWithHttpInfo($tenant_id, $url_id, $user_id_ws, $start_time, $end_time = null) { $returnType = '\FastComments\Client\Model\GetEventLogResponse'; - $request = $this->getEventLogRequest($tenant_id, $url_id, $user_id_ws, $start_time, $end_time, $contentType); + $request = $this->getEventLogRequest($tenant_id, $url_id, $user_id_ws, $start_time, $end_time); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -7314,6 +6497,8 @@ function ($exception) { /** * Create request for operation 'getEventLog' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $url_id (required) * @param string $user_id_ws (required) @@ -7324,9 +6509,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getEventLogRequest($tenant_id, $url_id, $user_id_ws, $start_time, $end_time = null, string $contentType = self::contentTypes['getEventLog'][0]) + public function getEventLogRequest($tenant_id, $url_id, $user_id_ws, $start_time, $end_time = null) { - + $contentType = self::contentTypes['getEventLog'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -7405,7 +6591,7 @@ public function getEventLogRequest($tenant_id, $url_id, $user_id_ws, $start_time // path params if ($tenant_id !== null) { $resourcePath = str_replace( - '{' . 'tenantId' . '}', + '{tenantId}', ObjectSerializer::toPathValue($tenant_id), $resourcePath ); @@ -7470,6 +6656,8 @@ public function getEventLogRequest($tenant_id, $url_id, $user_id_ws, $start_time * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string|null $after_id after_id (optional) * @param int|null $limit limit (optional) @@ -7483,9 +6671,9 @@ public function getEventLogRequest($tenant_id, $url_id, $user_id_ws, $start_time * @throws \InvalidArgumentException * @return \FastComments\Client\Model\PublicFeedPostsResponse|\FastComments\Client\Model\APIError */ - public function getFeedPostsPublic($tenant_id, $after_id = null, $limit = null, $tags = null, $sso = null, $is_crawler = null, $include_user_info = null, string $contentType = self::contentTypes['getFeedPostsPublic'][0]) + public function getFeedPostsPublic($tenant_id, array $options = []) { - list($response) = $this->getFeedPostsPublicWithHttpInfo($tenant_id, $after_id, $limit, $tags, $sso, $is_crawler, $include_user_info, $contentType); + list($response) = $this->getFeedPostsPublicWithHttpInfo($tenant_id, $options); return $response; } @@ -7494,6 +6682,8 @@ public function getFeedPostsPublic($tenant_id, $after_id = null, $limit = null, * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $after_id (optional) * @param int|null $limit (optional) @@ -7507,9 +6697,9 @@ public function getFeedPostsPublic($tenant_id, $after_id = null, $limit = null, * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\PublicFeedPostsResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getFeedPostsPublicWithHttpInfo($tenant_id, $after_id = null, $limit = null, $tags = null, $sso = null, $is_crawler = null, $include_user_info = null, string $contentType = self::contentTypes['getFeedPostsPublic'][0]) + public function getFeedPostsPublicWithHttpInfo($tenant_id, array $options = []) { - $request = $this->getFeedPostsPublicRequest($tenant_id, $after_id, $limit, $tags, $sso, $is_crawler, $include_user_info, $contentType); + $request = $this->getFeedPostsPublicRequest($tenant_id, $options); try { $options = $this->createHttpClientOption(); @@ -7536,61 +6726,21 @@ public function getFeedPostsPublicWithHttpInfo($tenant_id, $after_id = null, $li switch($statusCode) { case 200: - if ('\FastComments\Client\Model\PublicFeedPostsResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\PublicFeedPostsResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\PublicFeedPostsResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\PublicFeedPostsResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -7604,34 +6754,11 @@ public function getFeedPostsPublicWithHttpInfo($tenant_id, $after_id = null, $li ); } - $returnType = '\FastComments\Client\Model\PublicFeedPostsResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\PublicFeedPostsResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -7641,7 +6768,7 @@ public function getFeedPostsPublicWithHttpInfo($tenant_id, $after_id = null, $li $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -7649,8 +6776,10 @@ public function getFeedPostsPublicWithHttpInfo($tenant_id, $after_id = null, $li $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -7660,6 +6789,8 @@ public function getFeedPostsPublicWithHttpInfo($tenant_id, $after_id = null, $li * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $after_id (optional) * @param int|null $limit (optional) @@ -7672,9 +6803,9 @@ public function getFeedPostsPublicWithHttpInfo($tenant_id, $after_id = null, $li * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getFeedPostsPublicAsync($tenant_id, $after_id = null, $limit = null, $tags = null, $sso = null, $is_crawler = null, $include_user_info = null, string $contentType = self::contentTypes['getFeedPostsPublic'][0]) + public function getFeedPostsPublicAsync($tenant_id, array $options = []) { - return $this->getFeedPostsPublicAsyncWithHttpInfo($tenant_id, $after_id, $limit, $tags, $sso, $is_crawler, $include_user_info, $contentType) + return $this->getFeedPostsPublicAsyncWithHttpInfo($tenant_id, $options) ->then( function ($response) { return $response[0]; @@ -7687,6 +6818,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $after_id (optional) * @param int|null $limit (optional) @@ -7699,10 +6832,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getFeedPostsPublicAsyncWithHttpInfo($tenant_id, $after_id = null, $limit = null, $tags = null, $sso = null, $is_crawler = null, $include_user_info = null, string $contentType = self::contentTypes['getFeedPostsPublic'][0]) + public function getFeedPostsPublicAsyncWithHttpInfo($tenant_id, array $options = []) { $returnType = '\FastComments\Client\Model\PublicFeedPostsResponse'; - $request = $this->getFeedPostsPublicRequest($tenant_id, $after_id, $limit, $tags, $sso, $is_crawler, $include_user_info, $contentType); + $request = $this->getFeedPostsPublicRequest($tenant_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -7743,6 +6876,8 @@ function ($exception) { /** * Create request for operation 'getFeedPostsPublic' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $after_id (optional) * @param int|null $limit (optional) @@ -7755,9 +6890,17 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getFeedPostsPublicRequest($tenant_id, $after_id = null, $limit = null, $tags = null, $sso = null, $is_crawler = null, $include_user_info = null, string $contentType = self::contentTypes['getFeedPostsPublic'][0]) - { - + public function getFeedPostsPublicRequest($tenant_id, array $options = []) + { + // unbox the optional parameters and request options from the $options array + $after_id = array_key_exists('after_id', $options) ? $options['after_id'] : null; + $limit = array_key_exists('limit', $options) ? $options['limit'] : null; + $tags = array_key_exists('tags', $options) ? $options['tags'] : null; + $sso = array_key_exists('sso', $options) ? $options['sso'] : null; + $is_crawler = array_key_exists('is_crawler', $options) ? $options['is_crawler'] : null; + $include_user_info = array_key_exists('include_user_info', $options) ? $options['include_user_info'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['getFeedPostsPublic'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -7838,7 +6981,7 @@ public function getFeedPostsPublicRequest($tenant_id, $after_id = null, $limit = // path params if ($tenant_id !== null) { $resourcePath = str_replace( - '{' . 'tenantId' . '}', + '{tenantId}', ObjectSerializer::toPathValue($tenant_id), $resourcePath ); @@ -7903,6 +7046,8 @@ public function getFeedPostsPublicRequest($tenant_id, $after_id = null, $limit = * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string[] $post_ids post_ids (required) * @param string|null $sso sso (optional) @@ -7912,9 +7057,9 @@ public function getFeedPostsPublicRequest($tenant_id, $after_id = null, $limit = * @throws \InvalidArgumentException * @return \FastComments\Client\Model\FeedPostsStatsResponse|\FastComments\Client\Model\APIError */ - public function getFeedPostsStats($tenant_id, $post_ids, $sso = null, string $contentType = self::contentTypes['getFeedPostsStats'][0]) + public function getFeedPostsStats($tenant_id, $post_ids, $sso = null) { - list($response) = $this->getFeedPostsStatsWithHttpInfo($tenant_id, $post_ids, $sso, $contentType); + list($response) = $this->getFeedPostsStatsWithHttpInfo($tenant_id, $post_ids, $sso); return $response; } @@ -7923,6 +7068,8 @@ public function getFeedPostsStats($tenant_id, $post_ids, $sso = null, string $co * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string[] $post_ids (required) * @param string|null $sso (optional) @@ -7932,9 +7079,9 @@ public function getFeedPostsStats($tenant_id, $post_ids, $sso = null, string $co * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\FeedPostsStatsResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getFeedPostsStatsWithHttpInfo($tenant_id, $post_ids, $sso = null, string $contentType = self::contentTypes['getFeedPostsStats'][0]) + public function getFeedPostsStatsWithHttpInfo($tenant_id, $post_ids, $sso = null) { - $request = $this->getFeedPostsStatsRequest($tenant_id, $post_ids, $sso, $contentType); + $request = $this->getFeedPostsStatsRequest($tenant_id, $post_ids, $sso); try { $options = $this->createHttpClientOption(); @@ -7961,61 +7108,21 @@ public function getFeedPostsStatsWithHttpInfo($tenant_id, $post_ids, $sso = null switch($statusCode) { case 200: - if ('\FastComments\Client\Model\FeedPostsStatsResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\FeedPostsStatsResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\FeedPostsStatsResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\FeedPostsStatsResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -8029,34 +7136,11 @@ public function getFeedPostsStatsWithHttpInfo($tenant_id, $post_ids, $sso = null ); } - $returnType = '\FastComments\Client\Model\FeedPostsStatsResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\FeedPostsStatsResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -8066,7 +7150,7 @@ public function getFeedPostsStatsWithHttpInfo($tenant_id, $post_ids, $sso = null $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -8074,8 +7158,10 @@ public function getFeedPostsStatsWithHttpInfo($tenant_id, $post_ids, $sso = null $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -8085,6 +7171,8 @@ public function getFeedPostsStatsWithHttpInfo($tenant_id, $post_ids, $sso = null * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string[] $post_ids (required) * @param string|null $sso (optional) @@ -8093,9 +7181,9 @@ public function getFeedPostsStatsWithHttpInfo($tenant_id, $post_ids, $sso = null * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getFeedPostsStatsAsync($tenant_id, $post_ids, $sso = null, string $contentType = self::contentTypes['getFeedPostsStats'][0]) + public function getFeedPostsStatsAsync($tenant_id, $post_ids, $sso = null) { - return $this->getFeedPostsStatsAsyncWithHttpInfo($tenant_id, $post_ids, $sso, $contentType) + return $this->getFeedPostsStatsAsyncWithHttpInfo($tenant_id, $post_ids, $sso) ->then( function ($response) { return $response[0]; @@ -8108,6 +7196,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string[] $post_ids (required) * @param string|null $sso (optional) @@ -8116,10 +7206,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getFeedPostsStatsAsyncWithHttpInfo($tenant_id, $post_ids, $sso = null, string $contentType = self::contentTypes['getFeedPostsStats'][0]) + public function getFeedPostsStatsAsyncWithHttpInfo($tenant_id, $post_ids, $sso = null) { $returnType = '\FastComments\Client\Model\FeedPostsStatsResponse'; - $request = $this->getFeedPostsStatsRequest($tenant_id, $post_ids, $sso, $contentType); + $request = $this->getFeedPostsStatsRequest($tenant_id, $post_ids, $sso); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -8160,6 +7250,8 @@ function ($exception) { /** * Create request for operation 'getFeedPostsStats' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string[] $post_ids (required) * @param string|null $sso (optional) @@ -8168,9 +7260,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getFeedPostsStatsRequest($tenant_id, $post_ids, $sso = null, string $contentType = self::contentTypes['getFeedPostsStats'][0]) + public function getFeedPostsStatsRequest($tenant_id, $post_ids, $sso = null) { - + $contentType = self::contentTypes['getFeedPostsStats'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -8217,7 +7310,7 @@ public function getFeedPostsStatsRequest($tenant_id, $post_ids, $sso = null, str // path params if ($tenant_id !== null) { $resourcePath = str_replace( - '{' . 'tenantId' . '}', + '{tenantId}', ObjectSerializer::toPathValue($tenant_id), $resourcePath ); @@ -8290,9 +7383,9 @@ public function getFeedPostsStatsRequest($tenant_id, $post_ids, $sso = null, str * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GifGetLargeResponse|\FastComments\Client\Model\APIError|\FastComments\Client\Model\APIError */ - public function getGifLarge($tenant_id, $large_internal_url_sanitized, string $contentType = self::contentTypes['getGifLarge'][0]) + public function getGifLarge($tenant_id, $large_internal_url_sanitized) { - list($response) = $this->getGifLargeWithHttpInfo($tenant_id, $large_internal_url_sanitized, $contentType); + list($response) = $this->getGifLargeWithHttpInfo($tenant_id, $large_internal_url_sanitized); return $response; } @@ -8309,9 +7402,9 @@ public function getGifLarge($tenant_id, $large_internal_url_sanitized, string $c * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GifGetLargeResponse|\FastComments\Client\Model\APIError|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getGifLargeWithHttpInfo($tenant_id, $large_internal_url_sanitized, string $contentType = self::contentTypes['getGifLarge'][0]) + public function getGifLargeWithHttpInfo($tenant_id, $large_internal_url_sanitized) { - $request = $this->getGifLargeRequest($tenant_id, $large_internal_url_sanitized, $contentType); + $request = $this->getGifLargeRequest($tenant_id, $large_internal_url_sanitized); try { $options = $this->createHttpClientOption(); @@ -8338,88 +7431,27 @@ public function getGifLargeWithHttpInfo($tenant_id, $large_internal_url_sanitize switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GifGetLargeResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GifGetLargeResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GifGetLargeResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GifGetLargeResponse', + $request, + $response, + ); case 422: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -8433,34 +7465,11 @@ public function getGifLargeWithHttpInfo($tenant_id, $large_internal_url_sanitize ); } - $returnType = '\FastComments\Client\Model\GifGetLargeResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GifGetLargeResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -8470,7 +7479,7 @@ public function getGifLargeWithHttpInfo($tenant_id, $large_internal_url_sanitize $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 422: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -8478,7 +7487,7 @@ public function getGifLargeWithHttpInfo($tenant_id, $large_internal_url_sanitize $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -8486,8 +7495,10 @@ public function getGifLargeWithHttpInfo($tenant_id, $large_internal_url_sanitize $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -8504,9 +7515,9 @@ public function getGifLargeWithHttpInfo($tenant_id, $large_internal_url_sanitize * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getGifLargeAsync($tenant_id, $large_internal_url_sanitized, string $contentType = self::contentTypes['getGifLarge'][0]) + public function getGifLargeAsync($tenant_id, $large_internal_url_sanitized) { - return $this->getGifLargeAsyncWithHttpInfo($tenant_id, $large_internal_url_sanitized, $contentType) + return $this->getGifLargeAsyncWithHttpInfo($tenant_id, $large_internal_url_sanitized) ->then( function ($response) { return $response[0]; @@ -8526,10 +7537,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getGifLargeAsyncWithHttpInfo($tenant_id, $large_internal_url_sanitized, string $contentType = self::contentTypes['getGifLarge'][0]) + public function getGifLargeAsyncWithHttpInfo($tenant_id, $large_internal_url_sanitized) { $returnType = '\FastComments\Client\Model\GifGetLargeResponse'; - $request = $this->getGifLargeRequest($tenant_id, $large_internal_url_sanitized, $contentType); + $request = $this->getGifLargeRequest($tenant_id, $large_internal_url_sanitized); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -8577,9 +7588,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getGifLargeRequest($tenant_id, $large_internal_url_sanitized, string $contentType = self::contentTypes['getGifLarge'][0]) + public function getGifLargeRequest($tenant_id, $large_internal_url_sanitized) { - + $contentType = self::contentTypes['getGifLarge'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -8616,7 +7628,7 @@ public function getGifLargeRequest($tenant_id, $large_internal_url_sanitized, st // path params if ($tenant_id !== null) { $resourcePath = str_replace( - '{' . 'tenantId' . '}', + '{tenantId}', ObjectSerializer::toPathValue($tenant_id), $resourcePath ); @@ -8681,6 +7693,8 @@ public function getGifLargeRequest($tenant_id, $large_internal_url_sanitized, st * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $search search (required) * @param string|null $locale locale (optional) @@ -8692,9 +7706,9 @@ public function getGifLargeRequest($tenant_id, $large_internal_url_sanitized, st * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetGifsSearchResponse|\FastComments\Client\Model\APIError|\FastComments\Client\Model\APIError */ - public function getGifsSearch($tenant_id, $search, $locale = null, $rating = null, $page = null, string $contentType = self::contentTypes['getGifsSearch'][0]) + public function getGifsSearch($tenant_id, $search, array $options = []) { - list($response) = $this->getGifsSearchWithHttpInfo($tenant_id, $search, $locale, $rating, $page, $contentType); + list($response) = $this->getGifsSearchWithHttpInfo($tenant_id, $search, $options); return $response; } @@ -8703,6 +7717,8 @@ public function getGifsSearch($tenant_id, $search, $locale = null, $rating = nul * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $search (required) * @param string|null $locale (optional) @@ -8714,9 +7730,9 @@ public function getGifsSearch($tenant_id, $search, $locale = null, $rating = nul * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetGifsSearchResponse|\FastComments\Client\Model\APIError|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getGifsSearchWithHttpInfo($tenant_id, $search, $locale = null, $rating = null, $page = null, string $contentType = self::contentTypes['getGifsSearch'][0]) + public function getGifsSearchWithHttpInfo($tenant_id, $search, array $options = []) { - $request = $this->getGifsSearchRequest($tenant_id, $search, $locale, $rating, $page, $contentType); + $request = $this->getGifsSearchRequest($tenant_id, $search, $options); try { $options = $this->createHttpClientOption(); @@ -8743,88 +7759,27 @@ public function getGifsSearchWithHttpInfo($tenant_id, $search, $locale = null, $ switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetGifsSearchResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetGifsSearchResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetGifsSearchResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetGifsSearchResponse', + $request, + $response, + ); case 422: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -8838,34 +7793,11 @@ public function getGifsSearchWithHttpInfo($tenant_id, $search, $locale = null, $ ); } - $returnType = '\FastComments\Client\Model\GetGifsSearchResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetGifsSearchResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -8875,7 +7807,7 @@ public function getGifsSearchWithHttpInfo($tenant_id, $search, $locale = null, $ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 422: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -8883,7 +7815,7 @@ public function getGifsSearchWithHttpInfo($tenant_id, $search, $locale = null, $ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -8891,8 +7823,10 @@ public function getGifsSearchWithHttpInfo($tenant_id, $search, $locale = null, $ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -8902,6 +7836,8 @@ public function getGifsSearchWithHttpInfo($tenant_id, $search, $locale = null, $ * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $search (required) * @param string|null $locale (optional) @@ -8912,9 +7848,9 @@ public function getGifsSearchWithHttpInfo($tenant_id, $search, $locale = null, $ * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getGifsSearchAsync($tenant_id, $search, $locale = null, $rating = null, $page = null, string $contentType = self::contentTypes['getGifsSearch'][0]) + public function getGifsSearchAsync($tenant_id, $search, array $options = []) { - return $this->getGifsSearchAsyncWithHttpInfo($tenant_id, $search, $locale, $rating, $page, $contentType) + return $this->getGifsSearchAsyncWithHttpInfo($tenant_id, $search, $options) ->then( function ($response) { return $response[0]; @@ -8927,6 +7863,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $search (required) * @param string|null $locale (optional) @@ -8937,10 +7875,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getGifsSearchAsyncWithHttpInfo($tenant_id, $search, $locale = null, $rating = null, $page = null, string $contentType = self::contentTypes['getGifsSearch'][0]) + public function getGifsSearchAsyncWithHttpInfo($tenant_id, $search, array $options = []) { $returnType = '\FastComments\Client\Model\GetGifsSearchResponse'; - $request = $this->getGifsSearchRequest($tenant_id, $search, $locale, $rating, $page, $contentType); + $request = $this->getGifsSearchRequest($tenant_id, $search, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -8981,6 +7919,8 @@ function ($exception) { /** * Create request for operation 'getGifsSearch' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $search (required) * @param string|null $locale (optional) @@ -8991,9 +7931,14 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getGifsSearchRequest($tenant_id, $search, $locale = null, $rating = null, $page = null, string $contentType = self::contentTypes['getGifsSearch'][0]) + public function getGifsSearchRequest($tenant_id, $search, array $options = []) { - + // unbox the optional parameters and request options from the $options array + $locale = array_key_exists('locale', $options) ? $options['locale'] : null; + $rating = array_key_exists('rating', $options) ? $options['rating'] : null; + $page = array_key_exists('page', $options) ? $options['page'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['getGifsSearch'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -9060,7 +8005,7 @@ public function getGifsSearchRequest($tenant_id, $search, $locale = null, $ratin // path params if ($tenant_id !== null) { $resourcePath = str_replace( - '{' . 'tenantId' . '}', + '{tenantId}', ObjectSerializer::toPathValue($tenant_id), $resourcePath ); @@ -9125,6 +8070,8 @@ public function getGifsSearchRequest($tenant_id, $search, $locale = null, $ratin * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string|null $locale locale (optional) * @param string|null $rating rating (optional) @@ -9135,9 +8082,9 @@ public function getGifsSearchRequest($tenant_id, $search, $locale = null, $ratin * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetGifsTrendingResponse */ - public function getGifsTrending($tenant_id, $locale = null, $rating = null, $page = null, string $contentType = self::contentTypes['getGifsTrending'][0]) + public function getGifsTrending($tenant_id, array $options = []) { - list($response) = $this->getGifsTrendingWithHttpInfo($tenant_id, $locale, $rating, $page, $contentType); + list($response) = $this->getGifsTrendingWithHttpInfo($tenant_id, $options); return $response; } @@ -9146,6 +8093,8 @@ public function getGifsTrending($tenant_id, $locale = null, $rating = null, $pag * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $locale (optional) * @param string|null $rating (optional) @@ -9156,9 +8105,9 @@ public function getGifsTrending($tenant_id, $locale = null, $rating = null, $pag * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetGifsTrendingResponse, HTTP status code, HTTP response headers (array of strings) */ - public function getGifsTrendingWithHttpInfo($tenant_id, $locale = null, $rating = null, $page = null, string $contentType = self::contentTypes['getGifsTrending'][0]) + public function getGifsTrendingWithHttpInfo($tenant_id, array $options = []) { - $request = $this->getGifsTrendingRequest($tenant_id, $locale, $rating, $page, $contentType); + $request = $this->getGifsTrendingRequest($tenant_id, $options); try { $options = $this->createHttpClientOption(); @@ -9185,34 +8134,15 @@ public function getGifsTrendingWithHttpInfo($tenant_id, $locale = null, $rating switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetGifsTrendingResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetGifsTrendingResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetGifsTrendingResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetGifsTrendingResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -9226,34 +8156,11 @@ public function getGifsTrendingWithHttpInfo($tenant_id, $locale = null, $rating ); } - $returnType = '\FastComments\Client\Model\GetGifsTrendingResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetGifsTrendingResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -9263,8 +8170,10 @@ public function getGifsTrendingWithHttpInfo($tenant_id, $locale = null, $rating $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -9274,6 +8183,8 @@ public function getGifsTrendingWithHttpInfo($tenant_id, $locale = null, $rating * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $locale (optional) * @param string|null $rating (optional) @@ -9283,9 +8194,9 @@ public function getGifsTrendingWithHttpInfo($tenant_id, $locale = null, $rating * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getGifsTrendingAsync($tenant_id, $locale = null, $rating = null, $page = null, string $contentType = self::contentTypes['getGifsTrending'][0]) + public function getGifsTrendingAsync($tenant_id, array $options = []) { - return $this->getGifsTrendingAsyncWithHttpInfo($tenant_id, $locale, $rating, $page, $contentType) + return $this->getGifsTrendingAsyncWithHttpInfo($tenant_id, $options) ->then( function ($response) { return $response[0]; @@ -9298,6 +8209,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $locale (optional) * @param string|null $rating (optional) @@ -9307,10 +8220,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getGifsTrendingAsyncWithHttpInfo($tenant_id, $locale = null, $rating = null, $page = null, string $contentType = self::contentTypes['getGifsTrending'][0]) + public function getGifsTrendingAsyncWithHttpInfo($tenant_id, array $options = []) { $returnType = '\FastComments\Client\Model\GetGifsTrendingResponse'; - $request = $this->getGifsTrendingRequest($tenant_id, $locale, $rating, $page, $contentType); + $request = $this->getGifsTrendingRequest($tenant_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -9351,6 +8264,8 @@ function ($exception) { /** * Create request for operation 'getGifsTrending' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $locale (optional) * @param string|null $rating (optional) @@ -9360,9 +8275,14 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getGifsTrendingRequest($tenant_id, $locale = null, $rating = null, $page = null, string $contentType = self::contentTypes['getGifsTrending'][0]) + public function getGifsTrendingRequest($tenant_id, array $options = []) { - + // unbox the optional parameters and request options from the $options array + $locale = array_key_exists('locale', $options) ? $options['locale'] : null; + $rating = array_key_exists('rating', $options) ? $options['rating'] : null; + $page = array_key_exists('page', $options) ? $options['page'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['getGifsTrending'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -9413,7 +8333,7 @@ public function getGifsTrendingRequest($tenant_id, $locale = null, $rating = nul // path params if ($tenant_id !== null) { $resourcePath = str_replace( - '{' . 'tenantId' . '}', + '{tenantId}', ObjectSerializer::toPathValue($tenant_id), $resourcePath ); @@ -9478,6 +8398,8 @@ public function getGifsTrendingRequest($tenant_id, $locale = null, $rating = nul * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $url_id url_id (required) * @param string $user_id_ws user_id_ws (required) @@ -9489,9 +8411,9 @@ public function getGifsTrendingRequest($tenant_id, $locale = null, $rating = nul * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetEventLogResponse|\FastComments\Client\Model\APIError */ - public function getGlobalEventLog($tenant_id, $url_id, $user_id_ws, $start_time, $end_time = null, string $contentType = self::contentTypes['getGlobalEventLog'][0]) + public function getGlobalEventLog($tenant_id, $url_id, $user_id_ws, $start_time, $end_time = null) { - list($response) = $this->getGlobalEventLogWithHttpInfo($tenant_id, $url_id, $user_id_ws, $start_time, $end_time, $contentType); + list($response) = $this->getGlobalEventLogWithHttpInfo($tenant_id, $url_id, $user_id_ws, $start_time, $end_time); return $response; } @@ -9500,6 +8422,8 @@ public function getGlobalEventLog($tenant_id, $url_id, $user_id_ws, $start_time, * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $url_id (required) * @param string $user_id_ws (required) @@ -9511,9 +8435,9 @@ public function getGlobalEventLog($tenant_id, $url_id, $user_id_ws, $start_time, * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetEventLogResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getGlobalEventLogWithHttpInfo($tenant_id, $url_id, $user_id_ws, $start_time, $end_time = null, string $contentType = self::contentTypes['getGlobalEventLog'][0]) + public function getGlobalEventLogWithHttpInfo($tenant_id, $url_id, $user_id_ws, $start_time, $end_time = null) { - $request = $this->getGlobalEventLogRequest($tenant_id, $url_id, $user_id_ws, $start_time, $end_time, $contentType); + $request = $this->getGlobalEventLogRequest($tenant_id, $url_id, $user_id_ws, $start_time, $end_time); try { $options = $this->createHttpClientOption(); @@ -9540,61 +8464,21 @@ public function getGlobalEventLogWithHttpInfo($tenant_id, $url_id, $user_id_ws, switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetEventLogResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetEventLogResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetEventLogResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetEventLogResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -9608,34 +8492,11 @@ public function getGlobalEventLogWithHttpInfo($tenant_id, $url_id, $user_id_ws, ); } - $returnType = '\FastComments\Client\Model\GetEventLogResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetEventLogResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -9645,7 +8506,7 @@ public function getGlobalEventLogWithHttpInfo($tenant_id, $url_id, $user_id_ws, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -9653,8 +8514,10 @@ public function getGlobalEventLogWithHttpInfo($tenant_id, $url_id, $user_id_ws, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -9664,6 +8527,8 @@ public function getGlobalEventLogWithHttpInfo($tenant_id, $url_id, $user_id_ws, * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $url_id (required) * @param string $user_id_ws (required) @@ -9674,9 +8539,9 @@ public function getGlobalEventLogWithHttpInfo($tenant_id, $url_id, $user_id_ws, * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getGlobalEventLogAsync($tenant_id, $url_id, $user_id_ws, $start_time, $end_time = null, string $contentType = self::contentTypes['getGlobalEventLog'][0]) + public function getGlobalEventLogAsync($tenant_id, $url_id, $user_id_ws, $start_time, $end_time = null) { - return $this->getGlobalEventLogAsyncWithHttpInfo($tenant_id, $url_id, $user_id_ws, $start_time, $end_time, $contentType) + return $this->getGlobalEventLogAsyncWithHttpInfo($tenant_id, $url_id, $user_id_ws, $start_time, $end_time) ->then( function ($response) { return $response[0]; @@ -9689,6 +8554,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $url_id (required) * @param string $user_id_ws (required) @@ -9699,10 +8566,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getGlobalEventLogAsyncWithHttpInfo($tenant_id, $url_id, $user_id_ws, $start_time, $end_time = null, string $contentType = self::contentTypes['getGlobalEventLog'][0]) + public function getGlobalEventLogAsyncWithHttpInfo($tenant_id, $url_id, $user_id_ws, $start_time, $end_time = null) { $returnType = '\FastComments\Client\Model\GetEventLogResponse'; - $request = $this->getGlobalEventLogRequest($tenant_id, $url_id, $user_id_ws, $start_time, $end_time, $contentType); + $request = $this->getGlobalEventLogRequest($tenant_id, $url_id, $user_id_ws, $start_time, $end_time); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -9743,6 +8610,8 @@ function ($exception) { /** * Create request for operation 'getGlobalEventLog' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $url_id (required) * @param string $user_id_ws (required) @@ -9753,9 +8622,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getGlobalEventLogRequest($tenant_id, $url_id, $user_id_ws, $start_time, $end_time = null, string $contentType = self::contentTypes['getGlobalEventLog'][0]) + public function getGlobalEventLogRequest($tenant_id, $url_id, $user_id_ws, $start_time, $end_time = null) { - + $contentType = self::contentTypes['getGlobalEventLog'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -9834,7 +8704,7 @@ public function getGlobalEventLogRequest($tenant_id, $url_id, $user_id_ws, $star // path params if ($tenant_id !== null) { $resourcePath = str_replace( - '{' . 'tenantId' . '}', + '{tenantId}', ObjectSerializer::toPathValue($tenant_id), $resourcePath ); @@ -9899,6 +8769,8 @@ public function getGlobalEventLogRequest($tenant_id, $url_id, $user_id_ws, $star * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $url_id Page URL identifier (cleaned server-side). (required) * @param string|null $after_name Cursor: pass nextAfterName from the previous response. (optional) @@ -9909,9 +8781,9 @@ public function getGlobalEventLogRequest($tenant_id, $url_id, $user_id_ws, $star * @throws \InvalidArgumentException * @return \FastComments\Client\Model\PageUsersOfflineResponse|\FastComments\Client\Model\APIError|\FastComments\Client\Model\APIError|\FastComments\Client\Model\APIError */ - public function getOfflineUsers($tenant_id, $url_id, $after_name = null, $after_user_id = null, string $contentType = self::contentTypes['getOfflineUsers'][0]) + public function getOfflineUsers($tenant_id, $url_id, array $options = []) { - list($response) = $this->getOfflineUsersWithHttpInfo($tenant_id, $url_id, $after_name, $after_user_id, $contentType); + list($response) = $this->getOfflineUsersWithHttpInfo($tenant_id, $url_id, $options); return $response; } @@ -9920,6 +8792,8 @@ public function getOfflineUsers($tenant_id, $url_id, $after_name = null, $after_ * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $url_id Page URL identifier (cleaned server-side). (required) * @param string|null $after_name Cursor: pass nextAfterName from the previous response. (optional) @@ -9930,9 +8804,9 @@ public function getOfflineUsers($tenant_id, $url_id, $after_name = null, $after_ * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\PageUsersOfflineResponse|\FastComments\Client\Model\APIError|\FastComments\Client\Model\APIError|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getOfflineUsersWithHttpInfo($tenant_id, $url_id, $after_name = null, $after_user_id = null, string $contentType = self::contentTypes['getOfflineUsers'][0]) + public function getOfflineUsersWithHttpInfo($tenant_id, $url_id, array $options = []) { - $request = $this->getOfflineUsersRequest($tenant_id, $url_id, $after_name, $after_user_id, $contentType); + $request = $this->getOfflineUsersRequest($tenant_id, $url_id, $options); try { $options = $this->createHttpClientOption(); @@ -9959,115 +8833,33 @@ public function getOfflineUsersWithHttpInfo($tenant_id, $url_id, $after_name = n switch($statusCode) { case 200: - if ('\FastComments\Client\Model\PageUsersOfflineResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\PageUsersOfflineResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\PageUsersOfflineResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\PageUsersOfflineResponse', + $request, + $response, + ); case 403: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); case 422: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -10081,34 +8873,11 @@ public function getOfflineUsersWithHttpInfo($tenant_id, $url_id, $after_name = n ); } - $returnType = '\FastComments\Client\Model\PageUsersOfflineResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\PageUsersOfflineResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -10118,7 +8887,7 @@ public function getOfflineUsersWithHttpInfo($tenant_id, $url_id, $after_name = n $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -10126,7 +8895,7 @@ public function getOfflineUsersWithHttpInfo($tenant_id, $url_id, $after_name = n $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 422: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -10134,7 +8903,7 @@ public function getOfflineUsersWithHttpInfo($tenant_id, $url_id, $after_name = n $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -10142,8 +8911,10 @@ public function getOfflineUsersWithHttpInfo($tenant_id, $url_id, $after_name = n $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -10153,6 +8924,8 @@ public function getOfflineUsersWithHttpInfo($tenant_id, $url_id, $after_name = n * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $url_id Page URL identifier (cleaned server-side). (required) * @param string|null $after_name Cursor: pass nextAfterName from the previous response. (optional) @@ -10162,9 +8935,9 @@ public function getOfflineUsersWithHttpInfo($tenant_id, $url_id, $after_name = n * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getOfflineUsersAsync($tenant_id, $url_id, $after_name = null, $after_user_id = null, string $contentType = self::contentTypes['getOfflineUsers'][0]) + public function getOfflineUsersAsync($tenant_id, $url_id, array $options = []) { - return $this->getOfflineUsersAsyncWithHttpInfo($tenant_id, $url_id, $after_name, $after_user_id, $contentType) + return $this->getOfflineUsersAsyncWithHttpInfo($tenant_id, $url_id, $options) ->then( function ($response) { return $response[0]; @@ -10177,6 +8950,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $url_id Page URL identifier (cleaned server-side). (required) * @param string|null $after_name Cursor: pass nextAfterName from the previous response. (optional) @@ -10186,10 +8961,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getOfflineUsersAsyncWithHttpInfo($tenant_id, $url_id, $after_name = null, $after_user_id = null, string $contentType = self::contentTypes['getOfflineUsers'][0]) + public function getOfflineUsersAsyncWithHttpInfo($tenant_id, $url_id, array $options = []) { $returnType = '\FastComments\Client\Model\PageUsersOfflineResponse'; - $request = $this->getOfflineUsersRequest($tenant_id, $url_id, $after_name, $after_user_id, $contentType); + $request = $this->getOfflineUsersRequest($tenant_id, $url_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -10230,6 +9005,8 @@ function ($exception) { /** * Create request for operation 'getOfflineUsers' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $url_id Page URL identifier (cleaned server-side). (required) * @param string|null $after_name Cursor: pass nextAfterName from the previous response. (optional) @@ -10239,9 +9016,13 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getOfflineUsersRequest($tenant_id, $url_id, $after_name = null, $after_user_id = null, string $contentType = self::contentTypes['getOfflineUsers'][0]) + public function getOfflineUsersRequest($tenant_id, $url_id, array $options = []) { - + // unbox the optional parameters and request options from the $options array + $after_name = array_key_exists('after_name', $options) ? $options['after_name'] : null; + $after_user_id = array_key_exists('after_user_id', $options) ? $options['after_user_id'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['getOfflineUsers'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -10298,7 +9079,7 @@ public function getOfflineUsersRequest($tenant_id, $url_id, $after_name = null, // path params if ($tenant_id !== null) { $resourcePath = str_replace( - '{' . 'tenantId' . '}', + '{tenantId}', ObjectSerializer::toPathValue($tenant_id), $resourcePath ); @@ -10363,6 +9144,8 @@ public function getOfflineUsersRequest($tenant_id, $url_id, $after_name = null, * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $url_id Page URL identifier (cleaned server-side). (required) * @param string|null $after_name Cursor: pass nextAfterName from the previous response. (optional) @@ -10373,9 +9156,9 @@ public function getOfflineUsersRequest($tenant_id, $url_id, $after_name = null, * @throws \InvalidArgumentException * @return \FastComments\Client\Model\PageUsersOnlineResponse|\FastComments\Client\Model\APIError|\FastComments\Client\Model\APIError|\FastComments\Client\Model\APIError */ - public function getOnlineUsers($tenant_id, $url_id, $after_name = null, $after_user_id = null, string $contentType = self::contentTypes['getOnlineUsers'][0]) + public function getOnlineUsers($tenant_id, $url_id, array $options = []) { - list($response) = $this->getOnlineUsersWithHttpInfo($tenant_id, $url_id, $after_name, $after_user_id, $contentType); + list($response) = $this->getOnlineUsersWithHttpInfo($tenant_id, $url_id, $options); return $response; } @@ -10384,6 +9167,8 @@ public function getOnlineUsers($tenant_id, $url_id, $after_name = null, $after_u * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $url_id Page URL identifier (cleaned server-side). (required) * @param string|null $after_name Cursor: pass nextAfterName from the previous response. (optional) @@ -10394,9 +9179,9 @@ public function getOnlineUsers($tenant_id, $url_id, $after_name = null, $after_u * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\PageUsersOnlineResponse|\FastComments\Client\Model\APIError|\FastComments\Client\Model\APIError|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getOnlineUsersWithHttpInfo($tenant_id, $url_id, $after_name = null, $after_user_id = null, string $contentType = self::contentTypes['getOnlineUsers'][0]) + public function getOnlineUsersWithHttpInfo($tenant_id, $url_id, array $options = []) { - $request = $this->getOnlineUsersRequest($tenant_id, $url_id, $after_name, $after_user_id, $contentType); + $request = $this->getOnlineUsersRequest($tenant_id, $url_id, $options); try { $options = $this->createHttpClientOption(); @@ -10423,115 +9208,33 @@ public function getOnlineUsersWithHttpInfo($tenant_id, $url_id, $after_name = nu switch($statusCode) { case 200: - if ('\FastComments\Client\Model\PageUsersOnlineResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\PageUsersOnlineResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\PageUsersOnlineResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\PageUsersOnlineResponse', + $request, + $response, + ); case 403: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); case 422: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -10545,34 +9248,11 @@ public function getOnlineUsersWithHttpInfo($tenant_id, $url_id, $after_name = nu ); } - $returnType = '\FastComments\Client\Model\PageUsersOnlineResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\PageUsersOnlineResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -10582,7 +9262,7 @@ public function getOnlineUsersWithHttpInfo($tenant_id, $url_id, $after_name = nu $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -10590,7 +9270,7 @@ public function getOnlineUsersWithHttpInfo($tenant_id, $url_id, $after_name = nu $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 422: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -10598,7 +9278,7 @@ public function getOnlineUsersWithHttpInfo($tenant_id, $url_id, $after_name = nu $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -10606,8 +9286,10 @@ public function getOnlineUsersWithHttpInfo($tenant_id, $url_id, $after_name = nu $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -10617,6 +9299,8 @@ public function getOnlineUsersWithHttpInfo($tenant_id, $url_id, $after_name = nu * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $url_id Page URL identifier (cleaned server-side). (required) * @param string|null $after_name Cursor: pass nextAfterName from the previous response. (optional) @@ -10626,9 +9310,9 @@ public function getOnlineUsersWithHttpInfo($tenant_id, $url_id, $after_name = nu * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getOnlineUsersAsync($tenant_id, $url_id, $after_name = null, $after_user_id = null, string $contentType = self::contentTypes['getOnlineUsers'][0]) + public function getOnlineUsersAsync($tenant_id, $url_id, array $options = []) { - return $this->getOnlineUsersAsyncWithHttpInfo($tenant_id, $url_id, $after_name, $after_user_id, $contentType) + return $this->getOnlineUsersAsyncWithHttpInfo($tenant_id, $url_id, $options) ->then( function ($response) { return $response[0]; @@ -10641,6 +9325,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $url_id Page URL identifier (cleaned server-side). (required) * @param string|null $after_name Cursor: pass nextAfterName from the previous response. (optional) @@ -10650,10 +9336,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getOnlineUsersAsyncWithHttpInfo($tenant_id, $url_id, $after_name = null, $after_user_id = null, string $contentType = self::contentTypes['getOnlineUsers'][0]) + public function getOnlineUsersAsyncWithHttpInfo($tenant_id, $url_id, array $options = []) { $returnType = '\FastComments\Client\Model\PageUsersOnlineResponse'; - $request = $this->getOnlineUsersRequest($tenant_id, $url_id, $after_name, $after_user_id, $contentType); + $request = $this->getOnlineUsersRequest($tenant_id, $url_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -10694,6 +9380,8 @@ function ($exception) { /** * Create request for operation 'getOnlineUsers' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $url_id Page URL identifier (cleaned server-side). (required) * @param string|null $after_name Cursor: pass nextAfterName from the previous response. (optional) @@ -10703,9 +9391,13 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getOnlineUsersRequest($tenant_id, $url_id, $after_name = null, $after_user_id = null, string $contentType = self::contentTypes['getOnlineUsers'][0]) + public function getOnlineUsersRequest($tenant_id, $url_id, array $options = []) { - + // unbox the optional parameters and request options from the $options array + $after_name = array_key_exists('after_name', $options) ? $options['after_name'] : null; + $after_user_id = array_key_exists('after_user_id', $options) ? $options['after_user_id'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['getOnlineUsers'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -10762,7 +9454,7 @@ public function getOnlineUsersRequest($tenant_id, $url_id, $after_name = null, $ // path params if ($tenant_id !== null) { $resourcePath = str_replace( - '{' . 'tenantId' . '}', + '{tenantId}', ObjectSerializer::toPathValue($tenant_id), $resourcePath ); @@ -10827,6 +9519,8 @@ public function getOnlineUsersRequest($tenant_id, $url_id, $after_name = null, $ * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string|null $cursor Opaque pagination cursor returned as `nextCursor` from a prior request. Tied to the same `sortBy`. (optional) * @param int|null $limit 1..200, default 50 (optional) @@ -10839,9 +9533,9 @@ public function getOnlineUsersRequest($tenant_id, $url_id, $after_name = null, $ * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetPublicPagesResponse|\FastComments\Client\Model\APIError */ - public function getPagesPublic($tenant_id, $cursor = null, $limit = null, $q = null, $sort_by = null, $has_comments = null, string $contentType = self::contentTypes['getPagesPublic'][0]) + public function getPagesPublic($tenant_id, array $options = []) { - list($response) = $this->getPagesPublicWithHttpInfo($tenant_id, $cursor, $limit, $q, $sort_by, $has_comments, $contentType); + list($response) = $this->getPagesPublicWithHttpInfo($tenant_id, $options); return $response; } @@ -10850,6 +9544,8 @@ public function getPagesPublic($tenant_id, $cursor = null, $limit = null, $q = n * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $cursor Opaque pagination cursor returned as `nextCursor` from a prior request. Tied to the same `sortBy`. (optional) * @param int|null $limit 1..200, default 50 (optional) @@ -10862,9 +9558,9 @@ public function getPagesPublic($tenant_id, $cursor = null, $limit = null, $q = n * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetPublicPagesResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getPagesPublicWithHttpInfo($tenant_id, $cursor = null, $limit = null, $q = null, $sort_by = null, $has_comments = null, string $contentType = self::contentTypes['getPagesPublic'][0]) + public function getPagesPublicWithHttpInfo($tenant_id, array $options = []) { - $request = $this->getPagesPublicRequest($tenant_id, $cursor, $limit, $q, $sort_by, $has_comments, $contentType); + $request = $this->getPagesPublicRequest($tenant_id, $options); try { $options = $this->createHttpClientOption(); @@ -10891,61 +9587,21 @@ public function getPagesPublicWithHttpInfo($tenant_id, $cursor = null, $limit = switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetPublicPagesResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetPublicPagesResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetPublicPagesResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetPublicPagesResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -10959,34 +9615,11 @@ public function getPagesPublicWithHttpInfo($tenant_id, $cursor = null, $limit = ); } - $returnType = '\FastComments\Client\Model\GetPublicPagesResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetPublicPagesResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -10996,7 +9629,7 @@ public function getPagesPublicWithHttpInfo($tenant_id, $cursor = null, $limit = $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -11004,8 +9637,10 @@ public function getPagesPublicWithHttpInfo($tenant_id, $cursor = null, $limit = $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -11015,6 +9650,8 @@ public function getPagesPublicWithHttpInfo($tenant_id, $cursor = null, $limit = * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $cursor Opaque pagination cursor returned as `nextCursor` from a prior request. Tied to the same `sortBy`. (optional) * @param int|null $limit 1..200, default 50 (optional) @@ -11026,9 +9663,9 @@ public function getPagesPublicWithHttpInfo($tenant_id, $cursor = null, $limit = * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPagesPublicAsync($tenant_id, $cursor = null, $limit = null, $q = null, $sort_by = null, $has_comments = null, string $contentType = self::contentTypes['getPagesPublic'][0]) + public function getPagesPublicAsync($tenant_id, array $options = []) { - return $this->getPagesPublicAsyncWithHttpInfo($tenant_id, $cursor, $limit, $q, $sort_by, $has_comments, $contentType) + return $this->getPagesPublicAsyncWithHttpInfo($tenant_id, $options) ->then( function ($response) { return $response[0]; @@ -11041,6 +9678,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $cursor Opaque pagination cursor returned as `nextCursor` from a prior request. Tied to the same `sortBy`. (optional) * @param int|null $limit 1..200, default 50 (optional) @@ -11052,10 +9691,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPagesPublicAsyncWithHttpInfo($tenant_id, $cursor = null, $limit = null, $q = null, $sort_by = null, $has_comments = null, string $contentType = self::contentTypes['getPagesPublic'][0]) + public function getPagesPublicAsyncWithHttpInfo($tenant_id, array $options = []) { $returnType = '\FastComments\Client\Model\GetPublicPagesResponse'; - $request = $this->getPagesPublicRequest($tenant_id, $cursor, $limit, $q, $sort_by, $has_comments, $contentType); + $request = $this->getPagesPublicRequest($tenant_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -11096,6 +9735,8 @@ function ($exception) { /** * Create request for operation 'getPagesPublic' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $cursor Opaque pagination cursor returned as `nextCursor` from a prior request. Tied to the same `sortBy`. (optional) * @param int|null $limit 1..200, default 50 (optional) @@ -11107,9 +9748,16 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getPagesPublicRequest($tenant_id, $cursor = null, $limit = null, $q = null, $sort_by = null, $has_comments = null, string $contentType = self::contentTypes['getPagesPublic'][0]) + public function getPagesPublicRequest($tenant_id, array $options = []) { - + // unbox the optional parameters and request options from the $options array + $cursor = array_key_exists('cursor', $options) ? $options['cursor'] : null; + $limit = array_key_exists('limit', $options) ? $options['limit'] : null; + $q = array_key_exists('q', $options) ? $options['q'] : null; + $sort_by = array_key_exists('sort_by', $options) ? $options['sort_by'] : null; + $has_comments = array_key_exists('has_comments', $options) ? $options['has_comments'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['getPagesPublic'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -11180,7 +9828,7 @@ public function getPagesPublicRequest($tenant_id, $cursor = null, $limit = null, // path params if ($tenant_id !== null) { $resourcePath = str_replace( - '{' . 'tenantId' . '}', + '{tenantId}', ObjectSerializer::toPathValue($tenant_id), $resourcePath ); @@ -11245,6 +9893,8 @@ public function getPagesPublicRequest($tenant_id, $cursor = null, $limit = null, * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $namespace namespace (required) * @param string $component component (required) * @param string|null $locale locale (optional) @@ -11255,9 +9905,9 @@ public function getPagesPublicRequest($tenant_id, $cursor = null, $limit = null, * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetTranslationsResponse|\FastComments\Client\Model\APIError|\FastComments\Client\Model\APIError|\FastComments\Client\Model\APIError */ - public function getTranslations($namespace, $component, $locale = null, $use_full_translation_ids = null, string $contentType = self::contentTypes['getTranslations'][0]) + public function getTranslations($namespace, $component, array $options = []) { - list($response) = $this->getTranslationsWithHttpInfo($namespace, $component, $locale, $use_full_translation_ids, $contentType); + list($response) = $this->getTranslationsWithHttpInfo($namespace, $component, $options); return $response; } @@ -11266,6 +9916,8 @@ public function getTranslations($namespace, $component, $locale = null, $use_ful * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $namespace (required) * @param string $component (required) * @param string|null $locale (optional) @@ -11276,9 +9928,9 @@ public function getTranslations($namespace, $component, $locale = null, $use_ful * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetTranslationsResponse|\FastComments\Client\Model\APIError|\FastComments\Client\Model\APIError|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getTranslationsWithHttpInfo($namespace, $component, $locale = null, $use_full_translation_ids = null, string $contentType = self::contentTypes['getTranslations'][0]) + public function getTranslationsWithHttpInfo($namespace, $component, array $options = []) { - $request = $this->getTranslationsRequest($namespace, $component, $locale, $use_full_translation_ids, $contentType); + $request = $this->getTranslationsRequest($namespace, $component, $options); try { $options = $this->createHttpClientOption(); @@ -11305,115 +9957,33 @@ public function getTranslationsWithHttpInfo($namespace, $component, $locale = nu switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetTranslationsResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetTranslationsResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetTranslationsResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetTranslationsResponse', + $request, + $response, + ); case 422: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); case 500: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -11427,34 +9997,11 @@ public function getTranslationsWithHttpInfo($namespace, $component, $locale = nu ); } - $returnType = '\FastComments\Client\Model\GetTranslationsResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetTranslationsResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -11464,7 +10011,7 @@ public function getTranslationsWithHttpInfo($namespace, $component, $locale = nu $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 422: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -11472,7 +10019,7 @@ public function getTranslationsWithHttpInfo($namespace, $component, $locale = nu $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -11480,7 +10027,7 @@ public function getTranslationsWithHttpInfo($namespace, $component, $locale = nu $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -11488,8 +10035,10 @@ public function getTranslationsWithHttpInfo($namespace, $component, $locale = nu $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -11499,6 +10048,8 @@ public function getTranslationsWithHttpInfo($namespace, $component, $locale = nu * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $namespace (required) * @param string $component (required) * @param string|null $locale (optional) @@ -11508,9 +10059,9 @@ public function getTranslationsWithHttpInfo($namespace, $component, $locale = nu * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTranslationsAsync($namespace, $component, $locale = null, $use_full_translation_ids = null, string $contentType = self::contentTypes['getTranslations'][0]) + public function getTranslationsAsync($namespace, $component, array $options = []) { - return $this->getTranslationsAsyncWithHttpInfo($namespace, $component, $locale, $use_full_translation_ids, $contentType) + return $this->getTranslationsAsyncWithHttpInfo($namespace, $component, $options) ->then( function ($response) { return $response[0]; @@ -11523,6 +10074,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $namespace (required) * @param string $component (required) * @param string|null $locale (optional) @@ -11532,10 +10085,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTranslationsAsyncWithHttpInfo($namespace, $component, $locale = null, $use_full_translation_ids = null, string $contentType = self::contentTypes['getTranslations'][0]) + public function getTranslationsAsyncWithHttpInfo($namespace, $component, array $options = []) { $returnType = '\FastComments\Client\Model\GetTranslationsResponse'; - $request = $this->getTranslationsRequest($namespace, $component, $locale, $use_full_translation_ids, $contentType); + $request = $this->getTranslationsRequest($namespace, $component, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -11576,6 +10129,8 @@ function ($exception) { /** * Create request for operation 'getTranslations' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $namespace (required) * @param string $component (required) * @param string|null $locale (optional) @@ -11585,9 +10140,13 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getTranslationsRequest($namespace, $component, $locale = null, $use_full_translation_ids = null, string $contentType = self::contentTypes['getTranslations'][0]) + public function getTranslationsRequest($namespace, $component, array $options = []) { - + // unbox the optional parameters and request options from the $options array + $locale = array_key_exists('locale', $options) ? $options['locale'] : null; + $use_full_translation_ids = array_key_exists('use_full_translation_ids', $options) ? $options['use_full_translation_ids'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['getTranslations'][0]; + // verify the required parameter 'namespace' is set if ($namespace === null || (is_array($namespace) && count($namespace) === 0)) { throw new \InvalidArgumentException( @@ -11635,7 +10194,7 @@ public function getTranslationsRequest($namespace, $component, $locale = null, $ // path params if ($namespace !== null) { $resourcePath = str_replace( - '{' . 'namespace' . '}', + '{namespace}', ObjectSerializer::toPathValue($namespace), $resourcePath ); @@ -11643,7 +10202,7 @@ public function getTranslationsRequest($namespace, $component, $locale = null, $ // path params if ($component !== null) { $resourcePath = str_replace( - '{' . 'component' . '}', + '{component}', ObjectSerializer::toPathValue($component), $resourcePath ); @@ -11708,6 +10267,8 @@ public function getTranslationsRequest($namespace, $component, $locale = null, $ * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string|null $sso sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUserNotificationCount'] to see the possible values for this operation @@ -11716,9 +10277,9 @@ public function getTranslationsRequest($namespace, $component, $locale = null, $ * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetUserNotificationCountResponse|\FastComments\Client\Model\APIError */ - public function getUserNotificationCount($tenant_id, $sso = null, string $contentType = self::contentTypes['getUserNotificationCount'][0]) + public function getUserNotificationCount($tenant_id, $sso = null) { - list($response) = $this->getUserNotificationCountWithHttpInfo($tenant_id, $sso, $contentType); + list($response) = $this->getUserNotificationCountWithHttpInfo($tenant_id, $sso); return $response; } @@ -11727,6 +10288,8 @@ public function getUserNotificationCount($tenant_id, $sso = null, string $conten * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUserNotificationCount'] to see the possible values for this operation @@ -11735,9 +10298,9 @@ public function getUserNotificationCount($tenant_id, $sso = null, string $conten * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetUserNotificationCountResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getUserNotificationCountWithHttpInfo($tenant_id, $sso = null, string $contentType = self::contentTypes['getUserNotificationCount'][0]) + public function getUserNotificationCountWithHttpInfo($tenant_id, $sso = null) { - $request = $this->getUserNotificationCountRequest($tenant_id, $sso, $contentType); + $request = $this->getUserNotificationCountRequest($tenant_id, $sso); try { $options = $this->createHttpClientOption(); @@ -11764,61 +10327,21 @@ public function getUserNotificationCountWithHttpInfo($tenant_id, $sso = null, st switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetUserNotificationCountResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetUserNotificationCountResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetUserNotificationCountResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetUserNotificationCountResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -11832,34 +10355,11 @@ public function getUserNotificationCountWithHttpInfo($tenant_id, $sso = null, st ); } - $returnType = '\FastComments\Client\Model\GetUserNotificationCountResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetUserNotificationCountResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -11869,7 +10369,7 @@ public function getUserNotificationCountWithHttpInfo($tenant_id, $sso = null, st $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -11877,8 +10377,10 @@ public function getUserNotificationCountWithHttpInfo($tenant_id, $sso = null, st $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -11888,6 +10390,8 @@ public function getUserNotificationCountWithHttpInfo($tenant_id, $sso = null, st * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUserNotificationCount'] to see the possible values for this operation @@ -11895,9 +10399,9 @@ public function getUserNotificationCountWithHttpInfo($tenant_id, $sso = null, st * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getUserNotificationCountAsync($tenant_id, $sso = null, string $contentType = self::contentTypes['getUserNotificationCount'][0]) + public function getUserNotificationCountAsync($tenant_id, $sso = null) { - return $this->getUserNotificationCountAsyncWithHttpInfo($tenant_id, $sso, $contentType) + return $this->getUserNotificationCountAsyncWithHttpInfo($tenant_id, $sso) ->then( function ($response) { return $response[0]; @@ -11910,6 +10414,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUserNotificationCount'] to see the possible values for this operation @@ -11917,10 +10423,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getUserNotificationCountAsyncWithHttpInfo($tenant_id, $sso = null, string $contentType = self::contentTypes['getUserNotificationCount'][0]) + public function getUserNotificationCountAsyncWithHttpInfo($tenant_id, $sso = null) { $returnType = '\FastComments\Client\Model\GetUserNotificationCountResponse'; - $request = $this->getUserNotificationCountRequest($tenant_id, $sso, $contentType); + $request = $this->getUserNotificationCountRequest($tenant_id, $sso); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -11961,6 +10467,8 @@ function ($exception) { /** * Create request for operation 'getUserNotificationCount' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUserNotificationCount'] to see the possible values for this operation @@ -11968,9 +10476,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getUserNotificationCountRequest($tenant_id, $sso = null, string $contentType = self::contentTypes['getUserNotificationCount'][0]) + public function getUserNotificationCountRequest($tenant_id, $sso = null) { - + $contentType = self::contentTypes['getUserNotificationCount'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -12067,6 +10576,8 @@ public function getUserNotificationCountRequest($tenant_id, $sso = null, string * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string|null $url_id Used to determine whether the current page is subscribed. (optional) * @param int|null $page_size page_size (optional) @@ -12085,9 +10596,9 @@ public function getUserNotificationCountRequest($tenant_id, $sso = null, string * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetMyNotificationsResponse|\FastComments\Client\Model\APIError */ - public function getUserNotifications($tenant_id, $url_id = null, $page_size = null, $after_id = null, $include_context = null, $after_created_at = null, $unread_only = null, $dm_only = null, $no_dm = null, $include_translations = null, $include_tenant_notifications = null, $sso = null, string $contentType = self::contentTypes['getUserNotifications'][0]) + public function getUserNotifications($tenant_id, array $options = []) { - list($response) = $this->getUserNotificationsWithHttpInfo($tenant_id, $url_id, $page_size, $after_id, $include_context, $after_created_at, $unread_only, $dm_only, $no_dm, $include_translations, $include_tenant_notifications, $sso, $contentType); + list($response) = $this->getUserNotificationsWithHttpInfo($tenant_id, $options); return $response; } @@ -12096,6 +10607,8 @@ public function getUserNotifications($tenant_id, $url_id = null, $page_size = nu * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $url_id Used to determine whether the current page is subscribed. (optional) * @param int|null $page_size (optional) @@ -12114,9 +10627,9 @@ public function getUserNotifications($tenant_id, $url_id = null, $page_size = nu * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetMyNotificationsResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getUserNotificationsWithHttpInfo($tenant_id, $url_id = null, $page_size = null, $after_id = null, $include_context = null, $after_created_at = null, $unread_only = null, $dm_only = null, $no_dm = null, $include_translations = null, $include_tenant_notifications = null, $sso = null, string $contentType = self::contentTypes['getUserNotifications'][0]) + public function getUserNotificationsWithHttpInfo($tenant_id, array $options = []) { - $request = $this->getUserNotificationsRequest($tenant_id, $url_id, $page_size, $after_id, $include_context, $after_created_at, $unread_only, $dm_only, $no_dm, $include_translations, $include_tenant_notifications, $sso, $contentType); + $request = $this->getUserNotificationsRequest($tenant_id, $options); try { $options = $this->createHttpClientOption(); @@ -12143,61 +10656,21 @@ public function getUserNotificationsWithHttpInfo($tenant_id, $url_id = null, $pa switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetMyNotificationsResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetMyNotificationsResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetMyNotificationsResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetMyNotificationsResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -12211,34 +10684,11 @@ public function getUserNotificationsWithHttpInfo($tenant_id, $url_id = null, $pa ); } - $returnType = '\FastComments\Client\Model\GetMyNotificationsResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetMyNotificationsResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -12248,7 +10698,7 @@ public function getUserNotificationsWithHttpInfo($tenant_id, $url_id = null, $pa $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -12256,8 +10706,10 @@ public function getUserNotificationsWithHttpInfo($tenant_id, $url_id = null, $pa $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -12267,6 +10719,8 @@ public function getUserNotificationsWithHttpInfo($tenant_id, $url_id = null, $pa * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $url_id Used to determine whether the current page is subscribed. (optional) * @param int|null $page_size (optional) @@ -12284,9 +10738,9 @@ public function getUserNotificationsWithHttpInfo($tenant_id, $url_id = null, $pa * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getUserNotificationsAsync($tenant_id, $url_id = null, $page_size = null, $after_id = null, $include_context = null, $after_created_at = null, $unread_only = null, $dm_only = null, $no_dm = null, $include_translations = null, $include_tenant_notifications = null, $sso = null, string $contentType = self::contentTypes['getUserNotifications'][0]) + public function getUserNotificationsAsync($tenant_id, array $options = []) { - return $this->getUserNotificationsAsyncWithHttpInfo($tenant_id, $url_id, $page_size, $after_id, $include_context, $after_created_at, $unread_only, $dm_only, $no_dm, $include_translations, $include_tenant_notifications, $sso, $contentType) + return $this->getUserNotificationsAsyncWithHttpInfo($tenant_id, $options) ->then( function ($response) { return $response[0]; @@ -12299,6 +10753,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $url_id Used to determine whether the current page is subscribed. (optional) * @param int|null $page_size (optional) @@ -12316,10 +10772,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getUserNotificationsAsyncWithHttpInfo($tenant_id, $url_id = null, $page_size = null, $after_id = null, $include_context = null, $after_created_at = null, $unread_only = null, $dm_only = null, $no_dm = null, $include_translations = null, $include_tenant_notifications = null, $sso = null, string $contentType = self::contentTypes['getUserNotifications'][0]) + public function getUserNotificationsAsyncWithHttpInfo($tenant_id, array $options = []) { $returnType = '\FastComments\Client\Model\GetMyNotificationsResponse'; - $request = $this->getUserNotificationsRequest($tenant_id, $url_id, $page_size, $after_id, $include_context, $after_created_at, $unread_only, $dm_only, $no_dm, $include_translations, $include_tenant_notifications, $sso, $contentType); + $request = $this->getUserNotificationsRequest($tenant_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -12360,6 +10816,8 @@ function ($exception) { /** * Create request for operation 'getUserNotifications' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $url_id Used to determine whether the current page is subscribed. (optional) * @param int|null $page_size (optional) @@ -12377,9 +10835,22 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getUserNotificationsRequest($tenant_id, $url_id = null, $page_size = null, $after_id = null, $include_context = null, $after_created_at = null, $unread_only = null, $dm_only = null, $no_dm = null, $include_translations = null, $include_tenant_notifications = null, $sso = null, string $contentType = self::contentTypes['getUserNotifications'][0]) - { - + public function getUserNotificationsRequest($tenant_id, array $options = []) + { + // unbox the optional parameters and request options from the $options array + $url_id = array_key_exists('url_id', $options) ? $options['url_id'] : null; + $page_size = array_key_exists('page_size', $options) ? $options['page_size'] : null; + $after_id = array_key_exists('after_id', $options) ? $options['after_id'] : null; + $include_context = array_key_exists('include_context', $options) ? $options['include_context'] : null; + $after_created_at = array_key_exists('after_created_at', $options) ? $options['after_created_at'] : null; + $unread_only = array_key_exists('unread_only', $options) ? $options['unread_only'] : null; + $dm_only = array_key_exists('dm_only', $options) ? $options['dm_only'] : null; + $no_dm = array_key_exists('no_dm', $options) ? $options['no_dm'] : null; + $include_translations = array_key_exists('include_translations', $options) ? $options['include_translations'] : null; + $include_tenant_notifications = array_key_exists('include_tenant_notifications', $options) ? $options['include_tenant_notifications'] : null; + $sso = array_key_exists('sso', $options) ? $options['sso'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['getUserNotifications'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -12585,9 +11056,9 @@ public function getUserNotificationsRequest($tenant_id, $url_id = null, $page_si * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetUserPresenceStatusesResponse|\FastComments\Client\Model\APIError|\FastComments\Client\Model\APIError */ - public function getUserPresenceStatuses($tenant_id, $url_id_ws, $user_ids, string $contentType = self::contentTypes['getUserPresenceStatuses'][0]) + public function getUserPresenceStatuses($tenant_id, $url_id_ws, $user_ids) { - list($response) = $this->getUserPresenceStatusesWithHttpInfo($tenant_id, $url_id_ws, $user_ids, $contentType); + list($response) = $this->getUserPresenceStatusesWithHttpInfo($tenant_id, $url_id_ws, $user_ids); return $response; } @@ -12605,9 +11076,9 @@ public function getUserPresenceStatuses($tenant_id, $url_id_ws, $user_ids, strin * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetUserPresenceStatusesResponse|\FastComments\Client\Model\APIError|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getUserPresenceStatusesWithHttpInfo($tenant_id, $url_id_ws, $user_ids, string $contentType = self::contentTypes['getUserPresenceStatuses'][0]) + public function getUserPresenceStatusesWithHttpInfo($tenant_id, $url_id_ws, $user_ids) { - $request = $this->getUserPresenceStatusesRequest($tenant_id, $url_id_ws, $user_ids, $contentType); + $request = $this->getUserPresenceStatusesRequest($tenant_id, $url_id_ws, $user_ids); try { $options = $this->createHttpClientOption(); @@ -12634,88 +11105,27 @@ public function getUserPresenceStatusesWithHttpInfo($tenant_id, $url_id_ws, $use switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetUserPresenceStatusesResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetUserPresenceStatusesResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetUserPresenceStatusesResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetUserPresenceStatusesResponse', + $request, + $response, + ); case 422: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -12729,34 +11139,11 @@ public function getUserPresenceStatusesWithHttpInfo($tenant_id, $url_id_ws, $use ); } - $returnType = '\FastComments\Client\Model\GetUserPresenceStatusesResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetUserPresenceStatusesResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -12766,7 +11153,7 @@ public function getUserPresenceStatusesWithHttpInfo($tenant_id, $url_id_ws, $use $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 422: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -12774,7 +11161,7 @@ public function getUserPresenceStatusesWithHttpInfo($tenant_id, $url_id_ws, $use $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -12782,8 +11169,10 @@ public function getUserPresenceStatusesWithHttpInfo($tenant_id, $url_id_ws, $use $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -12801,9 +11190,9 @@ public function getUserPresenceStatusesWithHttpInfo($tenant_id, $url_id_ws, $use * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getUserPresenceStatusesAsync($tenant_id, $url_id_ws, $user_ids, string $contentType = self::contentTypes['getUserPresenceStatuses'][0]) + public function getUserPresenceStatusesAsync($tenant_id, $url_id_ws, $user_ids) { - return $this->getUserPresenceStatusesAsyncWithHttpInfo($tenant_id, $url_id_ws, $user_ids, $contentType) + return $this->getUserPresenceStatusesAsyncWithHttpInfo($tenant_id, $url_id_ws, $user_ids) ->then( function ($response) { return $response[0]; @@ -12824,10 +11213,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getUserPresenceStatusesAsyncWithHttpInfo($tenant_id, $url_id_ws, $user_ids, string $contentType = self::contentTypes['getUserPresenceStatuses'][0]) + public function getUserPresenceStatusesAsyncWithHttpInfo($tenant_id, $url_id_ws, $user_ids) { $returnType = '\FastComments\Client\Model\GetUserPresenceStatusesResponse'; - $request = $this->getUserPresenceStatusesRequest($tenant_id, $url_id_ws, $user_ids, $contentType); + $request = $this->getUserPresenceStatusesRequest($tenant_id, $url_id_ws, $user_ids); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -12876,9 +11265,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getUserPresenceStatusesRequest($tenant_id, $url_id_ws, $user_ids, string $contentType = self::contentTypes['getUserPresenceStatuses'][0]) + public function getUserPresenceStatusesRequest($tenant_id, $url_id_ws, $user_ids) { - + $contentType = self::contentTypes['getUserPresenceStatuses'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -12997,6 +11387,8 @@ public function getUserPresenceStatusesRequest($tenant_id, $url_id_ws, $user_ids * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string[]|null $post_ids post_ids (optional) * @param string|null $sso sso (optional) @@ -13006,9 +11398,9 @@ public function getUserPresenceStatusesRequest($tenant_id, $url_id_ws, $user_ids * @throws \InvalidArgumentException * @return \FastComments\Client\Model\UserReactsResponse|\FastComments\Client\Model\APIError */ - public function getUserReactsPublic($tenant_id, $post_ids = null, $sso = null, string $contentType = self::contentTypes['getUserReactsPublic'][0]) + public function getUserReactsPublic($tenant_id, array $options = []) { - list($response) = $this->getUserReactsPublicWithHttpInfo($tenant_id, $post_ids, $sso, $contentType); + list($response) = $this->getUserReactsPublicWithHttpInfo($tenant_id, $options); return $response; } @@ -13017,6 +11409,8 @@ public function getUserReactsPublic($tenant_id, $post_ids = null, $sso = null, s * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string[]|null $post_ids (optional) * @param string|null $sso (optional) @@ -13026,9 +11420,9 @@ public function getUserReactsPublic($tenant_id, $post_ids = null, $sso = null, s * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\UserReactsResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getUserReactsPublicWithHttpInfo($tenant_id, $post_ids = null, $sso = null, string $contentType = self::contentTypes['getUserReactsPublic'][0]) + public function getUserReactsPublicWithHttpInfo($tenant_id, array $options = []) { - $request = $this->getUserReactsPublicRequest($tenant_id, $post_ids, $sso, $contentType); + $request = $this->getUserReactsPublicRequest($tenant_id, $options); try { $options = $this->createHttpClientOption(); @@ -13055,61 +11449,21 @@ public function getUserReactsPublicWithHttpInfo($tenant_id, $post_ids = null, $s switch($statusCode) { case 200: - if ('\FastComments\Client\Model\UserReactsResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\UserReactsResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\UserReactsResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\UserReactsResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -13123,34 +11477,11 @@ public function getUserReactsPublicWithHttpInfo($tenant_id, $post_ids = null, $s ); } - $returnType = '\FastComments\Client\Model\UserReactsResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\UserReactsResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -13160,7 +11491,7 @@ public function getUserReactsPublicWithHttpInfo($tenant_id, $post_ids = null, $s $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -13168,8 +11499,10 @@ public function getUserReactsPublicWithHttpInfo($tenant_id, $post_ids = null, $s $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -13179,6 +11512,8 @@ public function getUserReactsPublicWithHttpInfo($tenant_id, $post_ids = null, $s * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string[]|null $post_ids (optional) * @param string|null $sso (optional) @@ -13187,9 +11522,9 @@ public function getUserReactsPublicWithHttpInfo($tenant_id, $post_ids = null, $s * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getUserReactsPublicAsync($tenant_id, $post_ids = null, $sso = null, string $contentType = self::contentTypes['getUserReactsPublic'][0]) + public function getUserReactsPublicAsync($tenant_id, array $options = []) { - return $this->getUserReactsPublicAsyncWithHttpInfo($tenant_id, $post_ids, $sso, $contentType) + return $this->getUserReactsPublicAsyncWithHttpInfo($tenant_id, $options) ->then( function ($response) { return $response[0]; @@ -13202,6 +11537,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string[]|null $post_ids (optional) * @param string|null $sso (optional) @@ -13210,10 +11547,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getUserReactsPublicAsyncWithHttpInfo($tenant_id, $post_ids = null, $sso = null, string $contentType = self::contentTypes['getUserReactsPublic'][0]) + public function getUserReactsPublicAsyncWithHttpInfo($tenant_id, array $options = []) { $returnType = '\FastComments\Client\Model\UserReactsResponse'; - $request = $this->getUserReactsPublicRequest($tenant_id, $post_ids, $sso, $contentType); + $request = $this->getUserReactsPublicRequest($tenant_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -13254,6 +11591,8 @@ function ($exception) { /** * Create request for operation 'getUserReactsPublic' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string[]|null $post_ids (optional) * @param string|null $sso (optional) @@ -13262,9 +11601,13 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getUserReactsPublicRequest($tenant_id, $post_ids = null, $sso = null, string $contentType = self::contentTypes['getUserReactsPublic'][0]) + public function getUserReactsPublicRequest($tenant_id, array $options = []) { - + // unbox the optional parameters and request options from the $options array + $post_ids = array_key_exists('post_ids', $options) ? $options['post_ids'] : null; + $sso = array_key_exists('sso', $options) ? $options['sso'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['getUserReactsPublic'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -13305,7 +11648,7 @@ public function getUserReactsPublicRequest($tenant_id, $post_ids = null, $sso = // path params if ($tenant_id !== null) { $resourcePath = str_replace( - '{' . 'tenantId' . '}', + '{tenantId}', ObjectSerializer::toPathValue($tenant_id), $resourcePath ); @@ -13378,9 +11721,9 @@ public function getUserReactsPublicRequest($tenant_id, $post_ids = null, $sso = * @throws \InvalidArgumentException * @return \FastComments\Client\Model\PageUsersInfoResponse|\FastComments\Client\Model\APIError|\FastComments\Client\Model\APIError */ - public function getUsersInfo($tenant_id, $ids, string $contentType = self::contentTypes['getUsersInfo'][0]) + public function getUsersInfo($tenant_id, $ids) { - list($response) = $this->getUsersInfoWithHttpInfo($tenant_id, $ids, $contentType); + list($response) = $this->getUsersInfoWithHttpInfo($tenant_id, $ids); return $response; } @@ -13397,9 +11740,9 @@ public function getUsersInfo($tenant_id, $ids, string $contentType = self::conte * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\PageUsersInfoResponse|\FastComments\Client\Model\APIError|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getUsersInfoWithHttpInfo($tenant_id, $ids, string $contentType = self::contentTypes['getUsersInfo'][0]) + public function getUsersInfoWithHttpInfo($tenant_id, $ids) { - $request = $this->getUsersInfoRequest($tenant_id, $ids, $contentType); + $request = $this->getUsersInfoRequest($tenant_id, $ids); try { $options = $this->createHttpClientOption(); @@ -13426,88 +11769,27 @@ public function getUsersInfoWithHttpInfo($tenant_id, $ids, string $contentType = switch($statusCode) { case 200: - if ('\FastComments\Client\Model\PageUsersInfoResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\PageUsersInfoResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\PageUsersInfoResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\PageUsersInfoResponse', + $request, + $response, + ); case 422: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -13521,34 +11803,11 @@ public function getUsersInfoWithHttpInfo($tenant_id, $ids, string $contentType = ); } - $returnType = '\FastComments\Client\Model\PageUsersInfoResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\PageUsersInfoResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -13558,7 +11817,7 @@ public function getUsersInfoWithHttpInfo($tenant_id, $ids, string $contentType = $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 422: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -13566,7 +11825,7 @@ public function getUsersInfoWithHttpInfo($tenant_id, $ids, string $contentType = $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -13574,8 +11833,10 @@ public function getUsersInfoWithHttpInfo($tenant_id, $ids, string $contentType = $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -13592,9 +11853,9 @@ public function getUsersInfoWithHttpInfo($tenant_id, $ids, string $contentType = * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getUsersInfoAsync($tenant_id, $ids, string $contentType = self::contentTypes['getUsersInfo'][0]) + public function getUsersInfoAsync($tenant_id, $ids) { - return $this->getUsersInfoAsyncWithHttpInfo($tenant_id, $ids, $contentType) + return $this->getUsersInfoAsyncWithHttpInfo($tenant_id, $ids) ->then( function ($response) { return $response[0]; @@ -13614,10 +11875,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getUsersInfoAsyncWithHttpInfo($tenant_id, $ids, string $contentType = self::contentTypes['getUsersInfo'][0]) + public function getUsersInfoAsyncWithHttpInfo($tenant_id, $ids) { $returnType = '\FastComments\Client\Model\PageUsersInfoResponse'; - $request = $this->getUsersInfoRequest($tenant_id, $ids, $contentType); + $request = $this->getUsersInfoRequest($tenant_id, $ids); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -13665,9 +11926,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getUsersInfoRequest($tenant_id, $ids, string $contentType = self::contentTypes['getUsersInfo'][0]) + public function getUsersInfoRequest($tenant_id, $ids) { - + $contentType = self::contentTypes['getUsersInfo'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -13704,7 +11966,7 @@ public function getUsersInfoRequest($tenant_id, $ids, string $contentType = self // path params if ($tenant_id !== null) { $resourcePath = str_replace( - '{' . 'tenantId' . '}', + '{tenantId}', ObjectSerializer::toPathValue($tenant_id), $resourcePath ); @@ -13777,9 +12039,9 @@ public function getUsersInfoRequest($tenant_id, $ids, string $contentType = self * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetV1PageLikes|\FastComments\Client\Model\APIError */ - public function getV1PageLikes($tenant_id, $url_id, string $contentType = self::contentTypes['getV1PageLikes'][0]) + public function getV1PageLikes($tenant_id, $url_id) { - list($response) = $this->getV1PageLikesWithHttpInfo($tenant_id, $url_id, $contentType); + list($response) = $this->getV1PageLikesWithHttpInfo($tenant_id, $url_id); return $response; } @@ -13796,9 +12058,9 @@ public function getV1PageLikes($tenant_id, $url_id, string $contentType = self:: * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetV1PageLikes|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getV1PageLikesWithHttpInfo($tenant_id, $url_id, string $contentType = self::contentTypes['getV1PageLikes'][0]) + public function getV1PageLikesWithHttpInfo($tenant_id, $url_id) { - $request = $this->getV1PageLikesRequest($tenant_id, $url_id, $contentType); + $request = $this->getV1PageLikesRequest($tenant_id, $url_id); try { $options = $this->createHttpClientOption(); @@ -13821,65 +12083,25 @@ public function getV1PageLikesWithHttpInfo($tenant_id, $url_id, string $contentT } $statusCode = $response->getStatusCode(); - - - switch($statusCode) { - case 200: - if ('\FastComments\Client\Model\GetV1PageLikes' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetV1PageLikes' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetV1PageLikes', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetV1PageLikes', + $request, + $response, + ); + default: + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -13893,34 +12115,11 @@ public function getV1PageLikesWithHttpInfo($tenant_id, $url_id, string $contentT ); } - $returnType = '\FastComments\Client\Model\GetV1PageLikes'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetV1PageLikes', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -13930,7 +12129,7 @@ public function getV1PageLikesWithHttpInfo($tenant_id, $url_id, string $contentT $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -13938,8 +12137,10 @@ public function getV1PageLikesWithHttpInfo($tenant_id, $url_id, string $contentT $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -13956,9 +12157,9 @@ public function getV1PageLikesWithHttpInfo($tenant_id, $url_id, string $contentT * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getV1PageLikesAsync($tenant_id, $url_id, string $contentType = self::contentTypes['getV1PageLikes'][0]) + public function getV1PageLikesAsync($tenant_id, $url_id) { - return $this->getV1PageLikesAsyncWithHttpInfo($tenant_id, $url_id, $contentType) + return $this->getV1PageLikesAsyncWithHttpInfo($tenant_id, $url_id) ->then( function ($response) { return $response[0]; @@ -13978,10 +12179,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getV1PageLikesAsyncWithHttpInfo($tenant_id, $url_id, string $contentType = self::contentTypes['getV1PageLikes'][0]) + public function getV1PageLikesAsyncWithHttpInfo($tenant_id, $url_id) { $returnType = '\FastComments\Client\Model\GetV1PageLikes'; - $request = $this->getV1PageLikesRequest($tenant_id, $url_id, $contentType); + $request = $this->getV1PageLikesRequest($tenant_id, $url_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -14029,9 +12230,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getV1PageLikesRequest($tenant_id, $url_id, string $contentType = self::contentTypes['getV1PageLikes'][0]) + public function getV1PageLikesRequest($tenant_id, $url_id) { - + $contentType = self::contentTypes['getV1PageLikes'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -14068,7 +12270,7 @@ public function getV1PageLikesRequest($tenant_id, $url_id, string $contentType = // path params if ($tenant_id !== null) { $resourcePath = str_replace( - '{' . 'tenantId' . '}', + '{tenantId}', ObjectSerializer::toPathValue($tenant_id), $resourcePath ); @@ -14142,9 +12344,9 @@ public function getV1PageLikesRequest($tenant_id, $url_id, string $contentType = * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetV2PageReactUsersResponse|\FastComments\Client\Model\APIError */ - public function getV2PageReactUsers($tenant_id, $url_id, $id, string $contentType = self::contentTypes['getV2PageReactUsers'][0]) + public function getV2PageReactUsers($tenant_id, $url_id, $id) { - list($response) = $this->getV2PageReactUsersWithHttpInfo($tenant_id, $url_id, $id, $contentType); + list($response) = $this->getV2PageReactUsersWithHttpInfo($tenant_id, $url_id, $id); return $response; } @@ -14162,9 +12364,9 @@ public function getV2PageReactUsers($tenant_id, $url_id, $id, string $contentTyp * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetV2PageReactUsersResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getV2PageReactUsersWithHttpInfo($tenant_id, $url_id, $id, string $contentType = self::contentTypes['getV2PageReactUsers'][0]) + public function getV2PageReactUsersWithHttpInfo($tenant_id, $url_id, $id) { - $request = $this->getV2PageReactUsersRequest($tenant_id, $url_id, $id, $contentType); + $request = $this->getV2PageReactUsersRequest($tenant_id, $url_id, $id); try { $options = $this->createHttpClientOption(); @@ -14191,61 +12393,21 @@ public function getV2PageReactUsersWithHttpInfo($tenant_id, $url_id, $id, string switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetV2PageReactUsersResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetV2PageReactUsersResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetV2PageReactUsersResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetV2PageReactUsersResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -14259,34 +12421,11 @@ public function getV2PageReactUsersWithHttpInfo($tenant_id, $url_id, $id, string ); } - $returnType = '\FastComments\Client\Model\GetV2PageReactUsersResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetV2PageReactUsersResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -14296,7 +12435,7 @@ public function getV2PageReactUsersWithHttpInfo($tenant_id, $url_id, $id, string $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -14304,8 +12443,10 @@ public function getV2PageReactUsersWithHttpInfo($tenant_id, $url_id, $id, string $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -14323,9 +12464,9 @@ public function getV2PageReactUsersWithHttpInfo($tenant_id, $url_id, $id, string * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getV2PageReactUsersAsync($tenant_id, $url_id, $id, string $contentType = self::contentTypes['getV2PageReactUsers'][0]) + public function getV2PageReactUsersAsync($tenant_id, $url_id, $id) { - return $this->getV2PageReactUsersAsyncWithHttpInfo($tenant_id, $url_id, $id, $contentType) + return $this->getV2PageReactUsersAsyncWithHttpInfo($tenant_id, $url_id, $id) ->then( function ($response) { return $response[0]; @@ -14346,10 +12487,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getV2PageReactUsersAsyncWithHttpInfo($tenant_id, $url_id, $id, string $contentType = self::contentTypes['getV2PageReactUsers'][0]) + public function getV2PageReactUsersAsyncWithHttpInfo($tenant_id, $url_id, $id) { $returnType = '\FastComments\Client\Model\GetV2PageReactUsersResponse'; - $request = $this->getV2PageReactUsersRequest($tenant_id, $url_id, $id, $contentType); + $request = $this->getV2PageReactUsersRequest($tenant_id, $url_id, $id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -14398,9 +12539,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getV2PageReactUsersRequest($tenant_id, $url_id, $id, string $contentType = self::contentTypes['getV2PageReactUsers'][0]) + public function getV2PageReactUsersRequest($tenant_id, $url_id, $id) { - + $contentType = self::contentTypes['getV2PageReactUsers'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -14453,7 +12595,7 @@ public function getV2PageReactUsersRequest($tenant_id, $url_id, $id, string $con // path params if ($tenant_id !== null) { $resourcePath = str_replace( - '{' . 'tenantId' . '}', + '{tenantId}', ObjectSerializer::toPathValue($tenant_id), $resourcePath ); @@ -14526,9 +12668,9 @@ public function getV2PageReactUsersRequest($tenant_id, $url_id, $id, string $con * @throws \InvalidArgumentException * @return \FastComments\Client\Model\GetV2PageReacts|\FastComments\Client\Model\APIError */ - public function getV2PageReacts($tenant_id, $url_id, string $contentType = self::contentTypes['getV2PageReacts'][0]) + public function getV2PageReacts($tenant_id, $url_id) { - list($response) = $this->getV2PageReactsWithHttpInfo($tenant_id, $url_id, $contentType); + list($response) = $this->getV2PageReactsWithHttpInfo($tenant_id, $url_id); return $response; } @@ -14545,9 +12687,9 @@ public function getV2PageReacts($tenant_id, $url_id, string $contentType = self: * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\GetV2PageReacts|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function getV2PageReactsWithHttpInfo($tenant_id, $url_id, string $contentType = self::contentTypes['getV2PageReacts'][0]) + public function getV2PageReactsWithHttpInfo($tenant_id, $url_id) { - $request = $this->getV2PageReactsRequest($tenant_id, $url_id, $contentType); + $request = $this->getV2PageReactsRequest($tenant_id, $url_id); try { $options = $this->createHttpClientOption(); @@ -14574,61 +12716,21 @@ public function getV2PageReactsWithHttpInfo($tenant_id, $url_id, string $content switch($statusCode) { case 200: - if ('\FastComments\Client\Model\GetV2PageReacts' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\GetV2PageReacts' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\GetV2PageReacts', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetV2PageReacts', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -14642,34 +12744,11 @@ public function getV2PageReactsWithHttpInfo($tenant_id, $url_id, string $content ); } - $returnType = '\FastComments\Client\Model\GetV2PageReacts'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\GetV2PageReacts', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -14679,7 +12758,7 @@ public function getV2PageReactsWithHttpInfo($tenant_id, $url_id, string $content $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -14687,8 +12766,10 @@ public function getV2PageReactsWithHttpInfo($tenant_id, $url_id, string $content $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -14705,9 +12786,9 @@ public function getV2PageReactsWithHttpInfo($tenant_id, $url_id, string $content * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getV2PageReactsAsync($tenant_id, $url_id, string $contentType = self::contentTypes['getV2PageReacts'][0]) + public function getV2PageReactsAsync($tenant_id, $url_id) { - return $this->getV2PageReactsAsyncWithHttpInfo($tenant_id, $url_id, $contentType) + return $this->getV2PageReactsAsyncWithHttpInfo($tenant_id, $url_id) ->then( function ($response) { return $response[0]; @@ -14727,10 +12808,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getV2PageReactsAsyncWithHttpInfo($tenant_id, $url_id, string $contentType = self::contentTypes['getV2PageReacts'][0]) + public function getV2PageReactsAsyncWithHttpInfo($tenant_id, $url_id) { $returnType = '\FastComments\Client\Model\GetV2PageReacts'; - $request = $this->getV2PageReactsRequest($tenant_id, $url_id, $contentType); + $request = $this->getV2PageReactsRequest($tenant_id, $url_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -14778,9 +12859,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getV2PageReactsRequest($tenant_id, $url_id, string $contentType = self::contentTypes['getV2PageReacts'][0]) + public function getV2PageReactsRequest($tenant_id, $url_id) { - + $contentType = self::contentTypes['getV2PageReacts'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -14817,7 +12899,7 @@ public function getV2PageReactsRequest($tenant_id, $url_id, string $contentType // path params if ($tenant_id !== null) { $resourcePath = str_replace( - '{' . 'tenantId' . '}', + '{tenantId}', ObjectSerializer::toPathValue($tenant_id), $resourcePath ); @@ -14882,6 +12964,8 @@ public function getV2PageReactsRequest($tenant_id, $url_id, string $contentType * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $comment_id comment_id (required) * @param string $broadcast_id broadcast_id (required) @@ -14892,9 +12976,9 @@ public function getV2PageReactsRequest($tenant_id, $url_id, string $contentType * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError */ - public function lockComment($tenant_id, $comment_id, $broadcast_id, $sso = null, string $contentType = self::contentTypes['lockComment'][0]) + public function lockComment($tenant_id, $comment_id, $broadcast_id, $sso = null) { - list($response) = $this->lockCommentWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $sso, $contentType); + list($response) = $this->lockCommentWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $sso); return $response; } @@ -14903,6 +12987,8 @@ public function lockComment($tenant_id, $comment_id, $broadcast_id, $sso = null, * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param string $broadcast_id (required) @@ -14913,9 +12999,9 @@ public function lockComment($tenant_id, $comment_id, $broadcast_id, $sso = null, * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function lockCommentWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $sso = null, string $contentType = self::contentTypes['lockComment'][0]) + public function lockCommentWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $sso = null) { - $request = $this->lockCommentRequest($tenant_id, $comment_id, $broadcast_id, $sso, $contentType); + $request = $this->lockCommentRequest($tenant_id, $comment_id, $broadcast_id, $sso); try { $options = $this->createHttpClientOption(); @@ -14942,61 +13028,21 @@ public function lockCommentWithHttpInfo($tenant_id, $comment_id, $broadcast_id, switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APIEmptyResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIEmptyResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIEmptyResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -15010,34 +13056,11 @@ public function lockCommentWithHttpInfo($tenant_id, $comment_id, $broadcast_id, ); } - $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -15047,7 +13070,7 @@ public function lockCommentWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -15055,8 +13078,10 @@ public function lockCommentWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -15066,6 +13091,8 @@ public function lockCommentWithHttpInfo($tenant_id, $comment_id, $broadcast_id, * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param string $broadcast_id (required) @@ -15075,9 +13102,9 @@ public function lockCommentWithHttpInfo($tenant_id, $comment_id, $broadcast_id, * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function lockCommentAsync($tenant_id, $comment_id, $broadcast_id, $sso = null, string $contentType = self::contentTypes['lockComment'][0]) + public function lockCommentAsync($tenant_id, $comment_id, $broadcast_id, $sso = null) { - return $this->lockCommentAsyncWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $sso, $contentType) + return $this->lockCommentAsyncWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $sso) ->then( function ($response) { return $response[0]; @@ -15090,6 +13117,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param string $broadcast_id (required) @@ -15099,10 +13128,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function lockCommentAsyncWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $sso = null, string $contentType = self::contentTypes['lockComment'][0]) + public function lockCommentAsyncWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $sso = null) { $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - $request = $this->lockCommentRequest($tenant_id, $comment_id, $broadcast_id, $sso, $contentType); + $request = $this->lockCommentRequest($tenant_id, $comment_id, $broadcast_id, $sso); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -15143,6 +13172,8 @@ function ($exception) { /** * Create request for operation 'lockComment' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param string $broadcast_id (required) @@ -15152,9 +13183,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function lockCommentRequest($tenant_id, $comment_id, $broadcast_id, $sso = null, string $contentType = self::contentTypes['lockComment'][0]) + public function lockCommentRequest($tenant_id, $comment_id, $broadcast_id, $sso = null) { - + $contentType = self::contentTypes['lockComment'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -15208,7 +13240,7 @@ public function lockCommentRequest($tenant_id, $comment_id, $broadcast_id, $sso // path params if ($tenant_id !== null) { $resourcePath = str_replace( - '{' . 'tenantId' . '}', + '{tenantId}', ObjectSerializer::toPathValue($tenant_id), $resourcePath ); @@ -15216,7 +13248,7 @@ public function lockCommentRequest($tenant_id, $comment_id, $broadcast_id, $sso // path params if ($comment_id !== null) { $resourcePath = str_replace( - '{' . 'commentId' . '}', + '{commentId}', ObjectSerializer::toPathValue($comment_id), $resourcePath ); @@ -15287,9 +13319,9 @@ public function lockCommentRequest($tenant_id, $comment_id, $broadcast_id, $sso * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APIEmptyResponse */ - public function logoutPublic(string $contentType = self::contentTypes['logoutPublic'][0]) + public function logoutPublic() { - list($response) = $this->logoutPublicWithHttpInfo($contentType); + list($response) = $this->logoutPublicWithHttpInfo(); return $response; } @@ -15304,9 +13336,9 @@ public function logoutPublic(string $contentType = self::contentTypes['logoutPub * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APIEmptyResponse, HTTP status code, HTTP response headers (array of strings) */ - public function logoutPublicWithHttpInfo(string $contentType = self::contentTypes['logoutPublic'][0]) + public function logoutPublicWithHttpInfo() { - $request = $this->logoutPublicRequest($contentType); + $request = $this->logoutPublicRequest(); try { $options = $this->createHttpClientOption(); @@ -15333,34 +13365,15 @@ public function logoutPublicWithHttpInfo(string $contentType = self::contentType switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APIEmptyResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIEmptyResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIEmptyResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -15374,34 +13387,11 @@ public function logoutPublicWithHttpInfo(string $contentType = self::contentType ); } - $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -15411,8 +13401,10 @@ public function logoutPublicWithHttpInfo(string $contentType = self::contentType $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -15427,9 +13419,9 @@ public function logoutPublicWithHttpInfo(string $contentType = self::contentType * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function logoutPublicAsync(string $contentType = self::contentTypes['logoutPublic'][0]) + public function logoutPublicAsync() { - return $this->logoutPublicAsyncWithHttpInfo($contentType) + return $this->logoutPublicAsyncWithHttpInfo() ->then( function ($response) { return $response[0]; @@ -15447,10 +13439,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function logoutPublicAsyncWithHttpInfo(string $contentType = self::contentTypes['logoutPublic'][0]) + public function logoutPublicAsyncWithHttpInfo() { $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - $request = $this->logoutPublicRequest($contentType); + $request = $this->logoutPublicRequest(); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -15496,9 +13488,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function logoutPublicRequest(string $contentType = self::contentTypes['logoutPublic'][0]) + public function logoutPublicRequest() { - + $contentType = self::contentTypes['logoutPublic'][0]; + $resourcePath = '/auth/logout'; $formParams = []; @@ -15569,6 +13562,8 @@ public function logoutPublicRequest(string $contentType = self::contentTypes['lo * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $comment_id comment_id (required) * @param string $broadcast_id broadcast_id (required) @@ -15579,9 +13574,9 @@ public function logoutPublicRequest(string $contentType = self::contentTypes['lo * @throws \InvalidArgumentException * @return \FastComments\Client\Model\ChangeCommentPinStatusResponse|\FastComments\Client\Model\APIError */ - public function pinComment($tenant_id, $comment_id, $broadcast_id, $sso = null, string $contentType = self::contentTypes['pinComment'][0]) + public function pinComment($tenant_id, $comment_id, $broadcast_id, $sso = null) { - list($response) = $this->pinCommentWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $sso, $contentType); + list($response) = $this->pinCommentWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $sso); return $response; } @@ -15590,6 +13585,8 @@ public function pinComment($tenant_id, $comment_id, $broadcast_id, $sso = null, * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param string $broadcast_id (required) @@ -15600,9 +13597,9 @@ public function pinComment($tenant_id, $comment_id, $broadcast_id, $sso = null, * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\ChangeCommentPinStatusResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function pinCommentWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $sso = null, string $contentType = self::contentTypes['pinComment'][0]) + public function pinCommentWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $sso = null) { - $request = $this->pinCommentRequest($tenant_id, $comment_id, $broadcast_id, $sso, $contentType); + $request = $this->pinCommentRequest($tenant_id, $comment_id, $broadcast_id, $sso); try { $options = $this->createHttpClientOption(); @@ -15629,61 +13626,21 @@ public function pinCommentWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $ switch($statusCode) { case 200: - if ('\FastComments\Client\Model\ChangeCommentPinStatusResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\ChangeCommentPinStatusResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\ChangeCommentPinStatusResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\ChangeCommentPinStatusResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -15697,34 +13654,11 @@ public function pinCommentWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $ ); } - $returnType = '\FastComments\Client\Model\ChangeCommentPinStatusResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\ChangeCommentPinStatusResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -15734,7 +13668,7 @@ public function pinCommentWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -15742,8 +13676,10 @@ public function pinCommentWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -15753,6 +13689,8 @@ public function pinCommentWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $ * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param string $broadcast_id (required) @@ -15762,9 +13700,9 @@ public function pinCommentWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $ * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function pinCommentAsync($tenant_id, $comment_id, $broadcast_id, $sso = null, string $contentType = self::contentTypes['pinComment'][0]) + public function pinCommentAsync($tenant_id, $comment_id, $broadcast_id, $sso = null) { - return $this->pinCommentAsyncWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $sso, $contentType) + return $this->pinCommentAsyncWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $sso) ->then( function ($response) { return $response[0]; @@ -15777,6 +13715,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param string $broadcast_id (required) @@ -15786,10 +13726,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function pinCommentAsyncWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $sso = null, string $contentType = self::contentTypes['pinComment'][0]) + public function pinCommentAsyncWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $sso = null) { $returnType = '\FastComments\Client\Model\ChangeCommentPinStatusResponse'; - $request = $this->pinCommentRequest($tenant_id, $comment_id, $broadcast_id, $sso, $contentType); + $request = $this->pinCommentRequest($tenant_id, $comment_id, $broadcast_id, $sso); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -15830,6 +13770,8 @@ function ($exception) { /** * Create request for operation 'pinComment' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param string $broadcast_id (required) @@ -15839,9 +13781,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function pinCommentRequest($tenant_id, $comment_id, $broadcast_id, $sso = null, string $contentType = self::contentTypes['pinComment'][0]) + public function pinCommentRequest($tenant_id, $comment_id, $broadcast_id, $sso = null) { - + $contentType = self::contentTypes['pinComment'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -15895,7 +13838,7 @@ public function pinCommentRequest($tenant_id, $comment_id, $broadcast_id, $sso = // path params if ($tenant_id !== null) { $resourcePath = str_replace( - '{' . 'tenantId' . '}', + '{tenantId}', ObjectSerializer::toPathValue($tenant_id), $resourcePath ); @@ -15903,7 +13846,7 @@ public function pinCommentRequest($tenant_id, $comment_id, $broadcast_id, $sso = // path params if ($comment_id !== null) { $resourcePath = str_replace( - '{' . 'commentId' . '}', + '{commentId}', ObjectSerializer::toPathValue($comment_id), $resourcePath ); @@ -15968,6 +13911,8 @@ public function pinCommentRequest($tenant_id, $comment_id, $broadcast_id, $sso = * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $post_id post_id (required) * @param \FastComments\Client\Model\ReactBodyParams $react_body_params react_body_params (required) @@ -15980,9 +13925,9 @@ public function pinCommentRequest($tenant_id, $comment_id, $broadcast_id, $sso = * @throws \InvalidArgumentException * @return \FastComments\Client\Model\ReactFeedPostResponse|\FastComments\Client\Model\APIError */ - public function reactFeedPostPublic($tenant_id, $post_id, $react_body_params, $is_undo = null, $broadcast_id = null, $sso = null, string $contentType = self::contentTypes['reactFeedPostPublic'][0]) + public function reactFeedPostPublic($tenant_id, $post_id, $react_body_params, array $options = []) { - list($response) = $this->reactFeedPostPublicWithHttpInfo($tenant_id, $post_id, $react_body_params, $is_undo, $broadcast_id, $sso, $contentType); + list($response) = $this->reactFeedPostPublicWithHttpInfo($tenant_id, $post_id, $react_body_params, $options); return $response; } @@ -15991,6 +13936,8 @@ public function reactFeedPostPublic($tenant_id, $post_id, $react_body_params, $i * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $post_id (required) * @param \FastComments\Client\Model\ReactBodyParams $react_body_params (required) @@ -16003,9 +13950,9 @@ public function reactFeedPostPublic($tenant_id, $post_id, $react_body_params, $i * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\ReactFeedPostResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function reactFeedPostPublicWithHttpInfo($tenant_id, $post_id, $react_body_params, $is_undo = null, $broadcast_id = null, $sso = null, string $contentType = self::contentTypes['reactFeedPostPublic'][0]) + public function reactFeedPostPublicWithHttpInfo($tenant_id, $post_id, $react_body_params, array $options = []) { - $request = $this->reactFeedPostPublicRequest($tenant_id, $post_id, $react_body_params, $is_undo, $broadcast_id, $sso, $contentType); + $request = $this->reactFeedPostPublicRequest($tenant_id, $post_id, $react_body_params, $options); try { $options = $this->createHttpClientOption(); @@ -16032,61 +13979,21 @@ public function reactFeedPostPublicWithHttpInfo($tenant_id, $post_id, $react_bod switch($statusCode) { case 200: - if ('\FastComments\Client\Model\ReactFeedPostResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\ReactFeedPostResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\ReactFeedPostResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\ReactFeedPostResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -16100,34 +14007,11 @@ public function reactFeedPostPublicWithHttpInfo($tenant_id, $post_id, $react_bod ); } - $returnType = '\FastComments\Client\Model\ReactFeedPostResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\ReactFeedPostResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -16137,7 +14021,7 @@ public function reactFeedPostPublicWithHttpInfo($tenant_id, $post_id, $react_bod $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -16145,8 +14029,10 @@ public function reactFeedPostPublicWithHttpInfo($tenant_id, $post_id, $react_bod $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -16156,6 +14042,8 @@ public function reactFeedPostPublicWithHttpInfo($tenant_id, $post_id, $react_bod * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $post_id (required) * @param \FastComments\Client\Model\ReactBodyParams $react_body_params (required) @@ -16167,9 +14055,9 @@ public function reactFeedPostPublicWithHttpInfo($tenant_id, $post_id, $react_bod * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function reactFeedPostPublicAsync($tenant_id, $post_id, $react_body_params, $is_undo = null, $broadcast_id = null, $sso = null, string $contentType = self::contentTypes['reactFeedPostPublic'][0]) + public function reactFeedPostPublicAsync($tenant_id, $post_id, $react_body_params, array $options = []) { - return $this->reactFeedPostPublicAsyncWithHttpInfo($tenant_id, $post_id, $react_body_params, $is_undo, $broadcast_id, $sso, $contentType) + return $this->reactFeedPostPublicAsyncWithHttpInfo($tenant_id, $post_id, $react_body_params, $options) ->then( function ($response) { return $response[0]; @@ -16182,6 +14070,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $post_id (required) * @param \FastComments\Client\Model\ReactBodyParams $react_body_params (required) @@ -16193,10 +14083,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function reactFeedPostPublicAsyncWithHttpInfo($tenant_id, $post_id, $react_body_params, $is_undo = null, $broadcast_id = null, $sso = null, string $contentType = self::contentTypes['reactFeedPostPublic'][0]) + public function reactFeedPostPublicAsyncWithHttpInfo($tenant_id, $post_id, $react_body_params, array $options = []) { $returnType = '\FastComments\Client\Model\ReactFeedPostResponse'; - $request = $this->reactFeedPostPublicRequest($tenant_id, $post_id, $react_body_params, $is_undo, $broadcast_id, $sso, $contentType); + $request = $this->reactFeedPostPublicRequest($tenant_id, $post_id, $react_body_params, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -16237,6 +14127,8 @@ function ($exception) { /** * Create request for operation 'reactFeedPostPublic' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $post_id (required) * @param \FastComments\Client\Model\ReactBodyParams $react_body_params (required) @@ -16248,9 +14140,14 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function reactFeedPostPublicRequest($tenant_id, $post_id, $react_body_params, $is_undo = null, $broadcast_id = null, $sso = null, string $contentType = self::contentTypes['reactFeedPostPublic'][0]) + public function reactFeedPostPublicRequest($tenant_id, $post_id, $react_body_params, array $options = []) { - + // unbox the optional parameters and request options from the $options array + $is_undo = array_key_exists('is_undo', $options) ? $options['is_undo'] : null; + $broadcast_id = array_key_exists('broadcast_id', $options) ? $options['broadcast_id'] : null; + $sso = array_key_exists('sso', $options) ? $options['sso'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['reactFeedPostPublic'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -16315,7 +14212,7 @@ public function reactFeedPostPublicRequest($tenant_id, $post_id, $react_body_par // path params if ($tenant_id !== null) { $resourcePath = str_replace( - '{' . 'tenantId' . '}', + '{tenantId}', ObjectSerializer::toPathValue($tenant_id), $resourcePath ); @@ -16323,7 +14220,7 @@ public function reactFeedPostPublicRequest($tenant_id, $post_id, $react_body_par // path params if ($post_id !== null) { $resourcePath = str_replace( - '{' . 'postId' . '}', + '{postId}', ObjectSerializer::toPathValue($post_id), $resourcePath ); @@ -16395,6 +14292,8 @@ public function reactFeedPostPublicRequest($tenant_id, $post_id, $react_body_par * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string|null $sso sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['resetUserNotificationCount'] to see the possible values for this operation @@ -16403,9 +14302,9 @@ public function reactFeedPostPublicRequest($tenant_id, $post_id, $react_body_par * @throws \InvalidArgumentException * @return \FastComments\Client\Model\ResetUserNotificationsResponse|\FastComments\Client\Model\APIError */ - public function resetUserNotificationCount($tenant_id, $sso = null, string $contentType = self::contentTypes['resetUserNotificationCount'][0]) + public function resetUserNotificationCount($tenant_id, $sso = null) { - list($response) = $this->resetUserNotificationCountWithHttpInfo($tenant_id, $sso, $contentType); + list($response) = $this->resetUserNotificationCountWithHttpInfo($tenant_id, $sso); return $response; } @@ -16414,6 +14313,8 @@ public function resetUserNotificationCount($tenant_id, $sso = null, string $cont * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['resetUserNotificationCount'] to see the possible values for this operation @@ -16422,9 +14323,9 @@ public function resetUserNotificationCount($tenant_id, $sso = null, string $cont * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\ResetUserNotificationsResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function resetUserNotificationCountWithHttpInfo($tenant_id, $sso = null, string $contentType = self::contentTypes['resetUserNotificationCount'][0]) + public function resetUserNotificationCountWithHttpInfo($tenant_id, $sso = null) { - $request = $this->resetUserNotificationCountRequest($tenant_id, $sso, $contentType); + $request = $this->resetUserNotificationCountRequest($tenant_id, $sso); try { $options = $this->createHttpClientOption(); @@ -16451,61 +14352,21 @@ public function resetUserNotificationCountWithHttpInfo($tenant_id, $sso = null, switch($statusCode) { case 200: - if ('\FastComments\Client\Model\ResetUserNotificationsResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\ResetUserNotificationsResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\ResetUserNotificationsResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\ResetUserNotificationsResponse', + $request, + $response, + ); + default: + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -16519,34 +14380,11 @@ public function resetUserNotificationCountWithHttpInfo($tenant_id, $sso = null, ); } - $returnType = '\FastComments\Client\Model\ResetUserNotificationsResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\ResetUserNotificationsResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -16556,7 +14394,7 @@ public function resetUserNotificationCountWithHttpInfo($tenant_id, $sso = null, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -16564,8 +14402,10 @@ public function resetUserNotificationCountWithHttpInfo($tenant_id, $sso = null, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -16575,6 +14415,8 @@ public function resetUserNotificationCountWithHttpInfo($tenant_id, $sso = null, * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['resetUserNotificationCount'] to see the possible values for this operation @@ -16582,9 +14424,9 @@ public function resetUserNotificationCountWithHttpInfo($tenant_id, $sso = null, * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function resetUserNotificationCountAsync($tenant_id, $sso = null, string $contentType = self::contentTypes['resetUserNotificationCount'][0]) + public function resetUserNotificationCountAsync($tenant_id, $sso = null) { - return $this->resetUserNotificationCountAsyncWithHttpInfo($tenant_id, $sso, $contentType) + return $this->resetUserNotificationCountAsyncWithHttpInfo($tenant_id, $sso) ->then( function ($response) { return $response[0]; @@ -16597,6 +14439,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['resetUserNotificationCount'] to see the possible values for this operation @@ -16604,10 +14448,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function resetUserNotificationCountAsyncWithHttpInfo($tenant_id, $sso = null, string $contentType = self::contentTypes['resetUserNotificationCount'][0]) + public function resetUserNotificationCountAsyncWithHttpInfo($tenant_id, $sso = null) { $returnType = '\FastComments\Client\Model\ResetUserNotificationsResponse'; - $request = $this->resetUserNotificationCountRequest($tenant_id, $sso, $contentType); + $request = $this->resetUserNotificationCountRequest($tenant_id, $sso); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -16648,6 +14492,8 @@ function ($exception) { /** * Create request for operation 'resetUserNotificationCount' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $sso (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['resetUserNotificationCount'] to see the possible values for this operation @@ -16655,9 +14501,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function resetUserNotificationCountRequest($tenant_id, $sso = null, string $contentType = self::contentTypes['resetUserNotificationCount'][0]) + public function resetUserNotificationCountRequest($tenant_id, $sso = null) { - + $contentType = self::contentTypes['resetUserNotificationCount'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -16754,6 +14601,8 @@ public function resetUserNotificationCountRequest($tenant_id, $sso = null, strin * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string|null $after_id after_id (optional) * @param int|null $after_created_at after_created_at (optional) @@ -16767,9 +14616,9 @@ public function resetUserNotificationCountRequest($tenant_id, $sso = null, strin * @throws \InvalidArgumentException * @return \FastComments\Client\Model\ResetUserNotificationsResponse|\FastComments\Client\Model\APIError */ - public function resetUserNotifications($tenant_id, $after_id = null, $after_created_at = null, $unread_only = null, $dm_only = null, $no_dm = null, $sso = null, string $contentType = self::contentTypes['resetUserNotifications'][0]) + public function resetUserNotifications($tenant_id, array $options = []) { - list($response) = $this->resetUserNotificationsWithHttpInfo($tenant_id, $after_id, $after_created_at, $unread_only, $dm_only, $no_dm, $sso, $contentType); + list($response) = $this->resetUserNotificationsWithHttpInfo($tenant_id, $options); return $response; } @@ -16778,6 +14627,8 @@ public function resetUserNotifications($tenant_id, $after_id = null, $after_crea * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $after_id (optional) * @param int|null $after_created_at (optional) @@ -16791,9 +14642,9 @@ public function resetUserNotifications($tenant_id, $after_id = null, $after_crea * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\ResetUserNotificationsResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function resetUserNotificationsWithHttpInfo($tenant_id, $after_id = null, $after_created_at = null, $unread_only = null, $dm_only = null, $no_dm = null, $sso = null, string $contentType = self::contentTypes['resetUserNotifications'][0]) + public function resetUserNotificationsWithHttpInfo($tenant_id, array $options = []) { - $request = $this->resetUserNotificationsRequest($tenant_id, $after_id, $after_created_at, $unread_only, $dm_only, $no_dm, $sso, $contentType); + $request = $this->resetUserNotificationsRequest($tenant_id, $options); try { $options = $this->createHttpClientOption(); @@ -16820,61 +14671,21 @@ public function resetUserNotificationsWithHttpInfo($tenant_id, $after_id = null, switch($statusCode) { case 200: - if ('\FastComments\Client\Model\ResetUserNotificationsResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\ResetUserNotificationsResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\ResetUserNotificationsResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\ResetUserNotificationsResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -16888,34 +14699,11 @@ public function resetUserNotificationsWithHttpInfo($tenant_id, $after_id = null, ); } - $returnType = '\FastComments\Client\Model\ResetUserNotificationsResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\ResetUserNotificationsResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -16925,7 +14713,7 @@ public function resetUserNotificationsWithHttpInfo($tenant_id, $after_id = null, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -16933,8 +14721,10 @@ public function resetUserNotificationsWithHttpInfo($tenant_id, $after_id = null, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -16944,6 +14734,8 @@ public function resetUserNotificationsWithHttpInfo($tenant_id, $after_id = null, * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $after_id (optional) * @param int|null $after_created_at (optional) @@ -16956,9 +14748,9 @@ public function resetUserNotificationsWithHttpInfo($tenant_id, $after_id = null, * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function resetUserNotificationsAsync($tenant_id, $after_id = null, $after_created_at = null, $unread_only = null, $dm_only = null, $no_dm = null, $sso = null, string $contentType = self::contentTypes['resetUserNotifications'][0]) + public function resetUserNotificationsAsync($tenant_id, array $options = []) { - return $this->resetUserNotificationsAsyncWithHttpInfo($tenant_id, $after_id, $after_created_at, $unread_only, $dm_only, $no_dm, $sso, $contentType) + return $this->resetUserNotificationsAsyncWithHttpInfo($tenant_id, $options) ->then( function ($response) { return $response[0]; @@ -16971,6 +14763,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $after_id (optional) * @param int|null $after_created_at (optional) @@ -16983,10 +14777,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function resetUserNotificationsAsyncWithHttpInfo($tenant_id, $after_id = null, $after_created_at = null, $unread_only = null, $dm_only = null, $no_dm = null, $sso = null, string $contentType = self::contentTypes['resetUserNotifications'][0]) + public function resetUserNotificationsAsyncWithHttpInfo($tenant_id, array $options = []) { $returnType = '\FastComments\Client\Model\ResetUserNotificationsResponse'; - $request = $this->resetUserNotificationsRequest($tenant_id, $after_id, $after_created_at, $unread_only, $dm_only, $no_dm, $sso, $contentType); + $request = $this->resetUserNotificationsRequest($tenant_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -17027,6 +14821,8 @@ function ($exception) { /** * Create request for operation 'resetUserNotifications' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string|null $after_id (optional) * @param int|null $after_created_at (optional) @@ -17039,9 +14835,17 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function resetUserNotificationsRequest($tenant_id, $after_id = null, $after_created_at = null, $unread_only = null, $dm_only = null, $no_dm = null, $sso = null, string $contentType = self::contentTypes['resetUserNotifications'][0]) - { - + public function resetUserNotificationsRequest($tenant_id, array $options = []) + { + // unbox the optional parameters and request options from the $options array + $after_id = array_key_exists('after_id', $options) ? $options['after_id'] : null; + $after_created_at = array_key_exists('after_created_at', $options) ? $options['after_created_at'] : null; + $unread_only = array_key_exists('unread_only', $options) ? $options['unread_only'] : null; + $dm_only = array_key_exists('dm_only', $options) ? $options['dm_only'] : null; + $no_dm = array_key_exists('no_dm', $options) ? $options['no_dm'] : null; + $sso = array_key_exists('sso', $options) ? $options['sso'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['resetUserNotifications'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -17188,6 +14992,8 @@ public function resetUserNotificationsRequest($tenant_id, $after_id = null, $aft * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $url_id url_id (required) * @param string|null $username_starts_with username_starts_with (optional) @@ -17200,9 +15006,9 @@ public function resetUserNotificationsRequest($tenant_id, $after_id = null, $aft * @throws \InvalidArgumentException * @return \FastComments\Client\Model\SearchUsersResult|\FastComments\Client\Model\APIError */ - public function searchUsers($tenant_id, $url_id, $username_starts_with = null, $mention_group_ids = null, $sso = null, $search_section = null, string $contentType = self::contentTypes['searchUsers'][0]) + public function searchUsers($tenant_id, $url_id, array $options = []) { - list($response) = $this->searchUsersWithHttpInfo($tenant_id, $url_id, $username_starts_with, $mention_group_ids, $sso, $search_section, $contentType); + list($response) = $this->searchUsersWithHttpInfo($tenant_id, $url_id, $options); return $response; } @@ -17211,6 +15017,8 @@ public function searchUsers($tenant_id, $url_id, $username_starts_with = null, $ * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $url_id (required) * @param string|null $username_starts_with (optional) @@ -17223,9 +15031,9 @@ public function searchUsers($tenant_id, $url_id, $username_starts_with = null, $ * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\SearchUsersResult|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function searchUsersWithHttpInfo($tenant_id, $url_id, $username_starts_with = null, $mention_group_ids = null, $sso = null, $search_section = null, string $contentType = self::contentTypes['searchUsers'][0]) + public function searchUsersWithHttpInfo($tenant_id, $url_id, array $options = []) { - $request = $this->searchUsersRequest($tenant_id, $url_id, $username_starts_with, $mention_group_ids, $sso, $search_section, $contentType); + $request = $this->searchUsersRequest($tenant_id, $url_id, $options); try { $options = $this->createHttpClientOption(); @@ -17252,61 +15060,21 @@ public function searchUsersWithHttpInfo($tenant_id, $url_id, $username_starts_wi switch($statusCode) { case 200: - if ('\FastComments\Client\Model\SearchUsersResult' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\SearchUsersResult' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\SearchUsersResult', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\SearchUsersResult', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -17320,34 +15088,11 @@ public function searchUsersWithHttpInfo($tenant_id, $url_id, $username_starts_wi ); } - $returnType = '\FastComments\Client\Model\SearchUsersResult'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\SearchUsersResult', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -17357,7 +15102,7 @@ public function searchUsersWithHttpInfo($tenant_id, $url_id, $username_starts_wi $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -17365,8 +15110,10 @@ public function searchUsersWithHttpInfo($tenant_id, $url_id, $username_starts_wi $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -17376,6 +15123,8 @@ public function searchUsersWithHttpInfo($tenant_id, $url_id, $username_starts_wi * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $url_id (required) * @param string|null $username_starts_with (optional) @@ -17387,9 +15136,9 @@ public function searchUsersWithHttpInfo($tenant_id, $url_id, $username_starts_wi * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function searchUsersAsync($tenant_id, $url_id, $username_starts_with = null, $mention_group_ids = null, $sso = null, $search_section = null, string $contentType = self::contentTypes['searchUsers'][0]) + public function searchUsersAsync($tenant_id, $url_id, array $options = []) { - return $this->searchUsersAsyncWithHttpInfo($tenant_id, $url_id, $username_starts_with, $mention_group_ids, $sso, $search_section, $contentType) + return $this->searchUsersAsyncWithHttpInfo($tenant_id, $url_id, $options) ->then( function ($response) { return $response[0]; @@ -17402,6 +15151,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $url_id (required) * @param string|null $username_starts_with (optional) @@ -17413,10 +15164,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function searchUsersAsyncWithHttpInfo($tenant_id, $url_id, $username_starts_with = null, $mention_group_ids = null, $sso = null, $search_section = null, string $contentType = self::contentTypes['searchUsers'][0]) + public function searchUsersAsyncWithHttpInfo($tenant_id, $url_id, array $options = []) { $returnType = '\FastComments\Client\Model\SearchUsersResult'; - $request = $this->searchUsersRequest($tenant_id, $url_id, $username_starts_with, $mention_group_ids, $sso, $search_section, $contentType); + $request = $this->searchUsersRequest($tenant_id, $url_id, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -17457,6 +15208,8 @@ function ($exception) { /** * Create request for operation 'searchUsers' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $url_id (required) * @param string|null $username_starts_with (optional) @@ -17468,9 +15221,15 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function searchUsersRequest($tenant_id, $url_id, $username_starts_with = null, $mention_group_ids = null, $sso = null, $search_section = null, string $contentType = self::contentTypes['searchUsers'][0]) + public function searchUsersRequest($tenant_id, $url_id, array $options = []) { - + // unbox the optional parameters and request options from the $options array + $username_starts_with = array_key_exists('username_starts_with', $options) ? $options['username_starts_with'] : null; + $mention_group_ids = array_key_exists('mention_group_ids', $options) ? $options['mention_group_ids'] : null; + $sso = array_key_exists('sso', $options) ? $options['sso'] : null; + $search_section = array_key_exists('search_section', $options) ? $options['search_section'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['searchUsers'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -17547,7 +15306,7 @@ public function searchUsersRequest($tenant_id, $url_id, $username_starts_with = // path params if ($tenant_id !== null) { $resourcePath = str_replace( - '{' . 'tenantId' . '}', + '{tenantId}', ObjectSerializer::toPathValue($tenant_id), $resourcePath ); @@ -17612,6 +15371,8 @@ public function searchUsersRequest($tenant_id, $url_id, $username_starts_with = * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $comment_id comment_id (required) * @param string $broadcast_id broadcast_id (required) @@ -17624,9 +15385,9 @@ public function searchUsersRequest($tenant_id, $url_id, $username_starts_with = * @throws \InvalidArgumentException * @return \FastComments\Client\Model\PublicAPISetCommentTextResponse|\FastComments\Client\Model\APIError */ - public function setCommentText($tenant_id, $comment_id, $broadcast_id, $comment_text_update_request, $edit_key = null, $sso = null, string $contentType = self::contentTypes['setCommentText'][0]) + public function setCommentText($tenant_id, $comment_id, $broadcast_id, $comment_text_update_request, array $options = []) { - list($response) = $this->setCommentTextWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $comment_text_update_request, $edit_key, $sso, $contentType); + list($response) = $this->setCommentTextWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $comment_text_update_request, $options); return $response; } @@ -17635,6 +15396,8 @@ public function setCommentText($tenant_id, $comment_id, $broadcast_id, $comment_ * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param string $broadcast_id (required) @@ -17647,9 +15410,9 @@ public function setCommentText($tenant_id, $comment_id, $broadcast_id, $comment_ * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\PublicAPISetCommentTextResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function setCommentTextWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $comment_text_update_request, $edit_key = null, $sso = null, string $contentType = self::contentTypes['setCommentText'][0]) + public function setCommentTextWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $comment_text_update_request, array $options = []) { - $request = $this->setCommentTextRequest($tenant_id, $comment_id, $broadcast_id, $comment_text_update_request, $edit_key, $sso, $contentType); + $request = $this->setCommentTextRequest($tenant_id, $comment_id, $broadcast_id, $comment_text_update_request, $options); try { $options = $this->createHttpClientOption(); @@ -17676,61 +15439,21 @@ public function setCommentTextWithHttpInfo($tenant_id, $comment_id, $broadcast_i switch($statusCode) { case 200: - if ('\FastComments\Client\Model\PublicAPISetCommentTextResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\PublicAPISetCommentTextResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\PublicAPISetCommentTextResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\PublicAPISetCommentTextResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -17744,34 +15467,11 @@ public function setCommentTextWithHttpInfo($tenant_id, $comment_id, $broadcast_i ); } - $returnType = '\FastComments\Client\Model\PublicAPISetCommentTextResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\PublicAPISetCommentTextResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -17781,7 +15481,7 @@ public function setCommentTextWithHttpInfo($tenant_id, $comment_id, $broadcast_i $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -17789,8 +15489,10 @@ public function setCommentTextWithHttpInfo($tenant_id, $comment_id, $broadcast_i $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -17800,6 +15502,8 @@ public function setCommentTextWithHttpInfo($tenant_id, $comment_id, $broadcast_i * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param string $broadcast_id (required) @@ -17811,9 +15515,9 @@ public function setCommentTextWithHttpInfo($tenant_id, $comment_id, $broadcast_i * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function setCommentTextAsync($tenant_id, $comment_id, $broadcast_id, $comment_text_update_request, $edit_key = null, $sso = null, string $contentType = self::contentTypes['setCommentText'][0]) + public function setCommentTextAsync($tenant_id, $comment_id, $broadcast_id, $comment_text_update_request, array $options = []) { - return $this->setCommentTextAsyncWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $comment_text_update_request, $edit_key, $sso, $contentType) + return $this->setCommentTextAsyncWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $comment_text_update_request, $options) ->then( function ($response) { return $response[0]; @@ -17826,6 +15530,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param string $broadcast_id (required) @@ -17837,10 +15543,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function setCommentTextAsyncWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $comment_text_update_request, $edit_key = null, $sso = null, string $contentType = self::contentTypes['setCommentText'][0]) + public function setCommentTextAsyncWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $comment_text_update_request, array $options = []) { $returnType = '\FastComments\Client\Model\PublicAPISetCommentTextResponse'; - $request = $this->setCommentTextRequest($tenant_id, $comment_id, $broadcast_id, $comment_text_update_request, $edit_key, $sso, $contentType); + $request = $this->setCommentTextRequest($tenant_id, $comment_id, $broadcast_id, $comment_text_update_request, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -17881,6 +15587,8 @@ function ($exception) { /** * Create request for operation 'setCommentText' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param string $broadcast_id (required) @@ -17892,9 +15600,13 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function setCommentTextRequest($tenant_id, $comment_id, $broadcast_id, $comment_text_update_request, $edit_key = null, $sso = null, string $contentType = self::contentTypes['setCommentText'][0]) + public function setCommentTextRequest($tenant_id, $comment_id, $broadcast_id, $comment_text_update_request, array $options = []) { - + // unbox the optional parameters and request options from the $options array + $edit_key = array_key_exists('edit_key', $options) ? $options['edit_key'] : null; + $sso = array_key_exists('sso', $options) ? $options['sso'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['setCommentText'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -17965,7 +15677,7 @@ public function setCommentTextRequest($tenant_id, $comment_id, $broadcast_id, $c // path params if ($tenant_id !== null) { $resourcePath = str_replace( - '{' . 'tenantId' . '}', + '{tenantId}', ObjectSerializer::toPathValue($tenant_id), $resourcePath ); @@ -17973,7 +15685,7 @@ public function setCommentTextRequest($tenant_id, $comment_id, $broadcast_id, $c // path params if ($comment_id !== null) { $resourcePath = str_replace( - '{' . 'commentId' . '}', + '{commentId}', ObjectSerializer::toPathValue($comment_id), $resourcePath ); @@ -18045,6 +15757,8 @@ public function setCommentTextRequest($tenant_id, $comment_id, $broadcast_id, $c * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $comment_id comment_id (required) * @param \FastComments\Client\Model\PublicBlockFromCommentParams $public_block_from_comment_params public_block_from_comment_params (required) @@ -18055,9 +15769,9 @@ public function setCommentTextRequest($tenant_id, $comment_id, $broadcast_id, $c * @throws \InvalidArgumentException * @return \FastComments\Client\Model\UnblockSuccess|\FastComments\Client\Model\APIError */ - public function unBlockCommentPublic($tenant_id, $comment_id, $public_block_from_comment_params, $sso = null, string $contentType = self::contentTypes['unBlockCommentPublic'][0]) + public function unBlockCommentPublic($tenant_id, $comment_id, $public_block_from_comment_params, $sso = null) { - list($response) = $this->unBlockCommentPublicWithHttpInfo($tenant_id, $comment_id, $public_block_from_comment_params, $sso, $contentType); + list($response) = $this->unBlockCommentPublicWithHttpInfo($tenant_id, $comment_id, $public_block_from_comment_params, $sso); return $response; } @@ -18066,6 +15780,8 @@ public function unBlockCommentPublic($tenant_id, $comment_id, $public_block_from * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param \FastComments\Client\Model\PublicBlockFromCommentParams $public_block_from_comment_params (required) @@ -18076,9 +15792,9 @@ public function unBlockCommentPublic($tenant_id, $comment_id, $public_block_from * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\UnblockSuccess|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function unBlockCommentPublicWithHttpInfo($tenant_id, $comment_id, $public_block_from_comment_params, $sso = null, string $contentType = self::contentTypes['unBlockCommentPublic'][0]) + public function unBlockCommentPublicWithHttpInfo($tenant_id, $comment_id, $public_block_from_comment_params, $sso = null) { - $request = $this->unBlockCommentPublicRequest($tenant_id, $comment_id, $public_block_from_comment_params, $sso, $contentType); + $request = $this->unBlockCommentPublicRequest($tenant_id, $comment_id, $public_block_from_comment_params, $sso); try { $options = $this->createHttpClientOption(); @@ -18105,61 +15821,21 @@ public function unBlockCommentPublicWithHttpInfo($tenant_id, $comment_id, $publi switch($statusCode) { case 200: - if ('\FastComments\Client\Model\UnblockSuccess' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\UnblockSuccess' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\UnblockSuccess', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\UnblockSuccess', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -18173,34 +15849,11 @@ public function unBlockCommentPublicWithHttpInfo($tenant_id, $comment_id, $publi ); } - $returnType = '\FastComments\Client\Model\UnblockSuccess'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\UnblockSuccess', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -18210,7 +15863,7 @@ public function unBlockCommentPublicWithHttpInfo($tenant_id, $comment_id, $publi $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -18218,8 +15871,10 @@ public function unBlockCommentPublicWithHttpInfo($tenant_id, $comment_id, $publi $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -18229,6 +15884,8 @@ public function unBlockCommentPublicWithHttpInfo($tenant_id, $comment_id, $publi * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param \FastComments\Client\Model\PublicBlockFromCommentParams $public_block_from_comment_params (required) @@ -18238,9 +15895,9 @@ public function unBlockCommentPublicWithHttpInfo($tenant_id, $comment_id, $publi * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function unBlockCommentPublicAsync($tenant_id, $comment_id, $public_block_from_comment_params, $sso = null, string $contentType = self::contentTypes['unBlockCommentPublic'][0]) + public function unBlockCommentPublicAsync($tenant_id, $comment_id, $public_block_from_comment_params, $sso = null) { - return $this->unBlockCommentPublicAsyncWithHttpInfo($tenant_id, $comment_id, $public_block_from_comment_params, $sso, $contentType) + return $this->unBlockCommentPublicAsyncWithHttpInfo($tenant_id, $comment_id, $public_block_from_comment_params, $sso) ->then( function ($response) { return $response[0]; @@ -18253,6 +15910,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param \FastComments\Client\Model\PublicBlockFromCommentParams $public_block_from_comment_params (required) @@ -18262,10 +15921,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function unBlockCommentPublicAsyncWithHttpInfo($tenant_id, $comment_id, $public_block_from_comment_params, $sso = null, string $contentType = self::contentTypes['unBlockCommentPublic'][0]) + public function unBlockCommentPublicAsyncWithHttpInfo($tenant_id, $comment_id, $public_block_from_comment_params, $sso = null) { $returnType = '\FastComments\Client\Model\UnblockSuccess'; - $request = $this->unBlockCommentPublicRequest($tenant_id, $comment_id, $public_block_from_comment_params, $sso, $contentType); + $request = $this->unBlockCommentPublicRequest($tenant_id, $comment_id, $public_block_from_comment_params, $sso); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -18306,6 +15965,8 @@ function ($exception) { /** * Create request for operation 'unBlockCommentPublic' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param \FastComments\Client\Model\PublicBlockFromCommentParams $public_block_from_comment_params (required) @@ -18315,9 +15976,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function unBlockCommentPublicRequest($tenant_id, $comment_id, $public_block_from_comment_params, $sso = null, string $contentType = self::contentTypes['unBlockCommentPublic'][0]) + public function unBlockCommentPublicRequest($tenant_id, $comment_id, $public_block_from_comment_params, $sso = null) { - + $contentType = self::contentTypes['unBlockCommentPublic'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -18371,7 +16033,7 @@ public function unBlockCommentPublicRequest($tenant_id, $comment_id, $public_blo // path params if ($comment_id !== null) { $resourcePath = str_replace( - '{' . 'commentId' . '}', + '{commentId}', ObjectSerializer::toPathValue($comment_id), $resourcePath ); @@ -18443,6 +16105,8 @@ public function unBlockCommentPublicRequest($tenant_id, $comment_id, $public_blo * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $comment_id comment_id (required) * @param string $broadcast_id broadcast_id (required) @@ -18453,9 +16117,9 @@ public function unBlockCommentPublicRequest($tenant_id, $comment_id, $public_blo * @throws \InvalidArgumentException * @return \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError */ - public function unLockComment($tenant_id, $comment_id, $broadcast_id, $sso = null, string $contentType = self::contentTypes['unLockComment'][0]) + public function unLockComment($tenant_id, $comment_id, $broadcast_id, $sso = null) { - list($response) = $this->unLockCommentWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $sso, $contentType); + list($response) = $this->unLockCommentWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $sso); return $response; } @@ -18464,6 +16128,8 @@ public function unLockComment($tenant_id, $comment_id, $broadcast_id, $sso = nul * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param string $broadcast_id (required) @@ -18474,9 +16140,9 @@ public function unLockComment($tenant_id, $comment_id, $broadcast_id, $sso = nul * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\APIEmptyResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function unLockCommentWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $sso = null, string $contentType = self::contentTypes['unLockComment'][0]) + public function unLockCommentWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $sso = null) { - $request = $this->unLockCommentRequest($tenant_id, $comment_id, $broadcast_id, $sso, $contentType); + $request = $this->unLockCommentRequest($tenant_id, $comment_id, $broadcast_id, $sso); try { $options = $this->createHttpClientOption(); @@ -18503,61 +16169,21 @@ public function unLockCommentWithHttpInfo($tenant_id, $comment_id, $broadcast_id switch($statusCode) { case 200: - if ('\FastComments\Client\Model\APIEmptyResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIEmptyResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIEmptyResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -18571,34 +16197,11 @@ public function unLockCommentWithHttpInfo($tenant_id, $comment_id, $broadcast_id ); } - $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIEmptyResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -18608,7 +16211,7 @@ public function unLockCommentWithHttpInfo($tenant_id, $comment_id, $broadcast_id $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -18616,8 +16219,10 @@ public function unLockCommentWithHttpInfo($tenant_id, $comment_id, $broadcast_id $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -18627,6 +16232,8 @@ public function unLockCommentWithHttpInfo($tenant_id, $comment_id, $broadcast_id * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param string $broadcast_id (required) @@ -18636,9 +16243,9 @@ public function unLockCommentWithHttpInfo($tenant_id, $comment_id, $broadcast_id * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function unLockCommentAsync($tenant_id, $comment_id, $broadcast_id, $sso = null, string $contentType = self::contentTypes['unLockComment'][0]) + public function unLockCommentAsync($tenant_id, $comment_id, $broadcast_id, $sso = null) { - return $this->unLockCommentAsyncWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $sso, $contentType) + return $this->unLockCommentAsyncWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $sso) ->then( function ($response) { return $response[0]; @@ -18651,6 +16258,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param string $broadcast_id (required) @@ -18660,10 +16269,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function unLockCommentAsyncWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $sso = null, string $contentType = self::contentTypes['unLockComment'][0]) + public function unLockCommentAsyncWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $sso = null) { $returnType = '\FastComments\Client\Model\APIEmptyResponse'; - $request = $this->unLockCommentRequest($tenant_id, $comment_id, $broadcast_id, $sso, $contentType); + $request = $this->unLockCommentRequest($tenant_id, $comment_id, $broadcast_id, $sso); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -18704,6 +16313,8 @@ function ($exception) { /** * Create request for operation 'unLockComment' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param string $broadcast_id (required) @@ -18713,9 +16324,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function unLockCommentRequest($tenant_id, $comment_id, $broadcast_id, $sso = null, string $contentType = self::contentTypes['unLockComment'][0]) + public function unLockCommentRequest($tenant_id, $comment_id, $broadcast_id, $sso = null) { - + $contentType = self::contentTypes['unLockComment'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -18769,7 +16381,7 @@ public function unLockCommentRequest($tenant_id, $comment_id, $broadcast_id, $ss // path params if ($tenant_id !== null) { $resourcePath = str_replace( - '{' . 'tenantId' . '}', + '{tenantId}', ObjectSerializer::toPathValue($tenant_id), $resourcePath ); @@ -18777,7 +16389,7 @@ public function unLockCommentRequest($tenant_id, $comment_id, $broadcast_id, $ss // path params if ($comment_id !== null) { $resourcePath = str_replace( - '{' . 'commentId' . '}', + '{commentId}', ObjectSerializer::toPathValue($comment_id), $resourcePath ); @@ -18842,6 +16454,8 @@ public function unLockCommentRequest($tenant_id, $comment_id, $broadcast_id, $ss * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $comment_id comment_id (required) * @param string $broadcast_id broadcast_id (required) @@ -18852,9 +16466,9 @@ public function unLockCommentRequest($tenant_id, $comment_id, $broadcast_id, $ss * @throws \InvalidArgumentException * @return \FastComments\Client\Model\ChangeCommentPinStatusResponse|\FastComments\Client\Model\APIError */ - public function unPinComment($tenant_id, $comment_id, $broadcast_id, $sso = null, string $contentType = self::contentTypes['unPinComment'][0]) + public function unPinComment($tenant_id, $comment_id, $broadcast_id, $sso = null) { - list($response) = $this->unPinCommentWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $sso, $contentType); + list($response) = $this->unPinCommentWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $sso); return $response; } @@ -18863,6 +16477,8 @@ public function unPinComment($tenant_id, $comment_id, $broadcast_id, $sso = null * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param string $broadcast_id (required) @@ -18873,9 +16489,9 @@ public function unPinComment($tenant_id, $comment_id, $broadcast_id, $sso = null * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\ChangeCommentPinStatusResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function unPinCommentWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $sso = null, string $contentType = self::contentTypes['unPinComment'][0]) + public function unPinCommentWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $sso = null) { - $request = $this->unPinCommentRequest($tenant_id, $comment_id, $broadcast_id, $sso, $contentType); + $request = $this->unPinCommentRequest($tenant_id, $comment_id, $broadcast_id, $sso); try { $options = $this->createHttpClientOption(); @@ -18902,61 +16518,21 @@ public function unPinCommentWithHttpInfo($tenant_id, $comment_id, $broadcast_id, switch($statusCode) { case 200: - if ('\FastComments\Client\Model\ChangeCommentPinStatusResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\ChangeCommentPinStatusResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\ChangeCommentPinStatusResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\ChangeCommentPinStatusResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -18970,34 +16546,11 @@ public function unPinCommentWithHttpInfo($tenant_id, $comment_id, $broadcast_id, ); } - $returnType = '\FastComments\Client\Model\ChangeCommentPinStatusResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\ChangeCommentPinStatusResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -19007,7 +16560,7 @@ public function unPinCommentWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -19015,8 +16568,10 @@ public function unPinCommentWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -19026,6 +16581,8 @@ public function unPinCommentWithHttpInfo($tenant_id, $comment_id, $broadcast_id, * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param string $broadcast_id (required) @@ -19035,9 +16592,9 @@ public function unPinCommentWithHttpInfo($tenant_id, $comment_id, $broadcast_id, * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function unPinCommentAsync($tenant_id, $comment_id, $broadcast_id, $sso = null, string $contentType = self::contentTypes['unPinComment'][0]) + public function unPinCommentAsync($tenant_id, $comment_id, $broadcast_id, $sso = null) { - return $this->unPinCommentAsyncWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $sso, $contentType) + return $this->unPinCommentAsyncWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $sso) ->then( function ($response) { return $response[0]; @@ -19050,6 +16607,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param string $broadcast_id (required) @@ -19059,10 +16618,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function unPinCommentAsyncWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $sso = null, string $contentType = self::contentTypes['unPinComment'][0]) + public function unPinCommentAsyncWithHttpInfo($tenant_id, $comment_id, $broadcast_id, $sso = null) { $returnType = '\FastComments\Client\Model\ChangeCommentPinStatusResponse'; - $request = $this->unPinCommentRequest($tenant_id, $comment_id, $broadcast_id, $sso, $contentType); + $request = $this->unPinCommentRequest($tenant_id, $comment_id, $broadcast_id, $sso); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -19103,6 +16662,8 @@ function ($exception) { /** * Create request for operation 'unPinComment' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param string $broadcast_id (required) @@ -19112,9 +16673,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function unPinCommentRequest($tenant_id, $comment_id, $broadcast_id, $sso = null, string $contentType = self::contentTypes['unPinComment'][0]) + public function unPinCommentRequest($tenant_id, $comment_id, $broadcast_id, $sso = null) { - + $contentType = self::contentTypes['unPinComment'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -19168,7 +16730,7 @@ public function unPinCommentRequest($tenant_id, $comment_id, $broadcast_id, $sso // path params if ($tenant_id !== null) { $resourcePath = str_replace( - '{' . 'tenantId' . '}', + '{tenantId}', ObjectSerializer::toPathValue($tenant_id), $resourcePath ); @@ -19176,7 +16738,7 @@ public function unPinCommentRequest($tenant_id, $comment_id, $broadcast_id, $sso // path params if ($comment_id !== null) { $resourcePath = str_replace( - '{' . 'commentId' . '}', + '{commentId}', ObjectSerializer::toPathValue($comment_id), $resourcePath ); @@ -19241,6 +16803,8 @@ public function unPinCommentRequest($tenant_id, $comment_id, $broadcast_id, $sso * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $post_id post_id (required) * @param \FastComments\Client\Model\UpdateFeedPostParams $update_feed_post_params update_feed_post_params (required) @@ -19252,9 +16816,9 @@ public function unPinCommentRequest($tenant_id, $comment_id, $broadcast_id, $sso * @throws \InvalidArgumentException * @return \FastComments\Client\Model\CreateFeedPostResponse|\FastComments\Client\Model\APIError */ - public function updateFeedPostPublic($tenant_id, $post_id, $update_feed_post_params, $broadcast_id = null, $sso = null, string $contentType = self::contentTypes['updateFeedPostPublic'][0]) + public function updateFeedPostPublic($tenant_id, $post_id, $update_feed_post_params, array $options = []) { - list($response) = $this->updateFeedPostPublicWithHttpInfo($tenant_id, $post_id, $update_feed_post_params, $broadcast_id, $sso, $contentType); + list($response) = $this->updateFeedPostPublicWithHttpInfo($tenant_id, $post_id, $update_feed_post_params, $options); return $response; } @@ -19263,6 +16827,8 @@ public function updateFeedPostPublic($tenant_id, $post_id, $update_feed_post_par * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $post_id (required) * @param \FastComments\Client\Model\UpdateFeedPostParams $update_feed_post_params (required) @@ -19274,9 +16840,9 @@ public function updateFeedPostPublic($tenant_id, $post_id, $update_feed_post_par * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\CreateFeedPostResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function updateFeedPostPublicWithHttpInfo($tenant_id, $post_id, $update_feed_post_params, $broadcast_id = null, $sso = null, string $contentType = self::contentTypes['updateFeedPostPublic'][0]) + public function updateFeedPostPublicWithHttpInfo($tenant_id, $post_id, $update_feed_post_params, array $options = []) { - $request = $this->updateFeedPostPublicRequest($tenant_id, $post_id, $update_feed_post_params, $broadcast_id, $sso, $contentType); + $request = $this->updateFeedPostPublicRequest($tenant_id, $post_id, $update_feed_post_params, $options); try { $options = $this->createHttpClientOption(); @@ -19303,61 +16869,21 @@ public function updateFeedPostPublicWithHttpInfo($tenant_id, $post_id, $update_f switch($statusCode) { case 200: - if ('\FastComments\Client\Model\CreateFeedPostResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\CreateFeedPostResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\CreateFeedPostResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\CreateFeedPostResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -19371,34 +16897,11 @@ public function updateFeedPostPublicWithHttpInfo($tenant_id, $post_id, $update_f ); } - $returnType = '\FastComments\Client\Model\CreateFeedPostResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\CreateFeedPostResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -19408,7 +16911,7 @@ public function updateFeedPostPublicWithHttpInfo($tenant_id, $post_id, $update_f $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -19416,8 +16919,10 @@ public function updateFeedPostPublicWithHttpInfo($tenant_id, $post_id, $update_f $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -19427,6 +16932,8 @@ public function updateFeedPostPublicWithHttpInfo($tenant_id, $post_id, $update_f * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $post_id (required) * @param \FastComments\Client\Model\UpdateFeedPostParams $update_feed_post_params (required) @@ -19437,9 +16944,9 @@ public function updateFeedPostPublicWithHttpInfo($tenant_id, $post_id, $update_f * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateFeedPostPublicAsync($tenant_id, $post_id, $update_feed_post_params, $broadcast_id = null, $sso = null, string $contentType = self::contentTypes['updateFeedPostPublic'][0]) + public function updateFeedPostPublicAsync($tenant_id, $post_id, $update_feed_post_params, array $options = []) { - return $this->updateFeedPostPublicAsyncWithHttpInfo($tenant_id, $post_id, $update_feed_post_params, $broadcast_id, $sso, $contentType) + return $this->updateFeedPostPublicAsyncWithHttpInfo($tenant_id, $post_id, $update_feed_post_params, $options) ->then( function ($response) { return $response[0]; @@ -19452,6 +16959,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $post_id (required) * @param \FastComments\Client\Model\UpdateFeedPostParams $update_feed_post_params (required) @@ -19462,10 +16971,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateFeedPostPublicAsyncWithHttpInfo($tenant_id, $post_id, $update_feed_post_params, $broadcast_id = null, $sso = null, string $contentType = self::contentTypes['updateFeedPostPublic'][0]) + public function updateFeedPostPublicAsyncWithHttpInfo($tenant_id, $post_id, $update_feed_post_params, array $options = []) { $returnType = '\FastComments\Client\Model\CreateFeedPostResponse'; - $request = $this->updateFeedPostPublicRequest($tenant_id, $post_id, $update_feed_post_params, $broadcast_id, $sso, $contentType); + $request = $this->updateFeedPostPublicRequest($tenant_id, $post_id, $update_feed_post_params, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -19506,6 +17015,8 @@ function ($exception) { /** * Create request for operation 'updateFeedPostPublic' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $post_id (required) * @param \FastComments\Client\Model\UpdateFeedPostParams $update_feed_post_params (required) @@ -19516,9 +17027,13 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function updateFeedPostPublicRequest($tenant_id, $post_id, $update_feed_post_params, $broadcast_id = null, $sso = null, string $contentType = self::contentTypes['updateFeedPostPublic'][0]) + public function updateFeedPostPublicRequest($tenant_id, $post_id, $update_feed_post_params, array $options = []) { - + // unbox the optional parameters and request options from the $options array + $broadcast_id = array_key_exists('broadcast_id', $options) ? $options['broadcast_id'] : null; + $sso = array_key_exists('sso', $options) ? $options['sso'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['updateFeedPostPublic'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -19573,7 +17088,7 @@ public function updateFeedPostPublicRequest($tenant_id, $post_id, $update_feed_p // path params if ($tenant_id !== null) { $resourcePath = str_replace( - '{' . 'tenantId' . '}', + '{tenantId}', ObjectSerializer::toPathValue($tenant_id), $resourcePath ); @@ -19581,7 +17096,7 @@ public function updateFeedPostPublicRequest($tenant_id, $post_id, $update_feed_p // path params if ($post_id !== null) { $resourcePath = str_replace( - '{' . 'postId' . '}', + '{postId}', ObjectSerializer::toPathValue($post_id), $resourcePath ); @@ -19653,6 +17168,8 @@ public function updateFeedPostPublicRequest($tenant_id, $post_id, $update_feed_p * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $notification_id notification_id (required) * @param string $opted_in_or_out opted_in_or_out (required) @@ -19664,9 +17181,9 @@ public function updateFeedPostPublicRequest($tenant_id, $post_id, $update_feed_p * @throws \InvalidArgumentException * @return \FastComments\Client\Model\UpdateUserNotificationCommentSubscriptionStatusResponse|\FastComments\Client\Model\APIError */ - public function updateUserNotificationCommentSubscriptionStatus($tenant_id, $notification_id, $opted_in_or_out, $comment_id, $sso = null, string $contentType = self::contentTypes['updateUserNotificationCommentSubscriptionStatus'][0]) + public function updateUserNotificationCommentSubscriptionStatus($tenant_id, $notification_id, $opted_in_or_out, $comment_id, $sso = null) { - list($response) = $this->updateUserNotificationCommentSubscriptionStatusWithHttpInfo($tenant_id, $notification_id, $opted_in_or_out, $comment_id, $sso, $contentType); + list($response) = $this->updateUserNotificationCommentSubscriptionStatusWithHttpInfo($tenant_id, $notification_id, $opted_in_or_out, $comment_id, $sso); return $response; } @@ -19675,6 +17192,8 @@ public function updateUserNotificationCommentSubscriptionStatus($tenant_id, $not * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $notification_id (required) * @param string $opted_in_or_out (required) @@ -19686,9 +17205,9 @@ public function updateUserNotificationCommentSubscriptionStatus($tenant_id, $not * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\UpdateUserNotificationCommentSubscriptionStatusResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function updateUserNotificationCommentSubscriptionStatusWithHttpInfo($tenant_id, $notification_id, $opted_in_or_out, $comment_id, $sso = null, string $contentType = self::contentTypes['updateUserNotificationCommentSubscriptionStatus'][0]) + public function updateUserNotificationCommentSubscriptionStatusWithHttpInfo($tenant_id, $notification_id, $opted_in_or_out, $comment_id, $sso = null) { - $request = $this->updateUserNotificationCommentSubscriptionStatusRequest($tenant_id, $notification_id, $opted_in_or_out, $comment_id, $sso, $contentType); + $request = $this->updateUserNotificationCommentSubscriptionStatusRequest($tenant_id, $notification_id, $opted_in_or_out, $comment_id, $sso); try { $options = $this->createHttpClientOption(); @@ -19715,61 +17234,21 @@ public function updateUserNotificationCommentSubscriptionStatusWithHttpInfo($ten switch($statusCode) { case 200: - if ('\FastComments\Client\Model\UpdateUserNotificationCommentSubscriptionStatusResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\UpdateUserNotificationCommentSubscriptionStatusResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\UpdateUserNotificationCommentSubscriptionStatusResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\UpdateUserNotificationCommentSubscriptionStatusResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -19783,34 +17262,11 @@ public function updateUserNotificationCommentSubscriptionStatusWithHttpInfo($ten ); } - $returnType = '\FastComments\Client\Model\UpdateUserNotificationCommentSubscriptionStatusResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\UpdateUserNotificationCommentSubscriptionStatusResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -19820,7 +17276,7 @@ public function updateUserNotificationCommentSubscriptionStatusWithHttpInfo($ten $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -19828,8 +17284,10 @@ public function updateUserNotificationCommentSubscriptionStatusWithHttpInfo($ten $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -19839,6 +17297,8 @@ public function updateUserNotificationCommentSubscriptionStatusWithHttpInfo($ten * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $notification_id (required) * @param string $opted_in_or_out (required) @@ -19849,9 +17309,9 @@ public function updateUserNotificationCommentSubscriptionStatusWithHttpInfo($ten * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateUserNotificationCommentSubscriptionStatusAsync($tenant_id, $notification_id, $opted_in_or_out, $comment_id, $sso = null, string $contentType = self::contentTypes['updateUserNotificationCommentSubscriptionStatus'][0]) + public function updateUserNotificationCommentSubscriptionStatusAsync($tenant_id, $notification_id, $opted_in_or_out, $comment_id, $sso = null) { - return $this->updateUserNotificationCommentSubscriptionStatusAsyncWithHttpInfo($tenant_id, $notification_id, $opted_in_or_out, $comment_id, $sso, $contentType) + return $this->updateUserNotificationCommentSubscriptionStatusAsyncWithHttpInfo($tenant_id, $notification_id, $opted_in_or_out, $comment_id, $sso) ->then( function ($response) { return $response[0]; @@ -19864,6 +17324,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $notification_id (required) * @param string $opted_in_or_out (required) @@ -19874,10 +17336,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateUserNotificationCommentSubscriptionStatusAsyncWithHttpInfo($tenant_id, $notification_id, $opted_in_or_out, $comment_id, $sso = null, string $contentType = self::contentTypes['updateUserNotificationCommentSubscriptionStatus'][0]) + public function updateUserNotificationCommentSubscriptionStatusAsyncWithHttpInfo($tenant_id, $notification_id, $opted_in_or_out, $comment_id, $sso = null) { $returnType = '\FastComments\Client\Model\UpdateUserNotificationCommentSubscriptionStatusResponse'; - $request = $this->updateUserNotificationCommentSubscriptionStatusRequest($tenant_id, $notification_id, $opted_in_or_out, $comment_id, $sso, $contentType); + $request = $this->updateUserNotificationCommentSubscriptionStatusRequest($tenant_id, $notification_id, $opted_in_or_out, $comment_id, $sso); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -19918,6 +17380,8 @@ function ($exception) { /** * Create request for operation 'updateUserNotificationCommentSubscriptionStatus' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $notification_id (required) * @param string $opted_in_or_out (required) @@ -19928,9 +17392,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function updateUserNotificationCommentSubscriptionStatusRequest($tenant_id, $notification_id, $opted_in_or_out, $comment_id, $sso = null, string $contentType = self::contentTypes['updateUserNotificationCommentSubscriptionStatus'][0]) + public function updateUserNotificationCommentSubscriptionStatusRequest($tenant_id, $notification_id, $opted_in_or_out, $comment_id, $sso = null) { - + $contentType = self::contentTypes['updateUserNotificationCommentSubscriptionStatus'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -20000,7 +17465,7 @@ public function updateUserNotificationCommentSubscriptionStatusRequest($tenant_i // path params if ($notification_id !== null) { $resourcePath = str_replace( - '{' . 'notificationId' . '}', + '{notificationId}', ObjectSerializer::toPathValue($notification_id), $resourcePath ); @@ -20008,7 +17473,7 @@ public function updateUserNotificationCommentSubscriptionStatusRequest($tenant_i // path params if ($opted_in_or_out !== null) { $resourcePath = str_replace( - '{' . 'optedInOrOut' . '}', + '{optedInOrOut}', ObjectSerializer::toPathValue($opted_in_or_out), $resourcePath ); @@ -20073,6 +17538,8 @@ public function updateUserNotificationCommentSubscriptionStatusRequest($tenant_i * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $url_id url_id (required) * @param string $url url (required) @@ -20085,9 +17552,9 @@ public function updateUserNotificationCommentSubscriptionStatusRequest($tenant_i * @throws \InvalidArgumentException * @return \FastComments\Client\Model\UpdateUserNotificationPageSubscriptionStatusResponse|\FastComments\Client\Model\APIError */ - public function updateUserNotificationPageSubscriptionStatus($tenant_id, $url_id, $url, $page_title, $subscribed_or_unsubscribed, $sso = null, string $contentType = self::contentTypes['updateUserNotificationPageSubscriptionStatus'][0]) + public function updateUserNotificationPageSubscriptionStatus($tenant_id, $url_id, $url, $page_title, $subscribed_or_unsubscribed, $sso = null) { - list($response) = $this->updateUserNotificationPageSubscriptionStatusWithHttpInfo($tenant_id, $url_id, $url, $page_title, $subscribed_or_unsubscribed, $sso, $contentType); + list($response) = $this->updateUserNotificationPageSubscriptionStatusWithHttpInfo($tenant_id, $url_id, $url, $page_title, $subscribed_or_unsubscribed, $sso); return $response; } @@ -20096,6 +17563,8 @@ public function updateUserNotificationPageSubscriptionStatus($tenant_id, $url_id * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $url_id (required) * @param string $url (required) @@ -20108,9 +17577,9 @@ public function updateUserNotificationPageSubscriptionStatus($tenant_id, $url_id * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\UpdateUserNotificationPageSubscriptionStatusResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function updateUserNotificationPageSubscriptionStatusWithHttpInfo($tenant_id, $url_id, $url, $page_title, $subscribed_or_unsubscribed, $sso = null, string $contentType = self::contentTypes['updateUserNotificationPageSubscriptionStatus'][0]) + public function updateUserNotificationPageSubscriptionStatusWithHttpInfo($tenant_id, $url_id, $url, $page_title, $subscribed_or_unsubscribed, $sso = null) { - $request = $this->updateUserNotificationPageSubscriptionStatusRequest($tenant_id, $url_id, $url, $page_title, $subscribed_or_unsubscribed, $sso, $contentType); + $request = $this->updateUserNotificationPageSubscriptionStatusRequest($tenant_id, $url_id, $url, $page_title, $subscribed_or_unsubscribed, $sso); try { $options = $this->createHttpClientOption(); @@ -20137,61 +17606,21 @@ public function updateUserNotificationPageSubscriptionStatusWithHttpInfo($tenant switch($statusCode) { case 200: - if ('\FastComments\Client\Model\UpdateUserNotificationPageSubscriptionStatusResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\UpdateUserNotificationPageSubscriptionStatusResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\UpdateUserNotificationPageSubscriptionStatusResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\UpdateUserNotificationPageSubscriptionStatusResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -20205,34 +17634,11 @@ public function updateUserNotificationPageSubscriptionStatusWithHttpInfo($tenant ); } - $returnType = '\FastComments\Client\Model\UpdateUserNotificationPageSubscriptionStatusResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\UpdateUserNotificationPageSubscriptionStatusResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -20242,7 +17648,7 @@ public function updateUserNotificationPageSubscriptionStatusWithHttpInfo($tenant $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -20250,8 +17656,10 @@ public function updateUserNotificationPageSubscriptionStatusWithHttpInfo($tenant $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -20261,6 +17669,8 @@ public function updateUserNotificationPageSubscriptionStatusWithHttpInfo($tenant * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $url_id (required) * @param string $url (required) @@ -20272,9 +17682,9 @@ public function updateUserNotificationPageSubscriptionStatusWithHttpInfo($tenant * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateUserNotificationPageSubscriptionStatusAsync($tenant_id, $url_id, $url, $page_title, $subscribed_or_unsubscribed, $sso = null, string $contentType = self::contentTypes['updateUserNotificationPageSubscriptionStatus'][0]) + public function updateUserNotificationPageSubscriptionStatusAsync($tenant_id, $url_id, $url, $page_title, $subscribed_or_unsubscribed, $sso = null) { - return $this->updateUserNotificationPageSubscriptionStatusAsyncWithHttpInfo($tenant_id, $url_id, $url, $page_title, $subscribed_or_unsubscribed, $sso, $contentType) + return $this->updateUserNotificationPageSubscriptionStatusAsyncWithHttpInfo($tenant_id, $url_id, $url, $page_title, $subscribed_or_unsubscribed, $sso) ->then( function ($response) { return $response[0]; @@ -20287,6 +17697,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $url_id (required) * @param string $url (required) @@ -20298,10 +17710,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateUserNotificationPageSubscriptionStatusAsyncWithHttpInfo($tenant_id, $url_id, $url, $page_title, $subscribed_or_unsubscribed, $sso = null, string $contentType = self::contentTypes['updateUserNotificationPageSubscriptionStatus'][0]) + public function updateUserNotificationPageSubscriptionStatusAsyncWithHttpInfo($tenant_id, $url_id, $url, $page_title, $subscribed_or_unsubscribed, $sso = null) { $returnType = '\FastComments\Client\Model\UpdateUserNotificationPageSubscriptionStatusResponse'; - $request = $this->updateUserNotificationPageSubscriptionStatusRequest($tenant_id, $url_id, $url, $page_title, $subscribed_or_unsubscribed, $sso, $contentType); + $request = $this->updateUserNotificationPageSubscriptionStatusRequest($tenant_id, $url_id, $url, $page_title, $subscribed_or_unsubscribed, $sso); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -20342,6 +17754,8 @@ function ($exception) { /** * Create request for operation 'updateUserNotificationPageSubscriptionStatus' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $url_id (required) * @param string $url (required) @@ -20353,9 +17767,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function updateUserNotificationPageSubscriptionStatusRequest($tenant_id, $url_id, $url, $page_title, $subscribed_or_unsubscribed, $sso = null, string $contentType = self::contentTypes['updateUserNotificationPageSubscriptionStatus'][0]) + public function updateUserNotificationPageSubscriptionStatusRequest($tenant_id, $url_id, $url, $page_title, $subscribed_or_unsubscribed, $sso = null) { - + $contentType = self::contentTypes['updateUserNotificationPageSubscriptionStatus'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -20450,7 +17865,7 @@ public function updateUserNotificationPageSubscriptionStatusRequest($tenant_id, // path params if ($subscribed_or_unsubscribed !== null) { $resourcePath = str_replace( - '{' . 'subscribedOrUnsubscribed' . '}', + '{subscribedOrUnsubscribed}', ObjectSerializer::toPathValue($subscribed_or_unsubscribed), $resourcePath ); @@ -20515,6 +17930,8 @@ public function updateUserNotificationPageSubscriptionStatusRequest($tenant_id, * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $notification_id notification_id (required) * @param string $new_status new_status (required) @@ -20525,9 +17942,9 @@ public function updateUserNotificationPageSubscriptionStatusRequest($tenant_id, * @throws \InvalidArgumentException * @return \FastComments\Client\Model\UpdateUserNotificationStatusResponse|\FastComments\Client\Model\APIError */ - public function updateUserNotificationStatus($tenant_id, $notification_id, $new_status, $sso = null, string $contentType = self::contentTypes['updateUserNotificationStatus'][0]) + public function updateUserNotificationStatus($tenant_id, $notification_id, $new_status, $sso = null) { - list($response) = $this->updateUserNotificationStatusWithHttpInfo($tenant_id, $notification_id, $new_status, $sso, $contentType); + list($response) = $this->updateUserNotificationStatusWithHttpInfo($tenant_id, $notification_id, $new_status, $sso); return $response; } @@ -20536,6 +17953,8 @@ public function updateUserNotificationStatus($tenant_id, $notification_id, $new_ * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $notification_id (required) * @param string $new_status (required) @@ -20546,9 +17965,9 @@ public function updateUserNotificationStatus($tenant_id, $notification_id, $new_ * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\UpdateUserNotificationStatusResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function updateUserNotificationStatusWithHttpInfo($tenant_id, $notification_id, $new_status, $sso = null, string $contentType = self::contentTypes['updateUserNotificationStatus'][0]) + public function updateUserNotificationStatusWithHttpInfo($tenant_id, $notification_id, $new_status, $sso = null) { - $request = $this->updateUserNotificationStatusRequest($tenant_id, $notification_id, $new_status, $sso, $contentType); + $request = $this->updateUserNotificationStatusRequest($tenant_id, $notification_id, $new_status, $sso); try { $options = $this->createHttpClientOption(); @@ -20575,61 +17994,21 @@ public function updateUserNotificationStatusWithHttpInfo($tenant_id, $notificati switch($statusCode) { case 200: - if ('\FastComments\Client\Model\UpdateUserNotificationStatusResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\UpdateUserNotificationStatusResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\UpdateUserNotificationStatusResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\UpdateUserNotificationStatusResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -20643,34 +18022,11 @@ public function updateUserNotificationStatusWithHttpInfo($tenant_id, $notificati ); } - $returnType = '\FastComments\Client\Model\UpdateUserNotificationStatusResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\UpdateUserNotificationStatusResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -20680,7 +18036,7 @@ public function updateUserNotificationStatusWithHttpInfo($tenant_id, $notificati $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -20688,8 +18044,10 @@ public function updateUserNotificationStatusWithHttpInfo($tenant_id, $notificati $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -20699,6 +18057,8 @@ public function updateUserNotificationStatusWithHttpInfo($tenant_id, $notificati * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $notification_id (required) * @param string $new_status (required) @@ -20708,9 +18068,9 @@ public function updateUserNotificationStatusWithHttpInfo($tenant_id, $notificati * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateUserNotificationStatusAsync($tenant_id, $notification_id, $new_status, $sso = null, string $contentType = self::contentTypes['updateUserNotificationStatus'][0]) + public function updateUserNotificationStatusAsync($tenant_id, $notification_id, $new_status, $sso = null) { - return $this->updateUserNotificationStatusAsyncWithHttpInfo($tenant_id, $notification_id, $new_status, $sso, $contentType) + return $this->updateUserNotificationStatusAsyncWithHttpInfo($tenant_id, $notification_id, $new_status, $sso) ->then( function ($response) { return $response[0]; @@ -20723,6 +18083,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $notification_id (required) * @param string $new_status (required) @@ -20732,10 +18094,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateUserNotificationStatusAsyncWithHttpInfo($tenant_id, $notification_id, $new_status, $sso = null, string $contentType = self::contentTypes['updateUserNotificationStatus'][0]) + public function updateUserNotificationStatusAsyncWithHttpInfo($tenant_id, $notification_id, $new_status, $sso = null) { $returnType = '\FastComments\Client\Model\UpdateUserNotificationStatusResponse'; - $request = $this->updateUserNotificationStatusRequest($tenant_id, $notification_id, $new_status, $sso, $contentType); + $request = $this->updateUserNotificationStatusRequest($tenant_id, $notification_id, $new_status, $sso); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -20776,6 +18138,8 @@ function ($exception) { /** * Create request for operation 'updateUserNotificationStatus' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $notification_id (required) * @param string $new_status (required) @@ -20785,9 +18149,10 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function updateUserNotificationStatusRequest($tenant_id, $notification_id, $new_status, $sso = null, string $contentType = self::contentTypes['updateUserNotificationStatus'][0]) + public function updateUserNotificationStatusRequest($tenant_id, $notification_id, $new_status, $sso = null) { - + $contentType = self::contentTypes['updateUserNotificationStatus'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -20841,7 +18206,7 @@ public function updateUserNotificationStatusRequest($tenant_id, $notification_id // path params if ($notification_id !== null) { $resourcePath = str_replace( - '{' . 'notificationId' . '}', + '{notificationId}', ObjectSerializer::toPathValue($notification_id), $resourcePath ); @@ -20849,7 +18214,7 @@ public function updateUserNotificationStatusRequest($tenant_id, $notification_id // path params if ($new_status !== null) { $resourcePath = str_replace( - '{' . 'newStatus' . '}', + '{newStatus}', ObjectSerializer::toPathValue($new_status), $resourcePath ); @@ -20914,6 +18279,8 @@ public function updateUserNotificationStatusRequest($tenant_id, $notification_id * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param \SplFileObject $file file (required) * @param \FastComments\Client\Model\SizePreset|null $size_preset Size preset: \"Default\" (1000x1000px) or \"CrossPlatform\" (creates sizes for popular devices) (optional) @@ -20924,9 +18291,9 @@ public function updateUserNotificationStatusRequest($tenant_id, $notification_id * @throws \InvalidArgumentException * @return \FastComments\Client\Model\UploadImageResponse */ - public function uploadImage($tenant_id, $file, $size_preset = null, $url_id = null, string $contentType = self::contentTypes['uploadImage'][0]) + public function uploadImage($tenant_id, $file, array $options = []) { - list($response) = $this->uploadImageWithHttpInfo($tenant_id, $file, $size_preset, $url_id, $contentType); + list($response) = $this->uploadImageWithHttpInfo($tenant_id, $file, $options); return $response; } @@ -20935,6 +18302,8 @@ public function uploadImage($tenant_id, $file, $size_preset = null, $url_id = nu * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param \SplFileObject $file (required) * @param \FastComments\Client\Model\SizePreset|null $size_preset Size preset: \"Default\" (1000x1000px) or \"CrossPlatform\" (creates sizes for popular devices) (optional) @@ -20945,9 +18314,9 @@ public function uploadImage($tenant_id, $file, $size_preset = null, $url_id = nu * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\UploadImageResponse, HTTP status code, HTTP response headers (array of strings) */ - public function uploadImageWithHttpInfo($tenant_id, $file, $size_preset = null, $url_id = null, string $contentType = self::contentTypes['uploadImage'][0]) + public function uploadImageWithHttpInfo($tenant_id, $file, array $options = []) { - $request = $this->uploadImageRequest($tenant_id, $file, $size_preset, $url_id, $contentType); + $request = $this->uploadImageRequest($tenant_id, $file, $options); try { $options = $this->createHttpClientOption(); @@ -20974,34 +18343,15 @@ public function uploadImageWithHttpInfo($tenant_id, $file, $size_preset = null, switch($statusCode) { case 200: - if ('\FastComments\Client\Model\UploadImageResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\UploadImageResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\UploadImageResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\UploadImageResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -21015,34 +18365,11 @@ public function uploadImageWithHttpInfo($tenant_id, $file, $size_preset = null, ); } - $returnType = '\FastComments\Client\Model\UploadImageResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\UploadImageResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -21052,8 +18379,10 @@ public function uploadImageWithHttpInfo($tenant_id, $file, $size_preset = null, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -21063,6 +18392,8 @@ public function uploadImageWithHttpInfo($tenant_id, $file, $size_preset = null, * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param \SplFileObject $file (required) * @param \FastComments\Client\Model\SizePreset|null $size_preset Size preset: \"Default\" (1000x1000px) or \"CrossPlatform\" (creates sizes for popular devices) (optional) @@ -21072,9 +18403,9 @@ public function uploadImageWithHttpInfo($tenant_id, $file, $size_preset = null, * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function uploadImageAsync($tenant_id, $file, $size_preset = null, $url_id = null, string $contentType = self::contentTypes['uploadImage'][0]) + public function uploadImageAsync($tenant_id, $file, array $options = []) { - return $this->uploadImageAsyncWithHttpInfo($tenant_id, $file, $size_preset, $url_id, $contentType) + return $this->uploadImageAsyncWithHttpInfo($tenant_id, $file, $options) ->then( function ($response) { return $response[0]; @@ -21087,6 +18418,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param \SplFileObject $file (required) * @param \FastComments\Client\Model\SizePreset|null $size_preset Size preset: \"Default\" (1000x1000px) or \"CrossPlatform\" (creates sizes for popular devices) (optional) @@ -21096,10 +18429,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function uploadImageAsyncWithHttpInfo($tenant_id, $file, $size_preset = null, $url_id = null, string $contentType = self::contentTypes['uploadImage'][0]) + public function uploadImageAsyncWithHttpInfo($tenant_id, $file, array $options = []) { $returnType = '\FastComments\Client\Model\UploadImageResponse'; - $request = $this->uploadImageRequest($tenant_id, $file, $size_preset, $url_id, $contentType); + $request = $this->uploadImageRequest($tenant_id, $file, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -21140,6 +18473,8 @@ function ($exception) { /** * Create request for operation 'uploadImage' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param \SplFileObject $file (required) * @param \FastComments\Client\Model\SizePreset|null $size_preset Size preset: \"Default\" (1000x1000px) or \"CrossPlatform\" (creates sizes for popular devices) (optional) @@ -21149,9 +18484,13 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function uploadImageRequest($tenant_id, $file, $size_preset = null, $url_id = null, string $contentType = self::contentTypes['uploadImage'][0]) + public function uploadImageRequest($tenant_id, $file, array $options = []) { - + // unbox the optional parameters and request options from the $options array + $size_preset = array_key_exists('size_preset', $options) ? $options['size_preset'] : null; + $url_id = array_key_exists('url_id', $options) ? $options['url_id'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['uploadImage'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -21199,24 +18538,21 @@ public function uploadImageRequest($tenant_id, $file, $size_preset = null, $url_ // path params if ($tenant_id !== null) { $resourcePath = str_replace( - '{' . 'tenantId' . '}', + '{tenantId}', ObjectSerializer::toPathValue($tenant_id), $resourcePath ); } // form params - if ($file !== null) { - $multipart = true; - $formParams['file'] = []; - $paramFiles = is_array($file) ? $file : [$file]; - foreach ($paramFiles as $paramFile) { - $formParams['file'][] = \GuzzleHttp\Psr7\Utils::tryFopen( - ObjectSerializer::toFormValue($paramFile), - 'rb' - ); - } - } + $formDataProcessor = new FormDataProcessor(); + + $formData = $formDataProcessor->prepare([ + 'file' => $file, + ]); + + $formParams = $formDataProcessor->flatten($formData); + $multipart = $formDataProcessor->has_file; $multipart = true; $headers = $this->headerSelector->selectHeaders( @@ -21277,6 +18613,8 @@ public function uploadImageRequest($tenant_id, $file, $size_preset = null, $url_ * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id tenant_id (required) * @param string $comment_id comment_id (required) * @param string $url_id url_id (required) @@ -21290,9 +18628,9 @@ public function uploadImageRequest($tenant_id, $file, $size_preset = null, $url_ * @throws \InvalidArgumentException * @return \FastComments\Client\Model\VoteResponse|\FastComments\Client\Model\APIError */ - public function voteComment($tenant_id, $comment_id, $url_id, $broadcast_id, $vote_body_params, $session_id = null, $sso = null, string $contentType = self::contentTypes['voteComment'][0]) + public function voteComment($tenant_id, $comment_id, $url_id, $broadcast_id, $vote_body_params, array $options = []) { - list($response) = $this->voteCommentWithHttpInfo($tenant_id, $comment_id, $url_id, $broadcast_id, $vote_body_params, $session_id, $sso, $contentType); + list($response) = $this->voteCommentWithHttpInfo($tenant_id, $comment_id, $url_id, $broadcast_id, $vote_body_params, $options); return $response; } @@ -21301,6 +18639,8 @@ public function voteComment($tenant_id, $comment_id, $url_id, $broadcast_id, $vo * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param string $url_id (required) @@ -21314,9 +18654,9 @@ public function voteComment($tenant_id, $comment_id, $url_id, $broadcast_id, $vo * @throws \InvalidArgumentException * @return array of \FastComments\Client\Model\VoteResponse|\FastComments\Client\Model\APIError, HTTP status code, HTTP response headers (array of strings) */ - public function voteCommentWithHttpInfo($tenant_id, $comment_id, $url_id, $broadcast_id, $vote_body_params, $session_id = null, $sso = null, string $contentType = self::contentTypes['voteComment'][0]) + public function voteCommentWithHttpInfo($tenant_id, $comment_id, $url_id, $broadcast_id, $vote_body_params, array $options = []) { - $request = $this->voteCommentRequest($tenant_id, $comment_id, $url_id, $broadcast_id, $vote_body_params, $session_id, $sso, $contentType); + $request = $this->voteCommentRequest($tenant_id, $comment_id, $url_id, $broadcast_id, $vote_body_params, $options); try { $options = $this->createHttpClientOption(); @@ -21343,61 +18683,21 @@ public function voteCommentWithHttpInfo($tenant_id, $comment_id, $url_id, $broad switch($statusCode) { case 200: - if ('\FastComments\Client\Model\VoteResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\VoteResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\VoteResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\VoteResponse', + $request, + $response, + ); default: - if ('\FastComments\Client\Model\APIError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\FastComments\Client\Model\APIError' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\FastComments\Client\Model\APIError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\APIError', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -21411,34 +18711,11 @@ public function voteCommentWithHttpInfo($tenant_id, $comment_id, $url_id, $broad ); } - $returnType = '\FastComments\Client\Model\VoteResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\FastComments\Client\Model\VoteResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -21448,7 +18725,7 @@ public function voteCommentWithHttpInfo($tenant_id, $comment_id, $url_id, $broad $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -21456,8 +18733,10 @@ public function voteCommentWithHttpInfo($tenant_id, $comment_id, $url_id, $broad $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -21467,6 +18746,8 @@ public function voteCommentWithHttpInfo($tenant_id, $comment_id, $url_id, $broad * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param string $url_id (required) @@ -21479,9 +18760,9 @@ public function voteCommentWithHttpInfo($tenant_id, $comment_id, $url_id, $broad * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function voteCommentAsync($tenant_id, $comment_id, $url_id, $broadcast_id, $vote_body_params, $session_id = null, $sso = null, string $contentType = self::contentTypes['voteComment'][0]) + public function voteCommentAsync($tenant_id, $comment_id, $url_id, $broadcast_id, $vote_body_params, array $options = []) { - return $this->voteCommentAsyncWithHttpInfo($tenant_id, $comment_id, $url_id, $broadcast_id, $vote_body_params, $session_id, $sso, $contentType) + return $this->voteCommentAsyncWithHttpInfo($tenant_id, $comment_id, $url_id, $broadcast_id, $vote_body_params, $options) ->then( function ($response) { return $response[0]; @@ -21494,6 +18775,8 @@ function ($response) { * * FastComments PHP API Client - A SDK for interacting with the FastComments API * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param string $url_id (required) @@ -21506,10 +18789,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function voteCommentAsyncWithHttpInfo($tenant_id, $comment_id, $url_id, $broadcast_id, $vote_body_params, $session_id = null, $sso = null, string $contentType = self::contentTypes['voteComment'][0]) + public function voteCommentAsyncWithHttpInfo($tenant_id, $comment_id, $url_id, $broadcast_id, $vote_body_params, array $options = []) { $returnType = '\FastComments\Client\Model\VoteResponse'; - $request = $this->voteCommentRequest($tenant_id, $comment_id, $url_id, $broadcast_id, $vote_body_params, $session_id, $sso, $contentType); + $request = $this->voteCommentRequest($tenant_id, $comment_id, $url_id, $broadcast_id, $vote_body_params, $options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -21550,6 +18833,8 @@ function ($exception) { /** * Create request for operation 'voteComment' * + * Note: required parameters (and the request body) are positional; optional parameters are passed as keys of the $options array + * * @param string $tenant_id (required) * @param string $comment_id (required) * @param string $url_id (required) @@ -21562,9 +18847,13 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function voteCommentRequest($tenant_id, $comment_id, $url_id, $broadcast_id, $vote_body_params, $session_id = null, $sso = null, string $contentType = self::contentTypes['voteComment'][0]) + public function voteCommentRequest($tenant_id, $comment_id, $url_id, $broadcast_id, $vote_body_params, array $options = []) { - + // unbox the optional parameters and request options from the $options array + $session_id = array_key_exists('session_id', $options) ? $options['session_id'] : null; + $sso = array_key_exists('sso', $options) ? $options['sso'] : null; + $contentType = $options['contentType'] ?? self::contentTypes['voteComment'][0]; + // verify the required parameter 'tenant_id' is set if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) { throw new \InvalidArgumentException( @@ -21651,7 +18940,7 @@ public function voteCommentRequest($tenant_id, $comment_id, $url_id, $broadcast_ // path params if ($tenant_id !== null) { $resourcePath = str_replace( - '{' . 'tenantId' . '}', + '{tenantId}', ObjectSerializer::toPathValue($tenant_id), $resourcePath ); @@ -21659,7 +18948,7 @@ public function voteCommentRequest($tenant_id, $comment_id, $url_id, $broadcast_ // path params if ($comment_id !== null) { $resourcePath = str_replace( - '{' . 'commentId' . '}', + '{commentId}', ObjectSerializer::toPathValue($comment_id), $resourcePath ); @@ -21742,6 +19031,57 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response + ): array { + if ($dataType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/lib/ApiException.php b/lib/ApiException.php index e46ffb5..702dde2 100644 --- a/lib/ApiException.php +++ b/lib/ApiException.php @@ -1,7 +1,7 @@ tempFolderPath; } + /** + * Sets the certificate file path, for mTLS + * + * @return $this + */ + public function setCertFile($certFile) + { + $this->certFile = $certFile; + return $this; + } + + /** + * Gets the certificate file path, for mTLS + * + * @return string Certificate file path + */ + public function getCertFile() + { + return $this->certFile; + } + + /** + * Sets the certificate key path, for mTLS + * + * @return $this + */ + public function setKeyFile($keyFile) + { + $this->keyFile = $keyFile; + return $this; + } + + /** + * Gets the certificate key path, for mTLS + * + * @return string Certificate key path + */ + public function getKeyFile() + { + return $this->keyFile; + } + + /** * Gets the default configuration instance * diff --git a/lib/FormDataProcessor.php b/lib/FormDataProcessor.php new file mode 100644 index 0000000..5c9165f --- /dev/null +++ b/lib/FormDataProcessor.php @@ -0,0 +1,247 @@ + $values the value of the form parameter + * + * @return array [key => value] of formdata + */ + public function prepare(array $values): array + { + $this->has_file = false; + $result = []; + + foreach ($values as $k => $v) { + if ($v === null) { + continue; + } + + $result[$k] = $this->makeFormSafe($v); + } + + return $result; + } + + /** + * Flattens a multi-level array of data and generates a single-level array + * compatible with formdata - a single-level array where the keys use bracket + * notation to signify nested data. + * + * credit: https://github.com/FranBar1966/FlatPHP + */ + public static function flatten(array $source, string $start = ''): array + { + $opt = [ + 'prefix' => '[', + 'suffix' => ']', + 'suffix-end' => true, + 'prefix-list' => '[', + 'suffix-list' => ']', + 'suffix-list-end' => true, + ]; + + if ($start === '') { + $currentPrefix = ''; + $currentSuffix = ''; + $currentSuffixEnd = false; + } elseif (array_is_list($source)) { + $currentPrefix = $opt['prefix-list']; + $currentSuffix = $opt['suffix-list']; + $currentSuffixEnd = $opt['suffix-list-end']; + } else { + $currentPrefix = $opt['prefix']; + $currentSuffix = $opt['suffix']; + $currentSuffixEnd = $opt['suffix-end']; + } + + $currentName = $start; + $result = []; + + foreach ($source as $key => $val) { + $currentName .= $currentPrefix.$key; + + if (is_array($val) && !empty($val)) { + $currentName .= $currentSuffix; + $result += self::flatten($val, $currentName); + } else { + if ($currentSuffixEnd) { + $currentName .= $currentSuffix; + } + + if (is_resource($val)) { + $result[$currentName] = $val; + } else { + $result[$currentName] = ObjectSerializer::toString($val); + } + } + + $currentName = $start; + } + + return $result; + } + + /** + * formdata must be limited to scalars or arrays of scalar values, + * or a resource for a file upload. Here we iterate through all available + * data and identify how to handle each scenario + */ + protected function makeFormSafe($value) + { + if ($value instanceof SplFileObject) { + return $this->processFiles([$value])[0]; + } + + if (is_resource($value)) { + $this->has_file = true; + + return $value; + } + + if ($value instanceof ModelInterface) { + return $this->processModel($value); + } + + if (is_array($value) || (is_object($value) && !$value instanceof \DateTimeInterface)) { + $data = []; + + foreach ($value as $k => $v) { + $data[$k] = $this->makeFormSafe($v); + } + + return $data; + } + + return ObjectSerializer::toString($value); + } + + /** + * We are able to handle nested ModelInterface. We do not simply call + * json_decode(json_encode()) because any given model may have binary data + * or other data that cannot be serialized to a JSON string + */ + protected function processModel(ModelInterface $model): array + { + $result = []; + + foreach ($model::openAPITypes() as $name => $type) { + $value = $model->offsetGet($name); + + if ($value === null) { + continue; + } + + if (strpos($type, '\SplFileObject') !== false) { + $file = is_array($value) ? $value : [$value]; + $result[$name] = $this->processFiles($file); + + continue; + } + + if ($value instanceof ModelInterface) { + $result[$name] = $this->processModel($value); + + continue; + } + + if (is_array($value) || is_object($value)) { + $result[$name] = $this->makeFormSafe($value); + + continue; + } + + $result[$name] = ObjectSerializer::toString($value); + } + + return $result; + } + + /** + * Handle file data + */ + protected function processFiles(array $files): array + { + $this->has_file = true; + + $result = []; + + foreach ($files as $i => $file) { + if (is_array($file)) { + $result[$i] = $this->processFiles($file); + + continue; + } + + if ($file instanceof StreamInterface) { + $result[$i] = $file; + + continue; + } + + if ($file instanceof SplFileObject) { + $result[$i] = $this->tryFopen($file); + } + } + + return $result; + } + + private function tryFopen(SplFileObject $file) + { + return Utils::tryFopen($file->getRealPath(), 'rb'); + } +} diff --git a/lib/HeaderSelector.php b/lib/HeaderSelector.php index 0537891..688280a 100644 --- a/lib/HeaderSelector.php +++ b/lib/HeaderSelector.php @@ -1,7 +1,7 @@ 'string', 'user_id' => 'string', @@ -73,12 +73,12 @@ class APIAuditLog implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ '_id' => null, 'user_id' => null, @@ -95,10 +95,10 @@ class APIAuditLog implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ '_id' => false, 'user_id' => false, @@ -115,10 +115,10 @@ class APIAuditLog implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -364,14 +364,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -799,11 +799,11 @@ public function setObjectDetails($object_details) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -811,12 +811,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -841,11 +841,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/APIBanUserChangeLog.php b/lib/Model/APIBanUserChangeLog.php index 4fbbaf8..93e2373 100644 --- a/lib/Model/APIBanUserChangeLog.php +++ b/lib/Model/APIBanUserChangeLog.php @@ -2,7 +2,7 @@ /** * APIBanUserChangeLog * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class APIBanUserChangeLog 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 $openAPIModelName = 'APIBanUserChangeLog'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'created_banned_user_id' => 'string', 'updated_banned_user_id' => 'string', @@ -65,12 +65,12 @@ class APIBanUserChangeLog implements ModelInterface, ArrayAccess, \JsonSerializa ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'created_banned_user_id' => null, 'updated_banned_user_id' => null, @@ -79,10 +79,10 @@ class APIBanUserChangeLog implements ModelInterface, ArrayAccess, \JsonSerializa ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'created_banned_user_id' => false, 'updated_banned_user_id' => false, @@ -91,10 +91,10 @@ class APIBanUserChangeLog implements ModelInterface, ArrayAccess, \JsonSerializa ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -270,14 +270,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -421,11 +421,11 @@ public function setChangedValuesBefore($changed_values_before) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -433,12 +433,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -463,11 +463,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/APIBanUserChangedValues.php b/lib/Model/APIBanUserChangedValues.php index 351a441..5b923b6 100644 --- a/lib/Model/APIBanUserChangedValues.php +++ b/lib/Model/APIBanUserChangedValues.php @@ -2,7 +2,7 @@ /** * APIBanUserChangedValues * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class APIBanUserChangedValues 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 $openAPIModelName = 'APIBanUserChangedValues'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ '_id' => 'string', 'tenant_id' => 'string', @@ -74,12 +74,12 @@ class APIBanUserChangedValues implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ '_id' => null, 'tenant_id' => null, @@ -97,10 +97,10 @@ class APIBanUserChangedValues implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ '_id' => false, 'tenant_id' => false, @@ -118,10 +118,10 @@ class APIBanUserChangedValues implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -333,14 +333,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -762,11 +762,11 @@ public function setBanReason($ban_reason) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -774,12 +774,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -804,11 +804,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/APIBannedUser.php b/lib/Model/APIBannedUser.php index 0947446..7bc5350 100644 --- a/lib/Model/APIBannedUser.php +++ b/lib/Model/APIBannedUser.php @@ -2,7 +2,7 @@ /** * APIBannedUser * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class APIBannedUser 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 $openAPIModelName = 'APIBannedUser'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ '_id' => 'string', 'tenant_id' => 'string', @@ -74,12 +74,12 @@ class APIBannedUser implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ '_id' => null, 'tenant_id' => null, @@ -97,10 +97,10 @@ class APIBannedUser implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ '_id' => false, 'tenant_id' => false, @@ -118,10 +118,10 @@ class APIBannedUser implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -333,14 +333,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -377,8 +377,8 @@ public function listInvalidProperties() if ($this->container['ban_type'] === null) { $invalidProperties[] = "'ban_type' can't be null"; } - if ($this->container['banned_until'] === null) { - $invalidProperties[] = "'banned_until' can't be null"; + if ($this->container['banned_until'] === null && !$this->isNullableSetToNull('banned_until')) { + $invalidProperties[] = "'banned_until' is required"; } if ($this->container['has_email_wildcard'] === null) { $invalidProperties[] = "'has_email_wildcard' can't be null"; @@ -699,7 +699,7 @@ public function setBanType($ban_type) /** * Gets banned_until * - * @return \DateTime + * @return \DateTime|null */ public function getBannedUntil() { @@ -709,7 +709,7 @@ public function getBannedUntil() /** * Sets banned_until * - * @param \DateTime $banned_until banned_until + * @param \DateTime|null $banned_until banned_until * * @return self */ @@ -786,11 +786,11 @@ public function setBanReason($ban_reason) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -798,12 +798,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -828,11 +828,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/APIBannedUserWithMultiMatchInfo.php b/lib/Model/APIBannedUserWithMultiMatchInfo.php index d8a1a5c..08e072d 100644 --- a/lib/Model/APIBannedUserWithMultiMatchInfo.php +++ b/lib/Model/APIBannedUserWithMultiMatchInfo.php @@ -2,7 +2,7 @@ /** * APIBannedUserWithMultiMatchInfo * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class APIBannedUserWithMultiMatchInfo 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 $openAPIModelName = 'APIBannedUserWithMultiMatchInfo'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ '_id' => 'string', 'user_id' => 'string', @@ -70,12 +70,12 @@ class APIBannedUserWithMultiMatchInfo implements ModelInterface, ArrayAccess, \J ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ '_id' => null, 'user_id' => null, @@ -89,10 +89,10 @@ class APIBannedUserWithMultiMatchInfo implements ModelInterface, ArrayAccess, \J ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ '_id' => false, 'user_id' => true, @@ -106,10 +106,10 @@ class APIBannedUserWithMultiMatchInfo implements ModelInterface, ArrayAccess, \J ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -305,14 +305,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -337,8 +337,8 @@ public function listInvalidProperties() if ($this->container['ban_type'] === null) { $invalidProperties[] = "'ban_type' can't be null"; } - if ($this->container['banned_until'] === null) { - $invalidProperties[] = "'banned_until' can't be null"; + if ($this->container['banned_until'] === null && !$this->isNullableSetToNull('banned_until')) { + $invalidProperties[] = "'banned_until' is required"; } if ($this->container['has_email_wildcard'] === null) { $invalidProperties[] = "'has_email_wildcard' can't be null"; @@ -520,7 +520,7 @@ public function setIpHash($ip_hash) /** * Gets banned_until * - * @return \DateTime + * @return \DateTime|null */ public function getBannedUntil() { @@ -530,7 +530,7 @@ public function getBannedUntil() /** * Sets banned_until * - * @param \DateTime $banned_until banned_until + * @param \DateTime|null $banned_until banned_until * * @return self */ @@ -634,11 +634,11 @@ public function setMatches($matches) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -646,12 +646,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -676,11 +676,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/APIComment.php b/lib/Model/APIComment.php index a4372c8..3924df4 100644 --- a/lib/Model/APIComment.php +++ b/lib/Model/APIComment.php @@ -2,7 +2,7 @@ /** * APIComment * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class APIComment 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 $openAPIModelName = 'APIComment'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'id' => 'string', 'ai_determined_spam' => 'bool', @@ -114,12 +114,12 @@ class APIComment implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'id' => null, 'ai_determined_spam' => null, @@ -177,10 +177,10 @@ class APIComment implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'id' => false, 'ai_determined_spam' => false, @@ -238,10 +238,10 @@ class APIComment implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -613,14 +613,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -654,11 +654,11 @@ public function listInvalidProperties() if ($this->container['commenter_name'] === null) { $invalidProperties[] = "'commenter_name' can't be null"; } - if ($this->container['date'] === null) { - $invalidProperties[] = "'date' can't be null"; + if ($this->container['date'] === null && !$this->isNullableSetToNull('date')) { + $invalidProperties[] = "'date' is required"; } - if ($this->container['locale'] === null) { - $invalidProperties[] = "'locale' can't be null"; + if ($this->container['locale'] === null && !$this->isNullableSetToNull('locale')) { + $invalidProperties[] = "'locale' is required"; } if ($this->container['tenant_id'] === null) { $invalidProperties[] = "'tenant_id' can't be null"; @@ -1022,7 +1022,7 @@ public function setCommenterName($commenter_name) /** * Gets date * - * @return float + * @return float|null */ public function getDate() { @@ -1032,7 +1032,7 @@ public function getDate() /** * Sets date * - * @param float $date date + * @param float|null $date date * * @return self */ @@ -1686,7 +1686,7 @@ public function setLocalDateString($local_date_string) /** * Gets locale * - * @return string + * @return string|null */ public function getLocale() { @@ -1696,7 +1696,7 @@ public function getLocale() /** * Sets locale * - * @param string $locale locale + * @param string|null $locale locale * * @return self */ @@ -2302,11 +2302,11 @@ public function setVotesUp($votes_up) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -2314,12 +2314,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -2344,11 +2344,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/APICommentBase.php b/lib/Model/APICommentBase.php index 33deb66..ef80909 100644 --- a/lib/Model/APICommentBase.php +++ b/lib/Model/APICommentBase.php @@ -2,7 +2,7 @@ /** * APICommentBase * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class APICommentBase 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 $openAPIModelName = 'APICommentBase'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'id' => 'string', 'ai_determined_spam' => 'bool', @@ -114,12 +114,12 @@ class APICommentBase implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'id' => null, 'ai_determined_spam' => null, @@ -177,10 +177,10 @@ class APICommentBase implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'id' => false, 'ai_determined_spam' => false, @@ -238,10 +238,10 @@ class APICommentBase implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -613,14 +613,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -654,11 +654,11 @@ public function listInvalidProperties() if ($this->container['commenter_name'] === null) { $invalidProperties[] = "'commenter_name' can't be null"; } - if ($this->container['date'] === null) { - $invalidProperties[] = "'date' can't be null"; + if ($this->container['date'] === null && !$this->isNullableSetToNull('date')) { + $invalidProperties[] = "'date' is required"; } - if ($this->container['locale'] === null) { - $invalidProperties[] = "'locale' can't be null"; + if ($this->container['locale'] === null && !$this->isNullableSetToNull('locale')) { + $invalidProperties[] = "'locale' is required"; } if ($this->container['tenant_id'] === null) { $invalidProperties[] = "'tenant_id' can't be null"; @@ -1022,7 +1022,7 @@ public function setCommenterName($commenter_name) /** * Gets date * - * @return \DateTime + * @return \DateTime|null */ public function getDate() { @@ -1032,7 +1032,7 @@ public function getDate() /** * Sets date * - * @param \DateTime $date date + * @param \DateTime|null $date date * * @return self */ @@ -1686,7 +1686,7 @@ public function setLocalDateString($local_date_string) /** * Gets locale * - * @return string + * @return string|null */ public function getLocale() { @@ -1696,7 +1696,7 @@ public function getLocale() /** * Sets locale * - * @param string $locale locale + * @param string|null $locale locale * * @return self */ @@ -2302,11 +2302,11 @@ public function setVotesUp($votes_up) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -2314,12 +2314,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -2344,11 +2344,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/APICommentBaseMeta.php b/lib/Model/APICommentBaseMeta.php index e8a6fb1..9472418 100644 --- a/lib/Model/APICommentBaseMeta.php +++ b/lib/Model/APICommentBaseMeta.php @@ -2,7 +2,7 @@ /** * APICommentBaseMeta * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class APICommentBaseMeta 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 $openAPIModelName = 'APICommentBase_meta'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'wp_user_id' => 'string', 'wp_post_id' => 'string' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'wp_user_id' => null, 'wp_post_id' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'wp_user_id' => false, 'wp_post_id' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -353,11 +353,11 @@ public function setWpPostId($wp_post_id) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -365,12 +365,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -395,11 +395,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/APICommentCommonBannedUser.php b/lib/Model/APICommentCommonBannedUser.php index 23ec6ad..fc76059 100644 --- a/lib/Model/APICommentCommonBannedUser.php +++ b/lib/Model/APICommentCommonBannedUser.php @@ -2,7 +2,7 @@ /** * APICommentCommonBannedUser * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class APICommentCommonBannedUser 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 $openAPIModelName = 'APICommentCommonBannedUser'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ '_id' => 'string', 'user_id' => 'string', @@ -69,12 +69,12 @@ class APICommentCommonBannedUser implements ModelInterface, ArrayAccess, \JsonSe ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ '_id' => null, 'user_id' => null, @@ -87,10 +87,10 @@ class APICommentCommonBannedUser implements ModelInterface, ArrayAccess, \JsonSe ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ '_id' => false, 'user_id' => true, @@ -103,10 +103,10 @@ class APICommentCommonBannedUser implements ModelInterface, ArrayAccess, \JsonSe ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -298,14 +298,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -330,8 +330,8 @@ public function listInvalidProperties() if ($this->container['ban_type'] === null) { $invalidProperties[] = "'ban_type' can't be null"; } - if ($this->container['banned_until'] === null) { - $invalidProperties[] = "'banned_until' can't be null"; + if ($this->container['banned_until'] === null && !$this->isNullableSetToNull('banned_until')) { + $invalidProperties[] = "'banned_until' is required"; } if ($this->container['has_email_wildcard'] === null) { $invalidProperties[] = "'has_email_wildcard' can't be null"; @@ -510,7 +510,7 @@ public function setIpHash($ip_hash) /** * Gets banned_until * - * @return \DateTime + * @return \DateTime|null */ public function getBannedUntil() { @@ -520,7 +520,7 @@ public function getBannedUntil() /** * Sets banned_until * - * @param \DateTime $banned_until banned_until + * @param \DateTime|null $banned_until banned_until * * @return self */ @@ -597,11 +597,11 @@ public function setBanReason($ban_reason) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -609,12 +609,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -639,11 +639,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/APICreateUserBadgeResponse.php b/lib/Model/APICreateUserBadgeResponse.php index 4894aaf..3401854 100644 --- a/lib/Model/APICreateUserBadgeResponse.php +++ b/lib/Model/APICreateUserBadgeResponse.php @@ -2,7 +2,7 @@ /** * APICreateUserBadgeResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class APICreateUserBadgeResponse 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 $openAPIModelName = 'APICreateUserBadgeResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'user_badge' => '\FastComments\Client\Model\UserBadge', @@ -64,12 +64,12 @@ class APICreateUserBadgeResponse implements ModelInterface, ArrayAccess, \JsonSe ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'user_badge' => null, @@ -77,10 +77,10 @@ class APICreateUserBadgeResponse implements ModelInterface, ArrayAccess, \JsonSe ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'user_badge' => false, @@ -88,10 +88,10 @@ class APICreateUserBadgeResponse implements ModelInterface, ArrayAccess, \JsonSe ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -263,14 +263,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -393,11 +393,11 @@ public function setNotes($notes) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -405,12 +405,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -435,11 +435,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/APIDomainConfiguration.php b/lib/Model/APIDomainConfiguration.php index 72947f4..acf8bce 100644 --- a/lib/Model/APIDomainConfiguration.php +++ b/lib/Model/APIDomainConfiguration.php @@ -2,7 +2,7 @@ /** * APIDomainConfiguration * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class APIDomainConfiguration 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 $openAPIModelName = 'APIDomainConfiguration'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'id' => 'string', 'domain' => 'string', @@ -76,12 +76,12 @@ class APIDomainConfiguration implements ModelInterface, ArrayAccess, \JsonSerial ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'id' => null, 'domain' => null, @@ -101,10 +101,10 @@ class APIDomainConfiguration implements ModelInterface, ArrayAccess, \JsonSerial ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'id' => false, 'domain' => false, @@ -124,10 +124,10 @@ class APIDomainConfiguration implements ModelInterface, ArrayAccess, \JsonSerial ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -347,14 +347,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -846,11 +846,11 @@ public function setDisableUnsubscribeLinks($disable_unsubscribe_links) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -858,12 +858,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -888,11 +888,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/APIEmptyResponse.php b/lib/Model/APIEmptyResponse.php index 8437d96..aa57a7b 100644 --- a/lib/Model/APIEmptyResponse.php +++ b/lib/Model/APIEmptyResponse.php @@ -2,7 +2,7 @@ /** * APIEmptyResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,46 +46,46 @@ class APIEmptyResponse 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 $openAPIModelName = 'APIEmptyResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -249,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -322,11 +322,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -334,12 +334,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -364,11 +364,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/APIEmptySuccessResponse.php b/lib/Model/APIEmptySuccessResponse.php index 31cd0f7..5607e53 100644 --- a/lib/Model/APIEmptySuccessResponse.php +++ b/lib/Model/APIEmptySuccessResponse.php @@ -2,7 +2,7 @@ /** * APIEmptySuccessResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,46 +46,46 @@ class APIEmptySuccessResponse 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 $openAPIModelName = 'APIEmptySuccessResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -249,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -322,11 +322,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -334,12 +334,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -364,11 +364,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/APIError.php b/lib/Model/APIError.php index 5797d69..1f0067d 100644 --- a/lib/Model/APIError.php +++ b/lib/Model/APIError.php @@ -2,7 +2,7 @@ /** * APIError * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class APIError 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 $openAPIModelName = 'APIError'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'reason' => 'string', @@ -69,12 +69,12 @@ class APIError implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'reason' => null, @@ -87,10 +87,10 @@ class APIError implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'reason' => false, @@ -103,10 +103,10 @@ class APIError implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -298,14 +298,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -566,11 +566,11 @@ public function setCustomConfig($custom_config) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -578,12 +578,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -608,11 +608,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/APIGetCommentResponse.php b/lib/Model/APIGetCommentResponse.php index 0fedbca..f9bf4d6 100644 --- a/lib/Model/APIGetCommentResponse.php +++ b/lib/Model/APIGetCommentResponse.php @@ -2,7 +2,7 @@ /** * APIGetCommentResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class APIGetCommentResponse 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 $openAPIModelName = 'APIGetCommentResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'comment' => '\FastComments\Client\Model\APIComment' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'comment' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'comment' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setComment($comment) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/APIGetCommentsResponse.php b/lib/Model/APIGetCommentsResponse.php index 7d17bef..7b34f83 100644 --- a/lib/Model/APIGetCommentsResponse.php +++ b/lib/Model/APIGetCommentsResponse.php @@ -2,7 +2,7 @@ /** * APIGetCommentsResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class APIGetCommentsResponse 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 $openAPIModelName = 'APIGetCommentsResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'comments' => '\FastComments\Client\Model\APIComment[]' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'comments' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'comments' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setComments($comments) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/APIGetUserBadgeProgressListResponse.php b/lib/Model/APIGetUserBadgeProgressListResponse.php index 9474655..8404bcc 100644 --- a/lib/Model/APIGetUserBadgeProgressListResponse.php +++ b/lib/Model/APIGetUserBadgeProgressListResponse.php @@ -2,7 +2,7 @@ /** * APIGetUserBadgeProgressListResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class APIGetUserBadgeProgressListResponse 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 $openAPIModelName = 'APIGetUserBadgeProgressListResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'user_badge_progresses' => '\FastComments\Client\Model\UserBadgeProgress[]' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'user_badge_progresses' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'user_badge_progresses' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setUserBadgeProgresses($user_badge_progresses) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/APIGetUserBadgeProgressResponse.php b/lib/Model/APIGetUserBadgeProgressResponse.php index bfc2cbf..7699dd3 100644 --- a/lib/Model/APIGetUserBadgeProgressResponse.php +++ b/lib/Model/APIGetUserBadgeProgressResponse.php @@ -2,7 +2,7 @@ /** * APIGetUserBadgeProgressResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class APIGetUserBadgeProgressResponse 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 $openAPIModelName = 'APIGetUserBadgeProgressResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'user_badge_progress' => '\FastComments\Client\Model\UserBadgeProgress' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'user_badge_progress' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'user_badge_progress' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setUserBadgeProgress($user_badge_progress) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/APIGetUserBadgeResponse.php b/lib/Model/APIGetUserBadgeResponse.php index 0bbf6d8..e2a4d7a 100644 --- a/lib/Model/APIGetUserBadgeResponse.php +++ b/lib/Model/APIGetUserBadgeResponse.php @@ -2,7 +2,7 @@ /** * APIGetUserBadgeResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class APIGetUserBadgeResponse 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 $openAPIModelName = 'APIGetUserBadgeResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'user_badge' => '\FastComments\Client\Model\UserBadge' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'user_badge' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'user_badge' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setUserBadge($user_badge) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/APIGetUserBadgesResponse.php b/lib/Model/APIGetUserBadgesResponse.php index 6d888f2..3ca6ad7 100644 --- a/lib/Model/APIGetUserBadgesResponse.php +++ b/lib/Model/APIGetUserBadgesResponse.php @@ -2,7 +2,7 @@ /** * APIGetUserBadgesResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class APIGetUserBadgesResponse 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 $openAPIModelName = 'APIGetUserBadgesResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'user_badges' => '\FastComments\Client\Model\UserBadge[]' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'user_badges' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'user_badges' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setUserBadges($user_badges) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/APIModerateGetUserBanPreferencesResponse.php b/lib/Model/APIModerateGetUserBanPreferencesResponse.php index 1e0ce86..c9003e7 100644 --- a/lib/Model/APIModerateGetUserBanPreferencesResponse.php +++ b/lib/Model/APIModerateGetUserBanPreferencesResponse.php @@ -2,7 +2,7 @@ /** * APIModerateGetUserBanPreferencesResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class APIModerateGetUserBanPreferencesResponse implements ModelInterface, ArrayA public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'APIModerateGetUserBanPreferencesResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'preferences' => '\FastComments\Client\Model\APIModerateUserBanPreferences', 'status' => '\FastComments\Client\Model\APIStatus' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'preferences' => null, 'status' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'preferences' => true, 'status' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -282,8 +282,8 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['preferences'] === null) { - $invalidProperties[] = "'preferences' can't be null"; + if ($this->container['preferences'] === null && !$this->isNullableSetToNull('preferences')) { + $invalidProperties[] = "'preferences' is required"; } if ($this->container['status'] === null) { $invalidProperties[] = "'status' can't be null"; @@ -306,7 +306,7 @@ public function valid() /** * Gets preferences * - * @return \FastComments\Client\Model\APIModerateUserBanPreferences + * @return \FastComments\Client\Model\APIModerateUserBanPreferences|null */ public function getPreferences() { @@ -316,7 +316,7 @@ public function getPreferences() /** * Sets preferences * - * @param \FastComments\Client\Model\APIModerateUserBanPreferences $preferences preferences + * @param \FastComments\Client\Model\APIModerateUserBanPreferences|null $preferences preferences * * @return self */ @@ -366,11 +366,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -378,12 +378,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -408,11 +408,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/APIModerateUserBanPreferences.php b/lib/Model/APIModerateUserBanPreferences.php index 830cc2b..7d2458a 100644 --- a/lib/Model/APIModerateUserBanPreferences.php +++ b/lib/Model/APIModerateUserBanPreferences.php @@ -2,7 +2,7 @@ /** * APIModerateUserBanPreferences * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class APIModerateUserBanPreferences implements ModelInterface, ArrayAccess, \Jso public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'APIModerateUserBanPreferences'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'should_ban_email' => 'bool', 'should_ban_by_ip' => 'bool', @@ -65,12 +65,12 @@ class APIModerateUserBanPreferences implements ModelInterface, ArrayAccess, \Jso ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'should_ban_email' => null, 'should_ban_by_ip' => null, @@ -79,10 +79,10 @@ class APIModerateUserBanPreferences implements ModelInterface, ArrayAccess, \Jso ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'should_ban_email' => false, 'should_ban_by_ip' => false, @@ -91,10 +91,10 @@ class APIModerateUserBanPreferences implements ModelInterface, ArrayAccess, \Jso ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -270,14 +270,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -433,11 +433,11 @@ public function setLastBanDuration($last_ban_duration) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -445,12 +445,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -475,11 +475,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/APIPage.php b/lib/Model/APIPage.php index 8c6d7b2..096de82 100644 --- a/lib/Model/APIPage.php +++ b/lib/Model/APIPage.php @@ -2,7 +2,7 @@ /** * APIPage * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class APIPage 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 $openAPIModelName = 'APIPage'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'is_closed' => 'bool', 'accessible_by_group_ids' => 'string[]', @@ -70,12 +70,12 @@ class APIPage implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'is_closed' => null, 'accessible_by_group_ids' => null, @@ -89,10 +89,10 @@ class APIPage implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'is_closed' => false, 'accessible_by_group_ids' => false, @@ -106,10 +106,10 @@ class APIPage implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -305,14 +305,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -609,11 +609,11 @@ public function setId($id) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -621,12 +621,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -651,11 +651,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/APISSOUser.php b/lib/Model/APISSOUser.php index e04b8a1..e84afc9 100644 --- a/lib/Model/APISSOUser.php +++ b/lib/Model/APISSOUser.php @@ -2,7 +2,7 @@ /** * APISSOUser * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class APISSOUser 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 $openAPIModelName = 'APISSOUser'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'id' => 'string', 'username' => 'string', @@ -81,12 +81,12 @@ class APISSOUser implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'id' => null, 'username' => null, @@ -111,10 +111,10 @@ class APISSOUser implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'id' => false, 'username' => false, @@ -139,10 +139,10 @@ class APISSOUser implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -382,14 +382,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -1001,11 +1001,11 @@ public function setGroupIds($group_ids) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -1013,12 +1013,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -1043,11 +1043,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/APISaveCommentResponse.php b/lib/Model/APISaveCommentResponse.php index c334514..d7f5326 100644 --- a/lib/Model/APISaveCommentResponse.php +++ b/lib/Model/APISaveCommentResponse.php @@ -2,7 +2,7 @@ /** * APISaveCommentResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class APISaveCommentResponse 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 $openAPIModelName = 'APISaveCommentResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'comment' => '\FastComments\Client\Model\APIComment', @@ -65,12 +65,12 @@ class APISaveCommentResponse implements ModelInterface, ArrayAccess, \JsonSerial ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'comment' => null, @@ -79,10 +79,10 @@ class APISaveCommentResponse implements ModelInterface, ArrayAccess, \JsonSerial ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'comment' => false, @@ -91,10 +91,10 @@ class APISaveCommentResponse implements ModelInterface, ArrayAccess, \JsonSerial ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -270,14 +270,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -302,8 +302,8 @@ public function listInvalidProperties() if ($this->container['comment'] === null) { $invalidProperties[] = "'comment' can't be null"; } - if ($this->container['user'] === null) { - $invalidProperties[] = "'user' can't be null"; + if ($this->container['user'] === null && !$this->isNullableSetToNull('user')) { + $invalidProperties[] = "'user' is required"; } return $invalidProperties; } @@ -377,7 +377,7 @@ public function setComment($comment) /** * Gets user * - * @return \FastComments\Client\Model\UserSessionInfo + * @return \FastComments\Client\Model\UserSessionInfo|null */ public function getUser() { @@ -387,7 +387,7 @@ public function getUser() /** * Sets user * - * @param \FastComments\Client\Model\UserSessionInfo $user user + * @param \FastComments\Client\Model\UserSessionInfo|null $user user * * @return self */ @@ -437,11 +437,11 @@ public function setModuleData($module_data) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -449,12 +449,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -479,11 +479,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/APIStatus.php b/lib/Model/APIStatus.php index 07ed27a..b8520d5 100644 --- a/lib/Model/APIStatus.php +++ b/lib/Model/APIStatus.php @@ -2,7 +2,7 @@ /** * APIStatus * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** diff --git a/lib/Model/APITenant.php b/lib/Model/APITenant.php index d11214b..f734e07 100644 --- a/lib/Model/APITenant.php +++ b/lib/Model/APITenant.php @@ -2,7 +2,7 @@ /** * APITenant * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class APITenant 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 $openAPIModelName = 'APITenant'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'id' => 'string', 'name' => 'string', @@ -89,12 +89,12 @@ class APITenant implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'id' => null, 'name' => null, @@ -127,10 +127,10 @@ class APITenant implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'id' => false, 'name' => false, @@ -163,10 +163,10 @@ class APITenant implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -438,14 +438,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -1277,11 +1277,11 @@ public function setMeta($meta) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -1289,12 +1289,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -1319,11 +1319,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/APITenantDailyUsage.php b/lib/Model/APITenantDailyUsage.php index 6b4240c..cbd3eba 100644 --- a/lib/Model/APITenantDailyUsage.php +++ b/lib/Model/APITenantDailyUsage.php @@ -2,7 +2,7 @@ /** * APITenantDailyUsage * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class APITenantDailyUsage 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 $openAPIModelName = 'APITenantDailyUsage'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'id' => 'string', 'tenant_id' => 'string', @@ -80,12 +80,12 @@ class APITenantDailyUsage implements ModelInterface, ArrayAccess, \JsonSerializa ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'id' => null, 'tenant_id' => null, @@ -109,10 +109,10 @@ class APITenantDailyUsage implements ModelInterface, ArrayAccess, \JsonSerializa ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'id' => false, 'tenant_id' => false, @@ -136,10 +136,10 @@ class APITenantDailyUsage implements ModelInterface, ArrayAccess, \JsonSerializa ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -375,14 +375,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -988,11 +988,11 @@ public function setApiErrorCount($api_error_count) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -1000,12 +1000,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -1030,11 +1030,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/APITicket.php b/lib/Model/APITicket.php index 776298b..14f0bc2 100644 --- a/lib/Model/APITicket.php +++ b/lib/Model/APITicket.php @@ -2,7 +2,7 @@ /** * APITicket * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class APITicket 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 $openAPIModelName = 'APITicket'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ '_id' => 'string', 'url_id' => 'string', @@ -70,12 +70,12 @@ class APITicket implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ '_id' => null, 'url_id' => null, @@ -89,10 +89,10 @@ class APITicket implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ '_id' => false, 'url_id' => false, @@ -106,10 +106,10 @@ class APITicket implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -305,14 +305,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -618,11 +618,11 @@ public function setFileCount($file_count) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -630,12 +630,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -660,11 +660,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/APITicketDetail.php b/lib/Model/APITicketDetail.php index 3867c72..8a4ac0f 100644 --- a/lib/Model/APITicketDetail.php +++ b/lib/Model/APITicketDetail.php @@ -2,7 +2,7 @@ /** * APITicketDetail * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class APITicketDetail 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 $openAPIModelName = 'APITicketDetail'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ '_id' => 'string', 'url_id' => 'string', @@ -74,12 +74,12 @@ class APITicketDetail implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ '_id' => null, 'url_id' => null, @@ -97,10 +97,10 @@ class APITicketDetail implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ '_id' => false, 'url_id' => false, @@ -118,10 +118,10 @@ class APITicketDetail implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -333,14 +333,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -778,11 +778,11 @@ public function setAckAt($ack_at) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -790,12 +790,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -820,11 +820,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/APITicketFile.php b/lib/Model/APITicketFile.php index 753907e..ff5ee66 100644 --- a/lib/Model/APITicketFile.php +++ b/lib/Model/APITicketFile.php @@ -2,7 +2,7 @@ /** * APITicketFile * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class APITicketFile 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 $openAPIModelName = 'APITicketFile'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'id' => 'string', 's3_key' => 'string', @@ -71,12 +71,12 @@ class APITicketFile implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'id' => null, 's3_key' => null, @@ -91,10 +91,10 @@ class APITicketFile implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'id' => false, 's3_key' => false, @@ -109,10 +109,10 @@ class APITicketFile implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -312,14 +312,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -652,11 +652,11 @@ public function setExpired($expired) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -664,12 +664,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -694,11 +694,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/APIUserSubscription.php b/lib/Model/APIUserSubscription.php index 78aa24a..ffbac69 100644 --- a/lib/Model/APIUserSubscription.php +++ b/lib/Model/APIUserSubscription.php @@ -2,7 +2,7 @@ /** * APIUserSubscription * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class APIUserSubscription 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 $openAPIModelName = 'APIUserSubscription'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'notification_frequency' => 'float', 'created_at' => '\DateTime', @@ -69,12 +69,12 @@ class APIUserSubscription implements ModelInterface, ArrayAccess, \JsonSerializa ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'notification_frequency' => 'double', 'created_at' => 'date-time', @@ -87,10 +87,10 @@ class APIUserSubscription implements ModelInterface, ArrayAccess, \JsonSerializa ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'notification_frequency' => false, 'created_at' => false, @@ -103,10 +103,10 @@ class APIUserSubscription implements ModelInterface, ArrayAccess, \JsonSerializa ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -298,14 +298,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -566,11 +566,11 @@ public function setId($id) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -578,12 +578,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -608,11 +608,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/AddDomainConfigParams.php b/lib/Model/AddDomainConfigParams.php index 11fd23d..8f04744 100644 --- a/lib/Model/AddDomainConfigParams.php +++ b/lib/Model/AddDomainConfigParams.php @@ -2,7 +2,7 @@ /** * AddDomainConfigParams * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class AddDomainConfigParams 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 $openAPIModelName = 'AddDomainConfigParams'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'domain' => 'string', 'email_from_name' => 'string', @@ -68,12 +68,12 @@ class AddDomainConfigParams implements ModelInterface, ArrayAccess, \JsonSeriali ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'domain' => null, 'email_from_name' => null, @@ -85,10 +85,10 @@ class AddDomainConfigParams implements ModelInterface, ArrayAccess, \JsonSeriali ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'domain' => false, 'email_from_name' => false, @@ -100,10 +100,10 @@ class AddDomainConfigParams implements ModelInterface, ArrayAccess, \JsonSeriali ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -291,14 +291,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -526,11 +526,11 @@ public function setEmailHeaders($email_headers) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -538,12 +538,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -568,11 +568,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/AddDomainConfigResponse.php b/lib/Model/AddDomainConfigResponse.php index e23d782..faf622e 100644 --- a/lib/Model/AddDomainConfigResponse.php +++ b/lib/Model/AddDomainConfigResponse.php @@ -2,7 +2,7 @@ /** * AddDomainConfigResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class AddDomainConfigResponse 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 $openAPIModelName = 'AddDomainConfigResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'reason' => 'string', 'code' => 'string', @@ -65,12 +65,12 @@ class AddDomainConfigResponse implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'reason' => null, 'code' => null, @@ -79,10 +79,10 @@ class AddDomainConfigResponse implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'reason' => false, 'code' => false, @@ -91,10 +91,10 @@ class AddDomainConfigResponse implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -270,14 +270,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -296,17 +296,8 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['reason'] === null) { - $invalidProperties[] = "'reason' can't be null"; - } - if ($this->container['code'] === null) { - $invalidProperties[] = "'code' can't be null"; - } - if ($this->container['status'] === null) { - $invalidProperties[] = "'status' can't be null"; - } - if ($this->container['configuration'] === null) { - $invalidProperties[] = "'configuration' can't be null"; + if ($this->container['status'] === null && !$this->isNullableSetToNull('status')) { + $invalidProperties[] = "'status' is required"; } return $invalidProperties; } @@ -326,7 +317,7 @@ public function valid() /** * Gets reason * - * @return string + * @return string|null */ public function getReason() { @@ -336,7 +327,7 @@ public function getReason() /** * Sets reason * - * @param string $reason reason + * @param string|null $reason reason * * @return self */ @@ -353,7 +344,7 @@ public function setReason($reason) /** * Gets code * - * @return string + * @return string|null */ public function getCode() { @@ -363,7 +354,7 @@ public function getCode() /** * Sets code * - * @param string $code code + * @param string|null $code code * * @return self */ @@ -380,7 +371,7 @@ public function setCode($code) /** * Gets status * - * @return mixed + * @return mixed|null */ public function getStatus() { @@ -390,7 +381,7 @@ public function getStatus() /** * Sets status * - * @param mixed $status status + * @param mixed|null $status status * * @return self */ @@ -414,7 +405,7 @@ public function setStatus($status) /** * Gets configuration * - * @return mixed + * @return mixed|null */ public function getConfiguration() { @@ -424,7 +415,7 @@ public function getConfiguration() /** * Sets configuration * - * @param mixed $configuration configuration + * @param mixed|null $configuration configuration * * @return self */ @@ -447,11 +438,11 @@ public function setConfiguration($configuration) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -459,12 +450,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -489,11 +480,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/AddDomainConfigResponseAnyOf.php b/lib/Model/AddDomainConfigResponseAnyOf.php index b63f90a..0a2cfc2 100644 --- a/lib/Model/AddDomainConfigResponseAnyOf.php +++ b/lib/Model/AddDomainConfigResponseAnyOf.php @@ -2,7 +2,7 @@ /** * AddDomainConfigResponseAnyOf * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class AddDomainConfigResponseAnyOf 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 $openAPIModelName = 'AddDomainConfigResponse_anyOf'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'configuration' => 'mixed', 'status' => 'mixed' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'configuration' => null, 'status' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'configuration' => true, 'status' => true ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -282,11 +282,11 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['configuration'] === null) { - $invalidProperties[] = "'configuration' can't be null"; + if ($this->container['configuration'] === null && !$this->isNullableSetToNull('configuration')) { + $invalidProperties[] = "'configuration' is required"; } - if ($this->container['status'] === null) { - $invalidProperties[] = "'status' can't be null"; + if ($this->container['status'] === null && !$this->isNullableSetToNull('status')) { + $invalidProperties[] = "'status' is required"; } return $invalidProperties; } @@ -306,7 +306,7 @@ public function valid() /** * Gets configuration * - * @return mixed + * @return mixed|null */ public function getConfiguration() { @@ -316,7 +316,7 @@ public function getConfiguration() /** * Sets configuration * - * @param mixed $configuration configuration + * @param mixed|null $configuration configuration * * @return self */ @@ -340,7 +340,7 @@ public function setConfiguration($configuration) /** * Gets status * - * @return mixed + * @return mixed|null */ public function getStatus() { @@ -350,7 +350,7 @@ public function getStatus() /** * Sets status * - * @param mixed $status status + * @param mixed|null $status status * * @return self */ @@ -373,11 +373,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -385,12 +385,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -415,11 +415,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/AddPageAPIResponse.php b/lib/Model/AddPageAPIResponse.php index 4f1b905..18b2723 100644 --- a/lib/Model/AddPageAPIResponse.php +++ b/lib/Model/AddPageAPIResponse.php @@ -2,7 +2,7 @@ /** * AddPageAPIResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class AddPageAPIResponse 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 $openAPIModelName = 'AddPageAPIResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'reason' => 'string', 'code' => 'string', @@ -65,12 +65,12 @@ class AddPageAPIResponse implements ModelInterface, ArrayAccess, \JsonSerializab ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'reason' => null, 'code' => null, @@ -79,10 +79,10 @@ class AddPageAPIResponse implements ModelInterface, ArrayAccess, \JsonSerializab ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'reason' => false, 'code' => false, @@ -91,10 +91,10 @@ class AddPageAPIResponse implements ModelInterface, ArrayAccess, \JsonSerializab ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -270,14 +270,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -424,11 +424,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -436,12 +436,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -466,11 +466,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/AddSSOUserAPIResponse.php b/lib/Model/AddSSOUserAPIResponse.php index 49993e6..dbbe4a6 100644 --- a/lib/Model/AddSSOUserAPIResponse.php +++ b/lib/Model/AddSSOUserAPIResponse.php @@ -2,7 +2,7 @@ /** * AddSSOUserAPIResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class AddSSOUserAPIResponse 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 $openAPIModelName = 'AddSSOUserAPIResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'reason' => 'string', 'code' => 'string', @@ -65,12 +65,12 @@ class AddSSOUserAPIResponse implements ModelInterface, ArrayAccess, \JsonSeriali ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'reason' => null, 'code' => null, @@ -79,10 +79,10 @@ class AddSSOUserAPIResponse implements ModelInterface, ArrayAccess, \JsonSeriali ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'reason' => false, 'code' => false, @@ -91,10 +91,10 @@ class AddSSOUserAPIResponse implements ModelInterface, ArrayAccess, \JsonSeriali ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -270,14 +270,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -424,11 +424,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -436,12 +436,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -466,11 +466,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/AdjustCommentVotesParams.php b/lib/Model/AdjustCommentVotesParams.php index d79370e..d0ae006 100644 --- a/lib/Model/AdjustCommentVotesParams.php +++ b/lib/Model/AdjustCommentVotesParams.php @@ -2,7 +2,7 @@ /** * AdjustCommentVotesParams * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,46 +46,46 @@ class AdjustCommentVotesParams 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 $openAPIModelName = 'AdjustCommentVotesParams'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'adjust_vote_amount' => 'float' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'adjust_vote_amount' => 'double' ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'adjust_vote_amount' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -249,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -322,11 +322,11 @@ public function setAdjustVoteAmount($adjust_vote_amount) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -334,12 +334,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -364,11 +364,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/AdjustVotesResponse.php b/lib/Model/AdjustVotesResponse.php index c9d1145..ed264f5 100644 --- a/lib/Model/AdjustVotesResponse.php +++ b/lib/Model/AdjustVotesResponse.php @@ -2,7 +2,7 @@ /** * AdjustVotesResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class AdjustVotesResponse 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 $openAPIModelName = 'AdjustVotesResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => 'string', 'new_comment_votes' => 'int' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'new_comment_votes' => 'int32' ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'new_comment_votes' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setNewCommentVotes($new_comment_votes) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/AggregateQuestionResultsResponse.php b/lib/Model/AggregateQuestionResultsResponse.php index 7a579b8..e289d5d 100644 --- a/lib/Model/AggregateQuestionResultsResponse.php +++ b/lib/Model/AggregateQuestionResultsResponse.php @@ -2,7 +2,7 @@ /** * AggregateQuestionResultsResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class AggregateQuestionResultsResponse 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 $openAPIModelName = 'AggregateQuestionResultsResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'data' => '\FastComments\Client\Model\QuestionResultAggregationOverall' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'data' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'data' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setData($data) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/AggregateResponse.php b/lib/Model/AggregateResponse.php index ed2e9a1..9733ec3 100644 --- a/lib/Model/AggregateResponse.php +++ b/lib/Model/AggregateResponse.php @@ -2,7 +2,7 @@ /** * AggregateResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class AggregateResponse 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 $openAPIModelName = 'AggregateResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'data' => '\FastComments\Client\Model\AggregationItem[]', @@ -67,12 +67,12 @@ class AggregateResponse implements ModelInterface, ArrayAccess, \JsonSerializabl ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'data' => null, @@ -83,10 +83,10 @@ class AggregateResponse implements ModelInterface, ArrayAccess, \JsonSerializabl ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'data' => false, @@ -97,10 +97,10 @@ class AggregateResponse implements ModelInterface, ArrayAccess, \JsonSerializabl ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -284,14 +284,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -313,15 +313,6 @@ public function listInvalidProperties() if ($this->container['status'] === null) { $invalidProperties[] = "'status' can't be null"; } - if ($this->container['data'] === null) { - $invalidProperties[] = "'data' can't be null"; - } - if ($this->container['reason'] === null) { - $invalidProperties[] = "'reason' can't be null"; - } - if ($this->container['code'] === null) { - $invalidProperties[] = "'code' can't be null"; - } return $invalidProperties; } @@ -367,7 +358,7 @@ public function setStatus($status) /** * Gets data * - * @return \FastComments\Client\Model\AggregationItem[] + * @return \FastComments\Client\Model\AggregationItem[]|null */ public function getData() { @@ -377,7 +368,7 @@ public function getData() /** * Sets data * - * @param \FastComments\Client\Model\AggregationItem[] $data data + * @param \FastComments\Client\Model\AggregationItem[]|null $data data * * @return self */ @@ -421,7 +412,7 @@ public function setStats($stats) /** * Gets reason * - * @return string + * @return string|null */ public function getReason() { @@ -431,7 +422,7 @@ public function getReason() /** * Sets reason * - * @param string $reason reason + * @param string|null $reason reason * * @return self */ @@ -448,7 +439,7 @@ public function setReason($reason) /** * Gets code * - * @return string + * @return string|null */ public function getCode() { @@ -458,7 +449,7 @@ public function getCode() /** * Sets code * - * @param string $code code + * @param string|null $code code * * @return self */ @@ -501,11 +492,11 @@ public function setValidResourceNames($valid_resource_names) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -513,12 +504,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -543,11 +534,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/AggregateTimeBucket.php b/lib/Model/AggregateTimeBucket.php index f821bde..9974ac0 100644 --- a/lib/Model/AggregateTimeBucket.php +++ b/lib/Model/AggregateTimeBucket.php @@ -2,7 +2,7 @@ /** * AggregateTimeBucket * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** diff --git a/lib/Model/AggregationAPIError.php b/lib/Model/AggregationAPIError.php index 9c9f2a5..90fe1d2 100644 --- a/lib/Model/AggregationAPIError.php +++ b/lib/Model/AggregationAPIError.php @@ -2,7 +2,7 @@ /** * AggregationAPIError * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class AggregationAPIError 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 $openAPIModelName = 'AggregationAPIError'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'reason' => 'string', @@ -65,12 +65,12 @@ class AggregationAPIError implements ModelInterface, ArrayAccess, \JsonSerializa ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'reason' => null, @@ -79,10 +79,10 @@ class AggregationAPIError implements ModelInterface, ArrayAccess, \JsonSerializa ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'reason' => false, @@ -91,10 +91,10 @@ class AggregationAPIError implements ModelInterface, ArrayAccess, \JsonSerializa ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -270,14 +270,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -430,11 +430,11 @@ public function setValidResourceNames($valid_resource_names) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -442,12 +442,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -472,11 +472,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/AggregationItem.php b/lib/Model/AggregationItem.php index 80be9a4..61cc009 100644 --- a/lib/Model/AggregationItem.php +++ b/lib/Model/AggregationItem.php @@ -2,7 +2,7 @@ /** * AggregationItem * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,46 +46,46 @@ class AggregationItem 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 $openAPIModelName = 'AggregationItem'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'groups' => 'array' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'groups' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'groups' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -249,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -319,11 +319,11 @@ public function setGroups($groups) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -331,12 +331,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -361,11 +361,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/AggregationOpType.php b/lib/Model/AggregationOpType.php index 4abbc14..1e5dfc7 100644 --- a/lib/Model/AggregationOpType.php +++ b/lib/Model/AggregationOpType.php @@ -2,7 +2,7 @@ /** * AggregationOpType * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** diff --git a/lib/Model/AggregationOperation.php b/lib/Model/AggregationOperation.php index d946a25..4e9b76d 100644 --- a/lib/Model/AggregationOperation.php +++ b/lib/Model/AggregationOperation.php @@ -2,7 +2,7 @@ /** * AggregationOperation * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -47,17 +47,17 @@ class AggregationOperation 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 $openAPIModelName = 'AggregationOperation'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'field' => 'string', 'op' => '\FastComments\Client\Model\AggregationOpType', @@ -66,12 +66,12 @@ class AggregationOperation implements ModelInterface, ArrayAccess, \JsonSerializ ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'field' => null, 'op' => null, @@ -80,10 +80,10 @@ class AggregationOperation implements ModelInterface, ArrayAccess, \JsonSerializ ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'field' => false, 'op' => false, @@ -92,10 +92,10 @@ class AggregationOperation implements ModelInterface, ArrayAccess, \JsonSerializ ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -271,14 +271,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -428,11 +428,11 @@ public function setExpandArray($expand_array) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -440,12 +440,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -470,11 +470,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/AggregationRequest.php b/lib/Model/AggregationRequest.php index 6840878..f6a9b09 100644 --- a/lib/Model/AggregationRequest.php +++ b/lib/Model/AggregationRequest.php @@ -2,7 +2,7 @@ /** * AggregationRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -47,17 +47,17 @@ class AggregationRequest 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 $openAPIModelName = 'AggregationRequest'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'query' => '\FastComments\Client\Model\QueryPredicate[]', 'resource_name' => 'string', @@ -67,12 +67,12 @@ class AggregationRequest implements ModelInterface, ArrayAccess, \JsonSerializab ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'query' => null, 'resource_name' => null, @@ -82,10 +82,10 @@ class AggregationRequest implements ModelInterface, ArrayAccess, \JsonSerializab ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'query' => false, 'resource_name' => false, @@ -95,10 +95,10 @@ class AggregationRequest implements ModelInterface, ArrayAccess, \JsonSerializab ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -278,14 +278,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -462,11 +462,11 @@ public function setSort($sort) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -474,12 +474,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -504,11 +504,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/AggregationRequestSort.php b/lib/Model/AggregationRequestSort.php index 974e4c5..ab928a1 100644 --- a/lib/Model/AggregationRequestSort.php +++ b/lib/Model/AggregationRequestSort.php @@ -2,7 +2,7 @@ /** * AggregationRequestSort * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class AggregationRequestSort 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 $openAPIModelName = 'AggregationRequest_sort'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'dir' => 'string', 'field' => 'string' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'dir' => null, 'field' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'dir' => false, 'field' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -271,14 +271,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -393,11 +393,11 @@ public function setField($field) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -405,12 +405,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -435,11 +435,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/AggregationResponse.php b/lib/Model/AggregationResponse.php index 5eafcf1..f333adc 100644 --- a/lib/Model/AggregationResponse.php +++ b/lib/Model/AggregationResponse.php @@ -2,7 +2,7 @@ /** * AggregationResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -47,17 +47,17 @@ class AggregationResponse 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 $openAPIModelName = 'AggregationResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'data' => '\FastComments\Client\Model\AggregationItem[]', @@ -65,12 +65,12 @@ class AggregationResponse implements ModelInterface, ArrayAccess, \JsonSerializa ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'data' => null, @@ -78,10 +78,10 @@ class AggregationResponse implements ModelInterface, ArrayAccess, \JsonSerializa ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'data' => false, @@ -89,10 +89,10 @@ class AggregationResponse implements ModelInterface, ArrayAccess, \JsonSerializa ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -264,14 +264,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -394,11 +394,11 @@ public function setStats($stats) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -406,12 +406,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -436,11 +436,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/AggregationResponseStats.php b/lib/Model/AggregationResponseStats.php index 5edc2cd..867d4ec 100644 --- a/lib/Model/AggregationResponseStats.php +++ b/lib/Model/AggregationResponseStats.php @@ -2,7 +2,7 @@ /** * AggregationResponseStats * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class AggregationResponseStats 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 $openAPIModelName = 'AggregationResponse_stats'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'time_ms' => 'int', 'scanned' => 'int' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'time_ms' => 'int64', 'scanned' => 'int64' ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'time_ms' => false, 'scanned' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setScanned($scanned) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/AggregationValue.php b/lib/Model/AggregationValue.php index a4d4b6d..762ebf0 100644 --- a/lib/Model/AggregationValue.php +++ b/lib/Model/AggregationValue.php @@ -2,7 +2,7 @@ /** * AggregationValue * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class AggregationValue 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 $openAPIModelName = 'AggregationValue'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'groups' => 'array', 'string_value' => 'string', @@ -66,12 +66,12 @@ class AggregationValue implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'groups' => null, 'string_value' => null, @@ -81,10 +81,10 @@ class AggregationValue implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'groups' => false, 'string_value' => false, @@ -94,10 +94,10 @@ class AggregationValue implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -277,14 +277,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -455,11 +455,11 @@ public function setDistinctCounts($distinct_counts) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -467,12 +467,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -497,11 +497,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/AwardUserBadgeResponse.php b/lib/Model/AwardUserBadgeResponse.php index 326c504..246c684 100644 --- a/lib/Model/AwardUserBadgeResponse.php +++ b/lib/Model/AwardUserBadgeResponse.php @@ -2,7 +2,7 @@ /** * AwardUserBadgeResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class AwardUserBadgeResponse 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 $openAPIModelName = 'AwardUserBadgeResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'notes' => 'string[]', 'badges' => '\FastComments\Client\Model\CommentUserBadgeInfo[]', @@ -64,12 +64,12 @@ class AwardUserBadgeResponse implements ModelInterface, ArrayAccess, \JsonSerial ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'notes' => null, 'badges' => null, @@ -77,10 +77,10 @@ class AwardUserBadgeResponse implements ModelInterface, ArrayAccess, \JsonSerial ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'notes' => false, 'badges' => false, @@ -88,10 +88,10 @@ class AwardUserBadgeResponse implements ModelInterface, ArrayAccess, \JsonSerial ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -263,14 +263,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -390,11 +390,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -402,12 +402,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -432,11 +432,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/BanUserFromCommentResult.php b/lib/Model/BanUserFromCommentResult.php index 1fe74b5..d53347e 100644 --- a/lib/Model/BanUserFromCommentResult.php +++ b/lib/Model/BanUserFromCommentResult.php @@ -2,7 +2,7 @@ /** * BanUserFromCommentResult * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class BanUserFromCommentResult 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 $openAPIModelName = 'BanUserFromCommentResult'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => 'string', 'changelog' => '\FastComments\Client\Model\APIBanUserChangeLog', @@ -65,12 +65,12 @@ class BanUserFromCommentResult implements ModelInterface, ArrayAccess, \JsonSeri ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'changelog' => null, @@ -79,10 +79,10 @@ class BanUserFromCommentResult implements ModelInterface, ArrayAccess, \JsonSeri ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'changelog' => false, @@ -91,10 +91,10 @@ class BanUserFromCommentResult implements ModelInterface, ArrayAccess, \JsonSeri ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -270,14 +270,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -424,11 +424,11 @@ public function setReason($reason) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -436,12 +436,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -466,11 +466,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/BanUserUndoParams.php b/lib/Model/BanUserUndoParams.php index 83fb834..d040cd7 100644 --- a/lib/Model/BanUserUndoParams.php +++ b/lib/Model/BanUserUndoParams.php @@ -2,7 +2,7 @@ /** * BanUserUndoParams * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,46 +46,46 @@ class BanUserUndoParams 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 $openAPIModelName = 'BanUserUndoParams'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'changelog' => '\FastComments\Client\Model\APIBanUserChangeLog' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'changelog' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'changelog' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -249,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -322,11 +322,11 @@ public function setChangelog($changelog) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -334,12 +334,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -364,11 +364,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/BannedUserMatch.php b/lib/Model/BannedUserMatch.php index 9c57870..5749cbe 100644 --- a/lib/Model/BannedUserMatch.php +++ b/lib/Model/BannedUserMatch.php @@ -2,7 +2,7 @@ /** * BannedUserMatch * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class BannedUserMatch 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 $openAPIModelName = 'BannedUserMatch'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'matched_on' => '\FastComments\Client\Model\BannedUserMatchType', 'matched_on_value' => '\FastComments\Client\Model\BannedUserMatchMatchedOnValue' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'matched_on' => null, 'matched_on_value' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'matched_on' => false, 'matched_on_value' => true ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -285,8 +285,8 @@ public function listInvalidProperties() if ($this->container['matched_on'] === null) { $invalidProperties[] = "'matched_on' can't be null"; } - if ($this->container['matched_on_value'] === null) { - $invalidProperties[] = "'matched_on_value' can't be null"; + if ($this->container['matched_on_value'] === null && !$this->isNullableSetToNull('matched_on_value')) { + $invalidProperties[] = "'matched_on_value' is required"; } return $invalidProperties; } @@ -333,7 +333,7 @@ public function setMatchedOn($matched_on) /** * Gets matched_on_value * - * @return \FastComments\Client\Model\BannedUserMatchMatchedOnValue + * @return \FastComments\Client\Model\BannedUserMatchMatchedOnValue|null */ public function getMatchedOnValue() { @@ -343,7 +343,7 @@ public function getMatchedOnValue() /** * Sets matched_on_value * - * @param \FastComments\Client\Model\BannedUserMatchMatchedOnValue $matched_on_value matched_on_value + * @param \FastComments\Client\Model\BannedUserMatchMatchedOnValue|null $matched_on_value matched_on_value * * @return self */ @@ -366,11 +366,11 @@ public function setMatchedOnValue($matched_on_value) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -378,12 +378,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -408,11 +408,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/BannedUserMatchMatchedOnValue.php b/lib/Model/BannedUserMatchMatchedOnValue.php index d2da246..2a0aaca 100644 --- a/lib/Model/BannedUserMatchMatchedOnValue.php +++ b/lib/Model/BannedUserMatchMatchedOnValue.php @@ -2,7 +2,7 @@ /** * BannedUserMatchMatchedOnValue * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,46 +46,46 @@ class BannedUserMatchMatchedOnValue implements ModelInterface, ArrayAccess, \Jso public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'BannedUserMatch_matchedOnValue'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -248,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -291,11 +291,11 @@ public function valid() /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -303,12 +303,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -333,11 +333,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/BannedUserMatchType.php b/lib/Model/BannedUserMatchType.php index 0c08500..10708ea 100644 --- a/lib/Model/BannedUserMatchType.php +++ b/lib/Model/BannedUserMatchType.php @@ -2,7 +2,7 @@ /** * BannedUserMatchType * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** diff --git a/lib/Model/BillingInfo.php b/lib/Model/BillingInfo.php index 278d2c3..4fb5cdb 100644 --- a/lib/Model/BillingInfo.php +++ b/lib/Model/BillingInfo.php @@ -2,7 +2,7 @@ /** * BillingInfo * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class BillingInfo 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 $openAPIModelName = 'BillingInfo'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'name' => 'string', 'address' => 'string', @@ -69,12 +69,12 @@ class BillingInfo implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'name' => null, 'address' => null, @@ -87,10 +87,10 @@ class BillingInfo implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'name' => false, 'address' => false, @@ -103,10 +103,10 @@ class BillingInfo implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -298,14 +298,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -582,11 +582,11 @@ public function setEmail($email) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -594,12 +594,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -624,11 +624,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/BlockFromCommentParams.php b/lib/Model/BlockFromCommentParams.php index f37f02c..e421bda 100644 --- a/lib/Model/BlockFromCommentParams.php +++ b/lib/Model/BlockFromCommentParams.php @@ -2,7 +2,7 @@ /** * BlockFromCommentParams * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,46 +46,46 @@ class BlockFromCommentParams 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 $openAPIModelName = 'BlockFromCommentParams'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'comment_ids_to_check' => 'string[]' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'comment_ids_to_check' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'comment_ids_to_check' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -249,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -319,11 +319,11 @@ public function setCommentIdsToCheck($comment_ids_to_check) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -331,12 +331,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -361,11 +361,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/BlockSuccess.php b/lib/Model/BlockSuccess.php index 8c268fc..837b0c9 100644 --- a/lib/Model/BlockSuccess.php +++ b/lib/Model/BlockSuccess.php @@ -2,7 +2,7 @@ /** * BlockSuccess * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class BlockSuccess 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 $openAPIModelName = 'BlockSuccess'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'comment_statuses' => 'array' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'comment_statuses' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'comment_statuses' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setCommentStatuses($comment_statuses) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/BuildModerationFilterParams.php b/lib/Model/BuildModerationFilterParams.php index ec34d74..a00ef06 100644 --- a/lib/Model/BuildModerationFilterParams.php +++ b/lib/Model/BuildModerationFilterParams.php @@ -2,7 +2,7 @@ /** * BuildModerationFilterParams * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class BuildModerationFilterParams implements ModelInterface, ArrayAccess, \JsonS public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'BuildModerationFilterParams'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'user_id' => 'string', 'tenant_id' => 'string', @@ -66,12 +66,12 @@ class BuildModerationFilterParams implements ModelInterface, ArrayAccess, \JsonS ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'user_id' => null, 'tenant_id' => null, @@ -81,10 +81,10 @@ class BuildModerationFilterParams implements ModelInterface, ArrayAccess, \JsonS ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'user_id' => false, 'tenant_id' => false, @@ -94,10 +94,10 @@ class BuildModerationFilterParams implements ModelInterface, ArrayAccess, \JsonS ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -277,14 +277,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -461,11 +461,11 @@ public function setTextSearch($text_search) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -473,12 +473,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -503,11 +503,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/BuildModerationFilterResponse.php b/lib/Model/BuildModerationFilterResponse.php index 2fc7c17..b7c1277 100644 --- a/lib/Model/BuildModerationFilterResponse.php +++ b/lib/Model/BuildModerationFilterResponse.php @@ -2,7 +2,7 @@ /** * BuildModerationFilterResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class BuildModerationFilterResponse implements ModelInterface, ArrayAccess, \Jso public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'BuildModerationFilterResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => 'string', 'moderation_filter' => '\FastComments\Client\Model\ModerationFilter' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'moderation_filter' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'moderation_filter' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setModerationFilter($moderation_filter) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/BulkAggregateQuestionItem.php b/lib/Model/BulkAggregateQuestionItem.php index 06ae911..9937f94 100644 --- a/lib/Model/BulkAggregateQuestionItem.php +++ b/lib/Model/BulkAggregateQuestionItem.php @@ -2,7 +2,7 @@ /** * BulkAggregateQuestionItem * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class BulkAggregateQuestionItem 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 $openAPIModelName = 'BulkAggregateQuestionItem'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'agg_id' => 'string', 'question_id' => 'string', @@ -67,12 +67,12 @@ class BulkAggregateQuestionItem implements ModelInterface, ArrayAccess, \JsonSer ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'agg_id' => null, 'question_id' => null, @@ -83,10 +83,10 @@ class BulkAggregateQuestionItem implements ModelInterface, ArrayAccess, \JsonSer ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'agg_id' => false, 'question_id' => false, @@ -97,10 +97,10 @@ class BulkAggregateQuestionItem implements ModelInterface, ArrayAccess, \JsonSer ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -284,14 +284,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -492,11 +492,11 @@ public function setStartDate($start_date) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -504,12 +504,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -534,11 +534,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/BulkAggregateQuestionResultsRequest.php b/lib/Model/BulkAggregateQuestionResultsRequest.php index 1299d9e..03be7f0 100644 --- a/lib/Model/BulkAggregateQuestionResultsRequest.php +++ b/lib/Model/BulkAggregateQuestionResultsRequest.php @@ -2,7 +2,7 @@ /** * BulkAggregateQuestionResultsRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,46 +46,46 @@ class BulkAggregateQuestionResultsRequest 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 $openAPIModelName = 'BulkAggregateQuestionResultsRequest'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'aggregations' => '\FastComments\Client\Model\BulkAggregateQuestionItem[]' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'aggregations' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'aggregations' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -249,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -322,11 +322,11 @@ public function setAggregations($aggregations) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -334,12 +334,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -364,11 +364,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/BulkAggregateQuestionResultsResponse.php b/lib/Model/BulkAggregateQuestionResultsResponse.php index a0c0da5..96aead9 100644 --- a/lib/Model/BulkAggregateQuestionResultsResponse.php +++ b/lib/Model/BulkAggregateQuestionResultsResponse.php @@ -2,7 +2,7 @@ /** * BulkAggregateQuestionResultsResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class BulkAggregateQuestionResultsResponse implements ModelInterface, ArrayAcces public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'BulkAggregateQuestionResultsResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'data' => 'array' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'data' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'data' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setData($data) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/BulkCreateHashTagsBody.php b/lib/Model/BulkCreateHashTagsBody.php index 45491e5..db9e54a 100644 --- a/lib/Model/BulkCreateHashTagsBody.php +++ b/lib/Model/BulkCreateHashTagsBody.php @@ -2,7 +2,7 @@ /** * BulkCreateHashTagsBody * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class BulkCreateHashTagsBody 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 $openAPIModelName = 'BulkCreateHashTagsBody'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'tenant_id' => 'string', 'tags' => '\FastComments\Client\Model\BulkCreateHashTagsBodyTagsInner[]' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'tenant_id' => null, 'tags' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'tenant_id' => false, 'tags' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -356,11 +356,11 @@ public function setTags($tags) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -368,12 +368,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -398,11 +398,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/BulkCreateHashTagsBodyTagsInner.php b/lib/Model/BulkCreateHashTagsBodyTagsInner.php index 83ba9c6..2a8da89 100644 --- a/lib/Model/BulkCreateHashTagsBodyTagsInner.php +++ b/lib/Model/BulkCreateHashTagsBodyTagsInner.php @@ -2,7 +2,7 @@ /** * BulkCreateHashTagsBodyTagsInner * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class BulkCreateHashTagsBodyTagsInner 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 $openAPIModelName = 'BulkCreateHashTagsBody_tags_inner'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'url' => 'string', 'tag' => 'string' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'url' => null, 'tag' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'url' => false, 'tag' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -356,11 +356,11 @@ public function setTag($tag) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -368,12 +368,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -398,11 +398,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/BulkCreateHashTagsResponse.php b/lib/Model/BulkCreateHashTagsResponse.php index c9a526a..39ce7c6 100644 --- a/lib/Model/BulkCreateHashTagsResponse.php +++ b/lib/Model/BulkCreateHashTagsResponse.php @@ -2,7 +2,7 @@ /** * BulkCreateHashTagsResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class BulkCreateHashTagsResponse 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 $openAPIModelName = 'BulkCreateHashTagsResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'results' => '\FastComments\Client\Model\BulkCreateHashTagsResponseResultsInner[]' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'results' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'results' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setResults($results) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/BulkCreateHashTagsResponseResultsInner.php b/lib/Model/BulkCreateHashTagsResponseResultsInner.php index 81c5005..0f37932 100644 --- a/lib/Model/BulkCreateHashTagsResponseResultsInner.php +++ b/lib/Model/BulkCreateHashTagsResponseResultsInner.php @@ -2,7 +2,7 @@ /** * BulkCreateHashTagsResponseResultsInner * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class BulkCreateHashTagsResponseResultsInner 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 $openAPIModelName = 'BulkCreateHashTagsResponse_results_inner'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'hash_tag' => '\FastComments\Client\Model\TenantHashTag', @@ -70,12 +70,12 @@ class BulkCreateHashTagsResponseResultsInner implements ModelInterface, ArrayAcc ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'hash_tag' => null, @@ -89,10 +89,10 @@ class BulkCreateHashTagsResponseResultsInner implements ModelInterface, ArrayAcc ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'hash_tag' => false, @@ -106,10 +106,10 @@ class BulkCreateHashTagsResponseResultsInner implements ModelInterface, ArrayAcc ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -305,14 +305,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -334,15 +334,6 @@ public function listInvalidProperties() if ($this->container['status'] === null) { $invalidProperties[] = "'status' can't be null"; } - if ($this->container['hash_tag'] === null) { - $invalidProperties[] = "'hash_tag' can't be null"; - } - if ($this->container['reason'] === null) { - $invalidProperties[] = "'reason' can't be null"; - } - if ($this->container['code'] === null) { - $invalidProperties[] = "'code' can't be null"; - } return $invalidProperties; } @@ -388,7 +379,7 @@ public function setStatus($status) /** * Gets hash_tag * - * @return \FastComments\Client\Model\TenantHashTag + * @return \FastComments\Client\Model\TenantHashTag|null */ public function getHashTag() { @@ -398,7 +389,7 @@ public function getHashTag() /** * Sets hash_tag * - * @param \FastComments\Client\Model\TenantHashTag $hash_tag hash_tag + * @param \FastComments\Client\Model\TenantHashTag|null $hash_tag hash_tag * * @return self */ @@ -415,7 +406,7 @@ public function setHashTag($hash_tag) /** * Gets reason * - * @return string + * @return string|null */ public function getReason() { @@ -425,7 +416,7 @@ public function getReason() /** * Sets reason * - * @param string $reason reason + * @param string|null $reason reason * * @return self */ @@ -442,7 +433,7 @@ public function setReason($reason) /** * Gets code * - * @return string + * @return string|null */ public function getCode() { @@ -452,7 +443,7 @@ public function getCode() /** * Sets code * - * @param string $code code + * @param string|null $code code * * @return self */ @@ -603,11 +594,11 @@ public function setCustomConfig($custom_config) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -615,12 +606,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -645,11 +636,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/BulkPreBanParams.php b/lib/Model/BulkPreBanParams.php index 36759f3..4483200 100644 --- a/lib/Model/BulkPreBanParams.php +++ b/lib/Model/BulkPreBanParams.php @@ -2,7 +2,7 @@ /** * BulkPreBanParams * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,46 +46,46 @@ class BulkPreBanParams 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 $openAPIModelName = 'BulkPreBanParams'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'comment_ids' => 'string[]' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'comment_ids' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'comment_ids' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -249,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -322,11 +322,11 @@ public function setCommentIds($comment_ids) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -334,12 +334,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -364,11 +364,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/BulkPreBanSummary.php b/lib/Model/BulkPreBanSummary.php index 82cf443..bfd29fa 100644 --- a/lib/Model/BulkPreBanSummary.php +++ b/lib/Model/BulkPreBanSummary.php @@ -2,7 +2,7 @@ /** * BulkPreBanSummary * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class BulkPreBanSummary 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 $openAPIModelName = 'BulkPreBanSummary'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => 'string', 'total_related_comment_count' => 'int', @@ -67,12 +67,12 @@ class BulkPreBanSummary implements ModelInterface, ArrayAccess, \JsonSerializabl ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'total_related_comment_count' => 'int32', @@ -83,10 +83,10 @@ class BulkPreBanSummary implements ModelInterface, ArrayAccess, \JsonSerializabl ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'total_related_comment_count' => false, @@ -97,10 +97,10 @@ class BulkPreBanSummary implements ModelInterface, ArrayAccess, \JsonSerializabl ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -284,14 +284,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -507,11 +507,11 @@ public function setIpHashes($ip_hashes) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -519,12 +519,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -549,11 +549,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/ChangeCommentPinStatusResponse.php b/lib/Model/ChangeCommentPinStatusResponse.php index c46e7d0..e569451 100644 --- a/lib/Model/ChangeCommentPinStatusResponse.php +++ b/lib/Model/ChangeCommentPinStatusResponse.php @@ -2,7 +2,7 @@ /** * ChangeCommentPinStatusResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class ChangeCommentPinStatusResponse implements ModelInterface, ArrayAccess, \Js public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'ChangeCommentPinStatusResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'comment_positions' => 'array', 'status' => '\FastComments\Client\Model\APIStatus' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'comment_positions' => null, 'status' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'comment_positions' => false, 'status' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/ChangeTicketStateBody.php b/lib/Model/ChangeTicketStateBody.php index c9dc853..7b19c93 100644 --- a/lib/Model/ChangeTicketStateBody.php +++ b/lib/Model/ChangeTicketStateBody.php @@ -2,7 +2,7 @@ /** * ChangeTicketStateBody * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,46 +46,46 @@ class ChangeTicketStateBody 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 $openAPIModelName = 'ChangeTicketStateBody'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'state' => 'int' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'state' => 'int32' ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'state' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -249,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -322,11 +322,11 @@ public function setState($state) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -334,12 +334,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -364,11 +364,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/ChangeTicketStateResponse.php b/lib/Model/ChangeTicketStateResponse.php index 322e9ea..185dc1c 100644 --- a/lib/Model/ChangeTicketStateResponse.php +++ b/lib/Model/ChangeTicketStateResponse.php @@ -2,7 +2,7 @@ /** * ChangeTicketStateResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class ChangeTicketStateResponse 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 $openAPIModelName = 'ChangeTicketStateResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'ticket' => '\FastComments\Client\Model\APITicket' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'ticket' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'ticket' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setTicket($ticket) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/CheckBlockedCommentsResponse.php b/lib/Model/CheckBlockedCommentsResponse.php index 5231f9d..6825839 100644 --- a/lib/Model/CheckBlockedCommentsResponse.php +++ b/lib/Model/CheckBlockedCommentsResponse.php @@ -2,7 +2,7 @@ /** * CheckBlockedCommentsResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class CheckBlockedCommentsResponse 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 $openAPIModelName = 'CheckBlockedCommentsResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'comment_statuses' => 'array', 'status' => '\FastComments\Client\Model\APIStatus' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'comment_statuses' => null, 'status' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'comment_statuses' => false, 'status' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/CombineQuestionResultsWithCommentsResponse.php b/lib/Model/CombineQuestionResultsWithCommentsResponse.php index cb4c982..7f7ed7e 100644 --- a/lib/Model/CombineQuestionResultsWithCommentsResponse.php +++ b/lib/Model/CombineQuestionResultsWithCommentsResponse.php @@ -2,7 +2,7 @@ /** * CombineQuestionResultsWithCommentsResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class CombineQuestionResultsWithCommentsResponse 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 $openAPIModelName = 'CombineQuestionResultsWithCommentsResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'data' => '\FastComments\Client\Model\FindCommentsByRangeResponse' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'data' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'data' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setData($data) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/CommentData.php b/lib/Model/CommentData.php index 993303c..057dc46 100644 --- a/lib/Model/CommentData.php +++ b/lib/Model/CommentData.php @@ -2,7 +2,7 @@ /** * CommentData * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class CommentData 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 $openAPIModelName = 'CommentData'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'date' => 'int', 'local_date_string' => 'string', @@ -87,12 +87,12 @@ class CommentData implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'date' => 'int64', 'local_date_string' => null, @@ -123,10 +123,10 @@ class CommentData implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'date' => false, 'local_date_string' => false, @@ -157,10 +157,10 @@ class CommentData implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -424,14 +424,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -1216,11 +1216,11 @@ public function setBotId($bot_id) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -1228,12 +1228,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -1258,11 +1258,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/CommentHTMLRenderingMode.php b/lib/Model/CommentHTMLRenderingMode.php index e27ed46..5288ae8 100644 --- a/lib/Model/CommentHTMLRenderingMode.php +++ b/lib/Model/CommentHTMLRenderingMode.php @@ -2,7 +2,7 @@ /** * CommentHTMLRenderingMode * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** diff --git a/lib/Model/CommentLogData.php b/lib/Model/CommentLogData.php index 0b2e2b2..5543db5 100644 --- a/lib/Model/CommentLogData.php +++ b/lib/Model/CommentLogData.php @@ -2,7 +2,7 @@ /** * CommentLogData * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class CommentLogData 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 $openAPIModelName = 'CommentLogData'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'clear_content' => 'bool', 'is_deleted_user' => 'bool', @@ -108,12 +108,12 @@ class CommentLogData implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'clear_content' => null, 'is_deleted_user' => null, @@ -165,10 +165,10 @@ class CommentLogData implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'clear_content' => false, 'is_deleted_user' => false, @@ -220,10 +220,10 @@ class CommentLogData implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -584,14 +584,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -1985,11 +1985,11 @@ public function setDetectedLanguage($detected_language) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -1997,12 +1997,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -2027,11 +2027,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/CommentLogEntry.php b/lib/Model/CommentLogEntry.php index 9224c8a..41d5337 100644 --- a/lib/Model/CommentLogEntry.php +++ b/lib/Model/CommentLogEntry.php @@ -2,7 +2,7 @@ /** * CommentLogEntry * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class CommentLogEntry 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 $openAPIModelName = 'CommentLogEntry'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'd' => '\DateTime', 't' => '\FastComments\Client\Model\CommentLogType', @@ -64,12 +64,12 @@ class CommentLogEntry implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'd' => 'date-time', 't' => null, @@ -77,10 +77,10 @@ class CommentLogEntry implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'd' => false, 't' => false, @@ -88,10 +88,10 @@ class CommentLogEntry implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -263,14 +263,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -393,11 +393,11 @@ public function setDa($da) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -405,12 +405,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -435,11 +435,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/CommentLogType.php b/lib/Model/CommentLogType.php index 7dac7bb..a198876 100644 --- a/lib/Model/CommentLogType.php +++ b/lib/Model/CommentLogType.php @@ -2,7 +2,7 @@ /** * CommentLogType * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** diff --git a/lib/Model/CommentQuestionResultsRenderingType.php b/lib/Model/CommentQuestionResultsRenderingType.php index 5349b4e..8b1117b 100644 --- a/lib/Model/CommentQuestionResultsRenderingType.php +++ b/lib/Model/CommentQuestionResultsRenderingType.php @@ -2,7 +2,7 @@ /** * CommentQuestionResultsRenderingType * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** diff --git a/lib/Model/CommentQuestionsRequired.php b/lib/Model/CommentQuestionsRequired.php index 50b110c..6892da4 100644 --- a/lib/Model/CommentQuestionsRequired.php +++ b/lib/Model/CommentQuestionsRequired.php @@ -2,7 +2,7 @@ /** * CommentQuestionsRequired * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** diff --git a/lib/Model/CommentTextUpdateRequest.php b/lib/Model/CommentTextUpdateRequest.php index 67f8040..9676499 100644 --- a/lib/Model/CommentTextUpdateRequest.php +++ b/lib/Model/CommentTextUpdateRequest.php @@ -2,7 +2,7 @@ /** * CommentTextUpdateRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class CommentTextUpdateRequest 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 $openAPIModelName = 'CommentTextUpdateRequest'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'comment' => 'string', 'mentions' => '\FastComments\Client\Model\CommentUserMentionInfo[]', @@ -64,12 +64,12 @@ class CommentTextUpdateRequest implements ModelInterface, ArrayAccess, \JsonSeri ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'comment' => null, 'mentions' => null, @@ -77,10 +77,10 @@ class CommentTextUpdateRequest implements ModelInterface, ArrayAccess, \JsonSeri ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'comment' => false, 'mentions' => false, @@ -88,10 +88,10 @@ class CommentTextUpdateRequest implements ModelInterface, ArrayAccess, \JsonSeri ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -263,14 +263,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -390,11 +390,11 @@ public function setHashTags($hash_tags) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -402,12 +402,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -432,11 +432,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/CommentThreadDeletionMode.php b/lib/Model/CommentThreadDeletionMode.php index 0a27cb0..9eab56c 100644 --- a/lib/Model/CommentThreadDeletionMode.php +++ b/lib/Model/CommentThreadDeletionMode.php @@ -2,7 +2,7 @@ /** * CommentThreadDeletionMode * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** diff --git a/lib/Model/CommentUserBadgeInfo.php b/lib/Model/CommentUserBadgeInfo.php index 31c35b0..745bc03 100644 --- a/lib/Model/CommentUserBadgeInfo.php +++ b/lib/Model/CommentUserBadgeInfo.php @@ -2,7 +2,7 @@ /** * CommentUserBadgeInfo * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class CommentUserBadgeInfo 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 $openAPIModelName = 'CommentUserBadgeInfo'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'id' => 'string', 'type' => 'int', @@ -70,12 +70,12 @@ class CommentUserBadgeInfo implements ModelInterface, ArrayAccess, \JsonSerializ ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'id' => null, 'type' => 'int32', @@ -89,10 +89,10 @@ class CommentUserBadgeInfo implements ModelInterface, ArrayAccess, \JsonSerializ ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'id' => false, 'type' => false, @@ -106,10 +106,10 @@ class CommentUserBadgeInfo implements ModelInterface, ArrayAccess, \JsonSerializ ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -305,14 +305,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -642,11 +642,11 @@ public function setCssClass($css_class) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -654,12 +654,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -684,11 +684,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/CommentUserHashTagInfo.php b/lib/Model/CommentUserHashTagInfo.php index e701c8e..c3dc504 100644 --- a/lib/Model/CommentUserHashTagInfo.php +++ b/lib/Model/CommentUserHashTagInfo.php @@ -2,7 +2,7 @@ /** * CommentUserHashTagInfo * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class CommentUserHashTagInfo 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 $openAPIModelName = 'CommentUserHashTagInfo'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'id' => 'string', 'tag' => 'string', @@ -65,12 +65,12 @@ class CommentUserHashTagInfo implements ModelInterface, ArrayAccess, \JsonSerial ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'id' => null, 'tag' => null, @@ -79,10 +79,10 @@ class CommentUserHashTagInfo implements ModelInterface, ArrayAccess, \JsonSerial ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'id' => false, 'tag' => false, @@ -91,10 +91,10 @@ class CommentUserHashTagInfo implements ModelInterface, ArrayAccess, \JsonSerial ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -270,14 +270,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -302,8 +302,8 @@ public function listInvalidProperties() if ($this->container['tag'] === null) { $invalidProperties[] = "'tag' can't be null"; } - if ($this->container['url'] === null) { - $invalidProperties[] = "'url' can't be null"; + if ($this->container['url'] === null && !$this->isNullableSetToNull('url')) { + $invalidProperties[] = "'url' is required"; } return $invalidProperties; } @@ -377,7 +377,7 @@ public function setTag($tag) /** * Gets url * - * @return string + * @return string|null */ public function getUrl() { @@ -387,7 +387,7 @@ public function getUrl() /** * Sets url * - * @param string $url url + * @param string|null $url url * * @return self */ @@ -437,11 +437,11 @@ public function setRetain($retain) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -449,12 +449,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -479,11 +479,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/CommentUserMentionInfo.php b/lib/Model/CommentUserMentionInfo.php index 06fefa1..29848eb 100644 --- a/lib/Model/CommentUserMentionInfo.php +++ b/lib/Model/CommentUserMentionInfo.php @@ -2,7 +2,7 @@ /** * CommentUserMentionInfo * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class CommentUserMentionInfo 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 $openAPIModelName = 'CommentUserMentionInfo'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'id' => 'string', 'tag' => 'string', @@ -66,12 +66,12 @@ class CommentUserMentionInfo implements ModelInterface, ArrayAccess, \JsonSerial ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'id' => null, 'tag' => null, @@ -81,10 +81,10 @@ class CommentUserMentionInfo implements ModelInterface, ArrayAccess, \JsonSerial ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'id' => false, 'tag' => false, @@ -94,10 +94,10 @@ class CommentUserMentionInfo implements ModelInterface, ArrayAccess, \JsonSerial ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -292,14 +292,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -495,11 +495,11 @@ public function setSent($sent) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -507,12 +507,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -537,11 +537,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/CommenterNameFormats.php b/lib/Model/CommenterNameFormats.php index c0f6f71..29eed64 100644 --- a/lib/Model/CommenterNameFormats.php +++ b/lib/Model/CommenterNameFormats.php @@ -2,7 +2,7 @@ /** * CommenterNameFormats * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** diff --git a/lib/Model/CommentsByIdsParams.php b/lib/Model/CommentsByIdsParams.php index 76bf309..a2b9fb4 100644 --- a/lib/Model/CommentsByIdsParams.php +++ b/lib/Model/CommentsByIdsParams.php @@ -2,7 +2,7 @@ /** * CommentsByIdsParams * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,46 +46,46 @@ class CommentsByIdsParams 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 $openAPIModelName = 'CommentsByIdsParams'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'ids' => 'string[]' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'ids' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'ids' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -249,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -322,11 +322,11 @@ public function setIds($ids) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -334,12 +334,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -364,11 +364,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/CreateAPIPageData.php b/lib/Model/CreateAPIPageData.php index 3c028d4..2cb2dbf 100644 --- a/lib/Model/CreateAPIPageData.php +++ b/lib/Model/CreateAPIPageData.php @@ -2,7 +2,7 @@ /** * CreateAPIPageData * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class CreateAPIPageData 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 $openAPIModelName = 'CreateAPIPageData'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'accessible_by_group_ids' => 'string[]', 'root_comment_count' => 'int', @@ -67,12 +67,12 @@ class CreateAPIPageData implements ModelInterface, ArrayAccess, \JsonSerializabl ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'accessible_by_group_ids' => null, 'root_comment_count' => 'int64', @@ -83,10 +83,10 @@ class CreateAPIPageData implements ModelInterface, ArrayAccess, \JsonSerializabl ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'accessible_by_group_ids' => false, 'root_comment_count' => false, @@ -97,10 +97,10 @@ class CreateAPIPageData implements ModelInterface, ArrayAccess, \JsonSerializabl ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -284,14 +284,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -498,11 +498,11 @@ public function setUrlId($url_id) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -510,12 +510,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -540,11 +540,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/CreateAPISSOUserData.php b/lib/Model/CreateAPISSOUserData.php index c958f9a..a8a1a94 100644 --- a/lib/Model/CreateAPISSOUserData.php +++ b/lib/Model/CreateAPISSOUserData.php @@ -2,7 +2,7 @@ /** * CreateAPISSOUserData * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class CreateAPISSOUserData 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 $openAPIModelName = 'CreateAPISSOUserData'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'group_ids' => 'string[]', 'has_blocked_users' => 'bool', @@ -81,12 +81,12 @@ class CreateAPISSOUserData implements ModelInterface, ArrayAccess, \JsonSerializ ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'group_ids' => null, 'has_blocked_users' => null, @@ -111,10 +111,10 @@ class CreateAPISSOUserData implements ModelInterface, ArrayAccess, \JsonSerializ ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'group_ids' => false, 'has_blocked_users' => false, @@ -139,10 +139,10 @@ class CreateAPISSOUserData implements ModelInterface, ArrayAccess, \JsonSerializ ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -382,14 +382,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -974,11 +974,11 @@ public function setId($id) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -986,12 +986,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -1016,11 +1016,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/CreateAPIUserSubscriptionData.php b/lib/Model/CreateAPIUserSubscriptionData.php index 8ebe5d4..eeec075 100644 --- a/lib/Model/CreateAPIUserSubscriptionData.php +++ b/lib/Model/CreateAPIUserSubscriptionData.php @@ -2,7 +2,7 @@ /** * CreateAPIUserSubscriptionData * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class CreateAPIUserSubscriptionData implements ModelInterface, ArrayAccess, \Jso public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'CreateAPIUserSubscriptionData'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'notification_frequency' => 'float', 'page_title' => 'string', @@ -67,12 +67,12 @@ class CreateAPIUserSubscriptionData implements ModelInterface, ArrayAccess, \Jso ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'notification_frequency' => 'double', 'page_title' => null, @@ -83,10 +83,10 @@ class CreateAPIUserSubscriptionData implements ModelInterface, ArrayAccess, \Jso ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'notification_frequency' => false, 'page_title' => false, @@ -97,10 +97,10 @@ class CreateAPIUserSubscriptionData implements ModelInterface, ArrayAccess, \Jso ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -284,14 +284,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -492,11 +492,11 @@ public function setUserId($user_id) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -504,12 +504,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -534,11 +534,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/CreateCommentParams.php b/lib/Model/CreateCommentParams.php index dfdd12e..344e569 100644 --- a/lib/Model/CreateCommentParams.php +++ b/lib/Model/CreateCommentParams.php @@ -2,7 +2,7 @@ /** * CreateCommentParams * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class CreateCommentParams 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 $openAPIModelName = 'CreateCommentParams'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'date' => 'int', 'local_date_string' => 'string', @@ -97,12 +97,12 @@ class CreateCommentParams implements ModelInterface, ArrayAccess, \JsonSerializa ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'date' => 'int64', 'local_date_string' => null, @@ -143,10 +143,10 @@ class CreateCommentParams implements ModelInterface, ArrayAccess, \JsonSerializa ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'date' => false, 'local_date_string' => false, @@ -187,10 +187,10 @@ class CreateCommentParams implements ModelInterface, ArrayAccess, \JsonSerializa ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -494,14 +494,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -1559,11 +1559,11 @@ public function setVotesUp($votes_up) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -1571,12 +1571,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -1601,11 +1601,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/CreateEmailTemplateBody.php b/lib/Model/CreateEmailTemplateBody.php index 2d72a5e..e938088 100644 --- a/lib/Model/CreateEmailTemplateBody.php +++ b/lib/Model/CreateEmailTemplateBody.php @@ -2,7 +2,7 @@ /** * CreateEmailTemplateBody * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class CreateEmailTemplateBody 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 $openAPIModelName = 'CreateEmailTemplateBody'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'email_template_id' => 'string', 'display_name' => 'string', @@ -67,12 +67,12 @@ class CreateEmailTemplateBody implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'email_template_id' => null, 'display_name' => null, @@ -83,10 +83,10 @@ class CreateEmailTemplateBody implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'email_template_id' => false, 'display_name' => false, @@ -97,10 +97,10 @@ class CreateEmailTemplateBody implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -284,14 +284,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -498,11 +498,11 @@ public function setTestData($test_data) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -510,12 +510,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -540,11 +540,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/CreateEmailTemplateResponse.php b/lib/Model/CreateEmailTemplateResponse.php index 14411f7..9ca6d1e 100644 --- a/lib/Model/CreateEmailTemplateResponse.php +++ b/lib/Model/CreateEmailTemplateResponse.php @@ -2,7 +2,7 @@ /** * CreateEmailTemplateResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class CreateEmailTemplateResponse implements ModelInterface, ArrayAccess, \JsonS public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'CreateEmailTemplateResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'email_template' => '\FastComments\Client\Model\CustomEmailTemplate' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'email_template' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'email_template' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setEmailTemplate($email_template) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/CreateFeedPostParams.php b/lib/Model/CreateFeedPostParams.php index 0b8a489..330a99a 100644 --- a/lib/Model/CreateFeedPostParams.php +++ b/lib/Model/CreateFeedPostParams.php @@ -2,7 +2,7 @@ /** * CreateFeedPostParams * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class CreateFeedPostParams 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 $openAPIModelName = 'CreateFeedPostParams'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'title' => 'string', 'content_html' => 'string', @@ -69,12 +69,12 @@ class CreateFeedPostParams implements ModelInterface, ArrayAccess, \JsonSerializ ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'title' => null, 'content_html' => null, @@ -87,10 +87,10 @@ class CreateFeedPostParams implements ModelInterface, ArrayAccess, \JsonSerializ ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'title' => false, 'content_html' => false, @@ -103,10 +103,10 @@ class CreateFeedPostParams implements ModelInterface, ArrayAccess, \JsonSerializ ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -298,14 +298,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -557,11 +557,11 @@ public function setMeta($meta) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -569,12 +569,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -599,11 +599,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/CreateFeedPostResponse.php b/lib/Model/CreateFeedPostResponse.php index 07f4e71..f563a56 100644 --- a/lib/Model/CreateFeedPostResponse.php +++ b/lib/Model/CreateFeedPostResponse.php @@ -2,7 +2,7 @@ /** * CreateFeedPostResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class CreateFeedPostResponse 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 $openAPIModelName = 'CreateFeedPostResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'feed_post' => '\FastComments\Client\Model\FeedPost' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'feed_post' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'feed_post' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setFeedPost($feed_post) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/CreateFeedPostsResponse.php b/lib/Model/CreateFeedPostsResponse.php index a3660f5..a16caea 100644 --- a/lib/Model/CreateFeedPostsResponse.php +++ b/lib/Model/CreateFeedPostsResponse.php @@ -2,7 +2,7 @@ /** * CreateFeedPostsResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class CreateFeedPostsResponse 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 $openAPIModelName = 'CreateFeedPostsResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'feed_post' => '\FastComments\Client\Model\FeedPost' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'feed_post' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'feed_post' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setFeedPost($feed_post) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/CreateHashTagBody.php b/lib/Model/CreateHashTagBody.php index 422b964..f14b36a 100644 --- a/lib/Model/CreateHashTagBody.php +++ b/lib/Model/CreateHashTagBody.php @@ -2,7 +2,7 @@ /** * CreateHashTagBody * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class CreateHashTagBody 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 $openAPIModelName = 'CreateHashTagBody'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'tenant_id' => 'string', 'tag' => 'string', @@ -64,12 +64,12 @@ class CreateHashTagBody implements ModelInterface, ArrayAccess, \JsonSerializabl ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'tenant_id' => null, 'tag' => null, @@ -77,10 +77,10 @@ class CreateHashTagBody implements ModelInterface, ArrayAccess, \JsonSerializabl ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'tenant_id' => false, 'tag' => false, @@ -88,10 +88,10 @@ class CreateHashTagBody implements ModelInterface, ArrayAccess, \JsonSerializabl ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -263,14 +263,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -390,11 +390,11 @@ public function setUrl($url) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -402,12 +402,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -432,11 +432,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/CreateHashTagResponse.php b/lib/Model/CreateHashTagResponse.php index 6a04421..90a16e9 100644 --- a/lib/Model/CreateHashTagResponse.php +++ b/lib/Model/CreateHashTagResponse.php @@ -2,7 +2,7 @@ /** * CreateHashTagResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class CreateHashTagResponse 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 $openAPIModelName = 'CreateHashTagResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'hash_tag' => '\FastComments\Client\Model\TenantHashTag' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'hash_tag' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'hash_tag' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setHashTag($hash_tag) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/CreateModeratorBody.php b/lib/Model/CreateModeratorBody.php index fc4a381..d72034e 100644 --- a/lib/Model/CreateModeratorBody.php +++ b/lib/Model/CreateModeratorBody.php @@ -2,7 +2,7 @@ /** * CreateModeratorBody * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class CreateModeratorBody 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 $openAPIModelName = 'CreateModeratorBody'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'name' => 'string', 'email' => 'string', @@ -65,12 +65,12 @@ class CreateModeratorBody implements ModelInterface, ArrayAccess, \JsonSerializa ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'name' => null, 'email' => null, @@ -79,10 +79,10 @@ class CreateModeratorBody implements ModelInterface, ArrayAccess, \JsonSerializa ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'name' => false, 'email' => false, @@ -91,10 +91,10 @@ class CreateModeratorBody implements ModelInterface, ArrayAccess, \JsonSerializa ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -270,14 +270,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -427,11 +427,11 @@ public function setModerationGroupIds($moderation_group_ids) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -439,12 +439,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -469,11 +469,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/CreateModeratorResponse.php b/lib/Model/CreateModeratorResponse.php index 924b376..6f86f50 100644 --- a/lib/Model/CreateModeratorResponse.php +++ b/lib/Model/CreateModeratorResponse.php @@ -2,7 +2,7 @@ /** * CreateModeratorResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class CreateModeratorResponse 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 $openAPIModelName = 'CreateModeratorResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'moderator' => '\FastComments\Client\Model\Moderator' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'moderator' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'moderator' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setModerator($moderator) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/CreateQuestionConfigBody.php b/lib/Model/CreateQuestionConfigBody.php index 4236a60..c17a550 100644 --- a/lib/Model/CreateQuestionConfigBody.php +++ b/lib/Model/CreateQuestionConfigBody.php @@ -2,7 +2,7 @@ /** * CreateQuestionConfigBody * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class CreateQuestionConfigBody 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 $openAPIModelName = 'CreateQuestionConfigBody'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'name' => 'string', 'question' => 'string', @@ -75,12 +75,12 @@ class CreateQuestionConfigBody implements ModelInterface, ArrayAccess, \JsonSeri ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'name' => null, 'question' => null, @@ -99,10 +99,10 @@ class CreateQuestionConfigBody implements ModelInterface, ArrayAccess, \JsonSeri ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'name' => false, 'question' => false, @@ -121,10 +121,10 @@ class CreateQuestionConfigBody implements ModelInterface, ArrayAccess, \JsonSeri ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -340,14 +340,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -773,11 +773,11 @@ public function setReportingOrder($reporting_order) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -785,12 +785,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -815,11 +815,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/CreateQuestionConfigResponse.php b/lib/Model/CreateQuestionConfigResponse.php index ced75f3..a09cab5 100644 --- a/lib/Model/CreateQuestionConfigResponse.php +++ b/lib/Model/CreateQuestionConfigResponse.php @@ -2,7 +2,7 @@ /** * CreateQuestionConfigResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class CreateQuestionConfigResponse 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 $openAPIModelName = 'CreateQuestionConfigResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'question_config' => '\FastComments\Client\Model\QuestionConfig' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'question_config' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'question_config' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setQuestionConfig($question_config) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/CreateQuestionResultBody.php b/lib/Model/CreateQuestionResultBody.php index 3214c22..52b3d0d 100644 --- a/lib/Model/CreateQuestionResultBody.php +++ b/lib/Model/CreateQuestionResultBody.php @@ -2,7 +2,7 @@ /** * CreateQuestionResultBody * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class CreateQuestionResultBody 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 $openAPIModelName = 'CreateQuestionResultBody'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'url_id' => 'string', 'value' => 'float', @@ -68,12 +68,12 @@ class CreateQuestionResultBody implements ModelInterface, ArrayAccess, \JsonSeri ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'url_id' => null, 'value' => 'double', @@ -85,10 +85,10 @@ class CreateQuestionResultBody implements ModelInterface, ArrayAccess, \JsonSeri ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'url_id' => false, 'value' => false, @@ -100,10 +100,10 @@ class CreateQuestionResultBody implements ModelInterface, ArrayAccess, \JsonSeri ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -291,14 +291,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -539,11 +539,11 @@ public function setMeta($meta) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -551,12 +551,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -581,11 +581,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/CreateQuestionResultResponse.php b/lib/Model/CreateQuestionResultResponse.php index c2da58c..0979649 100644 --- a/lib/Model/CreateQuestionResultResponse.php +++ b/lib/Model/CreateQuestionResultResponse.php @@ -2,7 +2,7 @@ /** * CreateQuestionResultResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class CreateQuestionResultResponse 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 $openAPIModelName = 'CreateQuestionResultResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'question_result' => '\FastComments\Client\Model\QuestionResult' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'question_result' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'question_result' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setQuestionResult($question_result) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/CreateSubscriptionAPIResponse.php b/lib/Model/CreateSubscriptionAPIResponse.php index 3a55a53..29c498f 100644 --- a/lib/Model/CreateSubscriptionAPIResponse.php +++ b/lib/Model/CreateSubscriptionAPIResponse.php @@ -2,7 +2,7 @@ /** * CreateSubscriptionAPIResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class CreateSubscriptionAPIResponse implements ModelInterface, ArrayAccess, \Jso public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'CreateSubscriptionAPIResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'reason' => 'string', 'code' => 'string', @@ -65,12 +65,12 @@ class CreateSubscriptionAPIResponse implements ModelInterface, ArrayAccess, \Jso ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'reason' => null, 'code' => null, @@ -79,10 +79,10 @@ class CreateSubscriptionAPIResponse implements ModelInterface, ArrayAccess, \Jso ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'reason' => false, 'code' => false, @@ -91,10 +91,10 @@ class CreateSubscriptionAPIResponse implements ModelInterface, ArrayAccess, \Jso ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -270,14 +270,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -424,11 +424,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -436,12 +436,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -466,11 +466,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/CreateTenantBody.php b/lib/Model/CreateTenantBody.php index d582e69..d944934 100644 --- a/lib/Model/CreateTenantBody.php +++ b/lib/Model/CreateTenantBody.php @@ -2,7 +2,7 @@ /** * CreateTenantBody * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class CreateTenantBody 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 $openAPIModelName = 'CreateTenantBody'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'name' => 'string', 'domain_configuration' => '\FastComments\Client\Model\APIDomainConfiguration[]', @@ -84,12 +84,12 @@ class CreateTenantBody implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'name' => null, 'domain_configuration' => null, @@ -117,10 +117,10 @@ class CreateTenantBody implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'name' => false, 'domain_configuration' => false, @@ -148,10 +148,10 @@ class CreateTenantBody implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -403,14 +403,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -1073,11 +1073,11 @@ public function setMeta($meta) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -1085,12 +1085,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -1115,11 +1115,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/CreateTenantPackageBody.php b/lib/Model/CreateTenantPackageBody.php index e741de2..28e3f7a 100644 --- a/lib/Model/CreateTenantPackageBody.php +++ b/lib/Model/CreateTenantPackageBody.php @@ -2,7 +2,7 @@ /** * CreateTenantPackageBody * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class CreateTenantPackageBody 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 $openAPIModelName = 'CreateTenantPackageBody'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'name' => 'string', 'monthly_cost_usd' => 'float', @@ -110,12 +110,12 @@ class CreateTenantPackageBody implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'name' => null, 'monthly_cost_usd' => 'double', @@ -169,10 +169,10 @@ class CreateTenantPackageBody implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'name' => false, 'monthly_cost_usd' => true, @@ -226,10 +226,10 @@ class CreateTenantPackageBody implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -585,14 +585,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -2018,11 +2018,11 @@ public function setFlexSsoModeratorUnit($flex_sso_moderator_unit) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -2030,12 +2030,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -2060,11 +2060,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/CreateTenantPackageResponse.php b/lib/Model/CreateTenantPackageResponse.php index 2b56e6a..1b9a5a8 100644 --- a/lib/Model/CreateTenantPackageResponse.php +++ b/lib/Model/CreateTenantPackageResponse.php @@ -2,7 +2,7 @@ /** * CreateTenantPackageResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class CreateTenantPackageResponse implements ModelInterface, ArrayAccess, \JsonS public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'CreateTenantPackageResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'tenant_package' => '\FastComments\Client\Model\TenantPackage' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'tenant_package' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'tenant_package' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setTenantPackage($tenant_package) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/CreateTenantResponse.php b/lib/Model/CreateTenantResponse.php index f52baea..f484b34 100644 --- a/lib/Model/CreateTenantResponse.php +++ b/lib/Model/CreateTenantResponse.php @@ -2,7 +2,7 @@ /** * CreateTenantResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class CreateTenantResponse 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 $openAPIModelName = 'CreateTenantResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'tenant' => '\FastComments\Client\Model\APITenant' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'tenant' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'tenant' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setTenant($tenant) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/CreateTenantUserBody.php b/lib/Model/CreateTenantUserBody.php index 2b419f7..bb74e05 100644 --- a/lib/Model/CreateTenantUserBody.php +++ b/lib/Model/CreateTenantUserBody.php @@ -2,7 +2,7 @@ /** * CreateTenantUserBody * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class CreateTenantUserBody 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 $openAPIModelName = 'CreateTenantUserBody'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'username' => 'string', 'email' => 'string', @@ -85,12 +85,12 @@ class CreateTenantUserBody implements ModelInterface, ArrayAccess, \JsonSerializ ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'username' => null, 'email' => null, @@ -119,10 +119,10 @@ class CreateTenantUserBody implements ModelInterface, ArrayAccess, \JsonSerializ ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'username' => false, 'email' => false, @@ -151,10 +151,10 @@ class CreateTenantUserBody implements ModelInterface, ArrayAccess, \JsonSerializ ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -410,14 +410,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -1107,11 +1107,11 @@ public function setDisplayLabel($display_label) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -1119,12 +1119,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -1149,11 +1149,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/CreateTenantUserResponse.php b/lib/Model/CreateTenantUserResponse.php index 7e48d7c..71bd9f8 100644 --- a/lib/Model/CreateTenantUserResponse.php +++ b/lib/Model/CreateTenantUserResponse.php @@ -2,7 +2,7 @@ /** * CreateTenantUserResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class CreateTenantUserResponse 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 $openAPIModelName = 'CreateTenantUserResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'tenant_user' => '\FastComments\Client\Model\User' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'tenant_user' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'tenant_user' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setTenantUser($tenant_user) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/CreateTicketBody.php b/lib/Model/CreateTicketBody.php index c8b5d78..4b13bb9 100644 --- a/lib/Model/CreateTicketBody.php +++ b/lib/Model/CreateTicketBody.php @@ -2,7 +2,7 @@ /** * CreateTicketBody * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,46 +46,46 @@ class CreateTicketBody 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 $openAPIModelName = 'CreateTicketBody'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'subject' => 'string' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'subject' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'subject' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -249,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -322,11 +322,11 @@ public function setSubject($subject) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -334,12 +334,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -364,11 +364,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/CreateTicketResponse.php b/lib/Model/CreateTicketResponse.php index 0420975..f387178 100644 --- a/lib/Model/CreateTicketResponse.php +++ b/lib/Model/CreateTicketResponse.php @@ -2,7 +2,7 @@ /** * CreateTicketResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class CreateTicketResponse 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 $openAPIModelName = 'CreateTicketResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'ticket' => '\FastComments\Client\Model\APITicket' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'ticket' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'ticket' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setTicket($ticket) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/CreateUserBadgeParams.php b/lib/Model/CreateUserBadgeParams.php index 9c51165..f8e4c33 100644 --- a/lib/Model/CreateUserBadgeParams.php +++ b/lib/Model/CreateUserBadgeParams.php @@ -2,7 +2,7 @@ /** * CreateUserBadgeParams * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class CreateUserBadgeParams 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 $openAPIModelName = 'CreateUserBadgeParams'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'user_id' => 'string', 'badge_id' => 'string', @@ -64,12 +64,12 @@ class CreateUserBadgeParams implements ModelInterface, ArrayAccess, \JsonSeriali ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'user_id' => null, 'badge_id' => null, @@ -77,10 +77,10 @@ class CreateUserBadgeParams implements ModelInterface, ArrayAccess, \JsonSeriali ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'user_id' => false, 'badge_id' => false, @@ -88,10 +88,10 @@ class CreateUserBadgeParams implements ModelInterface, ArrayAccess, \JsonSeriali ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -263,14 +263,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -393,11 +393,11 @@ public function setDisplayedOnComments($displayed_on_comments) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -405,12 +405,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -435,11 +435,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/CreateV1PageReact.php b/lib/Model/CreateV1PageReact.php index cb6c84d..2bd32de 100644 --- a/lib/Model/CreateV1PageReact.php +++ b/lib/Model/CreateV1PageReact.php @@ -2,7 +2,7 @@ /** * CreateV1PageReact * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class CreateV1PageReact 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 $openAPIModelName = 'CreateV1PageReact'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'code' => 'string', 'status' => '\FastComments\Client\Model\APIStatus' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'code' => null, 'status' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'code' => false, 'status' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -356,11 +356,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -368,12 +368,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -398,11 +398,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/CustomConfigParameters.php b/lib/Model/CustomConfigParameters.php index 5fd76b4..a1d583d 100644 --- a/lib/Model/CustomConfigParameters.php +++ b/lib/Model/CustomConfigParameters.php @@ -2,7 +2,7 @@ /** * CustomConfigParameters * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class CustomConfigParameters 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 $openAPIModelName = 'CustomConfigParameters'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'absolute_and_relative_dates' => 'bool', 'absolute_dates' => 'bool', @@ -149,12 +149,12 @@ class CustomConfigParameters implements ModelInterface, ArrayAccess, \JsonSerial ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'absolute_and_relative_dates' => null, 'absolute_dates' => null, @@ -247,10 +247,10 @@ class CustomConfigParameters implements ModelInterface, ArrayAccess, \JsonSerial ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'absolute_and_relative_dates' => false, 'absolute_dates' => false, @@ -343,10 +343,10 @@ class CustomConfigParameters implements ModelInterface, ArrayAccess, \JsonSerial ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -858,14 +858,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -3403,11 +3403,11 @@ public function setTos($tos) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -3415,12 +3415,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -3445,11 +3445,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/CustomEmailTemplate.php b/lib/Model/CustomEmailTemplate.php index f988119..351e090 100644 --- a/lib/Model/CustomEmailTemplate.php +++ b/lib/Model/CustomEmailTemplate.php @@ -2,7 +2,7 @@ /** * CustomEmailTemplate * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class CustomEmailTemplate 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 $openAPIModelName = 'CustomEmailTemplate'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ '_id' => 'string', 'tenant_id' => 'string', @@ -72,12 +72,12 @@ class CustomEmailTemplate implements ModelInterface, ArrayAccess, \JsonSerializa ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ '_id' => null, 'tenant_id' => null, @@ -93,10 +93,10 @@ class CustomEmailTemplate implements ModelInterface, ArrayAccess, \JsonSerializa ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ '_id' => false, 'tenant_id' => false, @@ -112,10 +112,10 @@ class CustomEmailTemplate implements ModelInterface, ArrayAccess, \JsonSerializa ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -319,14 +319,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -360,11 +360,11 @@ public function listInvalidProperties() if ($this->container['created_at'] === null) { $invalidProperties[] = "'created_at' can't be null"; } - if ($this->container['updated_at'] === null) { - $invalidProperties[] = "'updated_at' can't be null"; + if ($this->container['updated_at'] === null && !$this->isNullableSetToNull('updated_at')) { + $invalidProperties[] = "'updated_at' is required"; } - if ($this->container['updated_by_user_id'] === null) { - $invalidProperties[] = "'updated_by_user_id' can't be null"; + if ($this->container['updated_by_user_id'] === null && !$this->isNullableSetToNull('updated_by_user_id')) { + $invalidProperties[] = "'updated_by_user_id' is required"; } if ($this->container['ejs'] === null) { $invalidProperties[] = "'ejs' can't be null"; @@ -372,8 +372,8 @@ public function listInvalidProperties() if ($this->container['translation_overrides_by_locale'] === null) { $invalidProperties[] = "'translation_overrides_by_locale' can't be null"; } - if ($this->container['test_data'] === null) { - $invalidProperties[] = "'test_data' can't be null"; + if ($this->container['test_data'] === null && !$this->isNullableSetToNull('test_data')) { + $invalidProperties[] = "'test_data' is required"; } return $invalidProperties; } @@ -528,7 +528,7 @@ public function setCreatedAt($created_at) /** * Gets updated_at * - * @return \DateTime + * @return \DateTime|null */ public function getUpdatedAt() { @@ -538,7 +538,7 @@ public function getUpdatedAt() /** * Sets updated_at * - * @param \DateTime $updated_at updated_at + * @param \DateTime|null $updated_at updated_at * * @return self */ @@ -562,7 +562,7 @@ public function setUpdatedAt($updated_at) /** * Gets updated_by_user_id * - * @return string + * @return string|null */ public function getUpdatedByUserId() { @@ -572,7 +572,7 @@ public function getUpdatedByUserId() /** * Sets updated_by_user_id * - * @param string $updated_by_user_id updated_by_user_id + * @param string|null $updated_by_user_id updated_by_user_id * * @return self */ @@ -684,7 +684,7 @@ public function setTranslationOverridesByLocale($translation_overrides_by_locale /** * Gets test_data * - * @return mixed + * @return mixed|null */ public function getTestData() { @@ -694,7 +694,7 @@ public function getTestData() /** * Sets test_data * - * @param mixed $test_data test_data + * @param mixed|null $test_data test_data * * @return self */ @@ -717,11 +717,11 @@ public function setTestData($test_data) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -729,12 +729,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -759,11 +759,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/DeleteCommentAction.php b/lib/Model/DeleteCommentAction.php index 3f00e11..6340710 100644 --- a/lib/Model/DeleteCommentAction.php +++ b/lib/Model/DeleteCommentAction.php @@ -2,7 +2,7 @@ /** * DeleteCommentAction * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** diff --git a/lib/Model/DeleteCommentResult.php b/lib/Model/DeleteCommentResult.php index 5221bb4..970f8a8 100644 --- a/lib/Model/DeleteCommentResult.php +++ b/lib/Model/DeleteCommentResult.php @@ -2,7 +2,7 @@ /** * DeleteCommentResult * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class DeleteCommentResult 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 $openAPIModelName = 'DeleteCommentResult'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'action' => '\FastComments\Client\Model\DeleteCommentAction', 'status' => '\FastComments\Client\Model\APIStatus' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'action' => null, 'status' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'action' => false, 'status' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/DeleteDomainConfigResponse.php b/lib/Model/DeleteDomainConfigResponse.php index b17fdb4..6fd3058 100644 --- a/lib/Model/DeleteDomainConfigResponse.php +++ b/lib/Model/DeleteDomainConfigResponse.php @@ -2,7 +2,7 @@ /** * DeleteDomainConfigResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,46 +46,46 @@ class DeleteDomainConfigResponse 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 $openAPIModelName = 'DeleteDomainConfigResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => 'mixed' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => true ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -249,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -275,8 +275,8 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['status'] === null) { - $invalidProperties[] = "'status' can't be null"; + if ($this->container['status'] === null && !$this->isNullableSetToNull('status')) { + $invalidProperties[] = "'status' is required"; } return $invalidProperties; } @@ -296,7 +296,7 @@ public function valid() /** * Gets status * - * @return mixed + * @return mixed|null */ public function getStatus() { @@ -306,7 +306,7 @@ public function getStatus() /** * Sets status * - * @param mixed $status status + * @param mixed|null $status status * * @return self */ @@ -329,11 +329,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -341,12 +341,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -371,11 +371,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/DeleteFeedPostPublicResponse.php b/lib/Model/DeleteFeedPostPublicResponse.php index fa41dbe..5dd1b9b 100644 --- a/lib/Model/DeleteFeedPostPublicResponse.php +++ b/lib/Model/DeleteFeedPostPublicResponse.php @@ -2,7 +2,7 @@ /** * DeleteFeedPostPublicResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,46 +46,46 @@ class DeleteFeedPostPublicResponse 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 $openAPIModelName = 'DeleteFeedPostPublicResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -249,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -322,11 +322,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -334,12 +334,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -364,11 +364,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/DeleteHashTagRequestBody.php b/lib/Model/DeleteHashTagRequestBody.php index d0f4e88..70145c7 100644 --- a/lib/Model/DeleteHashTagRequestBody.php +++ b/lib/Model/DeleteHashTagRequestBody.php @@ -2,7 +2,7 @@ /** * DeleteHashTagRequestBody * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,46 +46,46 @@ class DeleteHashTagRequestBody 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 $openAPIModelName = 'DeleteHashTagRequestBody'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'tenant_id' => 'string' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'tenant_id' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'tenant_id' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -249,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -319,11 +319,11 @@ public function setTenantId($tenant_id) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -331,12 +331,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -361,11 +361,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/DeletePageAPIResponse.php b/lib/Model/DeletePageAPIResponse.php index 63ea43d..f988e31 100644 --- a/lib/Model/DeletePageAPIResponse.php +++ b/lib/Model/DeletePageAPIResponse.php @@ -2,7 +2,7 @@ /** * DeletePageAPIResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class DeletePageAPIResponse 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 $openAPIModelName = 'DeletePageAPIResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'reason' => 'string', 'code' => 'string', @@ -64,12 +64,12 @@ class DeletePageAPIResponse implements ModelInterface, ArrayAccess, \JsonSeriali ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'reason' => null, 'code' => null, @@ -77,10 +77,10 @@ class DeletePageAPIResponse implements ModelInterface, ArrayAccess, \JsonSeriali ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'reason' => false, 'code' => false, @@ -88,10 +88,10 @@ class DeletePageAPIResponse implements ModelInterface, ArrayAccess, \JsonSeriali ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -263,14 +263,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -390,11 +390,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -402,12 +402,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -432,11 +432,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/DeleteSSOUserAPIResponse.php b/lib/Model/DeleteSSOUserAPIResponse.php index 73a4b2f..f98f411 100644 --- a/lib/Model/DeleteSSOUserAPIResponse.php +++ b/lib/Model/DeleteSSOUserAPIResponse.php @@ -2,7 +2,7 @@ /** * DeleteSSOUserAPIResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class DeleteSSOUserAPIResponse 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 $openAPIModelName = 'DeleteSSOUserAPIResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'reason' => 'string', 'code' => 'string', @@ -65,12 +65,12 @@ class DeleteSSOUserAPIResponse implements ModelInterface, ArrayAccess, \JsonSeri ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'reason' => null, 'code' => null, @@ -79,10 +79,10 @@ class DeleteSSOUserAPIResponse implements ModelInterface, ArrayAccess, \JsonSeri ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'reason' => false, 'code' => false, @@ -91,10 +91,10 @@ class DeleteSSOUserAPIResponse implements ModelInterface, ArrayAccess, \JsonSeri ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -270,14 +270,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -424,11 +424,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -436,12 +436,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -466,11 +466,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/DeleteSubscriptionAPIResponse.php b/lib/Model/DeleteSubscriptionAPIResponse.php index 26c8545..ddc7bb9 100644 --- a/lib/Model/DeleteSubscriptionAPIResponse.php +++ b/lib/Model/DeleteSubscriptionAPIResponse.php @@ -2,7 +2,7 @@ /** * DeleteSubscriptionAPIResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class DeleteSubscriptionAPIResponse implements ModelInterface, ArrayAccess, \Jso public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'DeleteSubscriptionAPIResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'reason' => 'string', 'code' => 'string', @@ -64,12 +64,12 @@ class DeleteSubscriptionAPIResponse implements ModelInterface, ArrayAccess, \Jso ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'reason' => null, 'code' => null, @@ -77,10 +77,10 @@ class DeleteSubscriptionAPIResponse implements ModelInterface, ArrayAccess, \Jso ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'reason' => false, 'code' => false, @@ -88,10 +88,10 @@ class DeleteSubscriptionAPIResponse implements ModelInterface, ArrayAccess, \Jso ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -263,14 +263,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -390,11 +390,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -402,12 +402,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -432,11 +432,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/DeletedCommentResultComment.php b/lib/Model/DeletedCommentResultComment.php index 1674d96..bb41b4b 100644 --- a/lib/Model/DeletedCommentResultComment.php +++ b/lib/Model/DeletedCommentResultComment.php @@ -2,7 +2,7 @@ /** * DeletedCommentResultComment * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class DeletedCommentResultComment implements ModelInterface, ArrayAccess, \JsonS public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'DeletedCommentResultComment'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'is_deleted' => 'bool', 'comment_html' => 'string', @@ -65,12 +65,12 @@ class DeletedCommentResultComment implements ModelInterface, ArrayAccess, \JsonS ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'is_deleted' => null, 'comment_html' => null, @@ -79,10 +79,10 @@ class DeletedCommentResultComment implements ModelInterface, ArrayAccess, \JsonS ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'is_deleted' => false, 'comment_html' => false, @@ -91,10 +91,10 @@ class DeletedCommentResultComment implements ModelInterface, ArrayAccess, \JsonS ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -270,14 +270,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -434,11 +434,11 @@ public function setUserId($user_id) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -446,12 +446,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -476,11 +476,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/DigestEmailFrequency.php b/lib/Model/DigestEmailFrequency.php index 28bf35a..45ed8e5 100644 --- a/lib/Model/DigestEmailFrequency.php +++ b/lib/Model/DigestEmailFrequency.php @@ -2,7 +2,7 @@ /** * DigestEmailFrequency * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** diff --git a/lib/Model/EmailTemplateDefinition.php b/lib/Model/EmailTemplateDefinition.php index 0c0d183..69e4a78 100644 --- a/lib/Model/EmailTemplateDefinition.php +++ b/lib/Model/EmailTemplateDefinition.php @@ -2,7 +2,7 @@ /** * EmailTemplateDefinition * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class EmailTemplateDefinition 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 $openAPIModelName = 'EmailTemplateDefinition'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'email_template_id' => 'string', 'default_test_data' => 'array', @@ -65,12 +65,12 @@ class EmailTemplateDefinition implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'email_template_id' => null, 'default_test_data' => null, @@ -79,10 +79,10 @@ class EmailTemplateDefinition implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'email_template_id' => false, 'default_test_data' => false, @@ -91,10 +91,10 @@ class EmailTemplateDefinition implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -270,14 +270,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -433,11 +433,11 @@ public function setDefaultEjs($default_ejs) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -445,12 +445,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -475,11 +475,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/EmailTemplateRenderErrorResponse.php b/lib/Model/EmailTemplateRenderErrorResponse.php index ec39f9f..d01ed90 100644 --- a/lib/Model/EmailTemplateRenderErrorResponse.php +++ b/lib/Model/EmailTemplateRenderErrorResponse.php @@ -2,7 +2,7 @@ /** * EmailTemplateRenderErrorResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class EmailTemplateRenderErrorResponse 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 $openAPIModelName = 'EmailTemplateRenderErrorResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'id' => 'string', 'tenant_id' => 'string', @@ -68,12 +68,12 @@ class EmailTemplateRenderErrorResponse implements ModelInterface, ArrayAccess, \ ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'id' => null, 'tenant_id' => null, @@ -85,10 +85,10 @@ class EmailTemplateRenderErrorResponse implements ModelInterface, ArrayAccess, \ ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'id' => false, 'tenant_id' => false, @@ -100,10 +100,10 @@ class EmailTemplateRenderErrorResponse implements ModelInterface, ArrayAccess, \ ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -291,14 +291,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -544,11 +544,11 @@ public function setLastOccurredAt($last_occurred_at) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -556,12 +556,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -586,11 +586,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/EventLogEntry.php b/lib/Model/EventLogEntry.php index 672e8f5..ee3160a 100644 --- a/lib/Model/EventLogEntry.php +++ b/lib/Model/EventLogEntry.php @@ -2,7 +2,7 @@ /** * EventLogEntry * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class EventLogEntry 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 $openAPIModelName = 'EventLogEntry'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ '_id' => 'string', 'created_at' => '\DateTime', @@ -67,12 +67,12 @@ class EventLogEntry implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ '_id' => null, 'created_at' => 'date-time', @@ -83,10 +83,10 @@ class EventLogEntry implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ '_id' => false, 'created_at' => false, @@ -97,10 +97,10 @@ class EventLogEntry implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -284,14 +284,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -507,11 +507,11 @@ public function setData($data) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -519,12 +519,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -549,11 +549,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/FComment.php b/lib/Model/FComment.php index 970484b..ed2b1f0 100644 --- a/lib/Model/FComment.php +++ b/lib/Model/FComment.php @@ -2,7 +2,7 @@ /** * FComment * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class FComment 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 $openAPIModelName = 'FComment'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ '_id' => 'string', 'tenant_id' => 'string', @@ -134,12 +134,12 @@ class FComment implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ '_id' => null, 'tenant_id' => null, @@ -217,10 +217,10 @@ class FComment implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ '_id' => false, 'tenant_id' => false, @@ -298,10 +298,10 @@ class FComment implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -753,14 +753,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -800,8 +800,8 @@ public function listInvalidProperties() if ($this->container['comment_html'] === null) { $invalidProperties[] = "'comment_html' can't be null"; } - if ($this->container['date'] === null) { - $invalidProperties[] = "'date' can't be null"; + if ($this->container['date'] === null && !$this->isNullableSetToNull('date')) { + $invalidProperties[] = "'date' is required"; } if ($this->container['verified'] === null) { $invalidProperties[] = "'verified' can't be null"; @@ -809,8 +809,8 @@ public function listInvalidProperties() if ($this->container['approved'] === null) { $invalidProperties[] = "'approved' can't be null"; } - if ($this->container['locale'] === null) { - $invalidProperties[] = "'locale' can't be null"; + if ($this->container['locale'] === null && !$this->isNullableSetToNull('locale')) { + $invalidProperties[] = "'locale' is required"; } return $invalidProperties; } @@ -1250,7 +1250,7 @@ public function setParentId($parent_id) /** * Gets date * - * @return \DateTime + * @return \DateTime|null */ public function getDate() { @@ -1260,7 +1260,7 @@ public function getDate() /** * Sets date * - * @param \DateTime $date date + * @param \DateTime|null $date date * * @return self */ @@ -2077,7 +2077,7 @@ public function setApproved($approved) /** * Gets locale * - * @return string + * @return string|null */ public function getLocale() { @@ -2087,7 +2087,7 @@ public function getLocale() /** * Sets locale * - * @param string $locale locale + * @param string|null $locale locale * * @return self */ @@ -3031,11 +3031,11 @@ public function setBotId($bot_id) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -3043,12 +3043,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -3073,11 +3073,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/FCommentMeta.php b/lib/Model/FCommentMeta.php index f5b853c..b54503b 100644 --- a/lib/Model/FCommentMeta.php +++ b/lib/Model/FCommentMeta.php @@ -2,7 +2,7 @@ /** * FCommentMeta * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class FCommentMeta 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 $openAPIModelName = 'FComment_meta'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'wp_id' => 'string', 'wp_user_id' => 'string', @@ -64,12 +64,12 @@ class FCommentMeta implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'wp_id' => null, 'wp_user_id' => null, @@ -77,10 +77,10 @@ class FCommentMeta implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'wp_id' => false, 'wp_user_id' => false, @@ -88,10 +88,10 @@ class FCommentMeta implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -263,14 +263,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -387,11 +387,11 @@ public function setWpPostId($wp_post_id) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -399,12 +399,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -429,11 +429,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/FeedPost.php b/lib/Model/FeedPost.php index 3876010..4d4a1e7 100644 --- a/lib/Model/FeedPost.php +++ b/lib/Model/FeedPost.php @@ -2,7 +2,7 @@ /** * FeedPost * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class FeedPost 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 $openAPIModelName = 'FeedPost'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ '_id' => 'string', 'tenant_id' => 'string', @@ -77,12 +77,12 @@ class FeedPost implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ '_id' => null, 'tenant_id' => null, @@ -103,10 +103,10 @@ class FeedPost implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ '_id' => false, 'tenant_id' => false, @@ -127,10 +127,10 @@ class FeedPost implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -354,14 +354,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -859,11 +859,11 @@ public function setCommentCount($comment_count) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -871,12 +871,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -901,11 +901,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/FeedPostLink.php b/lib/Model/FeedPostLink.php index 5b8efc3..ca8012c 100644 --- a/lib/Model/FeedPostLink.php +++ b/lib/Model/FeedPostLink.php @@ -2,7 +2,7 @@ /** * FeedPostLink * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class FeedPostLink 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 $openAPIModelName = 'FeedPostLink'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'text' => 'string', 'title' => 'string', @@ -65,12 +65,12 @@ class FeedPostLink implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'text' => null, 'title' => null, @@ -79,10 +79,10 @@ class FeedPostLink implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'text' => false, 'title' => false, @@ -91,10 +91,10 @@ class FeedPostLink implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -270,14 +270,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -421,11 +421,11 @@ public function setUrl($url) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -433,12 +433,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -463,11 +463,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/FeedPostMediaItem.php b/lib/Model/FeedPostMediaItem.php index ac23eec..a41759d 100644 --- a/lib/Model/FeedPostMediaItem.php +++ b/lib/Model/FeedPostMediaItem.php @@ -2,7 +2,7 @@ /** * FeedPostMediaItem * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class FeedPostMediaItem 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 $openAPIModelName = 'FeedPostMediaItem'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'title' => 'string', 'link_url' => 'string', @@ -64,12 +64,12 @@ class FeedPostMediaItem implements ModelInterface, ArrayAccess, \JsonSerializabl ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'title' => null, 'link_url' => null, @@ -77,10 +77,10 @@ class FeedPostMediaItem implements ModelInterface, ArrayAccess, \JsonSerializabl ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'title' => false, 'link_url' => false, @@ -88,10 +88,10 @@ class FeedPostMediaItem implements ModelInterface, ArrayAccess, \JsonSerializabl ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -263,14 +263,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -390,11 +390,11 @@ public function setSizes($sizes) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -402,12 +402,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -432,11 +432,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/FeedPostMediaItemAsset.php b/lib/Model/FeedPostMediaItemAsset.php index 0c2d614..f290889 100644 --- a/lib/Model/FeedPostMediaItemAsset.php +++ b/lib/Model/FeedPostMediaItemAsset.php @@ -2,7 +2,7 @@ /** * FeedPostMediaItemAsset * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class FeedPostMediaItemAsset 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 $openAPIModelName = 'FeedPostMediaItemAsset'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'w' => 'int', 'h' => 'int', @@ -64,12 +64,12 @@ class FeedPostMediaItemAsset implements ModelInterface, ArrayAccess, \JsonSerial ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'w' => 'int32', 'h' => 'int32', @@ -77,10 +77,10 @@ class FeedPostMediaItemAsset implements ModelInterface, ArrayAccess, \JsonSerial ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'w' => false, 'h' => false, @@ -88,10 +88,10 @@ class FeedPostMediaItemAsset implements ModelInterface, ArrayAccess, \JsonSerial ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -263,14 +263,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -396,11 +396,11 @@ public function setSrc($src) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -408,12 +408,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -438,11 +438,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/FeedPostStats.php b/lib/Model/FeedPostStats.php index 64d1715..a60ebc2 100644 --- a/lib/Model/FeedPostStats.php +++ b/lib/Model/FeedPostStats.php @@ -2,7 +2,7 @@ /** * FeedPostStats * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class FeedPostStats 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 $openAPIModelName = 'FeedPostStats'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'reacts' => 'array', 'comment_count' => 'int' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'reacts' => 'int32', 'comment_count' => 'int32' ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'reacts' => false, 'comment_count' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -353,11 +353,11 @@ public function setCommentCount($comment_count) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -365,12 +365,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -395,11 +395,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/FeedPostsStatsResponse.php b/lib/Model/FeedPostsStatsResponse.php index 8067105..5238cd8 100644 --- a/lib/Model/FeedPostsStatsResponse.php +++ b/lib/Model/FeedPostsStatsResponse.php @@ -2,7 +2,7 @@ /** * FeedPostsStatsResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class FeedPostsStatsResponse 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 $openAPIModelName = 'FeedPostsStatsResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'stats' => 'array' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'stats' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'stats' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setStats($stats) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/FindCommentsByRangeItem.php b/lib/Model/FindCommentsByRangeItem.php index c6436f5..19d053c 100644 --- a/lib/Model/FindCommentsByRangeItem.php +++ b/lib/Model/FindCommentsByRangeItem.php @@ -2,7 +2,7 @@ /** * FindCommentsByRangeItem * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class FindCommentsByRangeItem 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 $openAPIModelName = 'FindCommentsByRangeItem'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'comment' => '\FastComments\Client\Model\FComment', 'result' => '\FastComments\Client\Model\QuestionResult' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'comment' => null, 'result' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'comment' => true, 'result' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -282,8 +282,8 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['comment'] === null) { - $invalidProperties[] = "'comment' can't be null"; + if ($this->container['comment'] === null && !$this->isNullableSetToNull('comment')) { + $invalidProperties[] = "'comment' is required"; } if ($this->container['result'] === null) { $invalidProperties[] = "'result' can't be null"; @@ -306,7 +306,7 @@ public function valid() /** * Gets comment * - * @return \FastComments\Client\Model\FComment + * @return \FastComments\Client\Model\FComment|null */ public function getComment() { @@ -316,7 +316,7 @@ public function getComment() /** * Sets comment * - * @param \FastComments\Client\Model\FComment $comment comment + * @param \FastComments\Client\Model\FComment|null $comment comment * * @return self */ @@ -366,11 +366,11 @@ public function setResult($result) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -378,12 +378,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -408,11 +408,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/FindCommentsByRangeResponse.php b/lib/Model/FindCommentsByRangeResponse.php index bcfa554..b9c8126 100644 --- a/lib/Model/FindCommentsByRangeResponse.php +++ b/lib/Model/FindCommentsByRangeResponse.php @@ -2,7 +2,7 @@ /** * FindCommentsByRangeResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class FindCommentsByRangeResponse implements ModelInterface, ArrayAccess, \JsonS public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'FindCommentsByRangeResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'results' => '\FastComments\Client\Model\FindCommentsByRangeItem[]', 'created_at' => '\DateTime' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'results' => null, 'created_at' => 'date-time' ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'results' => false, 'created_at' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setCreatedAt($created_at) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/FlagCommentResponse.php b/lib/Model/FlagCommentResponse.php index adeba42..26630d1 100644 --- a/lib/Model/FlagCommentResponse.php +++ b/lib/Model/FlagCommentResponse.php @@ -2,7 +2,7 @@ /** * FlagCommentResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class FlagCommentResponse 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 $openAPIModelName = 'FlagCommentResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status_code' => 'int', 'status' => '\FastComments\Client\Model\APIStatus', @@ -66,12 +66,12 @@ class FlagCommentResponse implements ModelInterface, ArrayAccess, \JsonSerializa ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status_code' => 'int32', 'status' => null, @@ -81,10 +81,10 @@ class FlagCommentResponse implements ModelInterface, ArrayAccess, \JsonSerializa ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status_code' => false, 'status' => false, @@ -94,10 +94,10 @@ class FlagCommentResponse implements ModelInterface, ArrayAccess, \JsonSerializa ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -277,14 +277,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -458,11 +458,11 @@ public function setWasUnapproved($was_unapproved) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -470,12 +470,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -500,11 +500,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetAuditLogsResponse.php b/lib/Model/GetAuditLogsResponse.php index 7e53812..21265d5 100644 --- a/lib/Model/GetAuditLogsResponse.php +++ b/lib/Model/GetAuditLogsResponse.php @@ -2,7 +2,7 @@ /** * GetAuditLogsResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class GetAuditLogsResponse 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 $openAPIModelName = 'GetAuditLogsResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'audit_logs' => '\FastComments\Client\Model\APIAuditLog[]' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'audit_logs' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'audit_logs' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setAuditLogs($audit_logs) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetBannedUsersCountResponse.php b/lib/Model/GetBannedUsersCountResponse.php index d123e85..9639ce2 100644 --- a/lib/Model/GetBannedUsersCountResponse.php +++ b/lib/Model/GetBannedUsersCountResponse.php @@ -2,7 +2,7 @@ /** * GetBannedUsersCountResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class GetBannedUsersCountResponse implements ModelInterface, ArrayAccess, \JsonS public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'GetBannedUsersCountResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'total_count' => 'float', 'status' => 'string' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'total_count' => 'double', 'status' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'total_count' => false, 'status' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetBannedUsersFromCommentResponse.php b/lib/Model/GetBannedUsersFromCommentResponse.php index 33e15bf..043b834 100644 --- a/lib/Model/GetBannedUsersFromCommentResponse.php +++ b/lib/Model/GetBannedUsersFromCommentResponse.php @@ -2,7 +2,7 @@ /** * GetBannedUsersFromCommentResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class GetBannedUsersFromCommentResponse 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 $openAPIModelName = 'GetBannedUsersFromCommentResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'banned_users' => '\FastComments\Client\Model\APIBannedUserWithMultiMatchInfo[]', 'code' => 'string', @@ -64,12 +64,12 @@ class GetBannedUsersFromCommentResponse implements ModelInterface, ArrayAccess, ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'banned_users' => null, 'code' => null, @@ -77,10 +77,10 @@ class GetBannedUsersFromCommentResponse implements ModelInterface, ArrayAccess, ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'banned_users' => false, 'code' => false, @@ -88,10 +88,10 @@ class GetBannedUsersFromCommentResponse implements ModelInterface, ArrayAccess, ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -278,14 +278,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -427,11 +427,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -439,12 +439,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -469,11 +469,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetCachedNotificationCountResponse.php b/lib/Model/GetCachedNotificationCountResponse.php index 180b89d..bb56bda 100644 --- a/lib/Model/GetCachedNotificationCountResponse.php +++ b/lib/Model/GetCachedNotificationCountResponse.php @@ -2,7 +2,7 @@ /** * GetCachedNotificationCountResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class GetCachedNotificationCountResponse 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 $openAPIModelName = 'GetCachedNotificationCountResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'data' => '\FastComments\Client\Model\UserNotificationCount' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'data' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'data' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setData($data) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetCommentBanStatusResponse.php b/lib/Model/GetCommentBanStatusResponse.php index b381c57..bb9f240 100644 --- a/lib/Model/GetCommentBanStatusResponse.php +++ b/lib/Model/GetCommentBanStatusResponse.php @@ -2,7 +2,7 @@ /** * GetCommentBanStatusResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class GetCommentBanStatusResponse implements ModelInterface, ArrayAccess, \JsonS public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'GetCommentBanStatusResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => 'string', 'email_domain' => 'string', @@ -64,12 +64,12 @@ class GetCommentBanStatusResponse implements ModelInterface, ArrayAccess, \JsonS ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'email_domain' => null, @@ -77,10 +77,10 @@ class GetCommentBanStatusResponse implements ModelInterface, ArrayAccess, \JsonS ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'email_domain' => true, @@ -88,10 +88,10 @@ class GetCommentBanStatusResponse implements ModelInterface, ArrayAccess, \JsonS ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -263,14 +263,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -292,11 +292,11 @@ public function listInvalidProperties() if ($this->container['status'] === null) { $invalidProperties[] = "'status' can't be null"; } - if ($this->container['email_domain'] === null) { - $invalidProperties[] = "'email_domain' can't be null"; + if ($this->container['email_domain'] === null && !$this->isNullableSetToNull('email_domain')) { + $invalidProperties[] = "'email_domain' is required"; } - if ($this->container['can_ip_ban'] === null) { - $invalidProperties[] = "'can_ip_ban' can't be null"; + if ($this->container['can_ip_ban'] === null && !$this->isNullableSetToNull('can_ip_ban')) { + $invalidProperties[] = "'can_ip_ban' is required"; } return $invalidProperties; } @@ -343,7 +343,7 @@ public function setStatus($status) /** * Gets email_domain * - * @return string + * @return string|null */ public function getEmailDomain() { @@ -353,7 +353,7 @@ public function getEmailDomain() /** * Sets email_domain * - * @param string $email_domain email_domain + * @param string|null $email_domain email_domain * * @return self */ @@ -377,7 +377,7 @@ public function setEmailDomain($email_domain) /** * Gets can_ip_ban * - * @return bool + * @return bool|null */ public function getCanIpBan() { @@ -387,7 +387,7 @@ public function getCanIpBan() /** * Sets can_ip_ban * - * @param bool $can_ip_ban can_ip_ban + * @param bool|null $can_ip_ban can_ip_ban * * @return self */ @@ -410,11 +410,11 @@ public function setCanIpBan($can_ip_ban) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -422,12 +422,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -452,11 +452,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetCommentTextResponse.php b/lib/Model/GetCommentTextResponse.php index 6cf996d..885d10d 100644 --- a/lib/Model/GetCommentTextResponse.php +++ b/lib/Model/GetCommentTextResponse.php @@ -2,7 +2,7 @@ /** * GetCommentTextResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class GetCommentTextResponse 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 $openAPIModelName = 'GetCommentTextResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'comment' => 'string', 'status' => '\FastComments\Client\Model\APIStatus' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'comment' => null, 'status' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'comment' => true, 'status' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -363,11 +363,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -375,12 +375,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -405,11 +405,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetCommentVoteUserNamesSuccessResponse.php b/lib/Model/GetCommentVoteUserNamesSuccessResponse.php index 0478402..eb8848c 100644 --- a/lib/Model/GetCommentVoteUserNamesSuccessResponse.php +++ b/lib/Model/GetCommentVoteUserNamesSuccessResponse.php @@ -2,7 +2,7 @@ /** * GetCommentVoteUserNamesSuccessResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class GetCommentVoteUserNamesSuccessResponse 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 $openAPIModelName = 'GetCommentVoteUserNamesSuccessResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'vote_user_names' => 'string[]', @@ -64,12 +64,12 @@ class GetCommentVoteUserNamesSuccessResponse implements ModelInterface, ArrayAcc ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'vote_user_names' => null, @@ -77,10 +77,10 @@ class GetCommentVoteUserNamesSuccessResponse implements ModelInterface, ArrayAcc ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'vote_user_names' => false, @@ -88,10 +88,10 @@ class GetCommentVoteUserNamesSuccessResponse implements ModelInterface, ArrayAcc ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -263,14 +263,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -396,11 +396,11 @@ public function setHasMore($has_more) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -408,12 +408,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -438,11 +438,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetCommentsForUserResponse.php b/lib/Model/GetCommentsForUserResponse.php index 3392f84..6f974c5 100644 --- a/lib/Model/GetCommentsForUserResponse.php +++ b/lib/Model/GetCommentsForUserResponse.php @@ -2,7 +2,7 @@ /** * GetCommentsForUserResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,46 +46,46 @@ class GetCommentsForUserResponse 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 $openAPIModelName = 'GetCommentsForUserResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'moderating_tenant_ids' => 'string[]' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'moderating_tenant_ids' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'moderating_tenant_ids' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -249,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -319,11 +319,11 @@ public function setModeratingTenantIds($moderating_tenant_ids) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -331,12 +331,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -361,11 +361,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetCommentsResponsePublicComment.php b/lib/Model/GetCommentsResponsePublicComment.php index 2e37369..a02128d 100644 --- a/lib/Model/GetCommentsResponsePublicComment.php +++ b/lib/Model/GetCommentsResponsePublicComment.php @@ -2,7 +2,7 @@ /** * GetCommentsResponsePublicComment * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class GetCommentsResponsePublicComment 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 $openAPIModelName = 'GetCommentsResponse_PublicComment_'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status_code' => 'int', 'status' => 'string', @@ -85,12 +85,12 @@ class GetCommentsResponsePublicComment implements ModelInterface, ArrayAccess, \ ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status_code' => 'int32', 'status' => null, @@ -119,10 +119,10 @@ class GetCommentsResponsePublicComment implements ModelInterface, ArrayAccess, \ ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status_code' => false, 'status' => false, @@ -151,10 +151,10 @@ class GetCommentsResponsePublicComment implements ModelInterface, ArrayAccess, \ ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -410,14 +410,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -442,8 +442,8 @@ public function listInvalidProperties() if ($this->container['comments'] === null) { $invalidProperties[] = "'comments' can't be null"; } - if ($this->container['user'] === null) { - $invalidProperties[] = "'user' can't be null"; + if ($this->container['user'] === null && !$this->isNullableSetToNull('user')) { + $invalidProperties[] = "'user' is required"; } if ($this->container['page_number'] === null) { $invalidProperties[] = "'page_number' can't be null"; @@ -628,7 +628,7 @@ public function setComments($comments) /** * Gets user * - * @return \FastComments\Client\Model\UserSessionInfo + * @return \FastComments\Client\Model\UserSessionInfo|null */ public function getUser() { @@ -638,7 +638,7 @@ public function getUser() /** * Sets user * - * @param \FastComments\Client\Model\UserSessionInfo $user user + * @param \FastComments\Client\Model\UserSessionInfo|null $user user * * @return self */ @@ -1127,11 +1127,11 @@ public function setCustomConfig($custom_config) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -1139,12 +1139,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -1169,11 +1169,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetCommentsResponseWithPresencePublicComment.php b/lib/Model/GetCommentsResponseWithPresencePublicComment.php index 46c7c21..a453ba9 100644 --- a/lib/Model/GetCommentsResponseWithPresencePublicComment.php +++ b/lib/Model/GetCommentsResponseWithPresencePublicComment.php @@ -2,7 +2,7 @@ /** * GetCommentsResponseWithPresencePublicComment * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class GetCommentsResponseWithPresencePublicComment implements ModelInterface, Ar public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'GetCommentsResponseWithPresence_PublicComment_'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status_code' => 'int', 'status' => 'string', @@ -88,12 +88,12 @@ class GetCommentsResponseWithPresencePublicComment implements ModelInterface, Ar ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status_code' => 'int32', 'status' => null, @@ -125,10 +125,10 @@ class GetCommentsResponseWithPresencePublicComment implements ModelInterface, Ar ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status_code' => false, 'status' => false, @@ -160,10 +160,10 @@ class GetCommentsResponseWithPresencePublicComment implements ModelInterface, Ar ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -431,14 +431,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -463,8 +463,8 @@ public function listInvalidProperties() if ($this->container['comments'] === null) { $invalidProperties[] = "'comments' can't be null"; } - if ($this->container['user'] === null) { - $invalidProperties[] = "'user' can't be null"; + if ($this->container['user'] === null && !$this->isNullableSetToNull('user')) { + $invalidProperties[] = "'user' is required"; } if ($this->container['page_number'] === null) { $invalidProperties[] = "'page_number' can't be null"; @@ -649,7 +649,7 @@ public function setComments($comments) /** * Gets user * - * @return \FastComments\Client\Model\UserSessionInfo + * @return \FastComments\Client\Model\UserSessionInfo|null */ public function getUser() { @@ -659,7 +659,7 @@ public function getUser() /** * Sets user * - * @param \FastComments\Client\Model\UserSessionInfo $user user + * @param \FastComments\Client\Model\UserSessionInfo|null $user user * * @return self */ @@ -1229,11 +1229,11 @@ public function setTenantIdWs($tenant_id_ws) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -1241,12 +1241,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -1271,11 +1271,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetDomainConfigResponse.php b/lib/Model/GetDomainConfigResponse.php index e6ae105..5fd164c 100644 --- a/lib/Model/GetDomainConfigResponse.php +++ b/lib/Model/GetDomainConfigResponse.php @@ -2,7 +2,7 @@ /** * GetDomainConfigResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class GetDomainConfigResponse 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 $openAPIModelName = 'GetDomainConfigResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'configuration' => 'mixed', 'status' => 'mixed', @@ -65,12 +65,12 @@ class GetDomainConfigResponse implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'configuration' => null, 'status' => null, @@ -79,10 +79,10 @@ class GetDomainConfigResponse implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'configuration' => true, 'status' => true, @@ -91,10 +91,10 @@ class GetDomainConfigResponse implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -270,14 +270,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -296,17 +296,8 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['configuration'] === null) { - $invalidProperties[] = "'configuration' can't be null"; - } - if ($this->container['status'] === null) { - $invalidProperties[] = "'status' can't be null"; - } - if ($this->container['reason'] === null) { - $invalidProperties[] = "'reason' can't be null"; - } - if ($this->container['code'] === null) { - $invalidProperties[] = "'code' can't be null"; + if ($this->container['status'] === null && !$this->isNullableSetToNull('status')) { + $invalidProperties[] = "'status' is required"; } return $invalidProperties; } @@ -326,7 +317,7 @@ public function valid() /** * Gets configuration * - * @return mixed + * @return mixed|null */ public function getConfiguration() { @@ -336,7 +327,7 @@ public function getConfiguration() /** * Sets configuration * - * @param mixed $configuration configuration + * @param mixed|null $configuration configuration * * @return self */ @@ -360,7 +351,7 @@ public function setConfiguration($configuration) /** * Gets status * - * @return mixed + * @return mixed|null */ public function getStatus() { @@ -370,7 +361,7 @@ public function getStatus() /** * Sets status * - * @param mixed $status status + * @param mixed|null $status status * * @return self */ @@ -394,7 +385,7 @@ public function setStatus($status) /** * Gets reason * - * @return string + * @return string|null */ public function getReason() { @@ -404,7 +395,7 @@ public function getReason() /** * Sets reason * - * @param string $reason reason + * @param string|null $reason reason * * @return self */ @@ -421,7 +412,7 @@ public function setReason($reason) /** * Gets code * - * @return string + * @return string|null */ public function getCode() { @@ -431,7 +422,7 @@ public function getCode() /** * Sets code * - * @param string $code code + * @param string|null $code code * * @return self */ @@ -447,11 +438,11 @@ public function setCode($code) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -459,12 +450,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -489,11 +480,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetDomainConfigsResponse.php b/lib/Model/GetDomainConfigsResponse.php index 1ef3fd9..b6b18f6 100644 --- a/lib/Model/GetDomainConfigsResponse.php +++ b/lib/Model/GetDomainConfigsResponse.php @@ -2,7 +2,7 @@ /** * GetDomainConfigsResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class GetDomainConfigsResponse 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 $openAPIModelName = 'GetDomainConfigsResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'configurations' => 'mixed', 'status' => 'mixed', @@ -65,12 +65,12 @@ class GetDomainConfigsResponse implements ModelInterface, ArrayAccess, \JsonSeri ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'configurations' => null, 'status' => null, @@ -79,10 +79,10 @@ class GetDomainConfigsResponse implements ModelInterface, ArrayAccess, \JsonSeri ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'configurations' => true, 'status' => true, @@ -91,10 +91,10 @@ class GetDomainConfigsResponse implements ModelInterface, ArrayAccess, \JsonSeri ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -270,14 +270,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -296,17 +296,8 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['configurations'] === null) { - $invalidProperties[] = "'configurations' can't be null"; - } - if ($this->container['status'] === null) { - $invalidProperties[] = "'status' can't be null"; - } - if ($this->container['reason'] === null) { - $invalidProperties[] = "'reason' can't be null"; - } - if ($this->container['code'] === null) { - $invalidProperties[] = "'code' can't be null"; + if ($this->container['status'] === null && !$this->isNullableSetToNull('status')) { + $invalidProperties[] = "'status' is required"; } return $invalidProperties; } @@ -326,7 +317,7 @@ public function valid() /** * Gets configurations * - * @return mixed + * @return mixed|null */ public function getConfigurations() { @@ -336,7 +327,7 @@ public function getConfigurations() /** * Sets configurations * - * @param mixed $configurations configurations + * @param mixed|null $configurations configurations * * @return self */ @@ -360,7 +351,7 @@ public function setConfigurations($configurations) /** * Gets status * - * @return mixed + * @return mixed|null */ public function getStatus() { @@ -370,7 +361,7 @@ public function getStatus() /** * Sets status * - * @param mixed $status status + * @param mixed|null $status status * * @return self */ @@ -394,7 +385,7 @@ public function setStatus($status) /** * Gets reason * - * @return string + * @return string|null */ public function getReason() { @@ -404,7 +395,7 @@ public function getReason() /** * Sets reason * - * @param string $reason reason + * @param string|null $reason reason * * @return self */ @@ -421,7 +412,7 @@ public function setReason($reason) /** * Gets code * - * @return string + * @return string|null */ public function getCode() { @@ -431,7 +422,7 @@ public function getCode() /** * Sets code * - * @param string $code code + * @param string|null $code code * * @return self */ @@ -447,11 +438,11 @@ public function setCode($code) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -459,12 +450,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -489,11 +480,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetDomainConfigsResponseAnyOf.php b/lib/Model/GetDomainConfigsResponseAnyOf.php index 741b057..655823c 100644 --- a/lib/Model/GetDomainConfigsResponseAnyOf.php +++ b/lib/Model/GetDomainConfigsResponseAnyOf.php @@ -2,7 +2,7 @@ /** * GetDomainConfigsResponseAnyOf * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class GetDomainConfigsResponseAnyOf implements ModelInterface, ArrayAccess, \Jso public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'GetDomainConfigsResponse_anyOf'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'configurations' => 'mixed', 'status' => 'mixed' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'configurations' => null, 'status' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'configurations' => true, 'status' => true ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -282,11 +282,11 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['configurations'] === null) { - $invalidProperties[] = "'configurations' can't be null"; + if ($this->container['configurations'] === null && !$this->isNullableSetToNull('configurations')) { + $invalidProperties[] = "'configurations' is required"; } - if ($this->container['status'] === null) { - $invalidProperties[] = "'status' can't be null"; + if ($this->container['status'] === null && !$this->isNullableSetToNull('status')) { + $invalidProperties[] = "'status' is required"; } return $invalidProperties; } @@ -306,7 +306,7 @@ public function valid() /** * Gets configurations * - * @return mixed + * @return mixed|null */ public function getConfigurations() { @@ -316,7 +316,7 @@ public function getConfigurations() /** * Sets configurations * - * @param mixed $configurations configurations + * @param mixed|null $configurations configurations * * @return self */ @@ -340,7 +340,7 @@ public function setConfigurations($configurations) /** * Gets status * - * @return mixed + * @return mixed|null */ public function getStatus() { @@ -350,7 +350,7 @@ public function getStatus() /** * Sets status * - * @param mixed $status status + * @param mixed|null $status status * * @return self */ @@ -373,11 +373,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -385,12 +385,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -415,11 +415,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetDomainConfigsResponseAnyOf1.php b/lib/Model/GetDomainConfigsResponseAnyOf1.php index 29efc13..a091cb4 100644 --- a/lib/Model/GetDomainConfigsResponseAnyOf1.php +++ b/lib/Model/GetDomainConfigsResponseAnyOf1.php @@ -2,7 +2,7 @@ /** * GetDomainConfigsResponseAnyOf1 * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class GetDomainConfigsResponseAnyOf1 implements ModelInterface, ArrayAccess, \Js public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'GetDomainConfigsResponse_anyOf_1'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'reason' => 'string', 'code' => 'string', @@ -64,12 +64,12 @@ class GetDomainConfigsResponseAnyOf1 implements ModelInterface, ArrayAccess, \Js ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'reason' => null, 'code' => null, @@ -77,10 +77,10 @@ class GetDomainConfigsResponseAnyOf1 implements ModelInterface, ArrayAccess, \Js ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'reason' => false, 'code' => false, @@ -88,10 +88,10 @@ class GetDomainConfigsResponseAnyOf1 implements ModelInterface, ArrayAccess, \Js ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -263,14 +263,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -295,8 +295,8 @@ public function listInvalidProperties() if ($this->container['code'] === null) { $invalidProperties[] = "'code' can't be null"; } - if ($this->container['status'] === null) { - $invalidProperties[] = "'status' can't be null"; + if ($this->container['status'] === null && !$this->isNullableSetToNull('status')) { + $invalidProperties[] = "'status' is required"; } return $invalidProperties; } @@ -370,7 +370,7 @@ public function setCode($code) /** * Gets status * - * @return mixed + * @return mixed|null */ public function getStatus() { @@ -380,7 +380,7 @@ public function getStatus() /** * Sets status * - * @param mixed $status status + * @param mixed|null $status status * * @return self */ @@ -403,11 +403,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -415,12 +415,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -445,11 +445,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetEmailTemplateDefinitionsResponse.php b/lib/Model/GetEmailTemplateDefinitionsResponse.php index 413d308..a1ea525 100644 --- a/lib/Model/GetEmailTemplateDefinitionsResponse.php +++ b/lib/Model/GetEmailTemplateDefinitionsResponse.php @@ -2,7 +2,7 @@ /** * GetEmailTemplateDefinitionsResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class GetEmailTemplateDefinitionsResponse 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 $openAPIModelName = 'GetEmailTemplateDefinitionsResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'definitions' => '\FastComments\Client\Model\EmailTemplateDefinition[]' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'definitions' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'definitions' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setDefinitions($definitions) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetEmailTemplateRenderErrorsResponse.php b/lib/Model/GetEmailTemplateRenderErrorsResponse.php index be0468e..94f7494 100644 --- a/lib/Model/GetEmailTemplateRenderErrorsResponse.php +++ b/lib/Model/GetEmailTemplateRenderErrorsResponse.php @@ -2,7 +2,7 @@ /** * GetEmailTemplateRenderErrorsResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class GetEmailTemplateRenderErrorsResponse implements ModelInterface, ArrayAcces public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'GetEmailTemplateRenderErrorsResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'render_errors' => '\FastComments\Client\Model\EmailTemplateRenderErrorResponse[]' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'render_errors' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'render_errors' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setRenderErrors($render_errors) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetEmailTemplateResponse.php b/lib/Model/GetEmailTemplateResponse.php index fcb4606..362d404 100644 --- a/lib/Model/GetEmailTemplateResponse.php +++ b/lib/Model/GetEmailTemplateResponse.php @@ -2,7 +2,7 @@ /** * GetEmailTemplateResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class GetEmailTemplateResponse 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 $openAPIModelName = 'GetEmailTemplateResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'email_template' => '\FastComments\Client\Model\CustomEmailTemplate' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'email_template' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'email_template' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setEmailTemplate($email_template) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetEmailTemplatesResponse.php b/lib/Model/GetEmailTemplatesResponse.php index 39d70ea..31e7ce8 100644 --- a/lib/Model/GetEmailTemplatesResponse.php +++ b/lib/Model/GetEmailTemplatesResponse.php @@ -2,7 +2,7 @@ /** * GetEmailTemplatesResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class GetEmailTemplatesResponse 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 $openAPIModelName = 'GetEmailTemplatesResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'email_templates' => '\FastComments\Client\Model\CustomEmailTemplate[]' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'email_templates' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'email_templates' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setEmailTemplates($email_templates) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetEventLogResponse.php b/lib/Model/GetEventLogResponse.php index ff8cc88..325d138 100644 --- a/lib/Model/GetEventLogResponse.php +++ b/lib/Model/GetEventLogResponse.php @@ -2,7 +2,7 @@ /** * GetEventLogResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class GetEventLogResponse 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 $openAPIModelName = 'GetEventLogResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'events' => '\FastComments\Client\Model\EventLogEntry[]', 'status' => '\FastComments\Client\Model\APIStatus' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'events' => null, 'status' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'events' => false, 'status' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetFeedPostsResponse.php b/lib/Model/GetFeedPostsResponse.php index 7a8e134..d4a01f4 100644 --- a/lib/Model/GetFeedPostsResponse.php +++ b/lib/Model/GetFeedPostsResponse.php @@ -2,7 +2,7 @@ /** * GetFeedPostsResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class GetFeedPostsResponse 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 $openAPIModelName = 'GetFeedPostsResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'feed_posts' => '\FastComments\Client\Model\FeedPost[]' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'feed_posts' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'feed_posts' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setFeedPosts($feed_posts) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetGifsSearchResponse.php b/lib/Model/GetGifsSearchResponse.php index fe21d6e..e6a43c5 100644 --- a/lib/Model/GetGifsSearchResponse.php +++ b/lib/Model/GetGifsSearchResponse.php @@ -2,7 +2,7 @@ /** * GetGifsSearchResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class GetGifsSearchResponse 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 $openAPIModelName = 'GetGifsSearchResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'images' => '\FastComments\Client\Model\GifSearchResponseImagesInnerInner[][]', 'status' => '\FastComments\Client\Model\APIStatus', @@ -64,12 +64,12 @@ class GetGifsSearchResponse implements ModelInterface, ArrayAccess, \JsonSeriali ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'images' => null, 'status' => null, @@ -77,10 +77,10 @@ class GetGifsSearchResponse implements ModelInterface, ArrayAccess, \JsonSeriali ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'images' => false, 'status' => false, @@ -88,10 +88,10 @@ class GetGifsSearchResponse implements ModelInterface, ArrayAccess, \JsonSeriali ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -263,14 +263,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -289,15 +289,9 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['images'] === null) { - $invalidProperties[] = "'images' can't be null"; - } if ($this->container['status'] === null) { $invalidProperties[] = "'status' can't be null"; } - if ($this->container['code'] === null) { - $invalidProperties[] = "'code' can't be null"; - } return $invalidProperties; } @@ -316,7 +310,7 @@ public function valid() /** * Gets images * - * @return \FastComments\Client\Model\GifSearchResponseImagesInnerInner[][] + * @return \FastComments\Client\Model\GifSearchResponseImagesInnerInner[][]|null */ public function getImages() { @@ -326,7 +320,7 @@ public function getImages() /** * Sets images * - * @param \FastComments\Client\Model\GifSearchResponseImagesInnerInner[][] $images images + * @param \FastComments\Client\Model\GifSearchResponseImagesInnerInner[][]|null $images images * * @return self */ @@ -370,7 +364,7 @@ public function setStatus($status) /** * Gets code * - * @return string + * @return string|null */ public function getCode() { @@ -380,7 +374,7 @@ public function getCode() /** * Sets code * - * @param string $code code + * @param string|null $code code * * @return self */ @@ -396,11 +390,11 @@ public function setCode($code) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -408,12 +402,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -438,11 +432,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetGifsTrendingResponse.php b/lib/Model/GetGifsTrendingResponse.php index 9f37456..64be7b9 100644 --- a/lib/Model/GetGifsTrendingResponse.php +++ b/lib/Model/GetGifsTrendingResponse.php @@ -2,7 +2,7 @@ /** * GetGifsTrendingResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class GetGifsTrendingResponse 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 $openAPIModelName = 'GetGifsTrendingResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'images' => '\FastComments\Client\Model\GifSearchResponseImagesInnerInner[][]', 'status' => '\FastComments\Client\Model\APIStatus', @@ -64,12 +64,12 @@ class GetGifsTrendingResponse implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'images' => null, 'status' => null, @@ -77,10 +77,10 @@ class GetGifsTrendingResponse implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'images' => false, 'status' => false, @@ -88,10 +88,10 @@ class GetGifsTrendingResponse implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -263,14 +263,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -289,15 +289,9 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['images'] === null) { - $invalidProperties[] = "'images' can't be null"; - } if ($this->container['status'] === null) { $invalidProperties[] = "'status' can't be null"; } - if ($this->container['code'] === null) { - $invalidProperties[] = "'code' can't be null"; - } return $invalidProperties; } @@ -316,7 +310,7 @@ public function valid() /** * Gets images * - * @return \FastComments\Client\Model\GifSearchResponseImagesInnerInner[][] + * @return \FastComments\Client\Model\GifSearchResponseImagesInnerInner[][]|null */ public function getImages() { @@ -326,7 +320,7 @@ public function getImages() /** * Sets images * - * @param \FastComments\Client\Model\GifSearchResponseImagesInnerInner[][] $images images + * @param \FastComments\Client\Model\GifSearchResponseImagesInnerInner[][]|null $images images * * @return self */ @@ -370,7 +364,7 @@ public function setStatus($status) /** * Gets code * - * @return string + * @return string|null */ public function getCode() { @@ -380,7 +374,7 @@ public function getCode() /** * Sets code * - * @param string $code code + * @param string|null $code code * * @return self */ @@ -396,11 +390,11 @@ public function setCode($code) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -408,12 +402,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -438,11 +432,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetHashTagsResponse.php b/lib/Model/GetHashTagsResponse.php index f422e50..ed6e33e 100644 --- a/lib/Model/GetHashTagsResponse.php +++ b/lib/Model/GetHashTagsResponse.php @@ -2,7 +2,7 @@ /** * GetHashTagsResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class GetHashTagsResponse 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 $openAPIModelName = 'GetHashTagsResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'hash_tags' => '\FastComments\Client\Model\TenantHashTag[]' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'hash_tags' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'hash_tags' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setHashTags($hash_tags) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetModeratorResponse.php b/lib/Model/GetModeratorResponse.php index 07c2729..09499d5 100644 --- a/lib/Model/GetModeratorResponse.php +++ b/lib/Model/GetModeratorResponse.php @@ -2,7 +2,7 @@ /** * GetModeratorResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class GetModeratorResponse 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 $openAPIModelName = 'GetModeratorResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'moderator' => '\FastComments\Client\Model\Moderator' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'moderator' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'moderator' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setModerator($moderator) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetModeratorsResponse.php b/lib/Model/GetModeratorsResponse.php index 8ff29eb..206b4b8 100644 --- a/lib/Model/GetModeratorsResponse.php +++ b/lib/Model/GetModeratorsResponse.php @@ -2,7 +2,7 @@ /** * GetModeratorsResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class GetModeratorsResponse 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 $openAPIModelName = 'GetModeratorsResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'moderators' => '\FastComments\Client\Model\Moderator[]' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'moderators' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'moderators' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setModerators($moderators) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetMyNotificationsResponse.php b/lib/Model/GetMyNotificationsResponse.php index f5e342d..93cdec4 100644 --- a/lib/Model/GetMyNotificationsResponse.php +++ b/lib/Model/GetMyNotificationsResponse.php @@ -2,7 +2,7 @@ /** * GetMyNotificationsResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class GetMyNotificationsResponse 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 $openAPIModelName = 'GetMyNotificationsResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'translations' => 'array', 'is_subscribed' => 'bool', @@ -66,12 +66,12 @@ class GetMyNotificationsResponse implements ModelInterface, ArrayAccess, \JsonSe ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'translations' => null, 'is_subscribed' => null, @@ -81,10 +81,10 @@ class GetMyNotificationsResponse implements ModelInterface, ArrayAccess, \JsonSe ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'translations' => false, 'is_subscribed' => false, @@ -94,10 +94,10 @@ class GetMyNotificationsResponse implements ModelInterface, ArrayAccess, \JsonSe ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -277,14 +277,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -467,11 +467,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -479,12 +479,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -509,11 +509,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetNotificationCountResponse.php b/lib/Model/GetNotificationCountResponse.php index f22b40a..25894d3 100644 --- a/lib/Model/GetNotificationCountResponse.php +++ b/lib/Model/GetNotificationCountResponse.php @@ -2,7 +2,7 @@ /** * GetNotificationCountResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class GetNotificationCountResponse 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 $openAPIModelName = 'GetNotificationCountResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'count' => 'float' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'count' => 'double' ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'count' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setCount($count) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetNotificationsResponse.php b/lib/Model/GetNotificationsResponse.php index 6454bab..9f7e81b 100644 --- a/lib/Model/GetNotificationsResponse.php +++ b/lib/Model/GetNotificationsResponse.php @@ -2,7 +2,7 @@ /** * GetNotificationsResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class GetNotificationsResponse 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 $openAPIModelName = 'GetNotificationsResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'notifications' => '\FastComments\Client\Model\UserNotification[]' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'notifications' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'notifications' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setNotifications($notifications) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetPageByURLIdAPIResponse.php b/lib/Model/GetPageByURLIdAPIResponse.php index 8967543..319615e 100644 --- a/lib/Model/GetPageByURLIdAPIResponse.php +++ b/lib/Model/GetPageByURLIdAPIResponse.php @@ -2,7 +2,7 @@ /** * GetPageByURLIdAPIResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class GetPageByURLIdAPIResponse 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 $openAPIModelName = 'GetPageByURLIdAPIResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'reason' => 'string', 'code' => 'string', @@ -65,12 +65,12 @@ class GetPageByURLIdAPIResponse implements ModelInterface, ArrayAccess, \JsonSer ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'reason' => null, 'code' => null, @@ -79,10 +79,10 @@ class GetPageByURLIdAPIResponse implements ModelInterface, ArrayAccess, \JsonSer ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'reason' => false, 'code' => false, @@ -91,10 +91,10 @@ class GetPageByURLIdAPIResponse implements ModelInterface, ArrayAccess, \JsonSer ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -270,14 +270,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -424,11 +424,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -436,12 +436,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -466,11 +466,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetPagesAPIResponse.php b/lib/Model/GetPagesAPIResponse.php index 74072a3..dcf4279 100644 --- a/lib/Model/GetPagesAPIResponse.php +++ b/lib/Model/GetPagesAPIResponse.php @@ -2,7 +2,7 @@ /** * GetPagesAPIResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class GetPagesAPIResponse 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 $openAPIModelName = 'GetPagesAPIResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'reason' => 'string', 'code' => 'string', @@ -65,12 +65,12 @@ class GetPagesAPIResponse implements ModelInterface, ArrayAccess, \JsonSerializa ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'reason' => null, 'code' => null, @@ -79,10 +79,10 @@ class GetPagesAPIResponse implements ModelInterface, ArrayAccess, \JsonSerializa ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'reason' => false, 'code' => false, @@ -91,10 +91,10 @@ class GetPagesAPIResponse implements ModelInterface, ArrayAccess, \JsonSerializa ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -270,14 +270,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -424,11 +424,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -436,12 +436,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -466,11 +466,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetPendingWebhookEventCountResponse.php b/lib/Model/GetPendingWebhookEventCountResponse.php index e5dfcf5..2859faf 100644 --- a/lib/Model/GetPendingWebhookEventCountResponse.php +++ b/lib/Model/GetPendingWebhookEventCountResponse.php @@ -2,7 +2,7 @@ /** * GetPendingWebhookEventCountResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class GetPendingWebhookEventCountResponse 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 $openAPIModelName = 'GetPendingWebhookEventCountResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'count' => 'float' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'count' => 'double' ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'count' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setCount($count) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetPendingWebhookEventsResponse.php b/lib/Model/GetPendingWebhookEventsResponse.php index 045a1c6..c47b875 100644 --- a/lib/Model/GetPendingWebhookEventsResponse.php +++ b/lib/Model/GetPendingWebhookEventsResponse.php @@ -2,7 +2,7 @@ /** * GetPendingWebhookEventsResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class GetPendingWebhookEventsResponse 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 $openAPIModelName = 'GetPendingWebhookEventsResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'pending_webhook_events' => '\FastComments\Client\Model\PendingCommentToSyncOutbound[]' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'pending_webhook_events' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'pending_webhook_events' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setPendingWebhookEvents($pending_webhook_events) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetPublicFeedPostsResponse.php b/lib/Model/GetPublicFeedPostsResponse.php index df16182..4fd99a5 100644 --- a/lib/Model/GetPublicFeedPostsResponse.php +++ b/lib/Model/GetPublicFeedPostsResponse.php @@ -2,7 +2,7 @@ /** * GetPublicFeedPostsResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class GetPublicFeedPostsResponse 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 $openAPIModelName = 'GetPublicFeedPostsResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'feed_posts' => '\FastComments\Client\Model\FeedPost[]', @@ -64,12 +64,12 @@ class GetPublicFeedPostsResponse implements ModelInterface, ArrayAccess, \JsonSe ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'feed_posts' => null, @@ -77,10 +77,10 @@ class GetPublicFeedPostsResponse implements ModelInterface, ArrayAccess, \JsonSe ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'feed_posts' => false, @@ -88,10 +88,10 @@ class GetPublicFeedPostsResponse implements ModelInterface, ArrayAccess, \JsonSe ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -263,14 +263,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -400,11 +400,11 @@ public function setUser($user) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -412,12 +412,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -442,11 +442,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetPublicPagesResponse.php b/lib/Model/GetPublicPagesResponse.php index 84e574c..02e241f 100644 --- a/lib/Model/GetPublicPagesResponse.php +++ b/lib/Model/GetPublicPagesResponse.php @@ -2,7 +2,7 @@ /** * GetPublicPagesResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class GetPublicPagesResponse 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 $openAPIModelName = 'GetPublicPagesResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'next_cursor' => 'string', 'pages' => '\FastComments\Client\Model\PublicPage[]', @@ -64,12 +64,12 @@ class GetPublicPagesResponse implements ModelInterface, ArrayAccess, \JsonSerial ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'next_cursor' => null, 'pages' => null, @@ -77,10 +77,10 @@ class GetPublicPagesResponse implements ModelInterface, ArrayAccess, \JsonSerial ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'next_cursor' => true, 'pages' => false, @@ -88,10 +88,10 @@ class GetPublicPagesResponse implements ModelInterface, ArrayAccess, \JsonSerial ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -263,14 +263,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -289,8 +289,8 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['next_cursor'] === null) { - $invalidProperties[] = "'next_cursor' can't be null"; + if ($this->container['next_cursor'] === null && !$this->isNullableSetToNull('next_cursor')) { + $invalidProperties[] = "'next_cursor' is required"; } if ($this->container['pages'] === null) { $invalidProperties[] = "'pages' can't be null"; @@ -316,7 +316,7 @@ public function valid() /** * Gets next_cursor * - * @return string + * @return string|null */ public function getNextCursor() { @@ -326,7 +326,7 @@ public function getNextCursor() /** * Sets next_cursor * - * @param string $next_cursor next_cursor + * @param string|null $next_cursor next_cursor * * @return self */ @@ -403,11 +403,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -415,12 +415,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -445,11 +445,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetQuestionConfigResponse.php b/lib/Model/GetQuestionConfigResponse.php index 23d5122..512b1b5 100644 --- a/lib/Model/GetQuestionConfigResponse.php +++ b/lib/Model/GetQuestionConfigResponse.php @@ -2,7 +2,7 @@ /** * GetQuestionConfigResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class GetQuestionConfigResponse 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 $openAPIModelName = 'GetQuestionConfigResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'question_config' => '\FastComments\Client\Model\QuestionConfig' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'question_config' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'question_config' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setQuestionConfig($question_config) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetQuestionConfigsResponse.php b/lib/Model/GetQuestionConfigsResponse.php index deda5fd..18adde1 100644 --- a/lib/Model/GetQuestionConfigsResponse.php +++ b/lib/Model/GetQuestionConfigsResponse.php @@ -2,7 +2,7 @@ /** * GetQuestionConfigsResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class GetQuestionConfigsResponse 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 $openAPIModelName = 'GetQuestionConfigsResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'question_configs' => '\FastComments\Client\Model\QuestionConfig[]' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'question_configs' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'question_configs' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setQuestionConfigs($question_configs) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetQuestionResultResponse.php b/lib/Model/GetQuestionResultResponse.php index 6c2a0b7..659876a 100644 --- a/lib/Model/GetQuestionResultResponse.php +++ b/lib/Model/GetQuestionResultResponse.php @@ -2,7 +2,7 @@ /** * GetQuestionResultResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class GetQuestionResultResponse 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 $openAPIModelName = 'GetQuestionResultResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'question_result' => '\FastComments\Client\Model\QuestionResult' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'question_result' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'question_result' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setQuestionResult($question_result) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetQuestionResultsResponse.php b/lib/Model/GetQuestionResultsResponse.php index de8f3f6..1bc7595 100644 --- a/lib/Model/GetQuestionResultsResponse.php +++ b/lib/Model/GetQuestionResultsResponse.php @@ -2,7 +2,7 @@ /** * GetQuestionResultsResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class GetQuestionResultsResponse 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 $openAPIModelName = 'GetQuestionResultsResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'question_results' => '\FastComments\Client\Model\QuestionResult[]' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'question_results' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'question_results' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setQuestionResults($question_results) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetSSOUserByEmailAPIResponse.php b/lib/Model/GetSSOUserByEmailAPIResponse.php index 4e484ab..4dfdffa 100644 --- a/lib/Model/GetSSOUserByEmailAPIResponse.php +++ b/lib/Model/GetSSOUserByEmailAPIResponse.php @@ -2,7 +2,7 @@ /** * GetSSOUserByEmailAPIResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class GetSSOUserByEmailAPIResponse 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 $openAPIModelName = 'GetSSOUserByEmailAPIResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'reason' => 'string', 'code' => 'string', @@ -65,12 +65,12 @@ class GetSSOUserByEmailAPIResponse implements ModelInterface, ArrayAccess, \Json ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'reason' => null, 'code' => null, @@ -79,10 +79,10 @@ class GetSSOUserByEmailAPIResponse implements ModelInterface, ArrayAccess, \Json ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'reason' => false, 'code' => false, @@ -91,10 +91,10 @@ class GetSSOUserByEmailAPIResponse implements ModelInterface, ArrayAccess, \Json ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -270,14 +270,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -424,11 +424,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -436,12 +436,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -466,11 +466,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetSSOUserByIdAPIResponse.php b/lib/Model/GetSSOUserByIdAPIResponse.php index 12b79a6..c864213 100644 --- a/lib/Model/GetSSOUserByIdAPIResponse.php +++ b/lib/Model/GetSSOUserByIdAPIResponse.php @@ -2,7 +2,7 @@ /** * GetSSOUserByIdAPIResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class GetSSOUserByIdAPIResponse 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 $openAPIModelName = 'GetSSOUserByIdAPIResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'reason' => 'string', 'code' => 'string', @@ -65,12 +65,12 @@ class GetSSOUserByIdAPIResponse implements ModelInterface, ArrayAccess, \JsonSer ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'reason' => null, 'code' => null, @@ -79,10 +79,10 @@ class GetSSOUserByIdAPIResponse implements ModelInterface, ArrayAccess, \JsonSer ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'reason' => false, 'code' => false, @@ -91,10 +91,10 @@ class GetSSOUserByIdAPIResponse implements ModelInterface, ArrayAccess, \JsonSer ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -270,14 +270,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -424,11 +424,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -436,12 +436,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -466,11 +466,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetSSOUsersResponse.php b/lib/Model/GetSSOUsersResponse.php index 5da3324..8516249 100644 --- a/lib/Model/GetSSOUsersResponse.php +++ b/lib/Model/GetSSOUsersResponse.php @@ -2,7 +2,7 @@ /** * GetSSOUsersResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class GetSSOUsersResponse 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 $openAPIModelName = 'GetSSOUsersResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'users' => '\FastComments\Client\Model\APISSOUser[]', 'status' => 'string' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'users' => null, 'status' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'users' => false, 'status' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetSubscriptionsAPIResponse.php b/lib/Model/GetSubscriptionsAPIResponse.php index 9f83477..856b7ed 100644 --- a/lib/Model/GetSubscriptionsAPIResponse.php +++ b/lib/Model/GetSubscriptionsAPIResponse.php @@ -2,7 +2,7 @@ /** * GetSubscriptionsAPIResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class GetSubscriptionsAPIResponse implements ModelInterface, ArrayAccess, \JsonS public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'GetSubscriptionsAPIResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'reason' => 'string', 'code' => 'string', @@ -65,12 +65,12 @@ class GetSubscriptionsAPIResponse implements ModelInterface, ArrayAccess, \JsonS ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'reason' => null, 'code' => null, @@ -79,10 +79,10 @@ class GetSubscriptionsAPIResponse implements ModelInterface, ArrayAccess, \JsonS ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'reason' => false, 'code' => false, @@ -91,10 +91,10 @@ class GetSubscriptionsAPIResponse implements ModelInterface, ArrayAccess, \JsonS ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -270,14 +270,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -424,11 +424,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -436,12 +436,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -466,11 +466,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetTenantDailyUsagesResponse.php b/lib/Model/GetTenantDailyUsagesResponse.php index 02eee05..f4515c5 100644 --- a/lib/Model/GetTenantDailyUsagesResponse.php +++ b/lib/Model/GetTenantDailyUsagesResponse.php @@ -2,7 +2,7 @@ /** * GetTenantDailyUsagesResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class GetTenantDailyUsagesResponse 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 $openAPIModelName = 'GetTenantDailyUsagesResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'tenant_daily_usages' => '\FastComments\Client\Model\APITenantDailyUsage[]' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'tenant_daily_usages' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'tenant_daily_usages' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setTenantDailyUsages($tenant_daily_usages) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetTenantManualBadgesResponse.php b/lib/Model/GetTenantManualBadgesResponse.php index 991f2fb..3405853 100644 --- a/lib/Model/GetTenantManualBadgesResponse.php +++ b/lib/Model/GetTenantManualBadgesResponse.php @@ -2,7 +2,7 @@ /** * GetTenantManualBadgesResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class GetTenantManualBadgesResponse implements ModelInterface, ArrayAccess, \Jso public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'GetTenantManualBadgesResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'badges' => '\FastComments\Client\Model\TenantBadge[]', 'status' => '\FastComments\Client\Model\APIStatus' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'badges' => null, 'status' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'badges' => false, 'status' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetTenantPackageResponse.php b/lib/Model/GetTenantPackageResponse.php index 81d307e..c101e4c 100644 --- a/lib/Model/GetTenantPackageResponse.php +++ b/lib/Model/GetTenantPackageResponse.php @@ -2,7 +2,7 @@ /** * GetTenantPackageResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class GetTenantPackageResponse 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 $openAPIModelName = 'GetTenantPackageResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'tenant_package' => '\FastComments\Client\Model\TenantPackage' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'tenant_package' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'tenant_package' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setTenantPackage($tenant_package) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetTenantPackagesResponse.php b/lib/Model/GetTenantPackagesResponse.php index 9d77416..d6a8139 100644 --- a/lib/Model/GetTenantPackagesResponse.php +++ b/lib/Model/GetTenantPackagesResponse.php @@ -2,7 +2,7 @@ /** * GetTenantPackagesResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class GetTenantPackagesResponse 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 $openAPIModelName = 'GetTenantPackagesResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'tenant_packages' => '\FastComments\Client\Model\TenantPackage[]' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'tenant_packages' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'tenant_packages' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setTenantPackages($tenant_packages) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetTenantResponse.php b/lib/Model/GetTenantResponse.php index da84f8b..f9a9e62 100644 --- a/lib/Model/GetTenantResponse.php +++ b/lib/Model/GetTenantResponse.php @@ -2,7 +2,7 @@ /** * GetTenantResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class GetTenantResponse 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 $openAPIModelName = 'GetTenantResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'tenant' => '\FastComments\Client\Model\APITenant' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'tenant' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'tenant' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setTenant($tenant) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetTenantUserResponse.php b/lib/Model/GetTenantUserResponse.php index ee837f9..34034d1 100644 --- a/lib/Model/GetTenantUserResponse.php +++ b/lib/Model/GetTenantUserResponse.php @@ -2,7 +2,7 @@ /** * GetTenantUserResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class GetTenantUserResponse 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 $openAPIModelName = 'GetTenantUserResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'tenant_user' => '\FastComments\Client\Model\User' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'tenant_user' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'tenant_user' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setTenantUser($tenant_user) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetTenantUsersResponse.php b/lib/Model/GetTenantUsersResponse.php index 4ee34bd..6ece341 100644 --- a/lib/Model/GetTenantUsersResponse.php +++ b/lib/Model/GetTenantUsersResponse.php @@ -2,7 +2,7 @@ /** * GetTenantUsersResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class GetTenantUsersResponse 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 $openAPIModelName = 'GetTenantUsersResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'tenant_users' => '\FastComments\Client\Model\User[]' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'tenant_users' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'tenant_users' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setTenantUsers($tenant_users) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetTenantsResponse.php b/lib/Model/GetTenantsResponse.php index 0e63a6f..baa11df 100644 --- a/lib/Model/GetTenantsResponse.php +++ b/lib/Model/GetTenantsResponse.php @@ -2,7 +2,7 @@ /** * GetTenantsResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class GetTenantsResponse 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 $openAPIModelName = 'GetTenantsResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'tenants' => '\FastComments\Client\Model\APITenant[]' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'tenants' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'tenants' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setTenants($tenants) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetTicketResponse.php b/lib/Model/GetTicketResponse.php index ad8ac8c..4a26248 100644 --- a/lib/Model/GetTicketResponse.php +++ b/lib/Model/GetTicketResponse.php @@ -2,7 +2,7 @@ /** * GetTicketResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class GetTicketResponse 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 $openAPIModelName = 'GetTicketResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'ticket' => '\FastComments\Client\Model\APITicketDetail', @@ -64,12 +64,12 @@ class GetTicketResponse implements ModelInterface, ArrayAccess, \JsonSerializabl ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'ticket' => null, @@ -77,10 +77,10 @@ class GetTicketResponse implements ModelInterface, ArrayAccess, \JsonSerializabl ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'ticket' => false, @@ -88,10 +88,10 @@ class GetTicketResponse implements ModelInterface, ArrayAccess, \JsonSerializabl ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -263,14 +263,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -396,11 +396,11 @@ public function setAvailableStates($available_states) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -408,12 +408,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -438,11 +438,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetTicketsResponse.php b/lib/Model/GetTicketsResponse.php index 82bdf8b..dca5d04 100644 --- a/lib/Model/GetTicketsResponse.php +++ b/lib/Model/GetTicketsResponse.php @@ -2,7 +2,7 @@ /** * GetTicketsResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class GetTicketsResponse 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 $openAPIModelName = 'GetTicketsResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'tickets' => '\FastComments\Client\Model\APITicket[]' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'tickets' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'tickets' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setTickets($tickets) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetTranslationsResponse.php b/lib/Model/GetTranslationsResponse.php index 0a28d80..907f46e 100644 --- a/lib/Model/GetTranslationsResponse.php +++ b/lib/Model/GetTranslationsResponse.php @@ -2,7 +2,7 @@ /** * GetTranslationsResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class GetTranslationsResponse 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 $openAPIModelName = 'GetTranslationsResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'translations' => 'array', 'status' => '\FastComments\Client\Model\APIStatus' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'translations' => null, 'status' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'translations' => false, 'status' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetUserInternalProfileResponse.php b/lib/Model/GetUserInternalProfileResponse.php index f9d939c..09b9080 100644 --- a/lib/Model/GetUserInternalProfileResponse.php +++ b/lib/Model/GetUserInternalProfileResponse.php @@ -2,7 +2,7 @@ /** * GetUserInternalProfileResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class GetUserInternalProfileResponse implements ModelInterface, ArrayAccess, \Js public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'GetUserInternalProfileResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'profile' => '\FastComments\Client\Model\GetUserInternalProfileResponseProfile', 'status' => '\FastComments\Client\Model\APIStatus' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'profile' => null, 'status' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'profile' => false, 'status' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetUserInternalProfileResponseProfile.php b/lib/Model/GetUserInternalProfileResponseProfile.php index 8bdb4ea..5bc618f 100644 --- a/lib/Model/GetUserInternalProfileResponseProfile.php +++ b/lib/Model/GetUserInternalProfileResponseProfile.php @@ -2,7 +2,7 @@ /** * GetUserInternalProfileResponseProfile * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class GetUserInternalProfileResponseProfile implements ModelInterface, ArrayAcce public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'GetUserInternalProfileResponse_profile'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'commenter_name' => 'string', 'first_comment_date' => '\DateTime', @@ -78,12 +78,12 @@ class GetUserInternalProfileResponseProfile implements ModelInterface, ArrayAcce ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'commenter_name' => null, 'first_comment_date' => 'date-time', @@ -105,10 +105,10 @@ class GetUserInternalProfileResponseProfile implements ModelInterface, ArrayAcce ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'commenter_name' => false, 'first_comment_date' => true, @@ -130,10 +130,10 @@ class GetUserInternalProfileResponseProfile implements ModelInterface, ArrayAcce ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -361,14 +361,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -912,11 +912,11 @@ public function setUserId($user_id) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -924,12 +924,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -954,11 +954,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetUserManualBadgesResponse.php b/lib/Model/GetUserManualBadgesResponse.php index 90d1d21..555037b 100644 --- a/lib/Model/GetUserManualBadgesResponse.php +++ b/lib/Model/GetUserManualBadgesResponse.php @@ -2,7 +2,7 @@ /** * GetUserManualBadgesResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class GetUserManualBadgesResponse implements ModelInterface, ArrayAccess, \JsonS public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'GetUserManualBadgesResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'badges' => '\FastComments\Client\Model\UserBadge[]', 'status' => '\FastComments\Client\Model\APIStatus' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'badges' => null, 'status' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'badges' => false, 'status' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetUserNotificationCountResponse.php b/lib/Model/GetUserNotificationCountResponse.php index ad08eb0..f150909 100644 --- a/lib/Model/GetUserNotificationCountResponse.php +++ b/lib/Model/GetUserNotificationCountResponse.php @@ -2,7 +2,7 @@ /** * GetUserNotificationCountResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class GetUserNotificationCountResponse 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 $openAPIModelName = 'GetUserNotificationCountResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'count' => 'int' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'count' => 'int64' ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'count' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setCount($count) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetUserPresenceStatusesResponse.php b/lib/Model/GetUserPresenceStatusesResponse.php index f112a4b..acdb114 100644 --- a/lib/Model/GetUserPresenceStatusesResponse.php +++ b/lib/Model/GetUserPresenceStatusesResponse.php @@ -2,7 +2,7 @@ /** * GetUserPresenceStatusesResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class GetUserPresenceStatusesResponse 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 $openAPIModelName = 'GetUserPresenceStatusesResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'user_ids_online' => 'array' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'user_ids_online' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'user_ids_online' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setUserIdsOnline($user_ids_online) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetUserResponse.php b/lib/Model/GetUserResponse.php index 822f7f3..ab2bfd6 100644 --- a/lib/Model/GetUserResponse.php +++ b/lib/Model/GetUserResponse.php @@ -2,7 +2,7 @@ /** * GetUserResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class GetUserResponse 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 $openAPIModelName = 'GetUserResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'user' => '\FastComments\Client\Model\User' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'user' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'user' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setUser($user) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetUserTrustFactorResponse.php b/lib/Model/GetUserTrustFactorResponse.php index 8251d6e..7b926b4 100644 --- a/lib/Model/GetUserTrustFactorResponse.php +++ b/lib/Model/GetUserTrustFactorResponse.php @@ -2,7 +2,7 @@ /** * GetUserTrustFactorResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class GetUserTrustFactorResponse 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 $openAPIModelName = 'GetUserTrustFactorResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'manual_trust_factor' => 'float', 'auto_trust_factor' => 'float', @@ -64,12 +64,12 @@ class GetUserTrustFactorResponse implements ModelInterface, ArrayAccess, \JsonSe ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'manual_trust_factor' => 'double', 'auto_trust_factor' => 'double', @@ -77,10 +77,10 @@ class GetUserTrustFactorResponse implements ModelInterface, ArrayAccess, \JsonSe ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'manual_trust_factor' => false, 'auto_trust_factor' => false, @@ -88,10 +88,10 @@ class GetUserTrustFactorResponse implements ModelInterface, ArrayAccess, \JsonSe ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -263,14 +263,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -390,11 +390,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -402,12 +402,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -432,11 +432,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetV1PageLikes.php b/lib/Model/GetV1PageLikes.php index b679aab..dde3a8e 100644 --- a/lib/Model/GetV1PageLikes.php +++ b/lib/Model/GetV1PageLikes.php @@ -2,7 +2,7 @@ /** * GetV1PageLikes * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class GetV1PageLikes 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 $openAPIModelName = 'GetV1PageLikes'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'url_id_ws' => 'string', 'did_like' => 'bool', @@ -66,12 +66,12 @@ class GetV1PageLikes implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'url_id_ws' => null, 'did_like' => null, @@ -81,10 +81,10 @@ class GetV1PageLikes implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'url_id_ws' => false, 'did_like' => false, @@ -94,10 +94,10 @@ class GetV1PageLikes implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -277,14 +277,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -470,11 +470,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -482,12 +482,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -512,11 +512,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetV2PageReactUsersResponse.php b/lib/Model/GetV2PageReactUsersResponse.php index 4ecea70..c6ab4e8 100644 --- a/lib/Model/GetV2PageReactUsersResponse.php +++ b/lib/Model/GetV2PageReactUsersResponse.php @@ -2,7 +2,7 @@ /** * GetV2PageReactUsersResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class GetV2PageReactUsersResponse implements ModelInterface, ArrayAccess, \JsonS public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'GetV2PageReactUsersResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'user_names' => 'string[]', 'status' => '\FastComments\Client\Model\APIStatus' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'user_names' => null, 'status' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'user_names' => false, 'status' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetV2PageReacts.php b/lib/Model/GetV2PageReacts.php index 666a051..d9a3139 100644 --- a/lib/Model/GetV2PageReacts.php +++ b/lib/Model/GetV2PageReacts.php @@ -2,7 +2,7 @@ /** * GetV2PageReacts * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class GetV2PageReacts 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 $openAPIModelName = 'GetV2PageReacts'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'reacted_ids' => 'string[]', 'counts' => 'array', @@ -64,12 +64,12 @@ class GetV2PageReacts implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'reacted_ids' => null, 'counts' => 'double', @@ -77,10 +77,10 @@ class GetV2PageReacts implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'reacted_ids' => false, 'counts' => false, @@ -88,10 +88,10 @@ class GetV2PageReacts implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -263,14 +263,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -390,11 +390,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -402,12 +402,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -432,11 +432,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetVotesForUserResponse.php b/lib/Model/GetVotesForUserResponse.php index c2db496..32cf0c7 100644 --- a/lib/Model/GetVotesForUserResponse.php +++ b/lib/Model/GetVotesForUserResponse.php @@ -2,7 +2,7 @@ /** * GetVotesForUserResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class GetVotesForUserResponse 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 $openAPIModelName = 'GetVotesForUserResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'applied_authorized_votes' => '\FastComments\Client\Model\PublicVote[]', @@ -65,12 +65,12 @@ class GetVotesForUserResponse implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'applied_authorized_votes' => null, @@ -79,10 +79,10 @@ class GetVotesForUserResponse implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'applied_authorized_votes' => false, @@ -91,10 +91,10 @@ class GetVotesForUserResponse implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -270,14 +270,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -433,11 +433,11 @@ public function setPendingVotes($pending_votes) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -445,12 +445,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -475,11 +475,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GetVotesResponse.php b/lib/Model/GetVotesResponse.php index 246d3e6..09a0535 100644 --- a/lib/Model/GetVotesResponse.php +++ b/lib/Model/GetVotesResponse.php @@ -2,7 +2,7 @@ /** * GetVotesResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class GetVotesResponse 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 $openAPIModelName = 'GetVotesResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'applied_authorized_votes' => '\FastComments\Client\Model\PublicVote[]', @@ -65,12 +65,12 @@ class GetVotesResponse implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'applied_authorized_votes' => null, @@ -79,10 +79,10 @@ class GetVotesResponse implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'applied_authorized_votes' => false, @@ -91,10 +91,10 @@ class GetVotesResponse implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -270,14 +270,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -433,11 +433,11 @@ public function setPendingVotes($pending_votes) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -445,12 +445,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -475,11 +475,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GifGetLargeResponse.php b/lib/Model/GifGetLargeResponse.php index 602cbaf..aa55298 100644 --- a/lib/Model/GifGetLargeResponse.php +++ b/lib/Model/GifGetLargeResponse.php @@ -2,7 +2,7 @@ /** * GifGetLargeResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class GifGetLargeResponse 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 $openAPIModelName = 'GifGetLargeResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'src' => 'string', 'status' => '\FastComments\Client\Model\APIStatus' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'src' => null, 'status' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'src' => false, 'status' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GifRating.php b/lib/Model/GifRating.php index 742a90a..346b6b3 100644 --- a/lib/Model/GifRating.php +++ b/lib/Model/GifRating.php @@ -2,7 +2,7 @@ /** * GifRating * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** diff --git a/lib/Model/GifSearchInternalError.php b/lib/Model/GifSearchInternalError.php index 85e8c2a..c2b9aea 100644 --- a/lib/Model/GifSearchInternalError.php +++ b/lib/Model/GifSearchInternalError.php @@ -2,7 +2,7 @@ /** * GifSearchInternalError * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class GifSearchInternalError 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 $openAPIModelName = 'GifSearchInternalError'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'code' => 'string', 'status' => '\FastComments\Client\Model\APIStatus' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'code' => null, 'status' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'code' => false, 'status' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GifSearchResponse.php b/lib/Model/GifSearchResponse.php index 51b234d..e88bd63 100644 --- a/lib/Model/GifSearchResponse.php +++ b/lib/Model/GifSearchResponse.php @@ -2,7 +2,7 @@ /** * GifSearchResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class GifSearchResponse 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 $openAPIModelName = 'GifSearchResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'images' => '\FastComments\Client\Model\GifSearchResponseImagesInnerInner[][]', 'status' => '\FastComments\Client\Model\APIStatus' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'images' => null, 'status' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'images' => false, 'status' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/GifSearchResponseImagesInnerInner.php b/lib/Model/GifSearchResponseImagesInnerInner.php index 1b2d1a5..2d6aa27 100644 --- a/lib/Model/GifSearchResponseImagesInnerInner.php +++ b/lib/Model/GifSearchResponseImagesInnerInner.php @@ -2,7 +2,7 @@ /** * GifSearchResponseImagesInnerInner * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,46 +46,46 @@ class GifSearchResponseImagesInnerInner 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 $openAPIModelName = 'GifSearchResponse_images_inner_inner'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -248,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -291,11 +291,11 @@ public function valid() /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -303,12 +303,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -333,11 +333,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/HeaderAccountNotification.php b/lib/Model/HeaderAccountNotification.php index cb0b6d5..7067ac3 100644 --- a/lib/Model/HeaderAccountNotification.php +++ b/lib/Model/HeaderAccountNotification.php @@ -2,7 +2,7 @@ /** * HeaderAccountNotification * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class HeaderAccountNotification 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 $openAPIModelName = 'HeaderAccountNotification'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ '_id' => 'string', 'title' => 'string', @@ -71,12 +71,12 @@ class HeaderAccountNotification implements ModelInterface, ArrayAccess, \JsonSer ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ '_id' => null, 'title' => null, @@ -91,10 +91,10 @@ class HeaderAccountNotification implements ModelInterface, ArrayAccess, \JsonSer ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ '_id' => false, 'title' => false, @@ -109,10 +109,10 @@ class HeaderAccountNotification implements ModelInterface, ArrayAccess, \JsonSer ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -312,14 +312,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -347,20 +347,20 @@ public function listInvalidProperties() if ($this->container['message'] === null) { $invalidProperties[] = "'message' can't be null"; } - if ($this->container['messages_by_locale'] === null) { - $invalidProperties[] = "'messages_by_locale' can't be null"; + if ($this->container['messages_by_locale'] === null && !$this->isNullableSetToNull('messages_by_locale')) { + $invalidProperties[] = "'messages_by_locale' is required"; } - if ($this->container['dates'] === null) { - $invalidProperties[] = "'dates' can't be null"; + if ($this->container['dates'] === null && !$this->isNullableSetToNull('dates')) { + $invalidProperties[] = "'dates' is required"; } if ($this->container['severity'] === null) { $invalidProperties[] = "'severity' can't be null"; } - if ($this->container['link_url'] === null) { - $invalidProperties[] = "'link_url' can't be null"; + if ($this->container['link_url'] === null && !$this->isNullableSetToNull('link_url')) { + $invalidProperties[] = "'link_url' is required"; } - if ($this->container['link_text'] === null) { - $invalidProperties[] = "'link_text' can't be null"; + if ($this->container['link_text'] === null && !$this->isNullableSetToNull('link_text')) { + $invalidProperties[] = "'link_text' is required"; } if ($this->container['created_at'] === null) { $invalidProperties[] = "'created_at' can't be null"; @@ -464,7 +464,7 @@ public function setMessage($message) /** * Gets messages_by_locale * - * @return array + * @return array|null */ public function getMessagesByLocale() { @@ -474,7 +474,7 @@ public function getMessagesByLocale() /** * Sets messages_by_locale * - * @param array $messages_by_locale Construct a type with a set of properties K of type T + * @param array|null $messages_by_locale Construct a type with a set of properties K of type T * * @return self */ @@ -498,7 +498,7 @@ public function setMessagesByLocale($messages_by_locale) /** * Gets dates * - * @return array + * @return array|null */ public function getDates() { @@ -508,7 +508,7 @@ public function getDates() /** * Sets dates * - * @param array $dates Construct a type with a set of properties K of type T + * @param array|null $dates Construct a type with a set of properties K of type T * * @return self */ @@ -559,7 +559,7 @@ public function setSeverity($severity) /** * Gets link_url * - * @return string + * @return string|null */ public function getLinkUrl() { @@ -569,7 +569,7 @@ public function getLinkUrl() /** * Sets link_url * - * @param string $link_url link_url + * @param string|null $link_url link_url * * @return self */ @@ -593,7 +593,7 @@ public function setLinkUrl($link_url) /** * Gets link_text * - * @return string + * @return string|null */ public function getLinkText() { @@ -603,7 +603,7 @@ public function getLinkText() /** * Sets link_text * - * @param string $link_text link_text + * @param string|null $link_text link_text * * @return self */ @@ -687,11 +687,11 @@ public function setType($type) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -699,12 +699,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -729,11 +729,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/HeaderState.php b/lib/Model/HeaderState.php index 14756b4..ea505b8 100644 --- a/lib/Model/HeaderState.php +++ b/lib/Model/HeaderState.php @@ -2,7 +2,7 @@ /** * HeaderState * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class HeaderState 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 $openAPIModelName = 'HeaderState'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'notification_type' => 'object', @@ -67,12 +67,12 @@ class HeaderState implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'notification_type' => null, @@ -83,10 +83,10 @@ class HeaderState implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'notification_type' => false, @@ -97,10 +97,10 @@ class HeaderState implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -284,14 +284,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -507,11 +507,11 @@ public function setAccountNotifications($account_notifications) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -519,12 +519,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -549,11 +549,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/IgnoredResponse.php b/lib/Model/IgnoredResponse.php index 5f7f247..74cd2e1 100644 --- a/lib/Model/IgnoredResponse.php +++ b/lib/Model/IgnoredResponse.php @@ -2,7 +2,7 @@ /** * IgnoredResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class IgnoredResponse 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 $openAPIModelName = 'IgnoredResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'note' => 'string' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'note' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'note' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -271,14 +271,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -393,11 +393,11 @@ public function setNote($note) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -405,12 +405,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -435,11 +435,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/ImageContentProfanityLevel.php b/lib/Model/ImageContentProfanityLevel.php index 3940feb..a6004d5 100644 --- a/lib/Model/ImageContentProfanityLevel.php +++ b/lib/Model/ImageContentProfanityLevel.php @@ -2,7 +2,7 @@ /** * ImageContentProfanityLevel * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** diff --git a/lib/Model/ImportedAgentApprovalNotificationFrequency.php b/lib/Model/ImportedAgentApprovalNotificationFrequency.php index 7a8fe26..44245c6 100644 --- a/lib/Model/ImportedAgentApprovalNotificationFrequency.php +++ b/lib/Model/ImportedAgentApprovalNotificationFrequency.php @@ -2,7 +2,7 @@ /** * ImportedAgentApprovalNotificationFrequency * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** diff --git a/lib/Model/ImportedSiteType.php b/lib/Model/ImportedSiteType.php index bfd1c69..2cb4dad 100644 --- a/lib/Model/ImportedSiteType.php +++ b/lib/Model/ImportedSiteType.php @@ -2,7 +2,7 @@ /** * ImportedSiteType * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** diff --git a/lib/Model/LiveEvent.php b/lib/Model/LiveEvent.php index ed40431..5b1ab4d 100644 --- a/lib/Model/LiveEvent.php +++ b/lib/Model/LiveEvent.php @@ -2,7 +2,7 @@ /** * LiveEvent * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class LiveEvent 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 $openAPIModelName = 'LiveEvent'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'type' => '\FastComments\Client\Model\LiveEventType', 'timestamp' => 'int', @@ -78,12 +78,12 @@ class LiveEvent implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'type' => null, 'timestamp' => 'int64', @@ -105,10 +105,10 @@ class LiveEvent implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'type' => false, 'timestamp' => false, @@ -130,10 +130,10 @@ class LiveEvent implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -361,14 +361,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -866,11 +866,11 @@ public function setChanges($changes) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -878,12 +878,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -908,11 +908,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/LiveEventExtraInfo.php b/lib/Model/LiveEventExtraInfo.php index 04ec39c..2a7e4cb 100644 --- a/lib/Model/LiveEventExtraInfo.php +++ b/lib/Model/LiveEventExtraInfo.php @@ -2,7 +2,7 @@ /** * LiveEventExtraInfo * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,46 +46,46 @@ class LiveEventExtraInfo 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 $openAPIModelName = 'LiveEvent_extraInfo'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'comment_positions' => 'array' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'comment_positions' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'comment_positions' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -249,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -319,11 +319,11 @@ public function setCommentPositions($comment_positions) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -331,12 +331,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -361,11 +361,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/LiveEventType.php b/lib/Model/LiveEventType.php index 916135c..cc59e84 100644 --- a/lib/Model/LiveEventType.php +++ b/lib/Model/LiveEventType.php @@ -2,7 +2,7 @@ /** * LiveEventType * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** diff --git a/lib/Model/MediaAsset.php b/lib/Model/MediaAsset.php index 87cf309..fa59810 100644 --- a/lib/Model/MediaAsset.php +++ b/lib/Model/MediaAsset.php @@ -2,7 +2,7 @@ /** * MediaAsset * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class MediaAsset 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 $openAPIModelName = 'MediaAsset'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'w' => 'int', 'h' => 'int', @@ -64,12 +64,12 @@ class MediaAsset implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'w' => 'int32', 'h' => 'int32', @@ -77,10 +77,10 @@ class MediaAsset implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'w' => false, 'h' => false, @@ -88,10 +88,10 @@ class MediaAsset implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -263,14 +263,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -396,11 +396,11 @@ public function setSrc($src) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -408,12 +408,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -438,11 +438,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/MentionAutoCompleteMode.php b/lib/Model/MentionAutoCompleteMode.php index bb0b4b1..de51bd3 100644 --- a/lib/Model/MentionAutoCompleteMode.php +++ b/lib/Model/MentionAutoCompleteMode.php @@ -2,7 +2,7 @@ /** * MentionAutoCompleteMode * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** diff --git a/lib/Model/MetaItem.php b/lib/Model/MetaItem.php index ab5b7fd..0738f22 100644 --- a/lib/Model/MetaItem.php +++ b/lib/Model/MetaItem.php @@ -2,7 +2,7 @@ /** * MetaItem * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class MetaItem 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 $openAPIModelName = 'MetaItem'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'name' => 'string', 'values' => 'string[]' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'name' => null, 'values' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'name' => false, 'values' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setValues($values) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/ModelInterface.php b/lib/Model/ModelInterface.php index a8d9567..b80fda0 100644 --- a/lib/Model/ModelInterface.php +++ b/lib/Model/ModelInterface.php @@ -2,7 +2,7 @@ /** * ModelInterface * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client\Model @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** diff --git a/lib/Model/ModerationAPIChildCommentsResponse.php b/lib/Model/ModerationAPIChildCommentsResponse.php index 6acdb44..743fb5f 100644 --- a/lib/Model/ModerationAPIChildCommentsResponse.php +++ b/lib/Model/ModerationAPIChildCommentsResponse.php @@ -2,7 +2,7 @@ /** * ModerationAPIChildCommentsResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class ModerationAPIChildCommentsResponse 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 $openAPIModelName = 'ModerationAPIChildCommentsResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'comments' => '\FastComments\Client\Model\ModerationAPIComment[]', 'status' => '\FastComments\Client\Model\APIStatus' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'comments' => null, 'status' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'comments' => false, 'status' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/ModerationAPIComment.php b/lib/Model/ModerationAPIComment.php index dd5406b..2dd340f 100644 --- a/lib/Model/ModerationAPIComment.php +++ b/lib/Model/ModerationAPIComment.php @@ -2,7 +2,7 @@ /** * ModerationAPIComment * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class ModerationAPIComment 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 $openAPIModelName = 'ModerationAPIComment'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'is_local_deleted' => 'bool', 'reply_count' => 'float', @@ -103,12 +103,12 @@ class ModerationAPIComment implements ModelInterface, ArrayAccess, \JsonSerializ ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'is_local_deleted' => null, 'reply_count' => 'double', @@ -155,10 +155,10 @@ class ModerationAPIComment implements ModelInterface, ArrayAccess, \JsonSerializ ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'is_local_deleted' => false, 'reply_count' => false, @@ -205,10 +205,10 @@ class ModerationAPIComment implements ModelInterface, ArrayAccess, \JsonSerializ ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -536,14 +536,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -580,14 +580,14 @@ public function listInvalidProperties() if ($this->container['comment_html'] === null) { $invalidProperties[] = "'comment_html' can't be null"; } - if ($this->container['date'] === null) { - $invalidProperties[] = "'date' can't be null"; + if ($this->container['date'] === null && !$this->isNullableSetToNull('date')) { + $invalidProperties[] = "'date' is required"; } if ($this->container['approved'] === null) { $invalidProperties[] = "'approved' can't be null"; } - if ($this->container['locale'] === null) { - $invalidProperties[] = "'locale' can't be null"; + if ($this->container['locale'] === null && !$this->isNullableSetToNull('locale')) { + $invalidProperties[] = "'locale' is required"; } if ($this->container['verified'] === null) { $invalidProperties[] = "'verified' can't be null"; @@ -1104,7 +1104,7 @@ public function setParentId($parent_id) /** * Gets date * - * @return \DateTime + * @return \DateTime|null */ public function getDate() { @@ -1114,7 +1114,7 @@ public function getDate() /** * Sets date * - * @param \DateTime $date date + * @param \DateTime|null $date date * * @return self */ @@ -1504,7 +1504,7 @@ public function setApproved($approved) /** * Gets locale * - * @return string + * @return string|null */ public function getLocale() { @@ -1514,7 +1514,7 @@ public function getLocale() /** * Sets locale * - * @param string $locale locale + * @param string|null $locale locale * * @return self */ @@ -1869,11 +1869,11 @@ public function setIsDeleted($is_deleted) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -1881,12 +1881,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -1911,11 +1911,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/ModerationAPICommentLog.php b/lib/Model/ModerationAPICommentLog.php index cd4b761..2fb4198 100644 --- a/lib/Model/ModerationAPICommentLog.php +++ b/lib/Model/ModerationAPICommentLog.php @@ -2,7 +2,7 @@ /** * ModerationAPICommentLog * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class ModerationAPICommentLog 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 $openAPIModelName = 'ModerationAPICommentLog'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'date' => '\DateTime', 'username' => 'string', @@ -65,12 +65,12 @@ class ModerationAPICommentLog implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'date' => 'date-time', 'username' => null, @@ -79,10 +79,10 @@ class ModerationAPICommentLog implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'date' => false, 'username' => false, @@ -91,10 +91,10 @@ class ModerationAPICommentLog implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -270,14 +270,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -430,11 +430,11 @@ public function setMessageHtml($message_html) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -442,12 +442,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -472,11 +472,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/ModerationAPICommentResponse.php b/lib/Model/ModerationAPICommentResponse.php index 02d74e4..4a8ef91 100644 --- a/lib/Model/ModerationAPICommentResponse.php +++ b/lib/Model/ModerationAPICommentResponse.php @@ -2,7 +2,7 @@ /** * ModerationAPICommentResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class ModerationAPICommentResponse 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 $openAPIModelName = 'ModerationAPICommentResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'comment' => '\FastComments\Client\Model\ModerationAPIComment', 'status' => '\FastComments\Client\Model\APIStatus' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'comment' => null, 'status' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'comment' => false, 'status' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/ModerationAPICountCommentsResponse.php b/lib/Model/ModerationAPICountCommentsResponse.php index 44e87a1..db98d98 100644 --- a/lib/Model/ModerationAPICountCommentsResponse.php +++ b/lib/Model/ModerationAPICountCommentsResponse.php @@ -2,7 +2,7 @@ /** * ModerationAPICountCommentsResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class ModerationAPICountCommentsResponse 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 $openAPIModelName = 'ModerationAPICountCommentsResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'count' => 'float' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'count' => 'double' ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'count' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setCount($count) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/ModerationAPIGetCommentIdsResponse.php b/lib/Model/ModerationAPIGetCommentIdsResponse.php index 2bf8e0b..087b3e7 100644 --- a/lib/Model/ModerationAPIGetCommentIdsResponse.php +++ b/lib/Model/ModerationAPIGetCommentIdsResponse.php @@ -2,7 +2,7 @@ /** * ModerationAPIGetCommentIdsResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class ModerationAPIGetCommentIdsResponse 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 $openAPIModelName = 'ModerationAPIGetCommentIdsResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'ids' => 'string[]', 'has_more' => 'bool', @@ -64,12 +64,12 @@ class ModerationAPIGetCommentIdsResponse implements ModelInterface, ArrayAccess, ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'ids' => null, 'has_more' => null, @@ -77,10 +77,10 @@ class ModerationAPIGetCommentIdsResponse implements ModelInterface, ArrayAccess, ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'ids' => false, 'has_more' => false, @@ -88,10 +88,10 @@ class ModerationAPIGetCommentIdsResponse implements ModelInterface, ArrayAccess, ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -263,14 +263,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -396,11 +396,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -408,12 +408,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -438,11 +438,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/ModerationAPIGetCommentsResponse.php b/lib/Model/ModerationAPIGetCommentsResponse.php index 7971ab2..5bf9ed9 100644 --- a/lib/Model/ModerationAPIGetCommentsResponse.php +++ b/lib/Model/ModerationAPIGetCommentsResponse.php @@ -2,7 +2,7 @@ /** * ModerationAPIGetCommentsResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class ModerationAPIGetCommentsResponse 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 $openAPIModelName = 'ModerationAPIGetCommentsResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'translations' => 'object', @@ -65,12 +65,12 @@ class ModerationAPIGetCommentsResponse implements ModelInterface, ArrayAccess, \ ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'translations' => null, @@ -79,10 +79,10 @@ class ModerationAPIGetCommentsResponse implements ModelInterface, ArrayAccess, \ ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'translations' => false, @@ -91,10 +91,10 @@ class ModerationAPIGetCommentsResponse implements ModelInterface, ArrayAccess, \ ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -270,14 +270,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -430,11 +430,11 @@ public function setModerationFilter($moderation_filter) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -442,12 +442,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -472,11 +472,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/ModerationAPIGetLogsResponse.php b/lib/Model/ModerationAPIGetLogsResponse.php index a3f0cde..289d710 100644 --- a/lib/Model/ModerationAPIGetLogsResponse.php +++ b/lib/Model/ModerationAPIGetLogsResponse.php @@ -2,7 +2,7 @@ /** * ModerationAPIGetLogsResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class ModerationAPIGetLogsResponse 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 $openAPIModelName = 'ModerationAPIGetLogsResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'logs' => '\FastComments\Client\Model\ModerationAPICommentLog[]', 'status' => '\FastComments\Client\Model\APIStatus' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'logs' => null, 'status' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'logs' => false, 'status' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/ModerationCommentSearchResponse.php b/lib/Model/ModerationCommentSearchResponse.php index de35880..f12c7f9 100644 --- a/lib/Model/ModerationCommentSearchResponse.php +++ b/lib/Model/ModerationCommentSearchResponse.php @@ -2,7 +2,7 @@ /** * ModerationCommentSearchResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class ModerationCommentSearchResponse 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 $openAPIModelName = 'ModerationCommentSearchResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'comment_count' => 'int', 'status' => '\FastComments\Client\Model\APIStatus' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'comment_count' => 'int32', 'status' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'comment_count' => false, 'status' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/ModerationExportResponse.php b/lib/Model/ModerationExportResponse.php index a47302f..adeb0c3 100644 --- a/lib/Model/ModerationExportResponse.php +++ b/lib/Model/ModerationExportResponse.php @@ -2,7 +2,7 @@ /** * ModerationExportResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class ModerationExportResponse 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 $openAPIModelName = 'ModerationExportResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => 'string', 'batch_job_id' => 'string' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'batch_job_id' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'batch_job_id' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setBatchJobId($batch_job_id) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/ModerationExportStatusResponse.php b/lib/Model/ModerationExportStatusResponse.php index dd31364..ec40bd9 100644 --- a/lib/Model/ModerationExportStatusResponse.php +++ b/lib/Model/ModerationExportStatusResponse.php @@ -2,7 +2,7 @@ /** * ModerationExportStatusResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class ModerationExportStatusResponse implements ModelInterface, ArrayAccess, \Js public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'ModerationExportStatusResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => 'string', 'job_status' => 'string', @@ -65,12 +65,12 @@ class ModerationExportStatusResponse implements ModelInterface, ArrayAccess, \Js ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'job_status' => null, @@ -79,10 +79,10 @@ class ModerationExportStatusResponse implements ModelInterface, ArrayAccess, \Js ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'job_status' => false, @@ -91,10 +91,10 @@ class ModerationExportStatusResponse implements ModelInterface, ArrayAccess, \Js ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -270,14 +270,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -430,11 +430,11 @@ public function setDownloadUrl($download_url) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -442,12 +442,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -472,11 +472,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/ModerationFilter.php b/lib/Model/ModerationFilter.php index 137f9a2..0aba7a1 100644 --- a/lib/Model/ModerationFilter.php +++ b/lib/Model/ModerationFilter.php @@ -2,7 +2,7 @@ /** * ModerationFilter * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class ModerationFilter 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 $openAPIModelName = 'ModerationFilter'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'reviewed' => 'bool', 'approved' => 'bool', @@ -73,12 +73,12 @@ class ModerationFilter implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'reviewed' => null, 'approved' => null, @@ -95,10 +95,10 @@ class ModerationFilter implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'reviewed' => false, 'approved' => false, @@ -115,10 +115,10 @@ class ModerationFilter implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -326,14 +326,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -693,11 +693,11 @@ public function setExactCommentText($exact_comment_text) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -705,12 +705,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -735,11 +735,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/ModerationPageSearchProjected.php b/lib/Model/ModerationPageSearchProjected.php index fabd813..de2ab19 100644 --- a/lib/Model/ModerationPageSearchProjected.php +++ b/lib/Model/ModerationPageSearchProjected.php @@ -2,7 +2,7 @@ /** * ModerationPageSearchProjected * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class ModerationPageSearchProjected implements ModelInterface, ArrayAccess, \Jso public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'ModerationPageSearchProjected'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'url_id' => 'string', 'url' => 'string', @@ -65,12 +65,12 @@ class ModerationPageSearchProjected implements ModelInterface, ArrayAccess, \Jso ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'url_id' => null, 'url' => null, @@ -79,10 +79,10 @@ class ModerationPageSearchProjected implements ModelInterface, ArrayAccess, \Jso ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'url_id' => false, 'url' => false, @@ -91,10 +91,10 @@ class ModerationPageSearchProjected implements ModelInterface, ArrayAccess, \Jso ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -270,14 +270,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -433,11 +433,11 @@ public function setCommentCount($comment_count) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -445,12 +445,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -475,11 +475,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/ModerationPageSearchResponse.php b/lib/Model/ModerationPageSearchResponse.php index e6f6f94..4aef944 100644 --- a/lib/Model/ModerationPageSearchResponse.php +++ b/lib/Model/ModerationPageSearchResponse.php @@ -2,7 +2,7 @@ /** * ModerationPageSearchResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class ModerationPageSearchResponse 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 $openAPIModelName = 'ModerationPageSearchResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'pages' => '\FastComments\Client\Model\ModerationPageSearchProjected[]', 'status' => '\FastComments\Client\Model\APIStatus' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'pages' => null, 'status' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'pages' => false, 'status' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/ModerationSiteSearchProjected.php b/lib/Model/ModerationSiteSearchProjected.php index 297a0be..b0a0c01 100644 --- a/lib/Model/ModerationSiteSearchProjected.php +++ b/lib/Model/ModerationSiteSearchProjected.php @@ -2,7 +2,7 @@ /** * ModerationSiteSearchProjected * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class ModerationSiteSearchProjected implements ModelInterface, ArrayAccess, \Jso public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'ModerationSiteSearchProjected'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'domain' => 'string', 'logo_src100px' => 'string' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'domain' => null, 'logo_src100px' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'domain' => false, 'logo_src100px' => true ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -363,11 +363,11 @@ public function setLogoSrc100px($logo_src100px) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -375,12 +375,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -405,11 +405,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/ModerationSiteSearchResponse.php b/lib/Model/ModerationSiteSearchResponse.php index 0482cfb..82fd1a0 100644 --- a/lib/Model/ModerationSiteSearchResponse.php +++ b/lib/Model/ModerationSiteSearchResponse.php @@ -2,7 +2,7 @@ /** * ModerationSiteSearchResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class ModerationSiteSearchResponse 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 $openAPIModelName = 'ModerationSiteSearchResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'sites' => '\FastComments\Client\Model\ModerationSiteSearchProjected[]', 'status' => '\FastComments\Client\Model\APIStatus' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'sites' => null, 'status' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'sites' => false, 'status' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/ModerationSuggestResponse.php b/lib/Model/ModerationSuggestResponse.php index 52dc320..5d4c260 100644 --- a/lib/Model/ModerationSuggestResponse.php +++ b/lib/Model/ModerationSuggestResponse.php @@ -2,7 +2,7 @@ /** * ModerationSuggestResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class ModerationSuggestResponse 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 $openAPIModelName = 'ModerationSuggestResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => 'string', 'pages' => '\FastComments\Client\Model\ModerationPageSearchProjected[]', @@ -65,12 +65,12 @@ class ModerationSuggestResponse implements ModelInterface, ArrayAccess, \JsonSer ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'pages' => null, @@ -79,10 +79,10 @@ class ModerationSuggestResponse implements ModelInterface, ArrayAccess, \JsonSer ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'pages' => false, @@ -91,10 +91,10 @@ class ModerationSuggestResponse implements ModelInterface, ArrayAccess, \JsonSer ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -270,14 +270,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -424,11 +424,11 @@ public function setCode($code) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -436,12 +436,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -466,11 +466,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/ModerationUserSearchProjected.php b/lib/Model/ModerationUserSearchProjected.php index 4d23b63..d810084 100644 --- a/lib/Model/ModerationUserSearchProjected.php +++ b/lib/Model/ModerationUserSearchProjected.php @@ -2,7 +2,7 @@ /** * ModerationUserSearchProjected * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class ModerationUserSearchProjected implements ModelInterface, ArrayAccess, \Jso public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'ModerationUserSearchProjected'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ '_id' => 'string', 'username' => 'string', @@ -65,12 +65,12 @@ class ModerationUserSearchProjected implements ModelInterface, ArrayAccess, \Jso ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ '_id' => null, 'username' => null, @@ -79,10 +79,10 @@ class ModerationUserSearchProjected implements ModelInterface, ArrayAccess, \Jso ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ '_id' => false, 'username' => false, @@ -91,10 +91,10 @@ class ModerationUserSearchProjected implements ModelInterface, ArrayAccess, \Jso ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -270,14 +270,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -441,11 +441,11 @@ public function setAvatarSrc($avatar_src) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -453,12 +453,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -483,11 +483,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/ModerationUserSearchResponse.php b/lib/Model/ModerationUserSearchResponse.php index 4f2c371..1181972 100644 --- a/lib/Model/ModerationUserSearchResponse.php +++ b/lib/Model/ModerationUserSearchResponse.php @@ -2,7 +2,7 @@ /** * ModerationUserSearchResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class ModerationUserSearchResponse 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 $openAPIModelName = 'ModerationUserSearchResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'users' => '\FastComments\Client\Model\ModerationUserSearchProjected[]', 'status' => '\FastComments\Client\Model\APIStatus' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'users' => null, 'status' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'users' => false, 'status' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/Moderator.php b/lib/Model/Moderator.php index d0a7342..0f6b135 100644 --- a/lib/Model/Moderator.php +++ b/lib/Model/Moderator.php @@ -2,7 +2,7 @@ /** * Moderator * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class Moderator 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 $openAPIModelName = 'Moderator'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ '_id' => 'string', 'tenant_id' => 'string', @@ -80,12 +80,12 @@ class Moderator implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ '_id' => null, 'tenant_id' => null, @@ -109,10 +109,10 @@ class Moderator implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ '_id' => false, 'tenant_id' => false, @@ -136,10 +136,10 @@ class Moderator implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -375,14 +375,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -407,17 +407,17 @@ public function listInvalidProperties() if ($this->container['tenant_id'] === null) { $invalidProperties[] = "'tenant_id' can't be null"; } - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; + if ($this->container['name'] === null && !$this->isNullableSetToNull('name')) { + $invalidProperties[] = "'name' is required"; } - if ($this->container['user_id'] === null) { - $invalidProperties[] = "'user_id' can't be null"; + if ($this->container['user_id'] === null && !$this->isNullableSetToNull('user_id')) { + $invalidProperties[] = "'user_id' is required"; } if ($this->container['accepted_invite'] === null) { $invalidProperties[] = "'accepted_invite' can't be null"; } - if ($this->container['email'] === null) { - $invalidProperties[] = "'email' can't be null"; + if ($this->container['email'] === null && !$this->isNullableSetToNull('email')) { + $invalidProperties[] = "'email' is required"; } if ($this->container['mark_reviewed_count'] === null) { $invalidProperties[] = "'mark_reviewed_count' can't be null"; @@ -446,14 +446,14 @@ public function listInvalidProperties() if ($this->container['un_flagged_count'] === null) { $invalidProperties[] = "'un_flagged_count' can't be null"; } - if ($this->container['verification_id'] === null) { - $invalidProperties[] = "'verification_id' can't be null"; + if ($this->container['verification_id'] === null && !$this->isNullableSetToNull('verification_id')) { + $invalidProperties[] = "'verification_id' is required"; } if ($this->container['created_at'] === null) { $invalidProperties[] = "'created_at' can't be null"; } - if ($this->container['moderation_group_ids'] === null) { - $invalidProperties[] = "'moderation_group_ids' can't be null"; + if ($this->container['moderation_group_ids'] === null && !$this->isNullableSetToNull('moderation_group_ids')) { + $invalidProperties[] = "'moderation_group_ids' is required"; } return $invalidProperties; } @@ -527,7 +527,7 @@ public function setTenantId($tenant_id) /** * Gets name * - * @return string + * @return string|null */ public function getName() { @@ -537,7 +537,7 @@ public function getName() /** * Sets name * - * @param string $name name + * @param string|null $name name * * @return self */ @@ -561,7 +561,7 @@ public function setName($name) /** * Gets user_id * - * @return string + * @return string|null */ public function getUserId() { @@ -571,7 +571,7 @@ public function getUserId() /** * Sets user_id * - * @param string $user_id user_id + * @param string|null $user_id user_id * * @return self */ @@ -622,7 +622,7 @@ public function setAcceptedInvite($accepted_invite) /** * Gets email * - * @return string + * @return string|null */ public function getEmail() { @@ -632,7 +632,7 @@ public function getEmail() /** * Sets email * - * @param string $email email + * @param string|null $email email * * @return self */ @@ -899,7 +899,7 @@ public function setUnFlaggedCount($un_flagged_count) /** * Gets verification_id * - * @return string + * @return string|null */ public function getVerificationId() { @@ -909,7 +909,7 @@ public function getVerificationId() /** * Sets verification_id * - * @param string $verification_id verification_id + * @param string|null $verification_id verification_id * * @return self */ @@ -960,7 +960,7 @@ public function setCreatedAt($created_at) /** * Gets moderation_group_ids * - * @return string[] + * @return string[]|null */ public function getModerationGroupIds() { @@ -970,7 +970,7 @@ public function getModerationGroupIds() /** * Sets moderation_group_ids * - * @param string[] $moderation_group_ids moderation_group_ids + * @param string[]|null $moderation_group_ids moderation_group_ids * * @return self */ @@ -1020,11 +1020,11 @@ public function setIsEmailSuppressed($is_email_suppressed) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -1032,12 +1032,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -1062,11 +1062,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/NotificationAndCount.php b/lib/Model/NotificationAndCount.php index e95bb8e..87dcb81 100644 --- a/lib/Model/NotificationAndCount.php +++ b/lib/Model/NotificationAndCount.php @@ -2,7 +2,7 @@ /** * NotificationAndCount * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class NotificationAndCount 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 $openAPIModelName = 'NotificationAndCount'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'type' => '\FastComments\Client\Model\NotificationType', 'count' => 'int' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'type' => null, 'count' => 'int64' ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'type' => false, 'count' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setCount($count) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/NotificationObjectType.php b/lib/Model/NotificationObjectType.php index 756f571..6523747 100644 --- a/lib/Model/NotificationObjectType.php +++ b/lib/Model/NotificationObjectType.php @@ -2,7 +2,7 @@ /** * NotificationObjectType * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** diff --git a/lib/Model/NotificationType.php b/lib/Model/NotificationType.php index 0beaf1c..43d8057 100644 --- a/lib/Model/NotificationType.php +++ b/lib/Model/NotificationType.php @@ -2,7 +2,7 @@ /** * NotificationType * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** diff --git a/lib/Model/PageUserEntry.php b/lib/Model/PageUserEntry.php index fb9bf0a..044d91c 100644 --- a/lib/Model/PageUserEntry.php +++ b/lib/Model/PageUserEntry.php @@ -2,7 +2,7 @@ /** * PageUserEntry * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class PageUserEntry 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 $openAPIModelName = 'PageUserEntry'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'is_private' => 'bool', 'avatar_src' => 'string', @@ -65,12 +65,12 @@ class PageUserEntry implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'is_private' => null, 'avatar_src' => null, @@ -79,10 +79,10 @@ class PageUserEntry implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'is_private' => false, 'avatar_src' => false, @@ -91,10 +91,10 @@ class PageUserEntry implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -270,14 +270,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -427,11 +427,11 @@ public function setId($id) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -439,12 +439,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -469,11 +469,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/PageUsersInfoResponse.php b/lib/Model/PageUsersInfoResponse.php index 2929779..a0f6394 100644 --- a/lib/Model/PageUsersInfoResponse.php +++ b/lib/Model/PageUsersInfoResponse.php @@ -2,7 +2,7 @@ /** * PageUsersInfoResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class PageUsersInfoResponse 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 $openAPIModelName = 'PageUsersInfoResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'users' => '\FastComments\Client\Model\PageUserEntry[]', 'status' => '\FastComments\Client\Model\APIStatus' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'users' => null, 'status' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'users' => false, 'status' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/PageUsersOfflineResponse.php b/lib/Model/PageUsersOfflineResponse.php index 7eb2c56..b1ee3d9 100644 --- a/lib/Model/PageUsersOfflineResponse.php +++ b/lib/Model/PageUsersOfflineResponse.php @@ -2,7 +2,7 @@ /** * PageUsersOfflineResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class PageUsersOfflineResponse 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 $openAPIModelName = 'PageUsersOfflineResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'next_after_user_id' => 'string', 'next_after_name' => 'string', @@ -65,12 +65,12 @@ class PageUsersOfflineResponse implements ModelInterface, ArrayAccess, \JsonSeri ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'next_after_user_id' => null, 'next_after_name' => null, @@ -79,10 +79,10 @@ class PageUsersOfflineResponse implements ModelInterface, ArrayAccess, \JsonSeri ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'next_after_user_id' => true, 'next_after_name' => true, @@ -91,10 +91,10 @@ class PageUsersOfflineResponse implements ModelInterface, ArrayAccess, \JsonSeri ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -270,14 +270,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -296,11 +296,11 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['next_after_user_id'] === null) { - $invalidProperties[] = "'next_after_user_id' can't be null"; + if ($this->container['next_after_user_id'] === null && !$this->isNullableSetToNull('next_after_user_id')) { + $invalidProperties[] = "'next_after_user_id' is required"; } - if ($this->container['next_after_name'] === null) { - $invalidProperties[] = "'next_after_name' can't be null"; + if ($this->container['next_after_name'] === null && !$this->isNullableSetToNull('next_after_name')) { + $invalidProperties[] = "'next_after_name' is required"; } if ($this->container['users'] === null) { $invalidProperties[] = "'users' can't be null"; @@ -326,7 +326,7 @@ public function valid() /** * Gets next_after_user_id * - * @return string + * @return string|null */ public function getNextAfterUserId() { @@ -336,7 +336,7 @@ public function getNextAfterUserId() /** * Sets next_after_user_id * - * @param string $next_after_user_id next_after_user_id + * @param string|null $next_after_user_id next_after_user_id * * @return self */ @@ -360,7 +360,7 @@ public function setNextAfterUserId($next_after_user_id) /** * Gets next_after_name * - * @return string + * @return string|null */ public function getNextAfterName() { @@ -370,7 +370,7 @@ public function getNextAfterName() /** * Sets next_after_name * - * @param string $next_after_name next_after_name + * @param string|null $next_after_name next_after_name * * @return self */ @@ -447,11 +447,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -459,12 +459,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -489,11 +489,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/PageUsersOnlineResponse.php b/lib/Model/PageUsersOnlineResponse.php index f8534ce..9d85bb1 100644 --- a/lib/Model/PageUsersOnlineResponse.php +++ b/lib/Model/PageUsersOnlineResponse.php @@ -2,7 +2,7 @@ /** * PageUsersOnlineResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class PageUsersOnlineResponse 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 $openAPIModelName = 'PageUsersOnlineResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'next_after_user_id' => 'string', 'next_after_name' => 'string', @@ -67,12 +67,12 @@ class PageUsersOnlineResponse implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'next_after_user_id' => null, 'next_after_name' => null, @@ -83,10 +83,10 @@ class PageUsersOnlineResponse implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'next_after_user_id' => true, 'next_after_name' => true, @@ -97,10 +97,10 @@ class PageUsersOnlineResponse implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -284,14 +284,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -310,11 +310,11 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['next_after_user_id'] === null) { - $invalidProperties[] = "'next_after_user_id' can't be null"; + if ($this->container['next_after_user_id'] === null && !$this->isNullableSetToNull('next_after_user_id')) { + $invalidProperties[] = "'next_after_user_id' is required"; } - if ($this->container['next_after_name'] === null) { - $invalidProperties[] = "'next_after_name' can't be null"; + if ($this->container['next_after_name'] === null && !$this->isNullableSetToNull('next_after_name')) { + $invalidProperties[] = "'next_after_name' is required"; } if ($this->container['total_count'] === null) { $invalidProperties[] = "'total_count' can't be null"; @@ -346,7 +346,7 @@ public function valid() /** * Gets next_after_user_id * - * @return string + * @return string|null */ public function getNextAfterUserId() { @@ -356,7 +356,7 @@ public function getNextAfterUserId() /** * Sets next_after_user_id * - * @param string $next_after_user_id next_after_user_id + * @param string|null $next_after_user_id next_after_user_id * * @return self */ @@ -380,7 +380,7 @@ public function setNextAfterUserId($next_after_user_id) /** * Gets next_after_name * - * @return string + * @return string|null */ public function getNextAfterName() { @@ -390,7 +390,7 @@ public function getNextAfterName() /** * Sets next_after_name * - * @param string $next_after_name next_after_name + * @param string|null $next_after_name next_after_name * * @return self */ @@ -521,11 +521,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -533,12 +533,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -563,11 +563,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/PagesSortBy.php b/lib/Model/PagesSortBy.php index cfaf913..ada71f0 100644 --- a/lib/Model/PagesSortBy.php +++ b/lib/Model/PagesSortBy.php @@ -2,7 +2,7 @@ /** * PagesSortBy * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** diff --git a/lib/Model/PatchDomainConfigParams.php b/lib/Model/PatchDomainConfigParams.php index d14f0cb..9621538 100644 --- a/lib/Model/PatchDomainConfigParams.php +++ b/lib/Model/PatchDomainConfigParams.php @@ -2,7 +2,7 @@ /** * PatchDomainConfigParams * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class PatchDomainConfigParams 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 $openAPIModelName = 'PatchDomainConfigParams'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'domain' => 'string', 'email_from_name' => 'string', @@ -68,12 +68,12 @@ class PatchDomainConfigParams implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'domain' => null, 'email_from_name' => null, @@ -85,10 +85,10 @@ class PatchDomainConfigParams implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'domain' => false, 'email_from_name' => false, @@ -100,10 +100,10 @@ class PatchDomainConfigParams implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -291,14 +291,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -523,11 +523,11 @@ public function setEmailHeaders($email_headers) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -535,12 +535,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -565,11 +565,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/PatchDomainConfigResponse.php b/lib/Model/PatchDomainConfigResponse.php index e848574..16227de 100644 --- a/lib/Model/PatchDomainConfigResponse.php +++ b/lib/Model/PatchDomainConfigResponse.php @@ -2,7 +2,7 @@ /** * PatchDomainConfigResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class PatchDomainConfigResponse 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 $openAPIModelName = 'PatchDomainConfigResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'configuration' => 'mixed', 'status' => 'mixed', @@ -65,12 +65,12 @@ class PatchDomainConfigResponse implements ModelInterface, ArrayAccess, \JsonSer ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'configuration' => null, 'status' => null, @@ -79,10 +79,10 @@ class PatchDomainConfigResponse implements ModelInterface, ArrayAccess, \JsonSer ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'configuration' => true, 'status' => true, @@ -91,10 +91,10 @@ class PatchDomainConfigResponse implements ModelInterface, ArrayAccess, \JsonSer ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -270,14 +270,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -296,17 +296,8 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['configuration'] === null) { - $invalidProperties[] = "'configuration' can't be null"; - } - if ($this->container['status'] === null) { - $invalidProperties[] = "'status' can't be null"; - } - if ($this->container['reason'] === null) { - $invalidProperties[] = "'reason' can't be null"; - } - if ($this->container['code'] === null) { - $invalidProperties[] = "'code' can't be null"; + if ($this->container['status'] === null && !$this->isNullableSetToNull('status')) { + $invalidProperties[] = "'status' is required"; } return $invalidProperties; } @@ -326,7 +317,7 @@ public function valid() /** * Gets configuration * - * @return mixed + * @return mixed|null */ public function getConfiguration() { @@ -336,7 +327,7 @@ public function getConfiguration() /** * Sets configuration * - * @param mixed $configuration configuration + * @param mixed|null $configuration configuration * * @return self */ @@ -360,7 +351,7 @@ public function setConfiguration($configuration) /** * Gets status * - * @return mixed + * @return mixed|null */ public function getStatus() { @@ -370,7 +361,7 @@ public function getStatus() /** * Sets status * - * @param mixed $status status + * @param mixed|null $status status * * @return self */ @@ -394,7 +385,7 @@ public function setStatus($status) /** * Gets reason * - * @return string + * @return string|null */ public function getReason() { @@ -404,7 +395,7 @@ public function getReason() /** * Sets reason * - * @param string $reason reason + * @param string|null $reason reason * * @return self */ @@ -421,7 +412,7 @@ public function setReason($reason) /** * Gets code * - * @return string + * @return string|null */ public function getCode() { @@ -431,7 +422,7 @@ public function getCode() /** * Sets code * - * @param string $code code + * @param string|null $code code * * @return self */ @@ -447,11 +438,11 @@ public function setCode($code) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -459,12 +450,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -489,11 +480,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/PatchPageAPIResponse.php b/lib/Model/PatchPageAPIResponse.php index 8e5e0ea..954f64a 100644 --- a/lib/Model/PatchPageAPIResponse.php +++ b/lib/Model/PatchPageAPIResponse.php @@ -2,7 +2,7 @@ /** * PatchPageAPIResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class PatchPageAPIResponse 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 $openAPIModelName = 'PatchPageAPIResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'reason' => 'string', 'code' => 'string', @@ -66,12 +66,12 @@ class PatchPageAPIResponse implements ModelInterface, ArrayAccess, \JsonSerializ ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'reason' => null, 'code' => null, @@ -81,10 +81,10 @@ class PatchPageAPIResponse implements ModelInterface, ArrayAccess, \JsonSerializ ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'reason' => false, 'code' => false, @@ -94,10 +94,10 @@ class PatchPageAPIResponse implements ModelInterface, ArrayAccess, \JsonSerializ ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -277,14 +277,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -458,11 +458,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -470,12 +470,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -500,11 +500,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/PatchSSOUserAPIResponse.php b/lib/Model/PatchSSOUserAPIResponse.php index cf43660..220a63b 100644 --- a/lib/Model/PatchSSOUserAPIResponse.php +++ b/lib/Model/PatchSSOUserAPIResponse.php @@ -2,7 +2,7 @@ /** * PatchSSOUserAPIResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class PatchSSOUserAPIResponse 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 $openAPIModelName = 'PatchSSOUserAPIResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'reason' => 'string', 'code' => 'string', @@ -65,12 +65,12 @@ class PatchSSOUserAPIResponse implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'reason' => null, 'code' => null, @@ -79,10 +79,10 @@ class PatchSSOUserAPIResponse implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'reason' => false, 'code' => false, @@ -91,10 +91,10 @@ class PatchSSOUserAPIResponse implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -270,14 +270,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -424,11 +424,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -436,12 +436,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -466,11 +466,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/PendingCommentToSyncOutbound.php b/lib/Model/PendingCommentToSyncOutbound.php index 3643a16..6c214e0 100644 --- a/lib/Model/PendingCommentToSyncOutbound.php +++ b/lib/Model/PendingCommentToSyncOutbound.php @@ -2,7 +2,7 @@ /** * PendingCommentToSyncOutbound * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class PendingCommentToSyncOutbound 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 $openAPIModelName = 'PendingCommentToSyncOutbound'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ '_id' => 'string', 'comment_id' => 'string', @@ -74,12 +74,12 @@ class PendingCommentToSyncOutbound implements ModelInterface, ArrayAccess, \Json ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ '_id' => null, 'comment_id' => null, @@ -97,10 +97,10 @@ class PendingCommentToSyncOutbound implements ModelInterface, ArrayAccess, \Json ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ '_id' => false, 'comment_id' => false, @@ -118,10 +118,10 @@ class PendingCommentToSyncOutbound implements ModelInterface, ArrayAccess, \Json ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -333,14 +333,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -365,8 +365,8 @@ public function listInvalidProperties() if ($this->container['comment_id'] === null) { $invalidProperties[] = "'comment_id' can't be null"; } - if ($this->container['external_id'] === null) { - $invalidProperties[] = "'external_id' can't be null"; + if ($this->container['external_id'] === null && !$this->isNullableSetToNull('external_id')) { + $invalidProperties[] = "'external_id' is required"; } if ($this->container['created_at'] === null) { $invalidProperties[] = "'created_at' can't be null"; @@ -491,7 +491,7 @@ public function setComment($comment) /** * Gets external_id * - * @return string + * @return string|null */ public function getExternalId() { @@ -501,7 +501,7 @@ public function getExternalId() /** * Sets external_id * - * @param string $external_id external_id + * @param string|null $external_id external_id * * @return self */ @@ -767,11 +767,11 @@ public function setWebhookId($webhook_id) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -779,12 +779,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -809,11 +809,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/PostRemoveCommentResponse.php b/lib/Model/PostRemoveCommentApiResponse.php similarity index 85% rename from lib/Model/PostRemoveCommentResponse.php rename to lib/Model/PostRemoveCommentApiResponse.php index 9d82e61..9962cfa 100644 --- a/lib/Model/PostRemoveCommentResponse.php +++ b/lib/Model/PostRemoveCommentApiResponse.php @@ -1,8 +1,8 @@ */ -class PostRemoveCommentResponse implements ModelInterface, ArrayAccess, \JsonSerializable +class PostRemoveCommentApiResponse implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'PostRemoveCommentResponse'; + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PostRemoveCommentApiResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'action' => 'string', 'status' => 'string' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'action' => null, 'status' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'action' => false, 'status' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/PreBanSummary.php b/lib/Model/PreBanSummary.php index e5c11e5..663e3d7 100644 --- a/lib/Model/PreBanSummary.php +++ b/lib/Model/PreBanSummary.php @@ -2,7 +2,7 @@ /** * PreBanSummary * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class PreBanSummary 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 $openAPIModelName = 'PreBanSummary'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'usernames' => 'string[]', @@ -64,12 +64,12 @@ class PreBanSummary implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'usernames' => null, @@ -77,10 +77,10 @@ class PreBanSummary implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'usernames' => false, @@ -88,10 +88,10 @@ class PreBanSummary implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -263,14 +263,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -396,11 +396,11 @@ public function setCount($count) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -408,12 +408,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -438,11 +438,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/PubSubComment.php b/lib/Model/PubSubComment.php index 4d0f05f..b9092a4 100644 --- a/lib/Model/PubSubComment.php +++ b/lib/Model/PubSubComment.php @@ -2,7 +2,7 @@ /** * PubSubComment * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class PubSubComment 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 $openAPIModelName = 'PubSubComment'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ '_id' => 'string', 'tenant_id' => 'string', @@ -104,12 +104,12 @@ class PubSubComment implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ '_id' => null, 'tenant_id' => null, @@ -157,10 +157,10 @@ class PubSubComment implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ '_id' => false, 'tenant_id' => false, @@ -208,10 +208,10 @@ class PubSubComment implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -543,14 +543,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -596,8 +596,8 @@ public function listInvalidProperties() if ($this->container['approved'] === null) { $invalidProperties[] = "'approved' can't be null"; } - if ($this->container['locale'] === null) { - $invalidProperties[] = "'locale' can't be null"; + if ($this->container['locale'] === null && !$this->isNullableSetToNull('locale')) { + $invalidProperties[] = "'locale' is required"; } if ($this->container['date'] === null) { $invalidProperties[] = "'date' can't be null"; @@ -1745,7 +1745,7 @@ public function setApproved($approved) /** * Gets locale * - * @return string + * @return string|null */ public function getLocale() { @@ -1755,7 +1755,7 @@ public function getLocale() /** * Sets locale * - * @param string $locale locale + * @param string|null $locale locale * * @return self */ @@ -1920,11 +1920,11 @@ public function setDate($date) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -1932,12 +1932,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -1962,11 +1962,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/PubSubCommentBase.php b/lib/Model/PubSubCommentBase.php index 58eabec..6f7e73b 100644 --- a/lib/Model/PubSubCommentBase.php +++ b/lib/Model/PubSubCommentBase.php @@ -2,7 +2,7 @@ /** * PubSubCommentBase * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class PubSubCommentBase 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 $openAPIModelName = 'PubSubCommentBase'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ '_id' => 'string', 'tenant_id' => 'string', @@ -101,12 +101,12 @@ class PubSubCommentBase implements ModelInterface, ArrayAccess, \JsonSerializabl ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ '_id' => null, 'tenant_id' => null, @@ -151,10 +151,10 @@ class PubSubCommentBase implements ModelInterface, ArrayAccess, \JsonSerializabl ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ '_id' => false, 'tenant_id' => false, @@ -199,10 +199,10 @@ class PubSubCommentBase implements ModelInterface, ArrayAccess, \JsonSerializabl ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -522,14 +522,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -575,8 +575,8 @@ public function listInvalidProperties() if ($this->container['approved'] === null) { $invalidProperties[] = "'approved' can't be null"; } - if ($this->container['locale'] === null) { - $invalidProperties[] = "'locale' can't be null"; + if ($this->container['locale'] === null && !$this->isNullableSetToNull('locale')) { + $invalidProperties[] = "'locale' is required"; } return $invalidProperties; } @@ -1721,7 +1721,7 @@ public function setApproved($approved) /** * Gets locale * - * @return string + * @return string|null */ public function getLocale() { @@ -1731,7 +1731,7 @@ public function getLocale() /** * Sets locale * - * @param string $locale locale + * @param string|null $locale locale * * @return self */ @@ -1815,11 +1815,11 @@ public function setGroupIds($group_ids) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -1827,12 +1827,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -1857,11 +1857,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/PubSubVote.php b/lib/Model/PubSubVote.php index 4735a12..9d7008c 100644 --- a/lib/Model/PubSubVote.php +++ b/lib/Model/PubSubVote.php @@ -2,7 +2,7 @@ /** * PubSubVote * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class PubSubVote 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 $openAPIModelName = 'PubSubVote'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ '_id' => 'string', 'tenant_id' => 'string', @@ -70,12 +70,12 @@ class PubSubVote implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ '_id' => null, 'tenant_id' => null, @@ -89,10 +89,10 @@ class PubSubVote implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ '_id' => false, 'tenant_id' => false, @@ -106,10 +106,10 @@ class PubSubVote implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -305,14 +305,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -352,8 +352,8 @@ public function listInvalidProperties() if ($this->container['created_at'] === null) { $invalidProperties[] = "'created_at' can't be null"; } - if ($this->container['verification_id'] === null) { - $invalidProperties[] = "'verification_id' can't be null"; + if ($this->container['verification_id'] === null && !$this->isNullableSetToNull('verification_id')) { + $invalidProperties[] = "'verification_id' is required"; } return $invalidProperties; } @@ -596,7 +596,7 @@ public function setCreatedAt($created_at) /** * Gets verification_id * - * @return string + * @return string|null */ public function getVerificationId() { @@ -606,7 +606,7 @@ public function getVerificationId() /** * Sets verification_id * - * @param string $verification_id verification_id + * @param string|null $verification_id verification_id * * @return self */ @@ -629,11 +629,11 @@ public function setVerificationId($verification_id) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -641,12 +641,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -671,11 +671,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/PublicAPIDeleteCommentResponse.php b/lib/Model/PublicAPIDeleteCommentResponse.php index 41fdf98..a147052 100644 --- a/lib/Model/PublicAPIDeleteCommentResponse.php +++ b/lib/Model/PublicAPIDeleteCommentResponse.php @@ -2,7 +2,7 @@ /** * PublicAPIDeleteCommentResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class PublicAPIDeleteCommentResponse implements ModelInterface, ArrayAccess, \Js public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'PublicAPIDeleteCommentResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'comment' => '\FastComments\Client\Model\DeletedCommentResultComment', 'hard_removed' => 'bool', @@ -64,12 +64,12 @@ class PublicAPIDeleteCommentResponse implements ModelInterface, ArrayAccess, \Js ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'comment' => null, 'hard_removed' => null, @@ -77,10 +77,10 @@ class PublicAPIDeleteCommentResponse implements ModelInterface, ArrayAccess, \Js ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'comment' => false, 'hard_removed' => false, @@ -88,10 +88,10 @@ class PublicAPIDeleteCommentResponse implements ModelInterface, ArrayAccess, \Js ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -263,14 +263,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -393,11 +393,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -405,12 +405,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -435,11 +435,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/PublicAPIGetCommentTextResponse.php b/lib/Model/PublicAPIGetCommentTextResponse.php index 27bda2e..b4b5c56 100644 --- a/lib/Model/PublicAPIGetCommentTextResponse.php +++ b/lib/Model/PublicAPIGetCommentTextResponse.php @@ -2,7 +2,7 @@ /** * PublicAPIGetCommentTextResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class PublicAPIGetCommentTextResponse 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 $openAPIModelName = 'PublicAPIGetCommentTextResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'comment_text' => 'string', @@ -64,12 +64,12 @@ class PublicAPIGetCommentTextResponse implements ModelInterface, ArrayAccess, \J ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'comment_text' => null, @@ -77,10 +77,10 @@ class PublicAPIGetCommentTextResponse implements ModelInterface, ArrayAccess, \J ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'comment_text' => false, @@ -88,10 +88,10 @@ class PublicAPIGetCommentTextResponse implements ModelInterface, ArrayAccess, \J ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -263,14 +263,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -396,11 +396,11 @@ public function setSanitizedCommentText($sanitized_comment_text) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -408,12 +408,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -438,11 +438,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/PublicAPISetCommentTextResponse.php b/lib/Model/PublicAPISetCommentTextResponse.php index 636125d..bd26cc8 100644 --- a/lib/Model/PublicAPISetCommentTextResponse.php +++ b/lib/Model/PublicAPISetCommentTextResponse.php @@ -2,7 +2,7 @@ /** * PublicAPISetCommentTextResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class PublicAPISetCommentTextResponse 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 $openAPIModelName = 'PublicAPISetCommentTextResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'comment' => '\FastComments\Client\Model\SetCommentTextResult', 'status' => '\FastComments\Client\Model\APIStatus' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'comment' => null, 'status' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'comment' => false, 'status' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/PublicBlockFromCommentParams.php b/lib/Model/PublicBlockFromCommentParams.php index 4efee61..8cc4789 100644 --- a/lib/Model/PublicBlockFromCommentParams.php +++ b/lib/Model/PublicBlockFromCommentParams.php @@ -2,7 +2,7 @@ /** * PublicBlockFromCommentParams * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,46 +46,46 @@ class PublicBlockFromCommentParams 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 $openAPIModelName = 'PublicBlockFromCommentParams'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'comment_ids' => 'string[]' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'comment_ids' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'comment_ids' => true ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -249,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -275,8 +275,8 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['comment_ids'] === null) { - $invalidProperties[] = "'comment_ids' can't be null"; + if ($this->container['comment_ids'] === null && !$this->isNullableSetToNull('comment_ids')) { + $invalidProperties[] = "'comment_ids' is required"; } return $invalidProperties; } @@ -296,7 +296,7 @@ public function valid() /** * Gets comment_ids * - * @return string[] + * @return string[]|null */ public function getCommentIds() { @@ -306,7 +306,7 @@ public function getCommentIds() /** * Sets comment_ids * - * @param string[] $comment_ids A list of comment ids to check if are blocked after performing the update. + * @param string[]|null $comment_ids A list of comment ids to check if are blocked after performing the update. * * @return self */ @@ -329,11 +329,11 @@ public function setCommentIds($comment_ids) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -341,12 +341,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -371,11 +371,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/PublicComment.php b/lib/Model/PublicComment.php index c16517b..2846a26 100644 --- a/lib/Model/PublicComment.php +++ b/lib/Model/PublicComment.php @@ -2,7 +2,7 @@ /** * PublicComment * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class PublicComment 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 $openAPIModelName = 'PublicComment'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ '_id' => 'string', 'user_id' => 'string', @@ -100,12 +100,12 @@ class PublicComment implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ '_id' => null, 'user_id' => null, @@ -149,10 +149,10 @@ class PublicComment implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ '_id' => false, 'user_id' => true, @@ -196,10 +196,10 @@ class PublicComment implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -515,14 +515,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -550,8 +550,8 @@ public function listInvalidProperties() if ($this->container['comment_html'] === null) { $invalidProperties[] = "'comment_html' can't be null"; } - if ($this->container['date'] === null) { - $invalidProperties[] = "'date' can't be null"; + if ($this->container['date'] === null && !$this->isNullableSetToNull('date')) { + $invalidProperties[] = "'date' is required"; } if ($this->container['verified'] === null) { $invalidProperties[] = "'verified' can't be null"; @@ -757,7 +757,7 @@ public function setParentId($parent_id) /** * Gets date * - * @return \DateTime + * @return \DateTime|null */ public function getDate() { @@ -767,7 +767,7 @@ public function getDate() /** * Sets date * - * @param \DateTime $date date + * @param \DateTime|null $date date * * @return self */ @@ -1731,11 +1731,11 @@ public function setIsBlocked($is_blocked) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -1743,12 +1743,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -1773,11 +1773,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/PublicCommentBase.php b/lib/Model/PublicCommentBase.php index 40e6ad8..0399e2c 100644 --- a/lib/Model/PublicCommentBase.php +++ b/lib/Model/PublicCommentBase.php @@ -2,7 +2,7 @@ /** * PublicCommentBase * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class PublicCommentBase 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 $openAPIModelName = 'PublicCommentBase'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ '_id' => 'string', 'user_id' => 'string', @@ -90,12 +90,12 @@ class PublicCommentBase implements ModelInterface, ArrayAccess, \JsonSerializabl ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ '_id' => null, 'user_id' => null, @@ -129,10 +129,10 @@ class PublicCommentBase implements ModelInterface, ArrayAccess, \JsonSerializabl ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ '_id' => false, 'user_id' => true, @@ -166,10 +166,10 @@ class PublicCommentBase implements ModelInterface, ArrayAccess, \JsonSerializabl ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -445,14 +445,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -480,8 +480,8 @@ public function listInvalidProperties() if ($this->container['comment_html'] === null) { $invalidProperties[] = "'comment_html' can't be null"; } - if ($this->container['date'] === null) { - $invalidProperties[] = "'date' can't be null"; + if ($this->container['date'] === null && !$this->isNullableSetToNull('date')) { + $invalidProperties[] = "'date' is required"; } if ($this->container['verified'] === null) { $invalidProperties[] = "'verified' can't be null"; @@ -687,7 +687,7 @@ public function setParentId($parent_id) /** * Gets date * - * @return \DateTime + * @return \DateTime|null */ public function getDate() { @@ -697,7 +697,7 @@ public function getDate() /** * Sets date * - * @param \DateTime $date date + * @param \DateTime|null $date date * * @return self */ @@ -1391,11 +1391,11 @@ public function setApproved($approved) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -1403,12 +1403,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -1433,11 +1433,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/PublicFeedPostsResponse.php b/lib/Model/PublicFeedPostsResponse.php index 6f8f161..fa2844f 100644 --- a/lib/Model/PublicFeedPostsResponse.php +++ b/lib/Model/PublicFeedPostsResponse.php @@ -2,7 +2,7 @@ /** * PublicFeedPostsResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class PublicFeedPostsResponse 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 $openAPIModelName = 'PublicFeedPostsResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'feed_posts' => '\FastComments\Client\Model\FeedPost[]', @@ -68,12 +68,12 @@ class PublicFeedPostsResponse implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'feed_posts' => null, @@ -85,10 +85,10 @@ class PublicFeedPostsResponse implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'feed_posts' => false, @@ -100,10 +100,10 @@ class PublicFeedPostsResponse implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -291,14 +291,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -536,11 +536,11 @@ public function setMyReacts($my_reacts) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -548,12 +548,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -578,11 +578,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/PublicPage.php b/lib/Model/PublicPage.php index 73ffd14..0895260 100644 --- a/lib/Model/PublicPage.php +++ b/lib/Model/PublicPage.php @@ -2,7 +2,7 @@ /** * PublicPage * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class PublicPage 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 $openAPIModelName = 'PublicPage'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'updated_at' => 'int', 'comment_count' => 'int', @@ -66,12 +66,12 @@ class PublicPage implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'updated_at' => 'int64', 'comment_count' => 'int32', @@ -81,10 +81,10 @@ class PublicPage implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'updated_at' => false, 'comment_count' => false, @@ -94,10 +94,10 @@ class PublicPage implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -277,14 +277,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -470,11 +470,11 @@ public function setUrlId($url_id) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -482,12 +482,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -512,11 +512,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/PublicVote.php b/lib/Model/PublicVote.php index 04b9aff..e85e6f1 100644 --- a/lib/Model/PublicVote.php +++ b/lib/Model/PublicVote.php @@ -2,7 +2,7 @@ /** * PublicVote * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class PublicVote 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 $openAPIModelName = 'PublicVote'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'id' => 'string', 'url_id' => 'string', @@ -67,12 +67,12 @@ class PublicVote implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'id' => null, 'url_id' => null, @@ -83,10 +83,10 @@ class PublicVote implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'id' => false, 'url_id' => false, @@ -97,10 +97,10 @@ class PublicVote implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -284,14 +284,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -507,11 +507,11 @@ public function setCreatedAt($created_at) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -519,12 +519,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -549,11 +549,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/PutDomainConfigResponse.php b/lib/Model/PutDomainConfigResponse.php index 1c15dca..3246e1a 100644 --- a/lib/Model/PutDomainConfigResponse.php +++ b/lib/Model/PutDomainConfigResponse.php @@ -2,7 +2,7 @@ /** * PutDomainConfigResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class PutDomainConfigResponse 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 $openAPIModelName = 'PutDomainConfigResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'configuration' => 'mixed', 'status' => 'mixed', @@ -65,12 +65,12 @@ class PutDomainConfigResponse implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'configuration' => null, 'status' => null, @@ -79,10 +79,10 @@ class PutDomainConfigResponse implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'configuration' => true, 'status' => true, @@ -91,10 +91,10 @@ class PutDomainConfigResponse implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -270,14 +270,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -296,17 +296,8 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['configuration'] === null) { - $invalidProperties[] = "'configuration' can't be null"; - } - if ($this->container['status'] === null) { - $invalidProperties[] = "'status' can't be null"; - } - if ($this->container['reason'] === null) { - $invalidProperties[] = "'reason' can't be null"; - } - if ($this->container['code'] === null) { - $invalidProperties[] = "'code' can't be null"; + if ($this->container['status'] === null && !$this->isNullableSetToNull('status')) { + $invalidProperties[] = "'status' is required"; } return $invalidProperties; } @@ -326,7 +317,7 @@ public function valid() /** * Gets configuration * - * @return mixed + * @return mixed|null */ public function getConfiguration() { @@ -336,7 +327,7 @@ public function getConfiguration() /** * Sets configuration * - * @param mixed $configuration configuration + * @param mixed|null $configuration configuration * * @return self */ @@ -360,7 +351,7 @@ public function setConfiguration($configuration) /** * Gets status * - * @return mixed + * @return mixed|null */ public function getStatus() { @@ -370,7 +361,7 @@ public function getStatus() /** * Sets status * - * @param mixed $status status + * @param mixed|null $status status * * @return self */ @@ -394,7 +385,7 @@ public function setStatus($status) /** * Gets reason * - * @return string + * @return string|null */ public function getReason() { @@ -404,7 +395,7 @@ public function getReason() /** * Sets reason * - * @param string $reason reason + * @param string|null $reason reason * * @return self */ @@ -421,7 +412,7 @@ public function setReason($reason) /** * Gets code * - * @return string + * @return string|null */ public function getCode() { @@ -431,7 +422,7 @@ public function getCode() /** * Sets code * - * @param string $code code + * @param string|null $code code * * @return self */ @@ -447,11 +438,11 @@ public function setCode($code) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -459,12 +450,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -489,11 +480,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/PutSSOUserAPIResponse.php b/lib/Model/PutSSOUserAPIResponse.php index b4fb08d..94d7b77 100644 --- a/lib/Model/PutSSOUserAPIResponse.php +++ b/lib/Model/PutSSOUserAPIResponse.php @@ -2,7 +2,7 @@ /** * PutSSOUserAPIResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class PutSSOUserAPIResponse 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 $openAPIModelName = 'PutSSOUserAPIResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'reason' => 'string', 'code' => 'string', @@ -65,12 +65,12 @@ class PutSSOUserAPIResponse implements ModelInterface, ArrayAccess, \JsonSeriali ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'reason' => null, 'code' => null, @@ -79,10 +79,10 @@ class PutSSOUserAPIResponse implements ModelInterface, ArrayAccess, \JsonSeriali ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'reason' => false, 'code' => false, @@ -91,10 +91,10 @@ class PutSSOUserAPIResponse implements ModelInterface, ArrayAccess, \JsonSeriali ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -270,14 +270,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -431,11 +431,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -443,12 +443,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -473,11 +473,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/QueryPredicate.php b/lib/Model/QueryPredicate.php index 5b4f4a6..de5a907 100644 --- a/lib/Model/QueryPredicate.php +++ b/lib/Model/QueryPredicate.php @@ -2,7 +2,7 @@ /** * QueryPredicate * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class QueryPredicate 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 $openAPIModelName = 'QueryPredicate'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'key' => 'string', 'value' => '\FastComments\Client\Model\QueryPredicateValue', @@ -64,12 +64,12 @@ class QueryPredicate implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'key' => null, 'value' => null, @@ -77,10 +77,10 @@ class QueryPredicate implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'key' => false, 'value' => false, @@ -88,10 +88,10 @@ class QueryPredicate implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -284,14 +284,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -436,11 +436,11 @@ public function setOperator($operator) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -448,12 +448,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -478,11 +478,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/QueryPredicateValue.php b/lib/Model/QueryPredicateValue.php index 472e828..697b290 100644 --- a/lib/Model/QueryPredicateValue.php +++ b/lib/Model/QueryPredicateValue.php @@ -2,7 +2,7 @@ /** * QueryPredicateValue * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,46 +46,46 @@ class QueryPredicateValue 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 $openAPIModelName = 'QueryPredicate_value'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -248,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -291,11 +291,11 @@ public function valid() /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -303,12 +303,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -333,11 +333,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/QuestionConfig.php b/lib/Model/QuestionConfig.php index 5f28db9..fd807ff 100644 --- a/lib/Model/QuestionConfig.php +++ b/lib/Model/QuestionConfig.php @@ -2,7 +2,7 @@ /** * QuestionConfig * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class QuestionConfig 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 $openAPIModelName = 'QuestionConfig'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ '_id' => 'string', 'tenant_id' => 'string', @@ -82,12 +82,12 @@ class QuestionConfig implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ '_id' => null, 'tenant_id' => null, @@ -113,10 +113,10 @@ class QuestionConfig implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ '_id' => false, 'tenant_id' => false, @@ -142,10 +142,10 @@ class QuestionConfig implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -389,14 +389,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -1059,11 +1059,11 @@ public function setReportingOrder($reporting_order) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -1071,12 +1071,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -1101,11 +1101,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/QuestionConfigCustomOptionsInner.php b/lib/Model/QuestionConfigCustomOptionsInner.php index 519174c..f657df4 100644 --- a/lib/Model/QuestionConfigCustomOptionsInner.php +++ b/lib/Model/QuestionConfigCustomOptionsInner.php @@ -2,7 +2,7 @@ /** * QuestionConfigCustomOptionsInner * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class QuestionConfigCustomOptionsInner 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 $openAPIModelName = 'QuestionConfig_customOptions_inner'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'image_src' => 'string', 'name' => 'string' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'image_src' => null, 'name' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'image_src' => false, 'name' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setName($name) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/QuestionDatum.php b/lib/Model/QuestionDatum.php index 7ae900c..76dc4b2 100644 --- a/lib/Model/QuestionDatum.php +++ b/lib/Model/QuestionDatum.php @@ -2,7 +2,7 @@ /** * QuestionDatum * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class QuestionDatum 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 $openAPIModelName = 'QuestionDatum'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'v' => 'array', 'total' => 'int' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'v' => 'double', 'total' => 'int64' ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'v' => false, 'total' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setTotal($total) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/QuestionRenderingType.php b/lib/Model/QuestionRenderingType.php index 6d22bfc..529b89c 100644 --- a/lib/Model/QuestionRenderingType.php +++ b/lib/Model/QuestionRenderingType.php @@ -2,7 +2,7 @@ /** * QuestionRenderingType * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** diff --git a/lib/Model/QuestionResult.php b/lib/Model/QuestionResult.php index 61532b9..7cfbfb9 100644 --- a/lib/Model/QuestionResult.php +++ b/lib/Model/QuestionResult.php @@ -2,7 +2,7 @@ /** * QuestionResult * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class QuestionResult 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 $openAPIModelName = 'QuestionResult'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ '_id' => 'string', 'tenant_id' => 'string', @@ -72,12 +72,12 @@ class QuestionResult implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ '_id' => null, 'tenant_id' => null, @@ -93,10 +93,10 @@ class QuestionResult implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ '_id' => false, 'tenant_id' => false, @@ -112,10 +112,10 @@ class QuestionResult implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -319,14 +319,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -700,11 +700,11 @@ public function setIpHash($ip_hash) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -712,12 +712,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -742,11 +742,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/QuestionResultAggregationOverall.php b/lib/Model/QuestionResultAggregationOverall.php index 8d69b7c..23cc87f 100644 --- a/lib/Model/QuestionResultAggregationOverall.php +++ b/lib/Model/QuestionResultAggregationOverall.php @@ -2,7 +2,7 @@ /** * QuestionResultAggregationOverall * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class QuestionResultAggregationOverall 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 $openAPIModelName = 'QuestionResultAggregationOverall'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'data_by_date_bucket' => 'array', 'data_by_url_id' => 'array', @@ -67,12 +67,12 @@ class QuestionResultAggregationOverall implements ModelInterface, ArrayAccess, \ ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'data_by_date_bucket' => null, 'data_by_url_id' => null, @@ -83,10 +83,10 @@ class QuestionResultAggregationOverall implements ModelInterface, ArrayAccess, \ ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'data_by_date_bucket' => false, 'data_by_url_id' => false, @@ -97,10 +97,10 @@ class QuestionResultAggregationOverall implements ModelInterface, ArrayAccess, \ ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -284,14 +284,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -495,11 +495,11 @@ public function setCreatedAt($created_at) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -507,12 +507,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -537,11 +537,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/QuestionSubQuestionVisibility.php b/lib/Model/QuestionSubQuestionVisibility.php index 9a5ec20..d6986b4 100644 --- a/lib/Model/QuestionSubQuestionVisibility.php +++ b/lib/Model/QuestionSubQuestionVisibility.php @@ -2,7 +2,7 @@ /** * QuestionSubQuestionVisibility * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** diff --git a/lib/Model/QuestionWhenSave.php b/lib/Model/QuestionWhenSave.php index b3ce2aa..313db85 100644 --- a/lib/Model/QuestionWhenSave.php +++ b/lib/Model/QuestionWhenSave.php @@ -2,7 +2,7 @@ /** * QuestionWhenSave * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** diff --git a/lib/Model/ReactBodyParams.php b/lib/Model/ReactBodyParams.php index 27e9419..f6977e3 100644 --- a/lib/Model/ReactBodyParams.php +++ b/lib/Model/ReactBodyParams.php @@ -2,7 +2,7 @@ /** * ReactBodyParams * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,46 +46,46 @@ class ReactBodyParams 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 $openAPIModelName = 'ReactBodyParams'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'react_type' => 'string' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'react_type' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'react_type' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -249,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -319,11 +319,11 @@ public function setReactType($react_type) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -331,12 +331,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -361,11 +361,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/ReactFeedPostResponse.php b/lib/Model/ReactFeedPostResponse.php index 686ffbd..786fcd1 100644 --- a/lib/Model/ReactFeedPostResponse.php +++ b/lib/Model/ReactFeedPostResponse.php @@ -2,7 +2,7 @@ /** * ReactFeedPostResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class ReactFeedPostResponse 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 $openAPIModelName = 'ReactFeedPostResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'react_type' => 'string', @@ -64,12 +64,12 @@ class ReactFeedPostResponse implements ModelInterface, ArrayAccess, \JsonSeriali ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'react_type' => null, @@ -77,10 +77,10 @@ class ReactFeedPostResponse implements ModelInterface, ArrayAccess, \JsonSeriali ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'react_type' => false, @@ -88,10 +88,10 @@ class ReactFeedPostResponse implements ModelInterface, ArrayAccess, \JsonSeriali ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -263,14 +263,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -396,11 +396,11 @@ public function setIsUndo($is_undo) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -408,12 +408,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -438,11 +438,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/RecordStringBeforeStringOrNullAfterStringOrNullValue.php b/lib/Model/RecordStringBeforeStringOrNullAfterStringOrNullValue.php index 8e30b7d..2a5f3f3 100644 --- a/lib/Model/RecordStringBeforeStringOrNullAfterStringOrNullValue.php +++ b/lib/Model/RecordStringBeforeStringOrNullAfterStringOrNullValue.php @@ -2,7 +2,7 @@ /** * RecordStringBeforeStringOrNullAfterStringOrNullValue * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class RecordStringBeforeStringOrNullAfterStringOrNullValue implements ModelInter public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'Record_string__before_string_or_null__after_string_or_null___value'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'after' => 'string', 'before' => 'string' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'after' => null, 'before' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'after' => true, 'before' => true ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -282,11 +282,11 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['after'] === null) { - $invalidProperties[] = "'after' can't be null"; + if ($this->container['after'] === null && !$this->isNullableSetToNull('after')) { + $invalidProperties[] = "'after' is required"; } - if ($this->container['before'] === null) { - $invalidProperties[] = "'before' can't be null"; + if ($this->container['before'] === null && !$this->isNullableSetToNull('before')) { + $invalidProperties[] = "'before' is required"; } return $invalidProperties; } @@ -306,7 +306,7 @@ public function valid() /** * Gets after * - * @return string + * @return string|null */ public function getAfter() { @@ -316,7 +316,7 @@ public function getAfter() /** * Sets after * - * @param string $after after + * @param string|null $after after * * @return self */ @@ -340,7 +340,7 @@ public function setAfter($after) /** * Gets before * - * @return string + * @return string|null */ public function getBefore() { @@ -350,7 +350,7 @@ public function getBefore() /** * Sets before * - * @param string $before before + * @param string|null $before before * * @return self */ @@ -373,11 +373,11 @@ public function setBefore($before) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -385,12 +385,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -415,11 +415,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/RemoveCommentActionResponse.php b/lib/Model/RemoveCommentActionResponse.php index 36e980a..63289dd 100644 --- a/lib/Model/RemoveCommentActionResponse.php +++ b/lib/Model/RemoveCommentActionResponse.php @@ -2,7 +2,7 @@ /** * RemoveCommentActionResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class RemoveCommentActionResponse implements ModelInterface, ArrayAccess, \JsonS public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'RemoveCommentActionResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => 'string', 'action' => 'string' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'action' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'action' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setAction($action) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/RemoveUserBadgeResponse.php b/lib/Model/RemoveUserBadgeResponse.php index 9b0f218..de3055f 100644 --- a/lib/Model/RemoveUserBadgeResponse.php +++ b/lib/Model/RemoveUserBadgeResponse.php @@ -2,7 +2,7 @@ /** * RemoveUserBadgeResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class RemoveUserBadgeResponse 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 $openAPIModelName = 'RemoveUserBadgeResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'badges' => '\FastComments\Client\Model\CommentUserBadgeInfo[]', 'status' => '\FastComments\Client\Model\APIStatus' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'badges' => null, 'status' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'badges' => false, 'status' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -356,11 +356,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -368,12 +368,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -398,11 +398,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/RenderEmailTemplateBody.php b/lib/Model/RenderEmailTemplateBody.php index deed800..9673c2f 100644 --- a/lib/Model/RenderEmailTemplateBody.php +++ b/lib/Model/RenderEmailTemplateBody.php @@ -2,7 +2,7 @@ /** * RenderEmailTemplateBody * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class RenderEmailTemplateBody 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 $openAPIModelName = 'RenderEmailTemplateBody'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'email_template_id' => 'string', 'ejs' => 'string', @@ -65,12 +65,12 @@ class RenderEmailTemplateBody implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'email_template_id' => null, 'ejs' => null, @@ -79,10 +79,10 @@ class RenderEmailTemplateBody implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'email_template_id' => false, 'ejs' => false, @@ -91,10 +91,10 @@ class RenderEmailTemplateBody implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -270,14 +270,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -427,11 +427,11 @@ public function setTranslationOverridesByLocale($translation_overrides_by_locale /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -439,12 +439,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -469,11 +469,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/RenderEmailTemplateResponse.php b/lib/Model/RenderEmailTemplateResponse.php index 030b873..043a38c 100644 --- a/lib/Model/RenderEmailTemplateResponse.php +++ b/lib/Model/RenderEmailTemplateResponse.php @@ -2,7 +2,7 @@ /** * RenderEmailTemplateResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class RenderEmailTemplateResponse implements ModelInterface, ArrayAccess, \JsonS public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'RenderEmailTemplateResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'html' => 'string' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'html' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'html' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setHtml($html) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/RenderableUserNotification.php b/lib/Model/RenderableUserNotification.php index f4193aa..2924d4d 100644 --- a/lib/Model/RenderableUserNotification.php +++ b/lib/Model/RenderableUserNotification.php @@ -2,7 +2,7 @@ /** * RenderableUserNotification * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class RenderableUserNotification 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 $openAPIModelName = 'RenderableUserNotification'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'conversation_id' => 'string', 'context_html' => 'string', @@ -82,12 +82,12 @@ class RenderableUserNotification implements ModelInterface, ArrayAccess, \JsonSe ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'conversation_id' => null, 'context_html' => null, @@ -113,10 +113,10 @@ class RenderableUserNotification implements ModelInterface, ArrayAccess, \JsonSe ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'conversation_id' => false, 'context_html' => false, @@ -142,10 +142,10 @@ class RenderableUserNotification implements ModelInterface, ArrayAccess, \JsonSe ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -389,14 +389,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -1064,11 +1064,11 @@ public function setId($_id) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -1076,12 +1076,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -1106,11 +1106,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/RepeatCommentCheckIgnoredReason.php b/lib/Model/RepeatCommentCheckIgnoredReason.php index 60ff87d..58d8695 100644 --- a/lib/Model/RepeatCommentCheckIgnoredReason.php +++ b/lib/Model/RepeatCommentCheckIgnoredReason.php @@ -2,7 +2,7 @@ /** * RepeatCommentCheckIgnoredReason * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** diff --git a/lib/Model/RepeatCommentHandlingAction.php b/lib/Model/RepeatCommentHandlingAction.php index 34c3ebb..b1989f1 100644 --- a/lib/Model/RepeatCommentHandlingAction.php +++ b/lib/Model/RepeatCommentHandlingAction.php @@ -2,7 +2,7 @@ /** * RepeatCommentHandlingAction * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** diff --git a/lib/Model/ReplaceTenantPackageBody.php b/lib/Model/ReplaceTenantPackageBody.php index 28cde10..997a198 100644 --- a/lib/Model/ReplaceTenantPackageBody.php +++ b/lib/Model/ReplaceTenantPackageBody.php @@ -2,7 +2,7 @@ /** * ReplaceTenantPackageBody * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class ReplaceTenantPackageBody 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 $openAPIModelName = 'ReplaceTenantPackageBody'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'name' => 'string', 'monthly_cost_usd' => 'float', @@ -92,12 +92,12 @@ class ReplaceTenantPackageBody implements ModelInterface, ArrayAccess, \JsonSeri ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'name' => null, 'monthly_cost_usd' => 'double', @@ -133,10 +133,10 @@ class ReplaceTenantPackageBody implements ModelInterface, ArrayAccess, \JsonSeri ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'name' => false, 'monthly_cost_usd' => false, @@ -172,10 +172,10 @@ class ReplaceTenantPackageBody implements ModelInterface, ArrayAccess, \JsonSeri ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -459,14 +459,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -1384,11 +1384,11 @@ public function setFlexMinimumCostCents($flex_minimum_cost_cents) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -1396,12 +1396,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -1426,11 +1426,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/ReplaceTenantUserBody.php b/lib/Model/ReplaceTenantUserBody.php index 77dad65..7d2a888 100644 --- a/lib/Model/ReplaceTenantUserBody.php +++ b/lib/Model/ReplaceTenantUserBody.php @@ -2,7 +2,7 @@ /** * ReplaceTenantUserBody * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class ReplaceTenantUserBody 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 $openAPIModelName = 'ReplaceTenantUserBody'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'username' => 'string', 'email' => 'string', @@ -89,12 +89,12 @@ class ReplaceTenantUserBody implements ModelInterface, ArrayAccess, \JsonSeriali ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'username' => null, 'email' => null, @@ -127,10 +127,10 @@ class ReplaceTenantUserBody implements ModelInterface, ArrayAccess, \JsonSeriali ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'username' => false, 'email' => false, @@ -163,10 +163,10 @@ class ReplaceTenantUserBody implements ModelInterface, ArrayAccess, \JsonSeriali ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -438,14 +438,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -1243,11 +1243,11 @@ public function setKarma($karma) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -1255,12 +1255,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -1285,11 +1285,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/ResetUserNotificationsResponse.php b/lib/Model/ResetUserNotificationsResponse.php index fcbf49b..4c9e883 100644 --- a/lib/Model/ResetUserNotificationsResponse.php +++ b/lib/Model/ResetUserNotificationsResponse.php @@ -2,7 +2,7 @@ /** * ResetUserNotificationsResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class ResetUserNotificationsResponse implements ModelInterface, ArrayAccess, \Js public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'ResetUserNotificationsResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'code' => 'string' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'code' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'code' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -269,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -388,11 +388,11 @@ public function setCode($code) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -400,12 +400,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -430,11 +430,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/SORTDIR.php b/lib/Model/SORTDIR.php index a1a7433..2df5ff9 100644 --- a/lib/Model/SORTDIR.php +++ b/lib/Model/SORTDIR.php @@ -2,7 +2,7 @@ /** * SORTDIR * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** diff --git a/lib/Model/SSOSecurityLevel.php b/lib/Model/SSOSecurityLevel.php index 8bafbb0..271e6f1 100644 --- a/lib/Model/SSOSecurityLevel.php +++ b/lib/Model/SSOSecurityLevel.php @@ -2,7 +2,7 @@ /** * SSOSecurityLevel * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** diff --git a/lib/Model/SaveCommentResponseOptimized.php b/lib/Model/SaveCommentResponseOptimized.php index 6667196..6a41545 100644 --- a/lib/Model/SaveCommentResponseOptimized.php +++ b/lib/Model/SaveCommentResponseOptimized.php @@ -2,7 +2,7 @@ /** * SaveCommentResponseOptimized * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class SaveCommentResponseOptimized 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 $openAPIModelName = 'SaveCommentResponseOptimized'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'comment' => '\FastComments\Client\Model\PublicComment', @@ -65,12 +65,12 @@ class SaveCommentResponseOptimized implements ModelInterface, ArrayAccess, \Json ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'comment' => null, @@ -79,10 +79,10 @@ class SaveCommentResponseOptimized implements ModelInterface, ArrayAccess, \Json ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'comment' => false, @@ -91,10 +91,10 @@ class SaveCommentResponseOptimized implements ModelInterface, ArrayAccess, \Json ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -270,14 +270,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -302,8 +302,8 @@ public function listInvalidProperties() if ($this->container['comment'] === null) { $invalidProperties[] = "'comment' can't be null"; } - if ($this->container['user'] === null) { - $invalidProperties[] = "'user' can't be null"; + if ($this->container['user'] === null && !$this->isNullableSetToNull('user')) { + $invalidProperties[] = "'user' is required"; } return $invalidProperties; } @@ -377,7 +377,7 @@ public function setComment($comment) /** * Gets user * - * @return \FastComments\Client\Model\UserSessionInfo + * @return \FastComments\Client\Model\UserSessionInfo|null */ public function getUser() { @@ -387,7 +387,7 @@ public function getUser() /** * Sets user * - * @param \FastComments\Client\Model\UserSessionInfo $user user + * @param \FastComments\Client\Model\UserSessionInfo|null $user user * * @return self */ @@ -437,11 +437,11 @@ public function setModuleData($module_data) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -449,12 +449,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -479,11 +479,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/SaveCommentsBulkResponse.php b/lib/Model/SaveCommentsBulkResponse.php index c0458a6..842492f 100644 --- a/lib/Model/SaveCommentsBulkResponse.php +++ b/lib/Model/SaveCommentsBulkResponse.php @@ -2,7 +2,7 @@ /** * SaveCommentsBulkResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class SaveCommentsBulkResponse 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 $openAPIModelName = 'SaveCommentsBulkResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'comment' => '\FastComments\Client\Model\APIComment', @@ -72,12 +72,12 @@ class SaveCommentsBulkResponse implements ModelInterface, ArrayAccess, \JsonSeri ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'comment' => null, @@ -93,10 +93,10 @@ class SaveCommentsBulkResponse implements ModelInterface, ArrayAccess, \JsonSeri ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'comment' => false, @@ -112,10 +112,10 @@ class SaveCommentsBulkResponse implements ModelInterface, ArrayAccess, \JsonSeri ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -319,14 +319,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -348,18 +348,6 @@ public function listInvalidProperties() if ($this->container['status'] === null) { $invalidProperties[] = "'status' can't be null"; } - if ($this->container['comment'] === null) { - $invalidProperties[] = "'comment' can't be null"; - } - if ($this->container['user'] === null) { - $invalidProperties[] = "'user' can't be null"; - } - if ($this->container['reason'] === null) { - $invalidProperties[] = "'reason' can't be null"; - } - if ($this->container['code'] === null) { - $invalidProperties[] = "'code' can't be null"; - } return $invalidProperties; } @@ -405,7 +393,7 @@ public function setStatus($status) /** * Gets comment * - * @return \FastComments\Client\Model\APIComment + * @return \FastComments\Client\Model\APIComment|null */ public function getComment() { @@ -415,7 +403,7 @@ public function getComment() /** * Sets comment * - * @param \FastComments\Client\Model\APIComment $comment comment + * @param \FastComments\Client\Model\APIComment|null $comment comment * * @return self */ @@ -432,7 +420,7 @@ public function setComment($comment) /** * Gets user * - * @return \FastComments\Client\Model\UserSessionInfo + * @return \FastComments\Client\Model\UserSessionInfo|null */ public function getUser() { @@ -442,7 +430,7 @@ public function getUser() /** * Sets user * - * @param \FastComments\Client\Model\UserSessionInfo $user user + * @param \FastComments\Client\Model\UserSessionInfo|null $user user * * @return self */ @@ -493,7 +481,7 @@ public function setModuleData($module_data) /** * Gets reason * - * @return string + * @return string|null */ public function getReason() { @@ -503,7 +491,7 @@ public function getReason() /** * Sets reason * - * @param string $reason reason + * @param string|null $reason reason * * @return self */ @@ -520,7 +508,7 @@ public function setReason($reason) /** * Gets code * - * @return string + * @return string|null */ public function getCode() { @@ -530,7 +518,7 @@ public function getCode() /** * Sets code * - * @param string $code code + * @param string|null $code code * * @return self */ @@ -681,11 +669,11 @@ public function setCustomConfig($custom_config) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -693,12 +681,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -723,11 +711,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/SaveCommentsResponseWithPresence.php b/lib/Model/SaveCommentsResponseWithPresence.php index b147895..7b71533 100644 --- a/lib/Model/SaveCommentsResponseWithPresence.php +++ b/lib/Model/SaveCommentsResponseWithPresence.php @@ -2,7 +2,7 @@ /** * SaveCommentsResponseWithPresence * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class SaveCommentsResponseWithPresence 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 $openAPIModelName = 'SaveCommentsResponseWithPresence'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'comment' => '\FastComments\Client\Model\PublicComment', @@ -66,12 +66,12 @@ class SaveCommentsResponseWithPresence implements ModelInterface, ArrayAccess, \ ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'comment' => null, @@ -81,10 +81,10 @@ class SaveCommentsResponseWithPresence implements ModelInterface, ArrayAccess, \ ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'comment' => false, @@ -94,10 +94,10 @@ class SaveCommentsResponseWithPresence implements ModelInterface, ArrayAccess, \ ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -277,14 +277,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -309,8 +309,8 @@ public function listInvalidProperties() if ($this->container['comment'] === null) { $invalidProperties[] = "'comment' can't be null"; } - if ($this->container['user'] === null) { - $invalidProperties[] = "'user' can't be null"; + if ($this->container['user'] === null && !$this->isNullableSetToNull('user')) { + $invalidProperties[] = "'user' is required"; } return $invalidProperties; } @@ -384,7 +384,7 @@ public function setComment($comment) /** * Gets user * - * @return \FastComments\Client\Model\UserSessionInfo + * @return \FastComments\Client\Model\UserSessionInfo|null */ public function getUser() { @@ -394,7 +394,7 @@ public function getUser() /** * Sets user * - * @param \FastComments\Client\Model\UserSessionInfo $user user + * @param \FastComments\Client\Model\UserSessionInfo|null $user user * * @return self */ @@ -471,11 +471,11 @@ public function setUserIdWs($user_id_ws) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -483,12 +483,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -513,11 +513,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/SearchUsersResponse.php b/lib/Model/SearchUsersResponse.php index a6c546c..bb49b42 100644 --- a/lib/Model/SearchUsersResponse.php +++ b/lib/Model/SearchUsersResponse.php @@ -2,7 +2,7 @@ /** * SearchUsersResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class SearchUsersResponse 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 $openAPIModelName = 'SearchUsersResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'users' => '\FastComments\Client\Model\UserSearchResult[]' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'users' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'users' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setUsers($users) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/SearchUsersResult.php b/lib/Model/SearchUsersResult.php index d3fa717..f958b36 100644 --- a/lib/Model/SearchUsersResult.php +++ b/lib/Model/SearchUsersResult.php @@ -2,7 +2,7 @@ /** * SearchUsersResult * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class SearchUsersResult 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 $openAPIModelName = 'SearchUsersResult'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'sections' => '\FastComments\Client\Model\UserSearchSectionResult[]', @@ -64,12 +64,12 @@ class SearchUsersResult implements ModelInterface, ArrayAccess, \JsonSerializabl ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'sections' => null, @@ -77,10 +77,10 @@ class SearchUsersResult implements ModelInterface, ArrayAccess, \JsonSerializabl ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'sections' => false, @@ -88,10 +88,10 @@ class SearchUsersResult implements ModelInterface, ArrayAccess, \JsonSerializabl ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -263,14 +263,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -292,12 +292,6 @@ public function listInvalidProperties() if ($this->container['status'] === null) { $invalidProperties[] = "'status' can't be null"; } - if ($this->container['sections'] === null) { - $invalidProperties[] = "'sections' can't be null"; - } - if ($this->container['users'] === null) { - $invalidProperties[] = "'users' can't be null"; - } return $invalidProperties; } @@ -343,7 +337,7 @@ public function setStatus($status) /** * Gets sections * - * @return \FastComments\Client\Model\UserSearchSectionResult[] + * @return \FastComments\Client\Model\UserSearchSectionResult[]|null */ public function getSections() { @@ -353,7 +347,7 @@ public function getSections() /** * Sets sections * - * @param \FastComments\Client\Model\UserSearchSectionResult[] $sections sections + * @param \FastComments\Client\Model\UserSearchSectionResult[]|null $sections sections * * @return self */ @@ -370,7 +364,7 @@ public function setSections($sections) /** * Gets users * - * @return \FastComments\Client\Model\UserSearchResult[] + * @return \FastComments\Client\Model\UserSearchResult[]|null */ public function getUsers() { @@ -380,7 +374,7 @@ public function getUsers() /** * Sets users * - * @param \FastComments\Client\Model\UserSearchResult[] $users users + * @param \FastComments\Client\Model\UserSearchResult[]|null $users users * * @return self */ @@ -396,11 +390,11 @@ public function setUsers($users) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -408,12 +402,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -438,11 +432,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/SearchUsersSectionedResponse.php b/lib/Model/SearchUsersSectionedResponse.php index a290a36..16cbbb8 100644 --- a/lib/Model/SearchUsersSectionedResponse.php +++ b/lib/Model/SearchUsersSectionedResponse.php @@ -2,7 +2,7 @@ /** * SearchUsersSectionedResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class SearchUsersSectionedResponse 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 $openAPIModelName = 'SearchUsersSectionedResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'sections' => '\FastComments\Client\Model\UserSearchSectionResult[]' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'sections' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'sections' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setSections($sections) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/SetCommentApprovedResponse.php b/lib/Model/SetCommentApprovedResponse.php index 6012b17..d605435 100644 --- a/lib/Model/SetCommentApprovedResponse.php +++ b/lib/Model/SetCommentApprovedResponse.php @@ -2,7 +2,7 @@ /** * SetCommentApprovedResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class SetCommentApprovedResponse 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 $openAPIModelName = 'SetCommentApprovedResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'did_reset_flagged_count' => 'bool', 'status' => '\FastComments\Client\Model\APIStatus' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'did_reset_flagged_count' => null, 'status' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'did_reset_flagged_count' => false, 'status' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -356,11 +356,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -368,12 +368,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -398,11 +398,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/SetCommentTextParams.php b/lib/Model/SetCommentTextParams.php index 8feee2f..23c08aa 100644 --- a/lib/Model/SetCommentTextParams.php +++ b/lib/Model/SetCommentTextParams.php @@ -2,7 +2,7 @@ /** * SetCommentTextParams * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,46 +46,46 @@ class SetCommentTextParams 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 $openAPIModelName = 'SetCommentTextParams'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'comment' => 'string' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'comment' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'comment' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -249,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -322,11 +322,11 @@ public function setComment($comment) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -334,12 +334,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -364,11 +364,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/SetCommentTextResponse.php b/lib/Model/SetCommentTextResponse.php index 96d5ea4..7cb32d0 100644 --- a/lib/Model/SetCommentTextResponse.php +++ b/lib/Model/SetCommentTextResponse.php @@ -2,7 +2,7 @@ /** * SetCommentTextResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class SetCommentTextResponse 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 $openAPIModelName = 'SetCommentTextResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'new_comment_text_html' => 'string', 'status' => '\FastComments\Client\Model\APIStatus' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'new_comment_text_html' => null, 'status' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'new_comment_text_html' => false, 'status' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/SetCommentTextResult.php b/lib/Model/SetCommentTextResult.php index 38a626f..79e9493 100644 --- a/lib/Model/SetCommentTextResult.php +++ b/lib/Model/SetCommentTextResult.php @@ -2,7 +2,7 @@ /** * SetCommentTextResult * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class SetCommentTextResult 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 $openAPIModelName = 'SetCommentTextResult'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'approved' => 'bool', 'comment_html' => 'string' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'approved' => null, 'comment_html' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'approved' => false, 'comment_html' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setCommentHtml($comment_html) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/SetUserTrustFactorResponse.php b/lib/Model/SetUserTrustFactorResponse.php index e0ad9b0..461c6f4 100644 --- a/lib/Model/SetUserTrustFactorResponse.php +++ b/lib/Model/SetUserTrustFactorResponse.php @@ -2,7 +2,7 @@ /** * SetUserTrustFactorResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class SetUserTrustFactorResponse 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 $openAPIModelName = 'SetUserTrustFactorResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'previous_manual_trust_factor' => 'float', 'status' => '\FastComments\Client\Model\APIStatus' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'previous_manual_trust_factor' => 'double', 'status' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'previous_manual_trust_factor' => false, 'status' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -356,11 +356,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -368,12 +368,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -398,11 +398,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/SizePreset.php b/lib/Model/SizePreset.php index 81fd38f..b0633ec 100644 --- a/lib/Model/SizePreset.php +++ b/lib/Model/SizePreset.php @@ -2,7 +2,7 @@ /** * SizePreset * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** diff --git a/lib/Model/SortDirections.php b/lib/Model/SortDirections.php index 15e9bba..1d2b624 100644 --- a/lib/Model/SortDirections.php +++ b/lib/Model/SortDirections.php @@ -2,7 +2,7 @@ /** * SortDirections * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** diff --git a/lib/Model/SpamRule.php b/lib/Model/SpamRule.php index c68132c..963ba33 100644 --- a/lib/Model/SpamRule.php +++ b/lib/Model/SpamRule.php @@ -2,7 +2,7 @@ /** * SpamRule * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class SpamRule 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 $openAPIModelName = 'SpamRule'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'actions' => 'string[]', 'comment_contains' => 'string' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'actions' => null, 'comment_contains' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'actions' => false, 'comment_contains' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -273,14 +273,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -382,11 +382,11 @@ public function setCommentContains($comment_contains) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -394,12 +394,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -424,11 +424,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/TOSConfig.php b/lib/Model/TOSConfig.php index af80bc7..3b0315f 100644 --- a/lib/Model/TOSConfig.php +++ b/lib/Model/TOSConfig.php @@ -2,7 +2,7 @@ /** * TOSConfig * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class TOSConfig 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 $openAPIModelName = 'TOSConfig'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'enabled' => 'bool', 'text_by_locale' => 'array', @@ -64,12 +64,12 @@ class TOSConfig implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'enabled' => null, 'text_by_locale' => null, @@ -77,10 +77,10 @@ class TOSConfig implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'enabled' => false, 'text_by_locale' => false, @@ -88,10 +88,10 @@ class TOSConfig implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -263,14 +263,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -387,11 +387,11 @@ public function setLastUpdated($last_updated) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -399,12 +399,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -429,11 +429,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/TenantBadge.php b/lib/Model/TenantBadge.php index 59ce2b5..3f94fbe 100644 --- a/lib/Model/TenantBadge.php +++ b/lib/Model/TenantBadge.php @@ -2,7 +2,7 @@ /** * TenantBadge * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class TenantBadge 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 $openAPIModelName = 'TenantBadge'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ '_id' => 'string', 'tenant_id' => 'string', @@ -82,12 +82,12 @@ class TenantBadge implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ '_id' => null, 'tenant_id' => null, @@ -113,10 +113,10 @@ class TenantBadge implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ '_id' => false, 'tenant_id' => false, @@ -142,10 +142,10 @@ class TenantBadge implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -389,14 +389,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -448,17 +448,17 @@ public function listInvalidProperties() if ($this->container['display_label'] === null) { $invalidProperties[] = "'display_label' can't be null"; } - if ($this->container['display_src'] === null) { - $invalidProperties[] = "'display_src' can't be null"; + if ($this->container['display_src'] === null && !$this->isNullableSetToNull('display_src')) { + $invalidProperties[] = "'display_src' is required"; } - if ($this->container['background_color'] === null) { - $invalidProperties[] = "'background_color' can't be null"; + if ($this->container['background_color'] === null && !$this->isNullableSetToNull('background_color')) { + $invalidProperties[] = "'background_color' is required"; } - if ($this->container['border_color'] === null) { - $invalidProperties[] = "'border_color' can't be null"; + if ($this->container['border_color'] === null && !$this->isNullableSetToNull('border_color')) { + $invalidProperties[] = "'border_color' is required"; } - if ($this->container['text_color'] === null) { - $invalidProperties[] = "'text_color' can't be null"; + if ($this->container['text_color'] === null && !$this->isNullableSetToNull('text_color')) { + $invalidProperties[] = "'text_color' is required"; } if ($this->container['is_awaiting_reprocess'] === null) { $invalidProperties[] = "'is_awaiting_reprocess' can't be null"; @@ -815,7 +815,7 @@ public function setDisplayLabel($display_label) /** * Gets display_src * - * @return string + * @return string|null */ public function getDisplaySrc() { @@ -825,7 +825,7 @@ public function getDisplaySrc() /** * Sets display_src * - * @param string $display_src display_src + * @param string|null $display_src display_src * * @return self */ @@ -849,7 +849,7 @@ public function setDisplaySrc($display_src) /** * Gets background_color * - * @return string + * @return string|null */ public function getBackgroundColor() { @@ -859,7 +859,7 @@ public function getBackgroundColor() /** * Sets background_color * - * @param string $background_color background_color + * @param string|null $background_color background_color * * @return self */ @@ -883,7 +883,7 @@ public function setBackgroundColor($background_color) /** * Gets border_color * - * @return string + * @return string|null */ public function getBorderColor() { @@ -893,7 +893,7 @@ public function getBorderColor() /** * Sets border_color * - * @param string $border_color border_color + * @param string|null $border_color border_color * * @return self */ @@ -917,7 +917,7 @@ public function setBorderColor($border_color) /** * Gets text_color * - * @return string + * @return string|null */ public function getTextColor() { @@ -927,7 +927,7 @@ public function getTextColor() /** * Sets text_color * - * @param string $text_color text_color + * @param string|null $text_color text_color * * @return self */ @@ -1106,11 +1106,11 @@ public function setReplacesBadgeId($replaces_badge_id) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -1118,12 +1118,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -1148,11 +1148,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/TenantHashTag.php b/lib/Model/TenantHashTag.php index 016b07f..0de7613 100644 --- a/lib/Model/TenantHashTag.php +++ b/lib/Model/TenantHashTag.php @@ -2,7 +2,7 @@ /** * TenantHashTag * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class TenantHashTag 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 $openAPIModelName = 'TenantHashTag'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ '_id' => 'string', 'created_at' => '\DateTime', @@ -66,12 +66,12 @@ class TenantHashTag implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ '_id' => null, 'created_at' => 'date-time', @@ -81,10 +81,10 @@ class TenantHashTag implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ '_id' => false, 'created_at' => false, @@ -94,10 +94,10 @@ class TenantHashTag implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -277,14 +277,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -467,11 +467,11 @@ public function setUrl($url) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -479,12 +479,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -509,11 +509,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/TenantPackage.php b/lib/Model/TenantPackage.php index 50078e0..1d7db46 100644 --- a/lib/Model/TenantPackage.php +++ b/lib/Model/TenantPackage.php @@ -2,7 +2,7 @@ /** * TenantPackage * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class TenantPackage 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 $openAPIModelName = 'TenantPackage'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ '_id' => 'string', 'name' => 'string', @@ -122,12 +122,12 @@ class TenantPackage implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ '_id' => null, 'name' => null, @@ -193,10 +193,10 @@ class TenantPackage implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ '_id' => false, 'name' => false, @@ -262,10 +262,10 @@ class TenantPackage implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -669,14 +669,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -707,17 +707,17 @@ public function listInvalidProperties() if ($this->container['created_at'] === null) { $invalidProperties[] = "'created_at' can't be null"; } - if ($this->container['monthly_cost_usd'] === null) { - $invalidProperties[] = "'monthly_cost_usd' can't be null"; + if ($this->container['monthly_cost_usd'] === null && !$this->isNullableSetToNull('monthly_cost_usd')) { + $invalidProperties[] = "'monthly_cost_usd' is required"; } - if ($this->container['yearly_cost_usd'] === null) { - $invalidProperties[] = "'yearly_cost_usd' can't be null"; + if ($this->container['yearly_cost_usd'] === null && !$this->isNullableSetToNull('yearly_cost_usd')) { + $invalidProperties[] = "'yearly_cost_usd' is required"; } - if ($this->container['monthly_stripe_plan_id'] === null) { - $invalidProperties[] = "'monthly_stripe_plan_id' can't be null"; + if ($this->container['monthly_stripe_plan_id'] === null && !$this->isNullableSetToNull('monthly_stripe_plan_id')) { + $invalidProperties[] = "'monthly_stripe_plan_id' is required"; } - if ($this->container['yearly_stripe_plan_id'] === null) { - $invalidProperties[] = "'yearly_stripe_plan_id' can't be null"; + if ($this->container['yearly_stripe_plan_id'] === null && !$this->isNullableSetToNull('yearly_stripe_plan_id')) { + $invalidProperties[] = "'yearly_stripe_plan_id' is required"; } if ($this->container['max_monthly_page_loads'] === null) { $invalidProperties[] = "'max_monthly_page_loads' can't be null"; @@ -929,7 +929,7 @@ public function setTemplateId($template_id) /** * Gets monthly_cost_usd * - * @return float + * @return float|null */ public function getMonthlyCostUsd() { @@ -939,7 +939,7 @@ public function getMonthlyCostUsd() /** * Sets monthly_cost_usd * - * @param float $monthly_cost_usd monthly_cost_usd + * @param float|null $monthly_cost_usd monthly_cost_usd * * @return self */ @@ -963,7 +963,7 @@ public function setMonthlyCostUsd($monthly_cost_usd) /** * Gets yearly_cost_usd * - * @return float + * @return float|null */ public function getYearlyCostUsd() { @@ -973,7 +973,7 @@ public function getYearlyCostUsd() /** * Sets yearly_cost_usd * - * @param float $yearly_cost_usd yearly_cost_usd + * @param float|null $yearly_cost_usd yearly_cost_usd * * @return self */ @@ -997,7 +997,7 @@ public function setYearlyCostUsd($yearly_cost_usd) /** * Gets monthly_stripe_plan_id * - * @return string + * @return string|null */ public function getMonthlyStripePlanId() { @@ -1007,7 +1007,7 @@ public function getMonthlyStripePlanId() /** * Sets monthly_stripe_plan_id * - * @param string $monthly_stripe_plan_id monthly_stripe_plan_id + * @param string|null $monthly_stripe_plan_id monthly_stripe_plan_id * * @return self */ @@ -1031,7 +1031,7 @@ public function setMonthlyStripePlanId($monthly_stripe_plan_id) /** * Gets yearly_stripe_plan_id * - * @return string + * @return string|null */ public function getYearlyStripePlanId() { @@ -1041,7 +1041,7 @@ public function getYearlyStripePlanId() /** * Sets yearly_stripe_plan_id * - * @param string $yearly_stripe_plan_id yearly_stripe_plan_id + * @param string|null $yearly_stripe_plan_id yearly_stripe_plan_id * * @return self */ @@ -2468,11 +2468,11 @@ public function setAiAgentMonthlyBudgetCents($ai_agent_monthly_budget_cents) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -2480,12 +2480,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -2510,11 +2510,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/UnBlockFromCommentParams.php b/lib/Model/UnBlockFromCommentParams.php index aff5dad..7ceaa8b 100644 --- a/lib/Model/UnBlockFromCommentParams.php +++ b/lib/Model/UnBlockFromCommentParams.php @@ -2,7 +2,7 @@ /** * UnBlockFromCommentParams * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,46 +46,46 @@ class UnBlockFromCommentParams 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 $openAPIModelName = 'UnBlockFromCommentParams'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'comment_ids_to_check' => 'string[]' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'comment_ids_to_check' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'comment_ids_to_check' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -249,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -319,11 +319,11 @@ public function setCommentIdsToCheck($comment_ids_to_check) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -331,12 +331,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -361,11 +361,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/UnblockSuccess.php b/lib/Model/UnblockSuccess.php index b5531ad..9964ad1 100644 --- a/lib/Model/UnblockSuccess.php +++ b/lib/Model/UnblockSuccess.php @@ -2,7 +2,7 @@ /** * UnblockSuccess * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class UnblockSuccess 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 $openAPIModelName = 'UnblockSuccess'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'comment_statuses' => 'array' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'comment_statuses' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'comment_statuses' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setCommentStatuses($comment_statuses) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/UpdatableCommentParams.php b/lib/Model/UpdatableCommentParams.php index 5dc3edf..365d725 100644 --- a/lib/Model/UpdatableCommentParams.php +++ b/lib/Model/UpdatableCommentParams.php @@ -2,7 +2,7 @@ /** * UpdatableCommentParams * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class UpdatableCommentParams 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 $openAPIModelName = 'UpdatableCommentParams'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'url_id' => 'string', 'url_id_raw' => 'string', @@ -100,12 +100,12 @@ class UpdatableCommentParams implements ModelInterface, ArrayAccess, \JsonSerial ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'url_id' => null, 'url_id_raw' => null, @@ -149,10 +149,10 @@ class UpdatableCommentParams implements ModelInterface, ArrayAccess, \JsonSerial ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'url_id' => false, 'url_id_raw' => false, @@ -196,10 +196,10 @@ class UpdatableCommentParams implements ModelInterface, ArrayAccess, \JsonSerial ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -515,14 +515,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -1758,11 +1758,11 @@ public function setFeedbackIds($feedback_ids) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -1770,12 +1770,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -1800,11 +1800,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/UpdateAPIPageData.php b/lib/Model/UpdateAPIPageData.php index 9727fb8..83e04ad 100644 --- a/lib/Model/UpdateAPIPageData.php +++ b/lib/Model/UpdateAPIPageData.php @@ -2,7 +2,7 @@ /** * UpdateAPIPageData * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class UpdateAPIPageData 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 $openAPIModelName = 'UpdateAPIPageData'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'is_closed' => 'bool', 'accessible_by_group_ids' => 'string[]', @@ -66,12 +66,12 @@ class UpdateAPIPageData implements ModelInterface, ArrayAccess, \JsonSerializabl ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'is_closed' => null, 'accessible_by_group_ids' => null, @@ -81,10 +81,10 @@ class UpdateAPIPageData implements ModelInterface, ArrayAccess, \JsonSerializabl ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'is_closed' => false, 'accessible_by_group_ids' => false, @@ -94,10 +94,10 @@ class UpdateAPIPageData implements ModelInterface, ArrayAccess, \JsonSerializabl ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -277,14 +277,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -455,11 +455,11 @@ public function setUrlId($url_id) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -467,12 +467,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -497,11 +497,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/UpdateAPISSOUserData.php b/lib/Model/UpdateAPISSOUserData.php index fc9911c..ee02559 100644 --- a/lib/Model/UpdateAPISSOUserData.php +++ b/lib/Model/UpdateAPISSOUserData.php @@ -2,7 +2,7 @@ /** * UpdateAPISSOUserData * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class UpdateAPISSOUserData 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 $openAPIModelName = 'UpdateAPISSOUserData'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'group_ids' => 'string[]', 'has_blocked_users' => 'bool', @@ -81,12 +81,12 @@ class UpdateAPISSOUserData implements ModelInterface, ArrayAccess, \JsonSerializ ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'group_ids' => null, 'has_blocked_users' => null, @@ -111,10 +111,10 @@ class UpdateAPISSOUserData implements ModelInterface, ArrayAccess, \JsonSerializ ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'group_ids' => false, 'has_blocked_users' => false, @@ -139,10 +139,10 @@ class UpdateAPISSOUserData implements ModelInterface, ArrayAccess, \JsonSerializ ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -382,14 +382,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -965,11 +965,11 @@ public function setId($id) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -977,12 +977,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -1007,11 +1007,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/UpdateAPIUserSubscriptionData.php b/lib/Model/UpdateAPIUserSubscriptionData.php index 994dca8..645ed5c 100644 --- a/lib/Model/UpdateAPIUserSubscriptionData.php +++ b/lib/Model/UpdateAPIUserSubscriptionData.php @@ -2,7 +2,7 @@ /** * UpdateAPIUserSubscriptionData * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,46 +46,46 @@ class UpdateAPIUserSubscriptionData implements ModelInterface, ArrayAccess, \Jso public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'UpdateAPIUserSubscriptionData'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'notification_frequency' => 'float' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'notification_frequency' => 'double' ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'notification_frequency' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -249,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -319,11 +319,11 @@ public function setNotificationFrequency($notification_frequency) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -331,12 +331,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -361,11 +361,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/UpdateDomainConfigParams.php b/lib/Model/UpdateDomainConfigParams.php index 6d58ff7..a0ea1ae 100644 --- a/lib/Model/UpdateDomainConfigParams.php +++ b/lib/Model/UpdateDomainConfigParams.php @@ -2,7 +2,7 @@ /** * UpdateDomainConfigParams * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class UpdateDomainConfigParams 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 $openAPIModelName = 'UpdateDomainConfigParams'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'domain' => 'string', 'email_from_name' => 'string', @@ -68,12 +68,12 @@ class UpdateDomainConfigParams implements ModelInterface, ArrayAccess, \JsonSeri ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'domain' => null, 'email_from_name' => null, @@ -85,10 +85,10 @@ class UpdateDomainConfigParams implements ModelInterface, ArrayAccess, \JsonSeri ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'domain' => false, 'email_from_name' => false, @@ -100,10 +100,10 @@ class UpdateDomainConfigParams implements ModelInterface, ArrayAccess, \JsonSeri ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -291,14 +291,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -526,11 +526,11 @@ public function setEmailHeaders($email_headers) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -538,12 +538,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -568,11 +568,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/UpdateEmailTemplateBody.php b/lib/Model/UpdateEmailTemplateBody.php index 1085a85..2b7145c 100644 --- a/lib/Model/UpdateEmailTemplateBody.php +++ b/lib/Model/UpdateEmailTemplateBody.php @@ -2,7 +2,7 @@ /** * UpdateEmailTemplateBody * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class UpdateEmailTemplateBody 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 $openAPIModelName = 'UpdateEmailTemplateBody'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'email_template_id' => 'string', 'display_name' => 'string', @@ -67,12 +67,12 @@ class UpdateEmailTemplateBody implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'email_template_id' => null, 'display_name' => null, @@ -83,10 +83,10 @@ class UpdateEmailTemplateBody implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'email_template_id' => false, 'display_name' => false, @@ -97,10 +97,10 @@ class UpdateEmailTemplateBody implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -284,14 +284,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -489,11 +489,11 @@ public function setTestData($test_data) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -501,12 +501,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -531,11 +531,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/UpdateFeedPostParams.php b/lib/Model/UpdateFeedPostParams.php index a71c741..2d4d03f 100644 --- a/lib/Model/UpdateFeedPostParams.php +++ b/lib/Model/UpdateFeedPostParams.php @@ -2,7 +2,7 @@ /** * UpdateFeedPostParams * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class UpdateFeedPostParams 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 $openAPIModelName = 'UpdateFeedPostParams'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'title' => 'string', 'content_html' => 'string', @@ -67,12 +67,12 @@ class UpdateFeedPostParams implements ModelInterface, ArrayAccess, \JsonSerializ ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'title' => null, 'content_html' => null, @@ -83,10 +83,10 @@ class UpdateFeedPostParams implements ModelInterface, ArrayAccess, \JsonSerializ ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'title' => false, 'content_html' => false, @@ -97,10 +97,10 @@ class UpdateFeedPostParams implements ModelInterface, ArrayAccess, \JsonSerializ ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -284,14 +284,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -489,11 +489,11 @@ public function setMeta($meta) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -501,12 +501,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -531,11 +531,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/UpdateHashTagBody.php b/lib/Model/UpdateHashTagBody.php index 29cac17..6eab1b2 100644 --- a/lib/Model/UpdateHashTagBody.php +++ b/lib/Model/UpdateHashTagBody.php @@ -2,7 +2,7 @@ /** * UpdateHashTagBody * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class UpdateHashTagBody 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 $openAPIModelName = 'UpdateHashTagBody'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'tenant_id' => 'string', 'url' => 'string', @@ -64,12 +64,12 @@ class UpdateHashTagBody implements ModelInterface, ArrayAccess, \JsonSerializabl ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'tenant_id' => null, 'url' => null, @@ -77,10 +77,10 @@ class UpdateHashTagBody implements ModelInterface, ArrayAccess, \JsonSerializabl ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'tenant_id' => false, 'url' => false, @@ -88,10 +88,10 @@ class UpdateHashTagBody implements ModelInterface, ArrayAccess, \JsonSerializabl ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -263,14 +263,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -387,11 +387,11 @@ public function setTag($tag) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -399,12 +399,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -429,11 +429,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/UpdateHashTagResponse.php b/lib/Model/UpdateHashTagResponse.php index 4935d1e..1fb3958 100644 --- a/lib/Model/UpdateHashTagResponse.php +++ b/lib/Model/UpdateHashTagResponse.php @@ -2,7 +2,7 @@ /** * UpdateHashTagResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class UpdateHashTagResponse 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 $openAPIModelName = 'UpdateHashTagResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'hash_tag' => '\FastComments\Client\Model\TenantHashTag' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'hash_tag' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'hash_tag' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setHashTag($hash_tag) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/UpdateModeratorBody.php b/lib/Model/UpdateModeratorBody.php index 226b2cc..ac7a53c 100644 --- a/lib/Model/UpdateModeratorBody.php +++ b/lib/Model/UpdateModeratorBody.php @@ -2,7 +2,7 @@ /** * UpdateModeratorBody * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class UpdateModeratorBody 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 $openAPIModelName = 'UpdateModeratorBody'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'name' => 'string', 'email' => 'string', @@ -65,12 +65,12 @@ class UpdateModeratorBody implements ModelInterface, ArrayAccess, \JsonSerializa ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'name' => null, 'email' => null, @@ -79,10 +79,10 @@ class UpdateModeratorBody implements ModelInterface, ArrayAccess, \JsonSerializa ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'name' => false, 'email' => false, @@ -91,10 +91,10 @@ class UpdateModeratorBody implements ModelInterface, ArrayAccess, \JsonSerializa ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -270,14 +270,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -421,11 +421,11 @@ public function setModerationGroupIds($moderation_group_ids) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -433,12 +433,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -463,11 +463,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/UpdateNotificationBody.php b/lib/Model/UpdateNotificationBody.php index c3b3838..3978d33 100644 --- a/lib/Model/UpdateNotificationBody.php +++ b/lib/Model/UpdateNotificationBody.php @@ -2,7 +2,7 @@ /** * UpdateNotificationBody * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class UpdateNotificationBody 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 $openAPIModelName = 'UpdateNotificationBody'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'viewed' => 'bool', 'opted_out' => 'bool' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'viewed' => null, 'opted_out' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'viewed' => false, 'opted_out' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -353,11 +353,11 @@ public function setOptedOut($opted_out) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -365,12 +365,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -395,11 +395,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/UpdateQuestionConfigBody.php b/lib/Model/UpdateQuestionConfigBody.php index 16c1706..377cc36 100644 --- a/lib/Model/UpdateQuestionConfigBody.php +++ b/lib/Model/UpdateQuestionConfigBody.php @@ -2,7 +2,7 @@ /** * UpdateQuestionConfigBody * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class UpdateQuestionConfigBody 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 $openAPIModelName = 'UpdateQuestionConfigBody'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'name' => 'string', 'question' => 'string', @@ -75,12 +75,12 @@ class UpdateQuestionConfigBody implements ModelInterface, ArrayAccess, \JsonSeri ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'name' => null, 'question' => null, @@ -99,10 +99,10 @@ class UpdateQuestionConfigBody implements ModelInterface, ArrayAccess, \JsonSeri ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'name' => false, 'question' => false, @@ -121,10 +121,10 @@ class UpdateQuestionConfigBody implements ModelInterface, ArrayAccess, \JsonSeri ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -340,14 +340,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -761,11 +761,11 @@ public function setReportingOrder($reporting_order) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -773,12 +773,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -803,11 +803,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/UpdateQuestionResultBody.php b/lib/Model/UpdateQuestionResultBody.php index 9a4ccf7..959279d 100644 --- a/lib/Model/UpdateQuestionResultBody.php +++ b/lib/Model/UpdateQuestionResultBody.php @@ -2,7 +2,7 @@ /** * UpdateQuestionResultBody * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class UpdateQuestionResultBody 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 $openAPIModelName = 'UpdateQuestionResultBody'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'url_id' => 'string', 'anon_user_id' => 'string', @@ -68,12 +68,12 @@ class UpdateQuestionResultBody implements ModelInterface, ArrayAccess, \JsonSeri ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'url_id' => null, 'anon_user_id' => null, @@ -85,10 +85,10 @@ class UpdateQuestionResultBody implements ModelInterface, ArrayAccess, \JsonSeri ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'url_id' => false, 'anon_user_id' => false, @@ -100,10 +100,10 @@ class UpdateQuestionResultBody implements ModelInterface, ArrayAccess, \JsonSeri ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -291,14 +291,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -530,11 +530,11 @@ public function setMeta($meta) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -542,12 +542,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -572,11 +572,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/UpdateSubscriptionAPIResponse.php b/lib/Model/UpdateSubscriptionAPIResponse.php index 69c83e6..d1fb45b 100644 --- a/lib/Model/UpdateSubscriptionAPIResponse.php +++ b/lib/Model/UpdateSubscriptionAPIResponse.php @@ -2,7 +2,7 @@ /** * UpdateSubscriptionAPIResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class UpdateSubscriptionAPIResponse implements ModelInterface, ArrayAccess, \Jso public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'UpdateSubscriptionAPIResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'reason' => 'string', 'code' => 'string', @@ -65,12 +65,12 @@ class UpdateSubscriptionAPIResponse implements ModelInterface, ArrayAccess, \Jso ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'reason' => null, 'code' => null, @@ -79,10 +79,10 @@ class UpdateSubscriptionAPIResponse implements ModelInterface, ArrayAccess, \Jso ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'reason' => false, 'code' => false, @@ -91,10 +91,10 @@ class UpdateSubscriptionAPIResponse implements ModelInterface, ArrayAccess, \Jso ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -270,14 +270,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -424,11 +424,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -436,12 +436,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -466,11 +466,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/UpdateTenantBody.php b/lib/Model/UpdateTenantBody.php index 9ecf77c..1f73faf 100644 --- a/lib/Model/UpdateTenantBody.php +++ b/lib/Model/UpdateTenantBody.php @@ -2,7 +2,7 @@ /** * UpdateTenantBody * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class UpdateTenantBody 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 $openAPIModelName = 'UpdateTenantBody'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'name' => 'string', 'email' => 'string', @@ -85,12 +85,12 @@ class UpdateTenantBody implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'name' => null, 'email' => null, @@ -119,10 +119,10 @@ class UpdateTenantBody implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'name' => false, 'email' => false, @@ -151,10 +151,10 @@ class UpdateTenantBody implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -410,14 +410,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -1101,11 +1101,11 @@ public function setManagedByTenantId($managed_by_tenant_id) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -1113,12 +1113,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -1143,11 +1143,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/UpdateTenantPackageBody.php b/lib/Model/UpdateTenantPackageBody.php index efca82b..c4916db 100644 --- a/lib/Model/UpdateTenantPackageBody.php +++ b/lib/Model/UpdateTenantPackageBody.php @@ -2,7 +2,7 @@ /** * UpdateTenantPackageBody * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class UpdateTenantPackageBody 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 $openAPIModelName = 'UpdateTenantPackageBody'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'name' => 'string', 'monthly_cost_usd' => 'float', @@ -93,12 +93,12 @@ class UpdateTenantPackageBody implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'name' => null, 'monthly_cost_usd' => 'double', @@ -135,10 +135,10 @@ class UpdateTenantPackageBody implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'name' => false, 'monthly_cost_usd' => false, @@ -175,10 +175,10 @@ class UpdateTenantPackageBody implements ModelInterface, ArrayAccess, \JsonSeria ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -466,14 +466,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -1373,11 +1373,11 @@ public function setFlexMinimumCostCents($flex_minimum_cost_cents) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -1385,12 +1385,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -1415,11 +1415,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/UpdateTenantUserBody.php b/lib/Model/UpdateTenantUserBody.php index 82bde61..f566e00 100644 --- a/lib/Model/UpdateTenantUserBody.php +++ b/lib/Model/UpdateTenantUserBody.php @@ -2,7 +2,7 @@ /** * UpdateTenantUserBody * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class UpdateTenantUserBody 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 $openAPIModelName = 'UpdateTenantUserBody'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'username' => 'string', 'display_name' => 'string', @@ -85,12 +85,12 @@ class UpdateTenantUserBody implements ModelInterface, ArrayAccess, \JsonSerializ ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'username' => null, 'display_name' => null, @@ -119,10 +119,10 @@ class UpdateTenantUserBody implements ModelInterface, ArrayAccess, \JsonSerializ ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'username' => false, 'display_name' => false, @@ -151,10 +151,10 @@ class UpdateTenantUserBody implements ModelInterface, ArrayAccess, \JsonSerializ ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -410,14 +410,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -1101,11 +1101,11 @@ public function setDisplayLabel($display_label) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -1113,12 +1113,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -1143,11 +1143,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/UpdateUserBadgeParams.php b/lib/Model/UpdateUserBadgeParams.php index 47cd7b2..c27ccca 100644 --- a/lib/Model/UpdateUserBadgeParams.php +++ b/lib/Model/UpdateUserBadgeParams.php @@ -2,7 +2,7 @@ /** * UpdateUserBadgeParams * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,46 +46,46 @@ class UpdateUserBadgeParams 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 $openAPIModelName = 'UpdateUserBadgeParams'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'displayed_on_comments' => 'bool' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'displayed_on_comments' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'displayed_on_comments' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -249,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -319,11 +319,11 @@ public function setDisplayedOnComments($displayed_on_comments) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -331,12 +331,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -361,11 +361,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/UpdateUserNotificationCommentSubscriptionStatusResponse.php b/lib/Model/UpdateUserNotificationCommentSubscriptionStatusResponse.php index beff407..990e0db 100644 --- a/lib/Model/UpdateUserNotificationCommentSubscriptionStatusResponse.php +++ b/lib/Model/UpdateUserNotificationCommentSubscriptionStatusResponse.php @@ -2,7 +2,7 @@ /** * UpdateUserNotificationCommentSubscriptionStatusResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class UpdateUserNotificationCommentSubscriptionStatusResponse implements ModelIn public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'UpdateUserNotificationCommentSubscriptionStatusResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'matched_count' => 'int', @@ -65,12 +65,12 @@ class UpdateUserNotificationCommentSubscriptionStatusResponse implements ModelIn ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'matched_count' => 'int64', @@ -79,10 +79,10 @@ class UpdateUserNotificationCommentSubscriptionStatusResponse implements ModelIn ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'matched_count' => false, @@ -91,10 +91,10 @@ class UpdateUserNotificationCommentSubscriptionStatusResponse implements ModelIn ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -285,14 +285,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -314,15 +314,6 @@ public function listInvalidProperties() if ($this->container['status'] === null) { $invalidProperties[] = "'status' can't be null"; } - if ($this->container['matched_count'] === null) { - $invalidProperties[] = "'matched_count' can't be null"; - } - if ($this->container['modified_count'] === null) { - $invalidProperties[] = "'modified_count' can't be null"; - } - if ($this->container['note'] === null) { - $invalidProperties[] = "'note' can't be null"; - } $allowedValues = $this->getNoteAllowableValues(); if (!is_null($this->container['note']) && !in_array($this->container['note'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -377,7 +368,7 @@ public function setStatus($status) /** * Gets matched_count * - * @return int + * @return int|null */ public function getMatchedCount() { @@ -387,7 +378,7 @@ public function getMatchedCount() /** * Sets matched_count * - * @param int $matched_count matched_count + * @param int|null $matched_count matched_count * * @return self */ @@ -404,7 +395,7 @@ public function setMatchedCount($matched_count) /** * Gets modified_count * - * @return int + * @return int|null */ public function getModifiedCount() { @@ -414,7 +405,7 @@ public function getModifiedCount() /** * Sets modified_count * - * @param int $modified_count modified_count + * @param int|null $modified_count modified_count * * @return self */ @@ -431,7 +422,7 @@ public function setModifiedCount($modified_count) /** * Gets note * - * @return string + * @return string|null */ public function getNote() { @@ -441,7 +432,7 @@ public function getNote() /** * Sets note * - * @param string $note note + * @param string|null $note note * * @return self */ @@ -467,11 +458,11 @@ public function setNote($note) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -479,12 +470,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -509,11 +500,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/UpdateUserNotificationPageSubscriptionStatusResponse.php b/lib/Model/UpdateUserNotificationPageSubscriptionStatusResponse.php index 260af22..711b44a 100644 --- a/lib/Model/UpdateUserNotificationPageSubscriptionStatusResponse.php +++ b/lib/Model/UpdateUserNotificationPageSubscriptionStatusResponse.php @@ -2,7 +2,7 @@ /** * UpdateUserNotificationPageSubscriptionStatusResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class UpdateUserNotificationPageSubscriptionStatusResponse implements ModelInter public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'UpdateUserNotificationPageSubscriptionStatusResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'matched_count' => 'int', @@ -65,12 +65,12 @@ class UpdateUserNotificationPageSubscriptionStatusResponse implements ModelInter ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'matched_count' => 'int64', @@ -79,10 +79,10 @@ class UpdateUserNotificationPageSubscriptionStatusResponse implements ModelInter ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'matched_count' => false, @@ -91,10 +91,10 @@ class UpdateUserNotificationPageSubscriptionStatusResponse implements ModelInter ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -285,14 +285,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -314,15 +314,6 @@ public function listInvalidProperties() if ($this->container['status'] === null) { $invalidProperties[] = "'status' can't be null"; } - if ($this->container['matched_count'] === null) { - $invalidProperties[] = "'matched_count' can't be null"; - } - if ($this->container['modified_count'] === null) { - $invalidProperties[] = "'modified_count' can't be null"; - } - if ($this->container['note'] === null) { - $invalidProperties[] = "'note' can't be null"; - } $allowedValues = $this->getNoteAllowableValues(); if (!is_null($this->container['note']) && !in_array($this->container['note'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -377,7 +368,7 @@ public function setStatus($status) /** * Gets matched_count * - * @return int + * @return int|null */ public function getMatchedCount() { @@ -387,7 +378,7 @@ public function getMatchedCount() /** * Sets matched_count * - * @param int $matched_count matched_count + * @param int|null $matched_count matched_count * * @return self */ @@ -404,7 +395,7 @@ public function setMatchedCount($matched_count) /** * Gets modified_count * - * @return int + * @return int|null */ public function getModifiedCount() { @@ -414,7 +405,7 @@ public function getModifiedCount() /** * Sets modified_count * - * @param int $modified_count modified_count + * @param int|null $modified_count modified_count * * @return self */ @@ -431,7 +422,7 @@ public function setModifiedCount($modified_count) /** * Gets note * - * @return string + * @return string|null */ public function getNote() { @@ -441,7 +432,7 @@ public function getNote() /** * Sets note * - * @param string $note note + * @param string|null $note note * * @return self */ @@ -467,11 +458,11 @@ public function setNote($note) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -479,12 +470,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -509,11 +500,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/UpdateUserNotificationStatusResponse.php b/lib/Model/UpdateUserNotificationStatusResponse.php index da195e7..e4a3dcb 100644 --- a/lib/Model/UpdateUserNotificationStatusResponse.php +++ b/lib/Model/UpdateUserNotificationStatusResponse.php @@ -2,7 +2,7 @@ /** * UpdateUserNotificationStatusResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class UpdateUserNotificationStatusResponse implements ModelInterface, ArrayAcces public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'UpdateUserNotificationStatusResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'matched_count' => 'int', @@ -65,12 +65,12 @@ class UpdateUserNotificationStatusResponse implements ModelInterface, ArrayAcces ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'matched_count' => 'int64', @@ -79,10 +79,10 @@ class UpdateUserNotificationStatusResponse implements ModelInterface, ArrayAcces ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'matched_count' => false, @@ -91,10 +91,10 @@ class UpdateUserNotificationStatusResponse implements ModelInterface, ArrayAcces ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -285,14 +285,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -314,15 +314,6 @@ public function listInvalidProperties() if ($this->container['status'] === null) { $invalidProperties[] = "'status' can't be null"; } - if ($this->container['matched_count'] === null) { - $invalidProperties[] = "'matched_count' can't be null"; - } - if ($this->container['modified_count'] === null) { - $invalidProperties[] = "'modified_count' can't be null"; - } - if ($this->container['note'] === null) { - $invalidProperties[] = "'note' can't be null"; - } $allowedValues = $this->getNoteAllowableValues(); if (!is_null($this->container['note']) && !in_array($this->container['note'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -377,7 +368,7 @@ public function setStatus($status) /** * Gets matched_count * - * @return int + * @return int|null */ public function getMatchedCount() { @@ -387,7 +378,7 @@ public function getMatchedCount() /** * Sets matched_count * - * @param int $matched_count matched_count + * @param int|null $matched_count matched_count * * @return self */ @@ -404,7 +395,7 @@ public function setMatchedCount($matched_count) /** * Gets modified_count * - * @return int + * @return int|null */ public function getModifiedCount() { @@ -414,7 +405,7 @@ public function getModifiedCount() /** * Sets modified_count * - * @param int $modified_count modified_count + * @param int|null $modified_count modified_count * * @return self */ @@ -431,7 +422,7 @@ public function setModifiedCount($modified_count) /** * Gets note * - * @return string + * @return string|null */ public function getNote() { @@ -441,7 +432,7 @@ public function getNote() /** * Sets note * - * @param string $note note + * @param string|null $note note * * @return self */ @@ -467,11 +458,11 @@ public function setNote($note) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -479,12 +470,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -509,11 +500,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/UploadImageResponse.php b/lib/Model/UploadImageResponse.php index c49ea8b..9cddf43 100644 --- a/lib/Model/UploadImageResponse.php +++ b/lib/Model/UploadImageResponse.php @@ -2,7 +2,7 @@ /** * UploadImageResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class UploadImageResponse 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 $openAPIModelName = 'UploadImageResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'url' => 'string', @@ -66,12 +66,12 @@ class UploadImageResponse implements ModelInterface, ArrayAccess, \JsonSerializa ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'url' => null, @@ -81,10 +81,10 @@ class UploadImageResponse implements ModelInterface, ArrayAccess, \JsonSerializa ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'url' => false, @@ -94,10 +94,10 @@ class UploadImageResponse implements ModelInterface, ArrayAccess, \JsonSerializa ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -277,14 +277,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -458,11 +458,11 @@ public function setCode($code) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -470,12 +470,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -500,11 +500,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/User.php b/lib/Model/User.php index 1048b75..9c59afe 100644 --- a/lib/Model/User.php +++ b/lib/Model/User.php @@ -2,7 +2,7 @@ /** * User * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class User 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 $openAPIModelName = 'User'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ '_id' => 'string', 'tenant_id' => 'string', @@ -121,12 +121,12 @@ class User implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ '_id' => null, 'tenant_id' => null, @@ -191,10 +191,10 @@ class User implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ '_id' => false, 'tenant_id' => true, @@ -259,10 +259,10 @@ class User implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -662,14 +662,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -694,14 +694,14 @@ public function listInvalidProperties() if ($this->container['username'] === null) { $invalidProperties[] = "'username' can't be null"; } - if ($this->container['email'] === null) { - $invalidProperties[] = "'email' can't be null"; + if ($this->container['email'] === null && !$this->isNullableSetToNull('email')) { + $invalidProperties[] = "'email' is required"; } if ($this->container['sign_up_date'] === null) { $invalidProperties[] = "'sign_up_date' can't be null"; } - if ($this->container['created_from_tenant_id'] === null) { - $invalidProperties[] = "'created_from_tenant_id' can't be null"; + if ($this->container['created_from_tenant_id'] === null && !$this->isNullableSetToNull('created_from_tenant_id')) { + $invalidProperties[] = "'created_from_tenant_id' is required"; } if ($this->container['created_from_ip_hashed'] === null) { $invalidProperties[] = "'created_from_ip_hashed' can't be null"; @@ -882,7 +882,7 @@ public function setWebsiteUrl($website_url) /** * Gets email * - * @return string + * @return string|null */ public function getEmail() { @@ -892,7 +892,7 @@ public function getEmail() /** * Sets email * - * @param string $email email + * @param string|null $email email * * @return self */ @@ -1058,7 +1058,7 @@ public function setCreatedFromUrlId($created_from_url_id) /** * Gets created_from_tenant_id * - * @return string + * @return string|null */ public function getCreatedFromTenantId() { @@ -1068,7 +1068,7 @@ public function getCreatedFromTenantId() /** * Sets created_from_tenant_id * - * @param string $created_from_tenant_id created_from_tenant_id + * @param string|null $created_from_tenant_id created_from_tenant_id * * @return self */ @@ -2401,11 +2401,11 @@ public function setIsEmailSuppressed($is_email_suppressed) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -2413,12 +2413,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -2443,11 +2443,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/UserBadge.php b/lib/Model/UserBadge.php index 87d5d10..44c446d 100644 --- a/lib/Model/UserBadge.php +++ b/lib/Model/UserBadge.php @@ -2,7 +2,7 @@ /** * UserBadge * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class UserBadge 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 $openAPIModelName = 'UserBadge'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ '_id' => 'string', 'user_id' => 'string', @@ -80,12 +80,12 @@ class UserBadge implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ '_id' => null, 'user_id' => null, @@ -109,10 +109,10 @@ class UserBadge implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ '_id' => false, 'user_id' => false, @@ -136,10 +136,10 @@ class UserBadge implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -375,14 +375,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -1009,11 +1009,11 @@ public function setUrlId($url_id) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -1021,12 +1021,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -1051,11 +1051,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/UserBadgeProgress.php b/lib/Model/UserBadgeProgress.php index 4f14ed5..fbc681f 100644 --- a/lib/Model/UserBadgeProgress.php +++ b/lib/Model/UserBadgeProgress.php @@ -2,7 +2,7 @@ /** * UserBadgeProgress * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class UserBadgeProgress 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 $openAPIModelName = 'UserBadgeProgress'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ '_id' => 'string', 'tenant_id' => 'string', @@ -70,12 +70,12 @@ class UserBadgeProgress implements ModelInterface, ArrayAccess, \JsonSerializabl ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ '_id' => null, 'tenant_id' => null, @@ -89,10 +89,10 @@ class UserBadgeProgress implements ModelInterface, ArrayAccess, \JsonSerializabl ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ '_id' => false, 'tenant_id' => false, @@ -106,10 +106,10 @@ class UserBadgeProgress implements ModelInterface, ArrayAccess, \JsonSerializabl ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -305,14 +305,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -609,11 +609,11 @@ public function setTosAcceptedAt($tos_accepted_at) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -621,12 +621,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -651,11 +651,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/UserNotification.php b/lib/Model/UserNotification.php index d18885f..88119fa 100644 --- a/lib/Model/UserNotification.php +++ b/lib/Model/UserNotification.php @@ -2,7 +2,7 @@ /** * UserNotification * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class UserNotification 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 $openAPIModelName = 'UserNotification'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ '_id' => 'string', 'tenant_id' => 'string', @@ -85,12 +85,12 @@ class UserNotification implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ '_id' => null, 'tenant_id' => null, @@ -119,10 +119,10 @@ class UserNotification implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ '_id' => false, 'tenant_id' => false, @@ -151,10 +151,10 @@ class UserNotification implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -410,14 +410,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -1193,11 +1193,11 @@ public function setFromUserNames($from_user_names) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -1205,12 +1205,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -1235,11 +1235,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/UserNotificationCount.php b/lib/Model/UserNotificationCount.php index 1b7b1b6..6292eb7 100644 --- a/lib/Model/UserNotificationCount.php +++ b/lib/Model/UserNotificationCount.php @@ -2,7 +2,7 @@ /** * UserNotificationCount * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class UserNotificationCount 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 $openAPIModelName = 'UserNotificationCount'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ '_id' => 'string', 'count' => 'float', @@ -65,12 +65,12 @@ class UserNotificationCount implements ModelInterface, ArrayAccess, \JsonSeriali ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ '_id' => null, 'count' => 'double', @@ -79,10 +79,10 @@ class UserNotificationCount implements ModelInterface, ArrayAccess, \JsonSeriali ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ '_id' => false, 'count' => false, @@ -91,10 +91,10 @@ class UserNotificationCount implements ModelInterface, ArrayAccess, \JsonSeriali ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -270,14 +270,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -433,11 +433,11 @@ public function setExpireAt($expire_at) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -445,12 +445,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -475,11 +475,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/UserNotificationWriteResponse.php b/lib/Model/UserNotificationWriteResponse.php index fe48851..3b92a05 100644 --- a/lib/Model/UserNotificationWriteResponse.php +++ b/lib/Model/UserNotificationWriteResponse.php @@ -2,7 +2,7 @@ /** * UserNotificationWriteResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class UserNotificationWriteResponse implements ModelInterface, ArrayAccess, \Jso public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'UserNotificationWriteResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'matched_count' => 'int', @@ -64,12 +64,12 @@ class UserNotificationWriteResponse implements ModelInterface, ArrayAccess, \Jso ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'matched_count' => 'int64', @@ -77,10 +77,10 @@ class UserNotificationWriteResponse implements ModelInterface, ArrayAccess, \Jso ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'matched_count' => false, @@ -88,10 +88,10 @@ class UserNotificationWriteResponse implements ModelInterface, ArrayAccess, \Jso ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -263,14 +263,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -396,11 +396,11 @@ public function setModifiedCount($modified_count) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -408,12 +408,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -438,11 +438,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/UserPresenceData.php b/lib/Model/UserPresenceData.php index fce0394..8fe5eea 100644 --- a/lib/Model/UserPresenceData.php +++ b/lib/Model/UserPresenceData.php @@ -2,7 +2,7 @@ /** * UserPresenceData * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class UserPresenceData 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 $openAPIModelName = 'UserPresenceData'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'url_id_ws' => 'string', 'user_id_ws' => 'string', @@ -64,12 +64,12 @@ class UserPresenceData implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'url_id_ws' => null, 'user_id_ws' => null, @@ -77,10 +77,10 @@ class UserPresenceData implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'url_id_ws' => false, 'user_id_ws' => false, @@ -88,10 +88,10 @@ class UserPresenceData implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -263,14 +263,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -387,11 +387,11 @@ public function setTenantIdWs($tenant_id_ws) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -399,12 +399,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -429,11 +429,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/UserReactsResponse.php b/lib/Model/UserReactsResponse.php index a4b436c..cfc1622 100644 --- a/lib/Model/UserReactsResponse.php +++ b/lib/Model/UserReactsResponse.php @@ -2,7 +2,7 @@ /** * UserReactsResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class UserReactsResponse 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 $openAPIModelName = 'UserReactsResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'reacts' => 'array>' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'reacts' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'reacts' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setReacts($reacts) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/UserSearchResult.php b/lib/Model/UserSearchResult.php index ce2749e..350c690 100644 --- a/lib/Model/UserSearchResult.php +++ b/lib/Model/UserSearchResult.php @@ -2,7 +2,7 @@ /** * UserSearchResult * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class UserSearchResult 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 $openAPIModelName = 'UserSearchResult'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'id' => 'string', 'name' => 'string', @@ -66,12 +66,12 @@ class UserSearchResult implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'id' => null, 'name' => null, @@ -81,10 +81,10 @@ class UserSearchResult implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'id' => false, 'name' => false, @@ -94,10 +94,10 @@ class UserSearchResult implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -292,14 +292,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -505,11 +505,11 @@ public function setType($type) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -517,12 +517,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -547,11 +547,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/UserSearchSection.php b/lib/Model/UserSearchSection.php index b12b260..c8eaeb0 100644 --- a/lib/Model/UserSearchSection.php +++ b/lib/Model/UserSearchSection.php @@ -2,7 +2,7 @@ /** * UserSearchSection * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** diff --git a/lib/Model/UserSearchSectionResult.php b/lib/Model/UserSearchSectionResult.php index 7ed7bd0..2e6f8cd 100644 --- a/lib/Model/UserSearchSectionResult.php +++ b/lib/Model/UserSearchSectionResult.php @@ -2,7 +2,7 @@ /** * UserSearchSectionResult * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class UserSearchSectionResult 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 $openAPIModelName = 'UserSearchSectionResult'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'section' => '\FastComments\Client\Model\UserSearchSection', 'users' => '\FastComments\Client\Model\UserSearchResult[]' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'section' => null, 'users' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'section' => false, 'users' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,11 +359,11 @@ public function setUsers($users) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/UserSessionInfo.php b/lib/Model/UserSessionInfo.php index 9f2187b..ed93aea 100644 --- a/lib/Model/UserSessionInfo.php +++ b/lib/Model/UserSessionInfo.php @@ -2,7 +2,7 @@ /** * UserSessionInfo * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class UserSessionInfo 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 $openAPIModelName = 'UserSessionInfo'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'id' => 'string', 'authorized' => 'bool', @@ -75,12 +75,12 @@ class UserSessionInfo implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'id' => null, 'authorized' => null, @@ -99,10 +99,10 @@ class UserSessionInfo implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'id' => false, 'authorized' => false, @@ -121,10 +121,10 @@ class UserSessionInfo implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -340,14 +340,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -782,11 +782,11 @@ public function setWebsiteUrl($website_url) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -794,12 +794,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -824,11 +824,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/UsersListLocation.php b/lib/Model/UsersListLocation.php index 0565eda..aaa183d 100644 --- a/lib/Model/UsersListLocation.php +++ b/lib/Model/UsersListLocation.php @@ -2,7 +2,7 @@ /** * UsersListLocation * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** diff --git a/lib/Model/VoteBodyParams.php b/lib/Model/VoteBodyParams.php index 5421af6..27714e5 100644 --- a/lib/Model/VoteBodyParams.php +++ b/lib/Model/VoteBodyParams.php @@ -2,7 +2,7 @@ /** * VoteBodyParams * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,17 +46,17 @@ class VoteBodyParams 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 $openAPIModelName = 'VoteBodyParams'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'commenter_email' => 'string', 'commenter_name' => 'string', @@ -65,12 +65,12 @@ class VoteBodyParams implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'commenter_email' => null, 'commenter_name' => null, @@ -79,10 +79,10 @@ class VoteBodyParams implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'commenter_email' => true, 'commenter_name' => true, @@ -91,10 +91,10 @@ class VoteBodyParams implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -285,14 +285,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -311,11 +311,11 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['commenter_email'] === null) { - $invalidProperties[] = "'commenter_email' can't be null"; + if ($this->container['commenter_email'] === null && !$this->isNullableSetToNull('commenter_email')) { + $invalidProperties[] = "'commenter_email' is required"; } - if ($this->container['commenter_name'] === null) { - $invalidProperties[] = "'commenter_name' can't be null"; + if ($this->container['commenter_name'] === null && !$this->isNullableSetToNull('commenter_name')) { + $invalidProperties[] = "'commenter_name' is required"; } if ($this->container['vote_dir'] === null) { $invalidProperties[] = "'vote_dir' can't be null"; @@ -329,8 +329,8 @@ public function listInvalidProperties() ); } - if ($this->container['url'] === null) { - $invalidProperties[] = "'url' can't be null"; + if ($this->container['url'] === null && !$this->isNullableSetToNull('url')) { + $invalidProperties[] = "'url' is required"; } return $invalidProperties; } @@ -350,7 +350,7 @@ public function valid() /** * Gets commenter_email * - * @return string + * @return string|null */ public function getCommenterEmail() { @@ -360,7 +360,7 @@ public function getCommenterEmail() /** * Sets commenter_email * - * @param string $commenter_email commenter_email + * @param string|null $commenter_email commenter_email * * @return self */ @@ -384,7 +384,7 @@ public function setCommenterEmail($commenter_email) /** * Gets commenter_name * - * @return string + * @return string|null */ public function getCommenterName() { @@ -394,7 +394,7 @@ public function getCommenterName() /** * Sets commenter_name * - * @param string $commenter_name commenter_name + * @param string|null $commenter_name commenter_name * * @return self */ @@ -455,7 +455,7 @@ public function setVoteDir($vote_dir) /** * Gets url * - * @return string + * @return string|null */ public function getUrl() { @@ -465,7 +465,7 @@ public function getUrl() /** * Sets url * - * @param string $url url + * @param string|null $url url * * @return self */ @@ -488,11 +488,11 @@ public function setUrl($url) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -500,12 +500,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -530,11 +530,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/VoteDeleteResponse.php b/lib/Model/VoteDeleteResponse.php index d35da34..eb642e4 100644 --- a/lib/Model/VoteDeleteResponse.php +++ b/lib/Model/VoteDeleteResponse.php @@ -2,7 +2,7 @@ /** * VoteDeleteResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,49 +46,49 @@ class VoteDeleteResponse 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 $openAPIModelName = 'VoteDeleteResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'status' => '\FastComments\Client\Model\APIStatus', 'was_pending_vote' => 'bool' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'was_pending_vote' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'was_pending_vote' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -256,14 +256,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -356,11 +356,11 @@ public function setWasPendingVote($was_pending_vote) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -368,12 +368,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -398,11 +398,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/VoteResponse.php b/lib/Model/VoteResponse.php index 7876d59..9f882b7 100644 --- a/lib/Model/VoteResponse.php +++ b/lib/Model/VoteResponse.php @@ -2,7 +2,7 @@ /** * VoteResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,19 +46,19 @@ class VoteResponse 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 $openAPIModelName = 'VoteResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ - 'status' => '\FastComments\Client\Model\VoteResponseStatus', + 'status' => 'string', 'vote_id' => 'string', 'is_verified' => 'bool', 'user' => '\FastComments\Client\Model\VoteResponseUser', @@ -66,12 +66,12 @@ class VoteResponse implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'status' => null, 'vote_id' => null, @@ -81,10 +81,10 @@ class VoteResponse implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'status' => false, 'vote_id' => false, @@ -94,10 +94,10 @@ class VoteResponse implements ModelInterface, ArrayAccess, \JsonSerializable ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -253,6 +253,23 @@ public function getModelName() return self::$openAPIModelName; } + public const STATUS_SUCCESS = 'success'; + public const STATUS_FAILED = 'failed'; + public const STATUS_PENDING_VERIFICATION = 'pending-verification'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_SUCCESS, + self::STATUS_FAILED, + self::STATUS_PENDING_VERIFICATION, + ]; + } /** * Associative array for storing property values @@ -277,14 +294,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -306,6 +323,15 @@ public function listInvalidProperties() if ($this->container['status'] === null) { $invalidProperties[] = "'status' can't be null"; } + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'status', must be one of '%s'", + $this->container['status'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -324,7 +350,7 @@ public function valid() /** * Gets status * - * @return \FastComments\Client\Model\VoteResponseStatus + * @return string */ public function getStatus() { @@ -334,7 +360,7 @@ public function getStatus() /** * Sets status * - * @param \FastComments\Client\Model\VoteResponseStatus $status status + * @param string $status status * * @return self */ @@ -343,6 +369,16 @@ public function setStatus($status) if (is_null($status)) { throw new \InvalidArgumentException('non-nullable status cannot be null'); } + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } $this->container['status'] = $status; return $this; @@ -458,11 +494,11 @@ public function setEditKey($edit_key) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -470,12 +506,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -500,11 +536,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/VoteResponseStatus.php b/lib/Model/VoteResponseStatus.php deleted file mode 100644 index 8b2ff67..0000000 --- a/lib/Model/VoteResponseStatus.php +++ /dev/null @@ -1,382 +0,0 @@ - - */ -class VoteResponseStatus implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'VoteResponse_status'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - - ]; - - /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ - protected static array $openAPINullables = [ - - ]; - - /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ - protected array $openAPINullablesSetToNull = []; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of nullable properties - * - * @return array - */ - protected static function openAPINullables(): array - { - return self::$openAPINullables; - } - - /** - * Array of nullable field names deliberately set to null - * - * @return boolean[] - */ - private function getOpenAPINullablesSetToNull(): array - { - return $this->openAPINullablesSetToNull; - } - - /** - * Setter - Array of nullable field names deliberately set to null - * - * @param boolean[] $openAPINullablesSetToNull - */ - private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void - { - $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; - } - - /** - * Checks if a property is nullable - * - * @param string $property - * @return bool - */ - public static function isNullable(string $property): bool - { - return self::openAPINullables()[$property] ?? false; - } - - /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool - */ - public function isNullableSetToNull(string $property): bool - { - return in_array($property, $this->getOpenAPINullablesSetToNull(), true); - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[]|null $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - } - - /** - * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName - * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the - * $this->openAPINullablesSetToNull array - * - * @param string $variableName - * @param array $fields - * @param mixed $defaultValue - */ - private function setIfExists(string $variableName, array $fields, $defaultValue): void - { - if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { - $this->openAPINullablesSetToNull[] = $variableName; - } - - $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/VoteResponseUser.php b/lib/Model/VoteResponseUser.php index 02300bf..613e31e 100644 --- a/lib/Model/VoteResponseUser.php +++ b/lib/Model/VoteResponseUser.php @@ -2,7 +2,7 @@ /** * VoteResponseUser * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -46,46 +46,46 @@ class VoteResponseUser 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 $openAPIModelName = 'VoteResponseUser'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'session_id' => 'string' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'session_id' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ 'session_id' => true ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -249,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, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -326,11 +326,11 @@ public function setSessionId($session_id) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -338,12 +338,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -368,11 +368,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/lib/Model/VoteStyle.php b/lib/Model/VoteStyle.php index 0b7f59f..c5abcda 100644 --- a/lib/Model/VoteStyle.php +++ b/lib/Model/VoteStyle.php @@ -2,7 +2,7 @@ /** * VoteStyle * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** diff --git a/lib/ObjectSerializer.php b/lib/ObjectSerializer.php index 6d5bf8d..9ce1c3a 100644 --- a/lib/ObjectSerializer.php +++ b/lib/ObjectSerializer.php @@ -2,7 +2,7 @@ /** * ObjectSerializer * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package FastComments\Client @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.0.0 * Contact: support@fastcomments.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.23.0-SNAPSHOT */ /** @@ -104,11 +104,11 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } 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; } @@ -140,7 +140,9 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) return $timestamp; + if (!is_string($timestamp)) { + return $timestamp; + } return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -168,20 +170,20 @@ public static function toPathValue($value) */ private static function isEmptyValue($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; } switch ($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. case 'int': case 'integer': return $value !== 0; @@ -190,16 +192,16 @@ private static function isEmptyValue($value, string $openApiType): bool case 'float': return $value !== 0 && $value !== 0.0; - # For boolean values, '' is considered empty + // For boolean values, '' is considered empty case 'bool': case 'boolean': return !in_array($value, [false, 0], true); - # For string values, '' is considered empty. + // For string values, '' is considered empty. case 'string': return $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: return true; } @@ -227,10 +229,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,8 +241,8 @@ public static function toQueryValue( } } - # Handle DateTime objects in query - if($openApiType === "\\DateTime" && $value instanceof \DateTime) { + // Handle DateTime objects in query + if ($openApiType === "\\DateTime" && $value instanceof \DateTime) { return ["{$paramName}" => $value->format(self::$dateTimeFormat)]; } @@ -250,10 +252,12 @@ public static function toQueryValue( // 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') ? $prop = "{$name}[{$k}]" : $k; + $prop = ($style === 'deepObject') ? "{$name}[{$k}]" : $k; if (is_array($v)) { $flattenArray($v, $prop, $result); @@ -324,24 +328,6 @@ public static function toHeaderValue($value) return self::toString($value); } - /** - * Take value and turn it into a string suitable for inclusion in - * the http body (form parameter). If it's a string, pass through unchanged - * If it's a datetime object, format it in ISO8601 - * - * @param string|\SplFileObject $value the value of the form parameter - * - * @return string the form string - */ - public static function toFormValue($value) - { - if ($value instanceof \SplFileObject) { - return $value->getRealPath(); - } else { - return self::toString($value); - } - } - /** * Take value and turn it into a string suitable for inclusion in * the parameter. If it's a string, pass through unchanged @@ -516,7 +502,7 @@ public static function deserialize($data, $class, $httpHeaders = null) $data = is_string($data) ? json_decode($data) : $data; if (is_array($data)) { - $data = (object)$data; + $data = (object) $data; } // If a discriminator is defined and points to a valid subclass, use it. @@ -555,20 +541,20 @@ public static function deserialize($data, $class, $httpHeaders = null) } /** - * 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). - * - * The function is copied from https://github.com/guzzle/psr7/blob/a243f80a1ca7fe8ceed4deee17f12c1930efe662/src/Query.php#L59-L112 - * with a modification which is described in https://github.com/guzzle/psr7/pull/603 - * - * @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. - */ + * 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). + * + * The function is copied from https://github.com/guzzle/psr7/blob/a243f80a1ca7fe8ceed4deee17f12c1930efe662/src/Query.php#L59-L112 + * with a modification which is described in https://github.com/guzzle/psr7/pull/603 + * + * @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) { @@ -613,6 +599,6 @@ public static function buildQuery(array $params, $encoding = PHP_QUERY_RFC3986): } } - return $qs ? (string) substr($qs, 0, -1) : ''; + return $qs ? substr($qs, 0, -1) : ''; } } diff --git a/openapi-generator-cli.jar b/openapi-generator-cli.jar new file mode 100644 index 0000000..7922aa8 Binary files /dev/null and b/openapi-generator-cli.jar differ diff --git a/openapi.json b/openapi.json index ca0225c..302747d 100644 --- a/openapi.json +++ b/openapi.json @@ -13107,9 +13107,9 @@ ] } }, - "/auth/my-account/moderate-comments/count": { + "/auth/my-account/moderate-comments/mod_api/count": { "get": { - "operationId": "GetCount", + "operationId": "getCount", "responses": { "200": { "description": "Ok", @@ -13137,6 +13137,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "text-search", @@ -13188,9 +13196,9 @@ ] } }, - "/auth/my-account/moderate-comments/api/ids": { + "/auth/my-account/moderate-comments/mod_api/api/ids": { "get": { - "operationId": "GetApiIds", + "operationId": "getApiIds", "responses": { "200": { "description": "Ok", @@ -13218,6 +13226,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "text-search", @@ -13277,9 +13293,9 @@ ] } }, - "/auth/my-account/moderate-comments/api/comments": { + "/auth/my-account/moderate-comments/mod_api/api/comments": { "get": { - "operationId": "GetApiComments", + "operationId": "getApiComments", "responses": { "200": { "description": "Ok", @@ -13307,6 +13323,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "page", @@ -13384,9 +13408,9 @@ ] } }, - "/auth/my-account/moderate-comments/api/export": { + "/auth/my-account/moderate-comments/mod_api/api/export": { "post": { - "operationId": "PostApiExport", + "operationId": "postApiExport", "responses": { "200": { "description": "Ok", @@ -13414,6 +13438,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "text-search", @@ -13465,9 +13497,9 @@ ] } }, - "/auth/my-account/moderate-comments/api/export/status": { + "/auth/my-account/moderate-comments/mod_api/api/export/status": { "get": { - "operationId": "GetApiExportStatus", + "operationId": "getApiExportStatus", "responses": { "200": { "description": "Ok", @@ -13495,6 +13527,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "batchJobId", @@ -13514,9 +13554,9 @@ ] } }, - "/auth/my-account/moderate-comments/search/users": { + "/auth/my-account/moderate-comments/mod_api/search/users": { "get": { - "operationId": "GetSearchUsers", + "operationId": "getSearchUsers", "responses": { "200": { "description": "Ok", @@ -13544,6 +13584,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "value", @@ -13563,9 +13611,9 @@ ] } }, - "/auth/my-account/moderate-comments/search/pages": { + "/auth/my-account/moderate-comments/mod_api/search/pages": { "get": { - "operationId": "GetSearchPages", + "operationId": "getSearchPages", "responses": { "200": { "description": "Ok", @@ -13593,6 +13641,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "value", @@ -13612,9 +13668,9 @@ ] } }, - "/auth/my-account/moderate-comments/search/sites": { + "/auth/my-account/moderate-comments/mod_api/search/sites": { "get": { - "operationId": "GetSearchSites", + "operationId": "getSearchSites", "responses": { "200": { "description": "Ok", @@ -13642,6 +13698,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "value", @@ -13661,9 +13725,9 @@ ] } }, - "/auth/my-account/moderate-comments/search/comments/summary": { + "/auth/my-account/moderate-comments/mod_api/search/comments/summary": { "get": { - "operationId": "GetSearchCommentsSummary", + "operationId": "getSearchCommentsSummary", "responses": { "200": { "description": "Ok", @@ -13691,6 +13755,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "value", @@ -13726,9 +13798,9 @@ ] } }, - "/auth/my-account/moderate-comments/search/suggest": { + "/auth/my-account/moderate-comments/mod_api/search/suggest": { "get": { - "operationId": "GetSearchSuggest", + "operationId": "getSearchSuggest", "responses": { "200": { "description": "Ok", @@ -13756,6 +13828,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "text-search", @@ -13775,9 +13855,9 @@ ] } }, - "/auth/my-account/moderate-comments/pre-ban-summary/{commentId}": { + "/auth/my-account/moderate-comments/mod_api/pre-ban-summary/{commentId}": { "get": { - "operationId": "GetPreBanSummary", + "operationId": "getPreBanSummary", "responses": { "200": { "description": "Ok", @@ -13805,6 +13885,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "path", "name": "commentId", @@ -13848,9 +13936,9 @@ ] } }, - "/auth/my-account/moderate-comments/bulk-pre-ban-summary": { + "/auth/my-account/moderate-comments/mod_api/bulk-pre-ban-summary": { "post": { - "operationId": "PostBulkPreBanSummary", + "operationId": "postBulkPreBanSummary", "responses": { "200": { "description": "Ok", @@ -13878,6 +13966,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "includeByUserIdAndEmail", @@ -13923,9 +14019,9 @@ } } }, - "/auth/my-account/moderate-comments/ban-user/from-comment/{commentId}": { + "/auth/my-account/moderate-comments/mod_api/ban-user/from-comment/{commentId}": { "post": { - "operationId": "PostBanUserFromComment", + "operationId": "postBanUserFromComment", "responses": { "200": { "description": "Ok", @@ -13953,6 +14049,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "path", "name": "commentId", @@ -14036,9 +14140,9 @@ ] } }, - "/auth/my-account/moderate-comments/ban-users/from-comment/{commentId}": { + "/auth/my-account/moderate-comments/mod_api/ban-users/from-comment/{commentId}": { "get": { - "operationId": "GetBanUsersFromComment", + "operationId": "getBanUsersFromComment", "responses": { "200": { "description": "Ok", @@ -14066,6 +14170,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "path", "name": "commentId", @@ -14085,9 +14197,9 @@ ] } }, - "/auth/my-account/moderate-comments/ban-user/undo": { + "/auth/my-account/moderate-comments/mod_api/ban-user/undo": { "post": { - "operationId": "PostBanUserUndo", + "operationId": "postBanUserUndo", "responses": { "200": { "description": "Ok", @@ -14115,6 +14227,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "sso", @@ -14136,16 +14256,16 @@ } } }, - "/auth/my-account/moderate-comments/remove-comment/{commentId}": { + "/auth/my-account/moderate-comments/mod_api/remove-comment/{commentId}": { "post": { - "operationId": "PostRemoveComment", + "operationId": "postRemoveComment", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "title": "PostRemoveCommentResponse", + "title": "PostRemoveCommentApiResponse", "anyOf": [ { "$ref": "#/components/schemas/DeleteCommentResult" @@ -14174,6 +14294,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "path", "name": "commentId", @@ -14182,6 +14310,14 @@ "type": "string" } }, + { + "in": "query", + "name": "broadcastId", + "required": false, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "sso", @@ -14193,9 +14329,9 @@ ] } }, - "/auth/my-account/moderate-comments/restore-deleted-comment/{commentId}": { + "/auth/my-account/moderate-comments/mod_api/restore-deleted-comment/{commentId}": { "post": { - "operationId": "PostRestoreDeletedComment", + "operationId": "postRestoreDeletedComment", "responses": { "200": { "description": "Ok", @@ -14223,6 +14359,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "path", "name": "commentId", @@ -14231,6 +14375,14 @@ "type": "string" } }, + { + "in": "query", + "name": "broadcastId", + "required": false, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "sso", @@ -14242,9 +14394,9 @@ ] } }, - "/auth/my-account/moderate-comments/flag-comment/{commentId}": { + "/auth/my-account/moderate-comments/mod_api/flag-comment/{commentId}": { "post": { - "operationId": "PostFlagComment", + "operationId": "postFlagComment", "responses": { "200": { "description": "Ok", @@ -14272,6 +14424,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "path", "name": "commentId", @@ -14280,6 +14440,14 @@ "type": "string" } }, + { + "in": "query", + "name": "broadcastId", + "required": false, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "sso", @@ -14291,9 +14459,9 @@ ] } }, - "/auth/my-account/moderate-comments/un-flag-comment/{commentId}": { + "/auth/my-account/moderate-comments/mod_api/un-flag-comment/{commentId}": { "post": { - "operationId": "PostUnFlagComment", + "operationId": "postUnFlagComment", "responses": { "200": { "description": "Ok", @@ -14321,6 +14489,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "path", "name": "commentId", @@ -14329,6 +14505,14 @@ "type": "string" } }, + { + "in": "query", + "name": "broadcastId", + "required": false, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "sso", @@ -14340,9 +14524,9 @@ ] } }, - "/auth/my-account/moderate-comments/set-comment-review-status/{commentId}": { + "/auth/my-account/moderate-comments/mod_api/set-comment-review-status/{commentId}": { "post": { - "operationId": "PostSetCommentReviewStatus", + "operationId": "postSetCommentReviewStatus", "responses": { "200": { "description": "Ok", @@ -14370,6 +14554,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "path", "name": "commentId", @@ -14386,6 +14578,14 @@ "type": "boolean" } }, + { + "in": "query", + "name": "broadcastId", + "required": false, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "sso", @@ -14397,9 +14597,9 @@ ] } }, - "/auth/my-account/moderate-comments/set-comment-spam-status/{commentId}": { + "/auth/my-account/moderate-comments/mod_api/set-comment-spam-status/{commentId}": { "post": { - "operationId": "PostSetCommentSpamStatus", + "operationId": "postSetCommentSpamStatus", "responses": { "200": { "description": "Ok", @@ -14427,6 +14627,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "path", "name": "commentId", @@ -14451,6 +14659,14 @@ "type": "boolean" } }, + { + "in": "query", + "name": "broadcastId", + "required": false, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "sso", @@ -14462,9 +14678,9 @@ ] } }, - "/auth/my-account/moderate-comments/set-comment-approval-status/{commentId}": { + "/auth/my-account/moderate-comments/mod_api/set-comment-approval-status/{commentId}": { "post": { - "operationId": "PostSetCommentApprovalStatus", + "operationId": "postSetCommentApprovalStatus", "responses": { "200": { "description": "Ok", @@ -14492,6 +14708,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "path", "name": "commentId", @@ -14508,6 +14732,14 @@ "type": "boolean" } }, + { + "in": "query", + "name": "broadcastId", + "required": false, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "sso", @@ -14519,9 +14751,9 @@ ] } }, - "/auth/my-account/moderate-comments/logs/{commentId}": { + "/auth/my-account/moderate-comments/mod_api/logs/{commentId}": { "get": { - "operationId": "GetLogs", + "operationId": "getLogs", "responses": { "200": { "description": "Ok", @@ -14549,6 +14781,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "path", "name": "commentId", @@ -14568,9 +14808,9 @@ ] } }, - "/auth/my-account/moderate-comments/comment/{commentId}": { + "/auth/my-account/moderate-comments/mod_api/comment/{commentId}": { "get": { - "operationId": "GetModerationComment", + "operationId": "getModerationComment", "responses": { "200": { "description": "Ok", @@ -14598,6 +14838,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "path", "name": "commentId", @@ -14633,9 +14881,9 @@ ] } }, - "/auth/my-account/moderate-comments/comments-by-ids": { + "/auth/my-account/moderate-comments/mod_api/comments-by-ids": { "post": { - "operationId": "PostCommentsByIds", + "operationId": "postCommentsByIds", "responses": { "200": { "description": "Ok", @@ -14663,6 +14911,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "sso", @@ -14684,9 +14940,9 @@ } } }, - "/auth/my-account/moderate-comments/comment-children/{commentId}": { + "/auth/my-account/moderate-comments/mod_api/comment-children/{commentId}": { "get": { - "operationId": "GetCommentChildren", + "operationId": "getCommentChildren", "responses": { "200": { "description": "Ok", @@ -14714,6 +14970,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "path", "name": "commentId", @@ -14733,9 +14997,9 @@ ] } }, - "/auth/my-account/moderate-comments/get-comment-text/{commentId}": { + "/auth/my-account/moderate-comments/mod_api/get-comment-text/{commentId}": { "get": { - "operationId": "GetModerationCommentText", + "operationId": "getModerationCommentText", "responses": { "200": { "description": "Ok", @@ -14763,6 +15027,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "path", "name": "commentId", @@ -14782,9 +15054,9 @@ ] } }, - "/auth/my-account/moderate-comments/set-comment-text/{commentId}": { + "/auth/my-account/moderate-comments/mod_api/set-comment-text/{commentId}": { "post": { - "operationId": "PostSetCommentText", + "operationId": "postSetCommentText", "responses": { "200": { "description": "Ok", @@ -14812,6 +15084,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "path", "name": "commentId", @@ -14820,6 +15100,14 @@ "type": "string" } }, + { + "in": "query", + "name": "broadcastId", + "required": false, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "sso", @@ -14841,9 +15129,9 @@ } } }, - "/auth/my-account/moderate-comments/adjust-comment-votes/{commentId}": { + "/auth/my-account/moderate-comments/mod_api/adjust-comment-votes/{commentId}": { "post": { - "operationId": "PostAdjustCommentVotes", + "operationId": "postAdjustCommentVotes", "responses": { "200": { "description": "Ok", @@ -14871,6 +15159,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "path", "name": "commentId", @@ -14879,6 +15175,14 @@ "type": "string" } }, + { + "in": "query", + "name": "broadcastId", + "required": false, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "sso", @@ -14900,9 +15204,9 @@ } } }, - "/auth/my-account/moderate-comments/vote/{commentId}": { + "/auth/my-account/moderate-comments/mod_api/vote/{commentId}": { "post": { - "operationId": "PostVote", + "operationId": "postVote", "responses": { "200": { "description": "Ok", @@ -14930,6 +15234,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "path", "name": "commentId", @@ -14946,6 +15258,14 @@ "type": "string" } }, + { + "in": "query", + "name": "broadcastId", + "required": false, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "sso", @@ -14957,9 +15277,9 @@ ] } }, - "/auth/my-account/moderate-comments/vote/{commentId}/{voteId}": { + "/auth/my-account/moderate-comments/mod_api/vote/{commentId}/{voteId}": { "delete": { - "operationId": "DeleteModerationVote", + "operationId": "deleteModerationVote", "responses": { "200": { "description": "Ok", @@ -14987,6 +15307,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "path", "name": "commentId", @@ -15003,6 +15331,14 @@ "type": "string" } }, + { + "in": "query", + "name": "broadcastId", + "required": false, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "sso", @@ -15014,9 +15350,9 @@ ] } }, - "/auth/my-account/moderate-comments/get-comment-ban-status/{commentId}": { + "/auth/my-account/moderate-comments/mod_api/get-comment-ban-status/{commentId}": { "get": { - "operationId": "GetCommentBanStatus", + "operationId": "getCommentBanStatus", "responses": { "200": { "description": "Ok", @@ -15044,6 +15380,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "path", "name": "commentId", @@ -15063,9 +15407,9 @@ ] } }, - "/auth/my-account/moderate-comments/user-ban-preference": { + "/auth/my-account/moderate-comments/mod_api/user-ban-preference": { "get": { - "operationId": "GetUserBanPreference", + "operationId": "getUserBanPreference", "responses": { "200": { "description": "Ok", @@ -15093,6 +15437,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "sso", @@ -15104,9 +15456,9 @@ ] } }, - "/auth/my-account/moderate-comments/get-manual-badges": { + "/auth/my-account/moderate-comments/mod_api/get-manual-badges": { "get": { - "operationId": "GetManualBadges", + "operationId": "getManualBadges", "responses": { "200": { "description": "Ok", @@ -15134,6 +15486,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "sso", @@ -15145,9 +15505,9 @@ ] } }, - "/auth/my-account/moderate-comments/get-manual-badges-for-user": { + "/auth/my-account/moderate-comments/mod_api/get-manual-badges-for-user": { "get": { - "operationId": "GetManualBadgesForUser", + "operationId": "getManualBadgesForUser", "responses": { "200": { "description": "Ok", @@ -15175,6 +15535,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "badgesUserId", @@ -15202,9 +15570,9 @@ ] } }, - "/auth/my-account/moderate-comments/award-badge": { + "/auth/my-account/moderate-comments/mod_api/award-badge": { "put": { - "operationId": "PutAwardBadge", + "operationId": "putAwardBadge", "responses": { "200": { "description": "Ok", @@ -15232,6 +15600,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "badgeId", @@ -15275,9 +15651,9 @@ ] } }, - "/auth/my-account/moderate-comments/remove-badge": { + "/auth/my-account/moderate-comments/mod_api/remove-badge": { "put": { - "operationId": "PutRemoveBadge", + "operationId": "putRemoveBadge", "responses": { "200": { "description": "Ok", @@ -15305,6 +15681,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "badgeId", @@ -15348,9 +15732,9 @@ ] } }, - "/auth/my-account/moderate-comments/get-trust-factor": { + "/auth/my-account/moderate-comments/mod_api/get-trust-factor": { "get": { - "operationId": "GetTrustFactor", + "operationId": "getTrustFactor", "responses": { "200": { "description": "Ok", @@ -15378,6 +15762,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "userId", @@ -15397,9 +15789,9 @@ ] } }, - "/auth/my-account/moderate-comments/set-trust-factor": { + "/auth/my-account/moderate-comments/mod_api/set-trust-factor": { "put": { - "operationId": "SetTrustFactor", + "operationId": "setTrustFactor", "responses": { "200": { "description": "Ok", @@ -15427,6 +15819,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "userId", @@ -15454,9 +15854,9 @@ ] } }, - "/auth/my-account/moderate-comments/get-user-internal-profile": { + "/auth/my-account/moderate-comments/mod_api/get-user-internal-profile": { "get": { - "operationId": "GetUserInternalProfile", + "operationId": "getUserInternalProfile", "responses": { "200": { "description": "Ok", @@ -15484,6 +15884,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "commentId", @@ -15503,9 +15911,9 @@ ] } }, - "/auth/my-account/moderate-comments/reopen-thread": { + "/auth/my-account/moderate-comments/mod_api/reopen-thread": { "put": { - "operationId": "PutReopenThread", + "operationId": "putReopenThread", "responses": { "200": { "description": "Ok", @@ -15533,6 +15941,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "urlId", @@ -15552,9 +15968,9 @@ ] } }, - "/auth/my-account/moderate-comments/close-thread": { + "/auth/my-account/moderate-comments/mod_api/close-thread": { "put": { - "operationId": "PutCloseThread", + "operationId": "putCloseThread", "responses": { "200": { "description": "Ok", @@ -15582,6 +15998,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "urlId", @@ -15601,9 +16025,9 @@ ] } }, - "/auth/my-account/moderate-comments/banned-users/counts": { + "/auth/my-account/moderate-comments/banned-users/mod_api/counts": { "get": { - "operationId": "GetCounts", + "operationId": "getCounts", "responses": { "200": { "description": "Ok", @@ -15631,6 +16055,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "sso", @@ -22595,7 +23027,7 @@ { "in": "query", "name": "tenantId", - "required": false, + "required": true, "schema": { "type": "string" } @@ -22647,7 +23079,7 @@ { "in": "query", "name": "tenantId", - "required": false, + "required": true, "schema": { "type": "string" } @@ -22697,17 +23129,17 @@ ], "parameters": [ { - "in": "path", - "name": "tag", + "in": "query", + "name": "tenantId", "required": true, "schema": { "type": "string" } }, { - "in": "query", - "name": "tenantId", - "required": false, + "in": "path", + "name": "tag", + "required": true, "schema": { "type": "string" } @@ -22755,17 +23187,17 @@ ], "parameters": [ { - "in": "path", - "name": "tag", + "in": "query", + "name": "tenantId", "required": true, "schema": { "type": "string" } }, { - "in": "query", - "name": "tenantId", - "required": false, + "in": "path", + "name": "tag", + "required": true, "schema": { "type": "string" } diff --git a/test/Api/DefaultApiTest.php b/test/Api/DefaultApiTest.php index 8778bf1..8ee4436 100644 --- a/test/Api/DefaultApiTest.php +++ b/test/Api/DefaultApiTest.php @@ -1,7 +1,7 @@ setHost('https://eu.fastcomments.com'); // Uncomment to use EU endpoint $apiInstance = new PublicApi(new Client(), $config); - $response = $apiInstance->getCommentsPublic( - $this->tenantId, - 'sdk-test-page' - ); + $response = $apiInstance->getCommentsPublic($this->tenantId, 'sdk-test-page'); $this->assertNotNull($response); } @@ -95,20 +92,13 @@ public function testPublicAPIWithSecureSSO(): void 'sdk-test-php', 'test-' . $timestamp, $commentData, - null, - $token + ['sso' => $token] ); $this->assertNotNull($createResponse); // Get comments with SSO - $getResponse = $publicApi->getCommentsPublic( - $this->tenantId, - 'sdk-test-php', - null, - null, - $token - ); + $getResponse = $publicApi->getCommentsPublic($this->tenantId, 'sdk-test-php', ['sso' => $token]); $this->assertNotNull($getResponse); } @@ -150,8 +140,7 @@ public function testDefaultAPIWithAPIKey(): void $testUrlId, 'test-' . $timestamp, $commentData, - null, - $token + ['sso' => $token] ); $this->assertNotNull($createResponse); @@ -165,17 +154,7 @@ public function testDefaultAPIWithAPIKey(): void $defaultConfig->setApiKey('x-api-key', $this->apiKey); $defaultApi = new DefaultApi(new Client(), $defaultConfig); - $getResponse = $defaultApi->getComments( - $this->tenantId, - null, // page - null, // limit - null, // skip - null, // asTree - null, // skipChildren - null, // limitChildren - null, // maxTreeDepth - $testUrlId // urlId - ); + $getResponse = $defaultApi->getComments($this->tenantId, ['url_id' => $testUrlId]); $this->assertNotNull($getResponse); @@ -232,8 +211,7 @@ public function testPublicAPICreateAndFetch(): void $testUrlId, 'test-' . $timestamp, $commentData, - null, - $token + ['sso' => $token] ); $this->assertNotNull($createResponse); @@ -242,13 +220,7 @@ public function testPublicAPICreateAndFetch(): void // Step 2: Fetch the comment back using PUBLIC API with SSO echo "Step 2: Fetching comments for page '" . $testUrlId . "' with SSO...\n"; - $getResponse = $publicApi->getCommentsPublic( - $this->tenantId, - $testUrlId, - null, // page - null, // limit - $token // ssoToken - ); + $getResponse = $publicApi->getCommentsPublic($this->tenantId, $testUrlId, ['sso' => $token]); $this->assertNotNull($getResponse); diff --git a/update.sh b/update.sh index fcd23cd..ad9f391 100755 --- a/update.sh +++ b/update.sh @@ -1,8 +1,14 @@ #!/bin/bash +# FastComments openapi-generator build (fork). The stock generator ignores +# useSingleRequestParameter for php; this build wires it. Just a jar; downloaded on demand. +JAR_URL="https://github.com/winrid/openapi-generator/releases/download/fastcomments-build-20260630/openapi-generator-cli.jar" +JAR_FILE="./openapi-generator-cli.jar" +[ -f "$JAR_FILE" ] || wget -q "$JAR_URL" -O "$JAR_FILE" + rm -rf lib/Api lib/Model docs/Api docs/Model test/Api test/Model -wget http://localhost:3001/js/swagger.json -O ./openapi.json -openapi-generator-cli generate -i ./openapi.json -g php -o . -c config.json +wget -q http://localhost:3001/js/swagger.json -O ./openapi.json +java -jar "$JAR_FILE" generate -i ./openapi.json -g php -o . -c config.json # Fix composer.json to ensure it has required fields node fix-composer.js