From 84ca70abb10025313f91777dc88fa36fc07ae147 Mon Sep 17 00:00:00 2001 From: "quantcloud[bot]" Date: Thu, 18 Dec 2025 04:57:34 +0000 Subject: [PATCH] feat(sdk): v4.8.0 - Auto-generated from unified API spec Generated from unified API spec v4.8.0 Changes: - Auto-generated SDK updates This PR was automatically created by the API generation pipeline. --- .openapi-generator/FILES | 5 +- .openapi-generator/VERSION | 2 +- README.md | 7 +- docs/Api/BackupManagementApi.md | 24 +- docs/Api/CommandsApi.md | 14 +- docs/Api/ComposeApi.md | 14 +- docs/Api/ContainersApi.md | 14 +- docs/Api/CrawlerSchedulesApi.md | 6 +- docs/Api/CrawlersApi.md | 59 +- docs/Api/CronApi.md | 46 +- docs/Api/DomainsApi.md | 32 +- docs/Api/EnvironmentsApi.md | 50 +- docs/Api/HeadersApi.md | 24 +- docs/Api/KVApi.md | 86 +- docs/Api/OrganizationsApi.md | 4 +- docs/Api/ProjectsApi.md | 32 +- docs/Api/PurgeApi.md | 8 +- docs/Api/SSHAccessApi.md | 12 +- docs/Api/ScalingPolicyApi.md | 18 +- docs/Api/VariablesApi.md | 18 +- docs/Api/VolumesApi.md | 24 +- docs/Model/V2RuleProxyAction.md | 2 +- docs/Model/V2RuleProxyActionWafConfig.md | 22 + docs/Model/V2RuleProxyRequest.md | 2 +- docs/Model/ValidateComposeRequestOneOf.md | 11 + src/Api/AIAgentsApi.php | 488 +- src/Api/AICustomToolsApi.php | 268 +- src/Api/AIInferenceApi.php | 338 +- src/Api/AIModelsApi.php | 241 +- src/Api/AIMonitoringApi.php | 138 +- src/Api/AISessionsApi.php | 538 +- src/Api/AIToolsApi.php | 391 +- src/Api/AIVectorDatabaseApi.php | 478 +- src/Api/ApplicationsApi.php | 374 +- src/Api/BackupManagementApi.php | 441 +- src/Api/CommandsApi.php | 268 +- src/Api/ComposeApi.php | 344 +- src/Api/ContainersApi.php | 64 +- src/Api/CrawlerSchedulesApi.php | 609 +- src/Api/CrawlersApi.php | 1188 ++-- src/Api/CronApi.php | 514 +- src/Api/DomainsApi.php | 510 +- src/Api/EnvironmentsApi.php | 702 ++- src/Api/HeadersApi.php | 397 +- src/Api/KVApi.php | 1439 +++-- src/Api/OrganizationsApi.php | 379 +- src/Api/ProjectsApi.php | 689 ++- src/Api/PurgeApi.php | 214 +- src/Api/RulesApi.php | 5043 +++++++++++++---- src/Api/SSHAccessApi.php | 158 +- src/Api/ScalingPolicyApi.php | 67 +- src/Api/VariablesApi.php | 70 +- src/Api/VolumesApi.php | 271 +- src/ApiException.php | 4 +- src/Configuration.php | 8 +- src/FormDataProcessor.php | 242 - src/HeaderSelector.php | 4 +- src/Model/Application.php | 8 +- src/Model/ApplicationDatabase.php | 8 +- .../ApplicationDeploymentInformationInner.php | 8 +- src/Model/ApplicationEnvironmentsInner.php | 8 +- src/Model/ApplicationFilesystem.php | 8 +- src/Model/ApplicationImageReference.php | 8 +- .../BulkSetEnvironmentVariablesRequest.php | 8 +- ...onmentVariablesRequestEnvironmentInner.php | 8 +- src/Model/ChatInference200Response.php | 8 +- .../ChatInference200ResponseResponse.php | 8 +- ...hatInference200ResponseResponseToolUse.php | 8 +- ...ference200ResponseResponseToolUseOneOf.php | 8 +- ...e200ResponseResponseToolUseOneOf1Inner.php | 8 +- ...e200ResponseResponseToolUseOneOfResult.php | 8 +- src/Model/ChatInference200ResponseUsage.php | 8 +- src/Model/ChatInferenceRequest.php | 8 +- .../ChatInferenceRequestMessagesInner.php | 8 +- ...atInferenceRequestMessagesInnerContent.php | 8 +- ...eRequestMessagesInnerContentOneOfInner.php | 8 +- ...estMessagesInnerContentOneOfInnerOneOf.php | 8 +- ...stMessagesInnerContentOneOfInnerOneOf1.php | 8 +- ...sagesInnerContentOneOfInnerOneOf1Image.php | 8 +- ...nnerContentOneOfInnerOneOf1ImageSource.php | 8 +- ...stMessagesInnerContentOneOfInnerOneOf2.php | 8 +- ...sagesInnerContentOneOfInnerOneOf2Video.php | 8 +- ...nnerContentOneOfInnerOneOf2VideoSource.php | 8 +- ...stMessagesInnerContentOneOfInnerOneOf3.php | 8 +- ...esInnerContentOneOfInnerOneOf3Document.php | 8 +- ...rContentOneOfInnerOneOf3DocumentSource.php | 8 +- .../ChatInferenceRequestResponseFormat.php | 8 +- src/Model/ChatInferenceRequestToolConfig.php | 8 +- ...atInferenceRequestToolConfigToolsInner.php | 8 +- ...nceRequestToolConfigToolsInnerToolSpec.php | 8 +- ...oolConfigToolsInnerToolSpecInputSchema.php | 8 +- src/Model/ChatInferenceStreamRequest.php | 8 +- ...hatInferenceStreamRequestMessagesInner.php | 8 +- ...renceStreamRequestMessagesInnerContent.php | 8 +- src/Model/ChatWithAIAgent200Response.php | 8 +- .../ChatWithAIAgent200ResponseResponse.php | 8 +- ...hatWithAIAgent200ResponseResponseUsage.php | 8 +- src/Model/ChatWithAIAgentRequest.php | 8 +- src/Model/Command.php | 8 +- src/Model/Compose.php | 8 +- src/Model/Container.php | 8 +- src/Model/ContainerDependsOnInner.php | 8 +- src/Model/ContainerEnvironmentInner.php | 8 +- src/Model/ContainerHealthCheck.php | 8 +- src/Model/ContainerImageReference.php | 8 +- src/Model/ContainerMountPointsInner.php | 8 +- src/Model/ContainerOriginProtectionConfig.php | 8 +- src/Model/ContainerSecretsInner.php | 8 +- src/Model/CrawlersRun200Response.php | 8 +- src/Model/CrawlersRunRequest.php | 8 +- src/Model/CreateAIAgent201Response.php | 8 +- src/Model/CreateAIAgentRequest.php | 8 +- src/Model/CreateAISession201Response.php | 8 +- src/Model/CreateAISessionRequest.php | 8 +- ...teAISessionRequestInitialMessagesInner.php | 8 +- src/Model/CreateApplication403Response.php | 8 +- src/Model/CreateApplicationRequest.php | 8 +- .../CreateApplicationRequestDatabase.php | 8 +- ...eateApplicationRequestEnvironmentInner.php | 8 +- .../CreateApplicationRequestFilesystem.php | 8 +- src/Model/CreateBackup202Response.php | 8 +- src/Model/CreateBackupRequest.php | 8 +- src/Model/CreateCommandRequest.php | 8 +- src/Model/CreateCronJobRequest.php | 8 +- src/Model/CreateCustomTool201Response.php | 8 +- src/Model/CreateCustomToolRequest.php | 8 +- src/Model/CreateEnvironment403Response.php | 8 +- src/Model/CreateEnvironmentRequest.php | 8 +- ...eateEnvironmentRequestEnvironmentInner.php | 8 +- .../CreateVectorCollection201Response.php | 8 +- ...eVectorCollection201ResponseCollection.php | 8 +- src/Model/CreateVectorCollectionRequest.php | 8 +- src/Model/CreateVolumeRequest.php | 8 +- src/Model/Cron.php | 8 +- src/Model/CronRun.php | 8 +- src/Model/DeleteAIAgent200Response.php | 8 +- src/Model/DeleteAISession200Response.php | 8 +- src/Model/DeleteBackup200Response.php | 8 +- src/Model/DeleteCustomTool200Response.php | 8 +- .../DeleteVectorCollection200Response.php | 8 +- src/Model/DownloadBackup200Response.php | 8 +- src/Model/Embeddings200Response.php | 8 +- src/Model/Embeddings200ResponseEmbeddings.php | 8 +- src/Model/Embeddings200ResponseUsage.php | 8 +- src/Model/EmbeddingsRequest.php | 8 +- src/Model/EmbeddingsRequestInput.php | 8 +- src/Model/Environment.php | 8 +- src/Model/EnvironmentResponse.php | 8 +- src/Model/EnvironmentSummary.php | 8 +- src/Model/ExtendAISession200Response.php | 8 +- src/Model/ExtendAISessionRequest.php | 8 +- src/Model/GetAIAgent200Response.php | 8 +- src/Model/GetAIAgent200ResponseAgent.php | 8 +- src/Model/GetAIModel200Response.php | 8 +- .../GetAIModel200ResponseCapabilities.php | 8 +- src/Model/GetAIModel200ResponsePricing.php | 8 +- src/Model/GetAIModel404Response.php | 8 +- src/Model/GetAISession200Response.php | 8 +- .../GetAIToolExecutionStatus200Response.php | 8 +- ...AIToolExecutionStatus200ResponseResult.php | 8 +- .../GetAIToolExecutionStatus404Response.php | 8 +- src/Model/GetAIUsageStats200Response.php | 8 +- ...GetAIUsageStats200ResponseByModelValue.php | 8 +- .../GetEcrLoginCredentials200Response.php | 8 +- src/Model/GetEnvironmentLogs200Response.php | 8 +- ...vironmentLogs200ResponseLogEventsInner.php | 8 +- .../GetSshAccessCredentials200Response.php | 8 +- ...ccessCredentials200ResponseCredentials.php | 8 +- src/Model/GetVectorCollection200Response.php | 8 +- ...tVectorCollection200ResponseCollection.php | 8 +- src/Model/ImageGeneration200Response.php | 8 +- src/Model/ImageGenerationRequest.php | 8 +- ...nerationRequestBackgroundRemovalParams.php | 8 +- ...tionRequestColorGuidedGenerationParams.php | 8 +- ...GenerationRequestImageGenerationConfig.php | 8 +- ...eGenerationRequestImageVariationParams.php | 8 +- ...ImageGenerationRequestInPaintingParams.php | 8 +- ...mageGenerationRequestOutPaintingParams.php | 8 +- ...mageGenerationRequestTextToImageParams.php | 8 +- src/Model/KVItemsCreate200Response.php | 8 +- src/Model/KVItemsDelete200Response.php | 8 +- src/Model/KVItemsShow200Response.php | 8 +- src/Model/KVItemsShow200ResponseValue.php | 8 +- src/Model/ListAIAgents200Response.php | 8 +- .../ListAIAgents200ResponseAgentsInner.php | 8 +- src/Model/ListAIModels200Response.php | 8 +- .../ListAIModels200ResponseModelsInner.php | 8 +- ...dels200ResponseModelsInnerCapabilities.php | 8 +- src/Model/ListAISessions200ResponseInner.php | 8 +- src/Model/ListAIToolExecutions200Response.php | 8 +- ...olExecutions200ResponseExecutionsInner.php | 8 +- src/Model/ListAIToolNames200Response.php | 8 +- src/Model/ListAITools200Response.php | 8 +- .../ListAITools200ResponseToolsInner.php | 8 +- ...stAITools200ResponseToolsInnerToolSpec.php | 8 +- ...0ResponseToolsInnerToolSpecInputSchema.php | 8 +- src/Model/ListBackups200Response.php | 8 +- .../ListBackups200ResponseBackupsInner.php | 8 +- src/Model/ListBackups422Response.php | 8 +- src/Model/ListCustomTools200Response.php | 8 +- .../ListCustomTools200ResponseToolsInner.php | 8 +- .../ListVectorCollections200Response.php | 8 +- ...Collections200ResponseCollectionsInner.php | 8 +- src/Model/ModelInterface.php | 4 +- .../OrganizationsList200ResponseInner.php | 8 +- .../PatchEnvironmentCompose202Response.php | 8 +- ...entCompose202ResponseSpotConfiguration.php | 8 +- .../PatchEnvironmentCompose400Response.php | 8 +- src/Model/PatchEnvironmentComposeRequest.php | 8 +- ...ronmentComposeRequestSpotConfiguration.php | 8 +- src/Model/PurgeCreateRequest.php | 8 +- .../QueryVectorCollection200Response.php | 8 +- ...ectorCollection200ResponseResultsInner.php | 8 +- ...lection200ResponseResultsInnerMetadata.php | 8 +- src/Model/QueryVectorCollectionRequest.php | 8 +- src/Model/ScalingPolicy.php | 8 +- src/Model/SpotConfiguration.php | 8 +- src/Model/SyncOperation.php | 8 +- src/Model/SyncToEnvironmentRequest.php | 8 +- src/Model/UpdateAIAgent200Response.php | 8 +- src/Model/UpdateAIAgentRequest.php | 8 +- src/Model/UpdateAISession200Response.php | 8 +- src/Model/UpdateAISessionRequest.php | 8 +- ...UpdateAISessionRequestNewMessagesInner.php | 8 +- src/Model/UpdateCronJobRequest.php | 8 +- src/Model/UpdateEnvironmentRequest.php | 8 +- src/Model/UpdateEnvironmentStateRequest.php | 8 +- .../UpdateEnvironmentVariableRequest.php | 8 +- .../UploadVectorDocuments200Response.php | 8 +- src/Model/UploadVectorDocumentsRequest.php | 8 +- ...adVectorDocumentsRequestDocumentsInner.php | 8 +- ...DocumentsRequestDocumentsInnerMetadata.php | 8 +- src/Model/V1ContentItem.php | 8 +- src/Model/V1ContentListResponse.php | 8 +- src/Model/V1ContentRequest.php | 8 +- src/Model/V1DeleteResponse.php | 8 +- src/Model/V1Error.php | 8 +- src/Model/V1FormSubmissionItem.php | 8 +- src/Model/V1FormSubmissionListResponse.php | 8 +- src/Model/V1GetMetricSeriesResponse.php | 8 +- src/Model/V1GetMetricSeriesResponseData.php | 8 +- src/Model/V1GetMetricsResponse.php | 8 +- src/Model/V1GetMetricsResponseData.php | 8 +- src/Model/V1GlobalMetaResponse.php | 8 +- src/Model/V1GlobalMetaResponseGlobalMeta.php | 8 +- src/Model/V1Info.php | 8 +- src/Model/V1Meta.php | 8 +- src/Model/V1MetricDayStats.php | 8 +- src/Model/V1MetricMinuteStats.php | 8 +- src/Model/V1MetricMonthStats.php | 8 +- src/Model/V1PingResponse.php | 8 +- src/Model/V1ProxyItem.php | 8 +- src/Model/V1ProxyListResponse.php | 8 +- src/Model/V1RedirectItem.php | 8 +- src/Model/V1RedirectListResponse.php | 8 +- src/Model/V1RedirectRequest.php | 8 +- src/Model/V1RedirectResponse.php | 8 +- src/Model/V1Revision.php | 8 +- src/Model/V1RevisionsResponse.php | 8 +- src/Model/V1SearchHit.php | 8 +- src/Model/V1SearchItemsResponse.php | 8 +- src/Model/V1SearchMutationResponse.php | 8 +- src/Model/V1SearchRecord.php | 8 +- src/Model/V1SearchResponse.php | 8 +- src/Model/V1SeriesPointDay.php | 8 +- src/Model/V1SeriesPointMonth.php | 8 +- src/Model/V1Transition.php | 8 +- src/Model/V1UploadResponse.php | 8 +- src/Model/V1UrlMetaRequest.php | 8 +- src/Model/V1UrlMetaResponse.php | 8 +- src/Model/V1WafLogItem.php | 8 +- src/Model/V1WafLogListResponse.php | 8 +- src/Model/V2Crawler.php | 8 +- src/Model/V2CrawlerAssets.php | 8 +- src/Model/V2CrawlerAssetsNetworkIntercept.php | 8 +- src/Model/V2CrawlerAssetsParser.php | 8 +- src/Model/V2CrawlerRequest.php | 8 +- src/Model/V2CrawlerRun.php | 8 +- src/Model/V2CrawlerSchedule.php | 8 +- src/Model/V2CrawlerScheduleRequest.php | 8 +- src/Model/V2CrawlerSitemapInner.php | 8 +- src/Model/V2CustomHeaderRequest.php | 8 +- src/Model/V2Domain.php | 8 +- src/Model/V2DomainDnsGoLiveRecordsInner.php | 8 +- .../V2DomainDnsValidationRecordsInner.php | 8 +- src/Model/V2DomainRequest.php | 8 +- src/Model/V2Error.php | 8 +- src/Model/V2Organization.php | 8 +- src/Model/V2OrganizationRequest.php | 8 +- src/Model/V2Project.php | 8 +- src/Model/V2ProjectRequest.php | 8 +- src/Model/V2Rule.php | 8 +- src/Model/V2RuleAuth.php | 8 +- src/Model/V2RuleAuthAction.php | 8 +- src/Model/V2RuleAuthRequest.php | 8 +- src/Model/V2RuleBotChallenge.php | 8 +- src/Model/V2RuleBotChallengeAction.php | 8 +- src/Model/V2RuleBotChallengeRequest.php | 8 +- src/Model/V2RuleContentFilter.php | 8 +- src/Model/V2RuleContentFilterAction.php | 8 +- src/Model/V2RuleContentFilterRequest.php | 8 +- src/Model/V2RuleCustomResponse.php | 8 +- src/Model/V2RuleCustomResponseAction.php | 8 +- src/Model/V2RuleCustomResponseRequest.php | 8 +- src/Model/V2RuleFunction.php | 8 +- src/Model/V2RuleFunctionAction.php | 8 +- src/Model/V2RuleFunctionRequest.php | 8 +- src/Model/V2RuleHeader.php | 8 +- src/Model/V2RuleHeaderAction.php | 8 +- src/Model/V2RuleHeaderRequest.php | 8 +- src/Model/V2RuleProxy.php | 8 +- src/Model/V2RuleProxyAction.php | 14 +- src/Model/V2RuleProxyActionNotifyConfig.php | 8 +- .../V2RuleProxyActionQuantCloudSelection.php | 8 +- src/Model/V2RuleProxyActionWafConfig.php | 902 +++ src/Model/V2RuleProxyRequest.php | 14 +- src/Model/V2RuleRedirect.php | 8 +- src/Model/V2RuleRedirectAction.php | 8 +- src/Model/V2RuleRedirectRequest.php | 8 +- src/Model/V2RuleRequest.php | 8 +- src/Model/V2RuleServeStatic.php | 8 +- src/Model/V2RuleServeStaticAction.php | 8 +- src/Model/V2RuleServeStaticRequest.php | 8 +- src/Model/V2SecretStore.php | 8 +- src/Model/V2SecretStoreRequest.php | 8 +- src/Model/V2Store.php | 8 +- src/Model/V2StoreItem.php | 8 +- src/Model/V2StoreItemRequest.php | 8 +- src/Model/V2StoreItemUpdateRequest.php | 8 +- src/Model/V2StoreItemsListResponse.php | 8 +- src/Model/V2StoreRequest.php | 8 +- src/Model/ValidateCompose200Response.php | 8 +- src/Model/ValidateCompose422Response.php | 8 +- src/Model/ValidateComposeRequest.php | 8 +- src/Model/ValidateComposeRequestOneOf.php | 489 ++ src/Model/Variable.php | 8 +- src/Model/Volume.php | 8 +- src/Model/WafConfig.php | 8 +- src/Model/WafConfigBlockLists.php | 8 +- src/Model/WafConfigHttpbl.php | 8 +- src/Model/WafConfigThresholdsInner.php | 8 +- src/ObjectSerializer.php | 28 +- 342 files changed, 14612 insertions(+), 6486 deletions(-) create mode 100644 docs/Model/V2RuleProxyActionWafConfig.md create mode 100644 docs/Model/ValidateComposeRequestOneOf.md delete mode 100644 src/FormDataProcessor.php create mode 100644 src/Model/V2RuleProxyActionWafConfig.php create mode 100644 src/Model/ValidateComposeRequestOneOf.php diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 8f7a519..7ea6fb4 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -286,6 +286,7 @@ docs/Model/V2RuleProxy.md docs/Model/V2RuleProxyAction.md docs/Model/V2RuleProxyActionNotifyConfig.md docs/Model/V2RuleProxyActionQuantCloudSelection.md +docs/Model/V2RuleProxyActionWafConfig.md docs/Model/V2RuleProxyRequest.md docs/Model/V2RuleRedirect.md docs/Model/V2RuleRedirectAction.md @@ -305,6 +306,7 @@ docs/Model/V2StoreRequest.md docs/Model/ValidateCompose200Response.md docs/Model/ValidateCompose422Response.md docs/Model/ValidateComposeRequest.md +docs/Model/ValidateComposeRequestOneOf.md docs/Model/Variable.md docs/Model/Volume.md docs/Model/WafConfig.md @@ -343,7 +345,6 @@ src/Api/VariablesApi.php src/Api/VolumesApi.php src/ApiException.php src/Configuration.php -src/FormDataProcessor.php src/HeaderSelector.php src/Model/Application.php src/Model/ApplicationDatabase.php @@ -602,6 +603,7 @@ src/Model/V2RuleProxy.php src/Model/V2RuleProxyAction.php src/Model/V2RuleProxyActionNotifyConfig.php src/Model/V2RuleProxyActionQuantCloudSelection.php +src/Model/V2RuleProxyActionWafConfig.php src/Model/V2RuleProxyRequest.php src/Model/V2RuleRedirect.php src/Model/V2RuleRedirectAction.php @@ -621,6 +623,7 @@ src/Model/V2StoreRequest.php src/Model/ValidateCompose200Response.php src/Model/ValidateCompose422Response.php src/Model/ValidateComposeRequest.php +src/Model/ValidateComposeRequestOneOf.php src/Model/Variable.php src/Model/Volume.php src/Model/WafConfig.php diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index eb1dc6a..758bb9c 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -7.13.0 +7.10.0 diff --git a/README.md b/README.md index 7f61fd2..b8fb1a7 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,8 @@ Unified API for QuantCDN Admin and QuantCloud Platform services ### Requirements -PHP 8.1 and later. +PHP 7.4 and later. +Should also work with PHP 8.0. ### Composer @@ -497,6 +498,7 @@ Class | Method | HTTP request | Description - [V2RuleProxyAction](docs/Model/V2RuleProxyAction.md) - [V2RuleProxyActionNotifyConfig](docs/Model/V2RuleProxyActionNotifyConfig.md) - [V2RuleProxyActionQuantCloudSelection](docs/Model/V2RuleProxyActionQuantCloudSelection.md) +- [V2RuleProxyActionWafConfig](docs/Model/V2RuleProxyActionWafConfig.md) - [V2RuleProxyRequest](docs/Model/V2RuleProxyRequest.md) - [V2RuleRedirect](docs/Model/V2RuleRedirect.md) - [V2RuleRedirectAction](docs/Model/V2RuleRedirectAction.md) @@ -516,6 +518,7 @@ Class | Method | HTTP request | Description - [ValidateCompose200Response](docs/Model/ValidateCompose200Response.md) - [ValidateCompose422Response](docs/Model/ValidateCompose422Response.md) - [ValidateComposeRequest](docs/Model/ValidateComposeRequest.md) +- [ValidateComposeRequestOneOf](docs/Model/ValidateComposeRequestOneOf.md) - [Variable](docs/Model/Variable.md) - [Volume](docs/Model/Volume.md) - [WafConfig](docs/Model/WafConfig.md) @@ -549,5 +552,5 @@ This PHP package is automatically generated by the [OpenAPI Generator](https://o - API version: `4.8.0` - Package version: `4.8.0` - - Generator version: `7.13.0` + - Generator version: `7.10.0` - Build package: `org.openapitools.codegen.languages.PhpClientCodegen` diff --git a/docs/Api/BackupManagementApi.md b/docs/Api/BackupManagementApi.md index 727644c..47e1838 100644 --- a/docs/Api/BackupManagementApi.md +++ b/docs/Api/BackupManagementApi.md @@ -35,9 +35,9 @@ $apiInstance = new QuantClient\Api\BackupManagementApi( new GuzzleHttp\Client(), $config ); -$organisation = 'organisation_example'; // string | The organisation ID -$application = 'application_example'; // string | The application ID -$environment = 'environment_example'; // string | The environment ID +$organisation = test-org; // string | The organisation ID +$application = test-app; // string | The application ID +$environment = test-env; // string | The environment ID $type = 'type_example'; // string | The backup type $create_backup_request = new \QuantClient\Model\CreateBackupRequest(); // \QuantClient\Model\CreateBackupRequest @@ -101,9 +101,9 @@ $apiInstance = new QuantClient\Api\BackupManagementApi( new GuzzleHttp\Client(), $config ); -$organisation = 'organisation_example'; // string | The organisation ID -$application = 'application_example'; // string | The application ID -$environment = 'environment_example'; // string | The environment ID +$organisation = test-org; // string | The organisation ID +$application = test-app; // string | The application ID +$environment = test-env; // string | The environment ID $type = 'type_example'; // string | The backup type $backup_id = 'backup_id_example'; // string | The backup ID @@ -167,9 +167,9 @@ $apiInstance = new QuantClient\Api\BackupManagementApi( new GuzzleHttp\Client(), $config ); -$organisation = 'organisation_example'; // string | The organisation ID -$application = 'application_example'; // string | The application ID -$environment = 'environment_example'; // string | The environment ID +$organisation = test-org; // string | The organisation ID +$application = test-app; // string | The application ID +$environment = test-env; // string | The environment ID $type = 'type_example'; // string | The backup type $backup_id = 'backup_id_example'; // string | The backup ID @@ -235,9 +235,9 @@ $apiInstance = new QuantClient\Api\BackupManagementApi( new GuzzleHttp\Client(), $config ); -$organisation = 'organisation_example'; // string | The organisation ID -$application = 'application_example'; // string | The application ID -$environment = 'environment_example'; // string | The environment ID +$organisation = test-org; // string | The organisation ID +$application = test-app; // string | The application ID +$environment = test-env; // string | The environment ID $type = 'type_example'; // string | The backup type $order = 'desc'; // string | Sort order for backups by creation date (asc = oldest first, desc = newest first) $limit = 50; // int | Maximum number of backups to return (max 100) diff --git a/docs/Api/CommandsApi.md b/docs/Api/CommandsApi.md index f88d0a5..739b5ee 100644 --- a/docs/Api/CommandsApi.md +++ b/docs/Api/CommandsApi.md @@ -34,8 +34,8 @@ $apiInstance = new QuantClient\Api\CommandsApi( new GuzzleHttp\Client(), $config ); -$organisation = 'organisation_example'; // string | The organisation ID -$environment = 'environment_example'; // string | The environment ID +$organisation = test-org; // string | The organisation ID +$environment = test-env; // string | The environment ID $create_command_request = new \QuantClient\Model\CreateCommandRequest(); // \QuantClient\Model\CreateCommandRequest try { @@ -96,9 +96,9 @@ $apiInstance = new QuantClient\Api\CommandsApi( new GuzzleHttp\Client(), $config ); -$organisation = 'organisation_example'; // string | The organisation ID -$environment = 'environment_example'; // string | The environment ID -$command = 'command_example'; // string | The command ID +$organisation = test-org; // string | The organisation ID +$environment = test-env; // string | The environment ID +$command = test-cmd; // string | The command ID try { $result = $apiInstance->getCommand($organisation, $environment, $command); @@ -158,8 +158,8 @@ $apiInstance = new QuantClient\Api\CommandsApi( new GuzzleHttp\Client(), $config ); -$organisation = 'organisation_example'; // string | The organisation ID -$environment = 'environment_example'; // string | The environment ID +$organisation = test-org; // string | The organisation ID +$environment = test-env; // string | The environment ID try { $result = $apiInstance->listCommands($organisation, $environment); diff --git a/docs/Api/ComposeApi.md b/docs/Api/ComposeApi.md index 9c88c8f..4e6c866 100644 --- a/docs/Api/ComposeApi.md +++ b/docs/Api/ComposeApi.md @@ -34,9 +34,9 @@ $apiInstance = new QuantClient\Api\ComposeApi( new GuzzleHttp\Client(), $config ); -$organisation = 'organisation_example'; // string | The organisation ID -$application = 'application_example'; // string | The application ID -$environment = 'environment_example'; // string | The environment ID +$organisation = test-org; // string | The organisation ID +$application = test-app; // string | The application ID +$environment = test-env; // string | The environment ID try { $result = $apiInstance->getEnvironmentCompose($organisation, $application, $environment); @@ -98,9 +98,9 @@ $apiInstance = new QuantClient\Api\ComposeApi( new GuzzleHttp\Client(), $config ); -$organisation = 'organisation_example'; // string | The organisation ID -$application = 'application_example'; // string | The application ID -$environment = 'environment_example'; // string | The environment ID +$organisation = test-org; // string | The organisation ID +$application = test-app; // string | The application ID +$environment = test-env; // string | The environment ID $patch_environment_compose_request = new \QuantClient\Model\PatchEnvironmentComposeRequest(); // \QuantClient\Model\PatchEnvironmentComposeRequest | Partial compose definition updates. All fields are optional. try { @@ -164,7 +164,7 @@ $apiInstance = new QuantClient\Api\ComposeApi( new GuzzleHttp\Client(), $config ); -$organisation = 'organisation_example'; // string | The organisation ID +$organisation = test-org; // string | The organisation ID $validate_compose_request = new \QuantClient\Model\ValidateComposeRequest(); // \QuantClient\Model\ValidateComposeRequest | The docker-compose.yml file content. Can be sent as raw YAML string or as a JSON wrapper containing both yamlContent (string) and imageSuffix (string) fields. Query parameter imageSuffix takes precedence if both are provided. $image_suffix = pr-456; // string | Optional. Image tag suffix to apply during translation. Transforms internal image tags to consistent '{containerName}-{suffix}' format (e.g., 'nginx-pr-456'). External images are left unchanged. Useful for feature branch deployments. diff --git a/docs/Api/ContainersApi.md b/docs/Api/ContainersApi.md index 37eec84..8542727 100644 --- a/docs/Api/ContainersApi.md +++ b/docs/Api/ContainersApi.md @@ -33,9 +33,9 @@ $apiInstance = new QuantClient\Api\ContainersApi( new GuzzleHttp\Client(), $config ); -$organisation = 'organisation_example'; // string | The organisation ID -$application = 'application_example'; // string | The application ID -$environment = 'environment_example'; // string | The environment ID +$organisation = test-org; // string | The organisation ID +$application = test-app; // string | The application ID +$environment = test-env; // string | The environment ID try { $apiInstance->listContainers($organisation, $application, $environment); @@ -94,10 +94,10 @@ $apiInstance = new QuantClient\Api\ContainersApi( new GuzzleHttp\Client(), $config ); -$organisation = 'organisation_example'; // string | The organisation ID -$application = 'application_example'; // string | The application ID -$environment = 'environment_example'; // string | The environment ID -$container = 'container_example'; // string | The container ID +$organisation = test-org; // string | The organisation ID +$application = test-app; // string | The application ID +$environment = test-env; // string | The environment ID +$container = test-container; // string | The container ID $container2 = new \QuantClient\Model\Container(); // \QuantClient\Model\Container try { diff --git a/docs/Api/CrawlerSchedulesApi.md b/docs/Api/CrawlerSchedulesApi.md index 520d928..5e9d12f 100644 --- a/docs/Api/CrawlerSchedulesApi.md +++ b/docs/Api/CrawlerSchedulesApi.md @@ -229,9 +229,9 @@ $apiInstance = new QuantClient\Api\CrawlerSchedulesApi( new GuzzleHttp\Client(), $config ); -$organization = 'organization_example'; // string -$project = 'project_example'; // string -$crawler = 'crawler_example'; // string +$organization = test-org; // string +$project = test-project; // string +$crawler = 00000000-0000-0000-0000-000000000000; // string try { $result = $apiInstance->crawlerSchedulesList($organization, $project, $crawler); diff --git a/docs/Api/CrawlersApi.md b/docs/Api/CrawlersApi.md index 2e5f259..7d5b751 100644 --- a/docs/Api/CrawlersApi.md +++ b/docs/Api/CrawlersApi.md @@ -39,8 +39,8 @@ $apiInstance = new QuantClient\Api\CrawlersApi( new GuzzleHttp\Client(), $config ); -$organization = 'organization_example'; // string | Organization identifier -$project = 'project_example'; // string | Project identifier +$organization = test-org; // string | Organization identifier +$project = test-project; // string | Project identifier $v2_crawler_request = new \QuantClient\Model\V2CrawlerRequest(); // \QuantClient\Model\V2CrawlerRequest try { @@ -101,9 +101,9 @@ $apiInstance = new QuantClient\Api\CrawlersApi( new GuzzleHttp\Client(), $config ); -$organization = 'organization_example'; // string | Organization identifier -$project = 'project_example'; // string | Project identifier -$crawler = 'crawler_example'; // string +$organization = test-org; // string | Organization identifier +$project = test-project; // string | Project identifier +$crawler = 00000000-0000-0000-0000-000000000000; // string | The UUID of the crawler try { $apiInstance->crawlersDelete($organization, $project, $crawler); @@ -118,7 +118,7 @@ try { | ------------- | ------------- | ------------- | ------------- | | **organization** | **string**| Organization identifier | | | **project** | **string**| Project identifier | | -| **crawler** | **string**| | | +| **crawler** | **string**| The UUID of the crawler | | ### Return type @@ -162,10 +162,10 @@ $apiInstance = new QuantClient\Api\CrawlersApi( new GuzzleHttp\Client(), $config ); -$organization = 'organization_example'; // string | Organization identifier -$project = 'project_example'; // string | Project identifier -$crawler = 'crawler_example'; // string | Crawler identifier -$run_id = 56; // int | Run identifier +$organization = test-org; // string | Organization identifier +$project = test-project; // string | Project identifier +$crawler = 00000000-0000-0000-0000-000000000000; // string | Crawler identifier +$run_id = 1; // int | Run identifier try { $result = $apiInstance->crawlersGetRunById($organization, $project, $crawler, $run_id); @@ -226,9 +226,9 @@ $apiInstance = new QuantClient\Api\CrawlersApi( new GuzzleHttp\Client(), $config ); -$organization = 'organization_example'; // string | Organization identifier -$project = 'project_example'; // string | Project identifier -$crawler = 'crawler_example'; // string | Crawler identifier +$organization = test-org; // string | Organization identifier +$project = test-project; // string | Project identifier +$crawler = 00000000-0000-0000-0000-000000000000; // string | Crawler identifier try { $result = $apiInstance->crawlersGetRuns($organization, $project, $crawler); @@ -266,7 +266,7 @@ try { ## `crawlersList()` ```php -crawlersList($organization, $project): \QuantClient\Model\V2Crawler[] +crawlersList($organization, $project) ``` List crawlers for the project @@ -288,12 +288,11 @@ $apiInstance = new QuantClient\Api\CrawlersApi( new GuzzleHttp\Client(), $config ); -$organization = 'organization_example'; // string | Organization identifier -$project = 'project_example'; // string | Project identifier +$organization = test-org; // string | Organization identifier +$project = test-project; // string | Project identifier try { - $result = $apiInstance->crawlersList($organization, $project); - print_r($result); + $apiInstance->crawlersList($organization, $project); } catch (Exception $e) { echo 'Exception when calling CrawlersApi->crawlersList: ', $e->getMessage(), PHP_EOL; } @@ -308,7 +307,7 @@ try { ### Return type -[**\QuantClient\Model\V2Crawler[]**](../Model/V2Crawler.md) +void (empty response body) ### Authorization @@ -348,9 +347,9 @@ $apiInstance = new QuantClient\Api\CrawlersApi( new GuzzleHttp\Client(), $config ); -$organization = 'organization_example'; // string | Organization identifier -$project = 'project_example'; // string | Project identifier -$crawler = 'crawler_example'; // string +$organization = test-org; // string | Organization identifier +$project = test-project; // string | Project identifier +$crawler = 00000000-0000-0000-0000-000000000000; // string | The UUID of the crawler try { $result = $apiInstance->crawlersRead($organization, $project, $crawler); @@ -366,7 +365,7 @@ try { | ------------- | ------------- | ------------- | ------------- | | **organization** | **string**| Organization identifier | | | **project** | **string**| Project identifier | | -| **crawler** | **string**| | | +| **crawler** | **string**| The UUID of the crawler | | ### Return type @@ -410,9 +409,9 @@ $apiInstance = new QuantClient\Api\CrawlersApi( new GuzzleHttp\Client(), $config ); -$organization = 'organization_example'; // string | Organization identifier -$project = 'project_example'; // string | Project identifier -$crawler = 'crawler_example'; // string | Crawler identifier +$organization = test-org; // string | Organization identifier +$project = test-project; // string | Project identifier +$crawler = 00000000-0000-0000-0000-000000000000; // string | Crawler identifier $crawlers_run_request = new \QuantClient\Model\CrawlersRunRequest(); // \QuantClient\Model\CrawlersRunRequest try { @@ -474,9 +473,9 @@ $apiInstance = new QuantClient\Api\CrawlersApi( new GuzzleHttp\Client(), $config ); -$organization = 'organization_example'; // string | Organization identifier -$project = 'project_example'; // string | Project identifier -$crawler = 'crawler_example'; // string +$organization = test-org; // string | Organization identifier +$project = test-project; // string | Project identifier +$crawler = 00000000-0000-0000-0000-000000000000; // string | The UUID of the crawler $v2_crawler_request = new \QuantClient\Model\V2CrawlerRequest(); // \QuantClient\Model\V2CrawlerRequest try { @@ -493,7 +492,7 @@ try { | ------------- | ------------- | ------------- | ------------- | | **organization** | **string**| Organization identifier | | | **project** | **string**| Project identifier | | -| **crawler** | **string**| | | +| **crawler** | **string**| The UUID of the crawler | | | **v2_crawler_request** | [**\QuantClient\Model\V2CrawlerRequest**](../Model/V2CrawlerRequest.md)| | | ### Return type diff --git a/docs/Api/CronApi.md b/docs/Api/CronApi.md index 1468fa3..eb9c7e8 100644 --- a/docs/Api/CronApi.md +++ b/docs/Api/CronApi.md @@ -38,9 +38,9 @@ $apiInstance = new QuantClient\Api\CronApi( new GuzzleHttp\Client(), $config ); -$organisation = 'organisation_example'; // string | The organisation ID -$application = 'application_example'; // string | The application ID -$environment = 'environment_example'; // string | The environment ID +$organisation = test-org; // string | The organisation ID +$application = test-app; // string | The application ID +$environment = test-env; // string | The environment ID $create_cron_job_request = new \QuantClient\Model\CreateCronJobRequest(); // \QuantClient\Model\CreateCronJobRequest try { @@ -102,9 +102,9 @@ $apiInstance = new QuantClient\Api\CronApi( new GuzzleHttp\Client(), $config ); -$organisation = 'organisation_example'; // string | The organisation ID -$application = 'application_example'; // string | The application ID -$environment = 'environment_example'; // string | The environment ID +$organisation = test-org; // string | The organisation ID +$application = test-app; // string | The application ID +$environment = test-env; // string | The environment ID $cron = 'cron_example'; // string | The cron job ID try { @@ -165,9 +165,9 @@ $apiInstance = new QuantClient\Api\CronApi( new GuzzleHttp\Client(), $config ); -$organisation = 'organisation_example'; // string | The organisation ID -$application = 'application_example'; // string | The application ID -$environment = 'environment_example'; // string | The environment ID +$organisation = test-org; // string | The organisation ID +$application = test-app; // string | The application ID +$environment = test-env; // string | The environment ID $cron = 'cron_example'; // string | The cron job ID try { @@ -229,10 +229,10 @@ $apiInstance = new QuantClient\Api\CronApi( new GuzzleHttp\Client(), $config ); -$organisation = 'organisation_example'; // string | The organisation ID -$application = 'application_example'; // string | The application ID -$environment = 'environment_example'; // string | The environment ID -$cron = 'cron_example'; // string | The cron job ID +$organisation = test-org; // string | The organisation ID +$application = test-app; // string | The application ID +$environment = test-env; // string | The environment ID +$cron = test-cron; // string | The cron job ID $run = 'run_example'; // string | The cron run ID try { @@ -295,10 +295,10 @@ $apiInstance = new QuantClient\Api\CronApi( new GuzzleHttp\Client(), $config ); -$organisation = 'organisation_example'; // string | The organisation ID -$application = 'application_example'; // string | The application ID -$environment = 'environment_example'; // string | The environment ID -$cron = 'cron_example'; // string | The cron job ID +$organisation = test-org; // string | The organisation ID +$application = test-app; // string | The application ID +$environment = test-env; // string | The environment ID +$cron = test-cron; // string | The cron job ID try { $result = $apiInstance->listCronJobRuns($organisation, $application, $environment, $cron); @@ -359,9 +359,9 @@ $apiInstance = new QuantClient\Api\CronApi( new GuzzleHttp\Client(), $config ); -$organisation = 'organisation_example'; // string | The organisation ID -$application = 'application_example'; // string | The application ID -$environment = 'environment_example'; // string | The environment ID +$organisation = test-org; // string | The organisation ID +$application = test-app; // string | The application ID +$environment = test-env; // string | The environment ID try { $result = $apiInstance->listCronJobs($organisation, $application, $environment); @@ -421,9 +421,9 @@ $apiInstance = new QuantClient\Api\CronApi( new GuzzleHttp\Client(), $config ); -$organisation = 'organisation_example'; // string | The organisation ID -$application = 'application_example'; // string | The application ID -$environment = 'environment_example'; // string | The environment ID +$organisation = test-org; // string | The organisation ID +$application = test-app; // string | The application ID +$environment = test-env; // string | The environment ID $cron = 'cron_example'; // string | The cron job ID $update_cron_job_request = new \QuantClient\Model\UpdateCronJobRequest(); // \QuantClient\Model\UpdateCronJobRequest diff --git a/docs/Api/DomainsApi.md b/docs/Api/DomainsApi.md index 68a3a79..bb54073 100644 --- a/docs/Api/DomainsApi.md +++ b/docs/Api/DomainsApi.md @@ -36,8 +36,8 @@ $apiInstance = new QuantClient\Api\DomainsApi( new GuzzleHttp\Client(), $config ); -$organization = 'organization_example'; // string | Organization identifier -$project = 'project_example'; // string | Project identifier +$organization = test-org; // string | Organization identifier +$project = test-project; // string | Project identifier $v2_domain_request = new \QuantClient\Model\V2DomainRequest(); // \QuantClient\Model\V2DomainRequest try { @@ -98,9 +98,9 @@ $apiInstance = new QuantClient\Api\DomainsApi( new GuzzleHttp\Client(), $config ); -$organization = 'organization_example'; // string | Organization identifier -$project = 'project_example'; // string | Project identifier -$domain = 'domain_example'; // string | Domain identifier +$organization = test-org; // string | Organization identifier +$project = test-project; // string | Project identifier +$domain = 0000; // string | Domain id try { $apiInstance->domainsDelete($organization, $project, $domain); @@ -115,7 +115,7 @@ try { | ------------- | ------------- | ------------- | ------------- | | **organization** | **string**| Organization identifier | | | **project** | **string**| Project identifier | | -| **domain** | **string**| Domain identifier | | +| **domain** | **string**| Domain id | | ### Return type @@ -159,8 +159,8 @@ $apiInstance = new QuantClient\Api\DomainsApi( new GuzzleHttp\Client(), $config ); -$organization = 'organization_example'; // string | Organization identifier -$project = 'project_example'; // string | Project identifier +$organization = test-org; // string | Organization identifier +$project = test-project; // string | Project identifier try { $result = $apiInstance->domainsList($organization, $project); @@ -219,9 +219,9 @@ $apiInstance = new QuantClient\Api\DomainsApi( new GuzzleHttp\Client(), $config ); -$organization = 'organization_example'; // string | Organization identifier -$project = 'project_example'; // string | Project identifier -$domain = 'domain_example'; // string | Domain identifier +$organization = test-org; // string | Organization identifier +$project = test-project; // string | Project identifier +$domain = 0000; // string | Domain id try { $result = $apiInstance->domainsRead($organization, $project, $domain); @@ -237,7 +237,7 @@ try { | ------------- | ------------- | ------------- | ------------- | | **organization** | **string**| Organization identifier | | | **project** | **string**| Project identifier | | -| **domain** | **string**| Domain identifier | | +| **domain** | **string**| Domain id | | ### Return type @@ -281,9 +281,9 @@ $apiInstance = new QuantClient\Api\DomainsApi( new GuzzleHttp\Client(), $config ); -$organization = 'organization_example'; // string | Organization identifier -$project = 'project_example'; // string | Project identifier -$domain = 'domain_example'; // string | Domain identifier +$organization = test-org; // string | Organization identifier +$project = test-project; // string | Project identifier +$domain = 0000; // string | Domain id try { $apiInstance->domainsRenew($organization, $project, $domain); @@ -298,7 +298,7 @@ try { | ------------- | ------------- | ------------- | ------------- | | **organization** | **string**| Organization identifier | | | **project** | **string**| Project identifier | | -| **domain** | **string**| Domain identifier | | +| **domain** | **string**| Domain id | | ### Return type diff --git a/docs/Api/EnvironmentsApi.md b/docs/Api/EnvironmentsApi.md index 8549fbf..6da7583 100644 --- a/docs/Api/EnvironmentsApi.md +++ b/docs/Api/EnvironmentsApi.md @@ -41,8 +41,8 @@ $apiInstance = new QuantClient\Api\EnvironmentsApi( new GuzzleHttp\Client(), $config ); -$organisation = 'organisation_example'; // string | The organisation ID -$application = 'application_example'; // string | The application ID +$organisation = test-org; // string | The organisation ID +$application = test-app; // string | The application ID $create_environment_request = new \QuantClient\Model\CreateEnvironmentRequest(); // \QuantClient\Model\CreateEnvironmentRequest try { @@ -103,9 +103,9 @@ $apiInstance = new QuantClient\Api\EnvironmentsApi( new GuzzleHttp\Client(), $config ); -$organisation = 'organisation_example'; // string | The organisation ID -$application = 'application_example'; // string | The application ID -$environment = 'environment_example'; // string | The environment ID +$organisation = test-org; // string | The organisation ID +$application = test-app; // string | The application ID +$environment = test-env; // string | The environment ID try { $apiInstance->deleteEnvironment($organisation, $application, $environment); @@ -164,9 +164,9 @@ $apiInstance = new QuantClient\Api\EnvironmentsApi( new GuzzleHttp\Client(), $config ); -$organisation = 'organisation_example'; // string | The organisation ID -$application = 'application_example'; // string | The application ID -$environment = 'environment_example'; // string | The environment ID +$organisation = test-org; // string | The organisation ID +$application = test-app; // string | The application ID +$environment = test-env; // string | The environment ID try { $result = $apiInstance->getEnvironment($organisation, $application, $environment); @@ -228,9 +228,9 @@ $apiInstance = new QuantClient\Api\EnvironmentsApi( new GuzzleHttp\Client(), $config ); -$organisation = 'organisation_example'; // string | The organisation ID -$application = 'application_example'; // string | The application ID -$environment = 'environment_example'; // string | The environment ID +$organisation = test-org; // string | The organisation ID +$application = test-app; // string | The application ID +$environment = test-env; // string | The environment ID $start_time = 'start_time_example'; // string | Start time for log retrieval (ISO 8601 format or Unix timestamp) $end_time = 'end_time_example'; // string | End time for log retrieval (ISO 8601 format or Unix timestamp) $container_name = 'container_name_example'; // string | Filter logs by specific container name @@ -304,9 +304,9 @@ $apiInstance = new QuantClient\Api\EnvironmentsApi( new GuzzleHttp\Client(), $config ); -$organisation = 'organisation_example'; // string | The organisation ID -$application = 'application_example'; // string | The application ID -$environment = 'environment_example'; // string | The environment ID +$organisation = test-org; // string | The organisation ID +$application = test-app; // string | The application ID +$environment = test-env; // string | The environment ID $start_time = 56; // int | Start time for metrics retrieval (Unix timestamp in milliseconds) $end_time = 56; // int | End time for metrics retrieval (Unix timestamp in milliseconds) $period = 56; // int | Period in seconds for metric aggregation (e.g., 60 for 1 minute, 300 for 5 minutes) @@ -376,8 +376,8 @@ $apiInstance = new QuantClient\Api\EnvironmentsApi( new GuzzleHttp\Client(), $config ); -$organisation = 'organisation_example'; // string | The organisation ID -$application = 'application_example'; // string | The application ID +$organisation = test-org; // string | The organisation ID +$application = test-app; // string | The application ID try { $result = $apiInstance->listEnvironments($organisation, $application); @@ -436,9 +436,9 @@ $apiInstance = new QuantClient\Api\EnvironmentsApi( new GuzzleHttp\Client(), $config ); -$organisation = 'organisation_example'; // string | The organisation ID -$application = 'application_example'; // string | The application ID -$environment = 'environment_example'; // string | The environment ID +$organisation = test-org; // string | The organisation ID +$application = test-app; // string | The application ID +$environment = test-env; // string | The environment ID $type = 'type_example'; // string | The sync type try { @@ -500,9 +500,9 @@ $apiInstance = new QuantClient\Api\EnvironmentsApi( new GuzzleHttp\Client(), $config ); -$organisation = 'organisation_example'; // string | The organisation ID -$application = 'application_example'; // string | The application ID -$environment = 'environment_example'; // string | The environment ID +$organisation = test-org; // string | The organisation ID +$application = test-app; // string | The application ID +$environment = test-env; // string | The environment ID $type = 'type_example'; // string | The sync type $sync_to_environment_request = new \QuantClient\Model\SyncToEnvironmentRequest(); // \QuantClient\Model\SyncToEnvironmentRequest @@ -631,9 +631,9 @@ $apiInstance = new QuantClient\Api\EnvironmentsApi( new GuzzleHttp\Client(), $config ); -$organisation = 'organisation_example'; // string | The organisation ID -$application = 'application_example'; // string | The application ID -$environment = 'environment_example'; // string | The environment ID +$organisation = test-org; // string | The organisation ID +$application = test-app; // string | The application ID +$environment = test-env; // string | The environment ID $update_environment_state_request = new \QuantClient\Model\UpdateEnvironmentStateRequest(); // \QuantClient\Model\UpdateEnvironmentStateRequest try { diff --git a/docs/Api/HeadersApi.md b/docs/Api/HeadersApi.md index dca5b61..6b9b48e 100644 --- a/docs/Api/HeadersApi.md +++ b/docs/Api/HeadersApi.md @@ -34,8 +34,8 @@ $apiInstance = new QuantClient\Api\HeadersApi( new GuzzleHttp\Client(), $config ); -$organization = 'organization_example'; // string -$project = 'project_example'; // string +$organization = test-org; // string | Organization identifier +$project = test-project; // string | Project identifier $v2_custom_header_request = new \QuantClient\Model\V2CustomHeaderRequest(); // \QuantClient\Model\V2CustomHeaderRequest try { @@ -50,8 +50,8 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **organization** | **string**| | | -| **project** | **string**| | | +| **organization** | **string**| Organization identifier | | +| **project** | **string**| Project identifier | | | **v2_custom_header_request** | [**\QuantClient\Model\V2CustomHeaderRequest**](../Model/V2CustomHeaderRequest.md)| | | ### Return type @@ -96,8 +96,8 @@ $apiInstance = new QuantClient\Api\HeadersApi( new GuzzleHttp\Client(), $config ); -$organization = 'organization_example'; // string -$project = 'project_example'; // string +$organization = test-org; // string | Organization identifier +$project = test-project; // string | Project identifier $v2_custom_header_request = new \QuantClient\Model\V2CustomHeaderRequest(); // \QuantClient\Model\V2CustomHeaderRequest try { @@ -111,8 +111,8 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **organization** | **string**| | | -| **project** | **string**| | | +| **organization** | **string**| Organization identifier | | +| **project** | **string**| Project identifier | | | **v2_custom_header_request** | [**\QuantClient\Model\V2CustomHeaderRequest**](../Model/V2CustomHeaderRequest.md)| | | ### Return type @@ -157,8 +157,8 @@ $apiInstance = new QuantClient\Api\HeadersApi( new GuzzleHttp\Client(), $config ); -$organization = 'organization_example'; // string -$project = 'project_example'; // string +$organization = test-org; // string | Organization identifier +$project = test-project; // string | Project identifier try { $result = $apiInstance->headersList($organization, $project); @@ -172,8 +172,8 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **organization** | **string**| | | -| **project** | **string**| | | +| **organization** | **string**| Organization identifier | | +| **project** | **string**| Project identifier | | ### Return type diff --git a/docs/Api/KVApi.md b/docs/Api/KVApi.md index abd928f..136f671 100644 --- a/docs/Api/KVApi.md +++ b/docs/Api/KVApi.md @@ -40,8 +40,8 @@ $apiInstance = new QuantClient\Api\KVApi( new GuzzleHttp\Client(), $config ); -$organization = 'organization_example'; // string -$project = 'project_example'; // string +$organization = test-org; // string | Organization identifier +$project = test-project; // string | Project identifier $v2_store_request = new \QuantClient\Model\V2StoreRequest(); // \QuantClient\Model\V2StoreRequest try { @@ -56,8 +56,8 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **organization** | **string**| | | -| **project** | **string**| | | +| **organization** | **string**| Organization identifier | | +| **project** | **string**| Project identifier | | | **v2_store_request** | [**\QuantClient\Model\V2StoreRequest**](../Model/V2StoreRequest.md)| | | ### Return type @@ -102,9 +102,9 @@ $apiInstance = new QuantClient\Api\KVApi( new GuzzleHttp\Client(), $config ); -$organization = 'organization_example'; // string -$project = 'project_example'; // string -$store_id = 'store_id_example'; // string +$organization = test-org; // string | Organization identifier +$project = test-project; // string | Project identifier +$store_id = 0000; // string try { $apiInstance->kVDelete($organization, $project, $store_id); @@ -117,8 +117,8 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **organization** | **string**| | | -| **project** | **string**| | | +| **organization** | **string**| Organization identifier | | +| **project** | **string**| Project identifier | | | **store_id** | **string**| | | ### Return type @@ -163,9 +163,9 @@ $apiInstance = new QuantClient\Api\KVApi( new GuzzleHttp\Client(), $config ); -$organization = 'organization_example'; // string -$project = 'project_example'; // string -$store_id = 'store_id_example'; // string +$organization = test-org; // string | Organization identifier +$project = test-project; // string | Project identifier +$store_id = 0000; // string $v2_store_item_request = new \QuantClient\Model\V2StoreItemRequest(); // \QuantClient\Model\V2StoreItemRequest try { @@ -180,8 +180,8 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **organization** | **string**| | | -| **project** | **string**| | | +| **organization** | **string**| Organization identifier | | +| **project** | **string**| Project identifier | | | **store_id** | **string**| | | | **v2_store_item_request** | [**\QuantClient\Model\V2StoreItemRequest**](../Model/V2StoreItemRequest.md)| | | @@ -227,9 +227,9 @@ $apiInstance = new QuantClient\Api\KVApi( new GuzzleHttp\Client(), $config ); -$organization = 'organization_example'; // string -$project = 'project_example'; // string -$store_id = 'store_id_example'; // string +$organization = test-org; // string | Organization identifier +$project = test-project; // string | Project identifier +$store_id = 0000; // string $key = 'key_example'; // string try { @@ -244,8 +244,8 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **organization** | **string**| | | -| **project** | **string**| | | +| **organization** | **string**| Organization identifier | | +| **project** | **string**| Project identifier | | | **store_id** | **string**| | | | **key** | **string**| | | @@ -291,9 +291,9 @@ $apiInstance = new QuantClient\Api\KVApi( new GuzzleHttp\Client(), $config ); -$organization = 'organization_example'; // string -$project = 'project_example'; // string -$store_id = 'store_id_example'; // string +$organization = test-org; // string | Organization identifier +$project = test-project; // string | Project identifier +$store_id = 0000; // string $cursor = 'cursor_example'; // string | Cursor for pagination $limit = 10; // int | Number of items to return $search = 'search_example'; // string | Search filter for keys @@ -311,8 +311,8 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **organization** | **string**| | | -| **project** | **string**| | | +| **organization** | **string**| Organization identifier | | +| **project** | **string**| Project identifier | | | **store_id** | **string**| | | | **cursor** | **string**| Cursor for pagination | [optional] | | **limit** | **int**| Number of items to return | [optional] [default to 10] | @@ -363,9 +363,9 @@ $apiInstance = new QuantClient\Api\KVApi( new GuzzleHttp\Client(), $config ); -$organization = 'organization_example'; // string -$project = 'project_example'; // string -$store_id = 'store_id_example'; // string +$organization = test-org; // string | Organization identifier +$project = test-project; // string | Project identifier +$store_id = 0000; // string $key = 'key_example'; // string try { @@ -380,8 +380,8 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **organization** | **string**| | | -| **project** | **string**| | | +| **organization** | **string**| Organization identifier | | +| **project** | **string**| Project identifier | | | **store_id** | **string**| | | | **key** | **string**| | | @@ -427,9 +427,9 @@ $apiInstance = new QuantClient\Api\KVApi( new GuzzleHttp\Client(), $config ); -$organization = 'organization_example'; // string -$project = 'project_example'; // string -$store_id = 'store_id_example'; // string +$organization = test-org; // string | Organization identifier +$project = test-project; // string | Project identifier +$store_id = 0000; // string $key = 'key_example'; // string $v2_store_item_update_request = new \QuantClient\Model\V2StoreItemUpdateRequest(); // \QuantClient\Model\V2StoreItemUpdateRequest @@ -445,8 +445,8 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **organization** | **string**| | | -| **project** | **string**| | | +| **organization** | **string**| Organization identifier | | +| **project** | **string**| Project identifier | | | **store_id** | **string**| | | | **key** | **string**| | | | **v2_store_item_update_request** | [**\QuantClient\Model\V2StoreItemUpdateRequest**](../Model/V2StoreItemUpdateRequest.md)| | | @@ -493,8 +493,8 @@ $apiInstance = new QuantClient\Api\KVApi( new GuzzleHttp\Client(), $config ); -$organization = 'organization_example'; // string -$project = 'project_example'; // string +$organization = test-org; // string | Organization identifier +$project = test-project; // string | Project identifier try { $result = $apiInstance->kVList($organization, $project); @@ -508,8 +508,8 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **organization** | **string**| | | -| **project** | **string**| | | +| **organization** | **string**| Organization identifier | | +| **project** | **string**| Project identifier | | ### Return type @@ -553,9 +553,9 @@ $apiInstance = new QuantClient\Api\KVApi( new GuzzleHttp\Client(), $config ); -$organization = 'organization_example'; // string -$project = 'project_example'; // string -$store_id = 'store_id_example'; // string +$organization = test-org; // string | Organization identifier +$project = test-project; // string | Project identifier +$store_id = 0000; // string try { $result = $apiInstance->kVShow($organization, $project, $store_id); @@ -569,8 +569,8 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **organization** | **string**| | | -| **project** | **string**| | | +| **organization** | **string**| Organization identifier | | +| **project** | **string**| Project identifier | | | **store_id** | **string**| | | ### Return type diff --git a/docs/Api/OrganizationsApi.md b/docs/Api/OrganizationsApi.md index a686013..282ae50 100644 --- a/docs/Api/OrganizationsApi.md +++ b/docs/Api/OrganizationsApi.md @@ -88,7 +88,7 @@ $apiInstance = new QuantClient\Api\OrganizationsApi( new GuzzleHttp\Client(), $config ); -$organization = 'organization_example'; // string +$organization = test-org; // string | Organization identifier try { $result = $apiInstance->organizationsRead($organization); @@ -102,7 +102,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **organization** | **string**| | | +| **organization** | **string**| Organization identifier | | ### Return type diff --git a/docs/Api/ProjectsApi.md b/docs/Api/ProjectsApi.md index 7f9d287..4225809 100644 --- a/docs/Api/ProjectsApi.md +++ b/docs/Api/ProjectsApi.md @@ -36,7 +36,7 @@ $apiInstance = new QuantClient\Api\ProjectsApi( new GuzzleHttp\Client(), $config ); -$organization = 'organization_example'; // string +$organization = test-org; // string | Organization identifier $v2_project_request = new \QuantClient\Model\V2ProjectRequest(); // \QuantClient\Model\V2ProjectRequest try { @@ -51,7 +51,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **organization** | **string**| | | +| **organization** | **string**| Organization identifier | | | **v2_project_request** | [**\QuantClient\Model\V2ProjectRequest**](../Model/V2ProjectRequest.md)| | | ### Return type @@ -96,8 +96,8 @@ $apiInstance = new QuantClient\Api\ProjectsApi( new GuzzleHttp\Client(), $config ); -$organization = 'organization_example'; // string -$project = 'project_example'; // string +$organization = test-org; // string | Organization identifier +$project = test-project; // string | Project identifier try { $apiInstance->projectsDelete($organization, $project); @@ -110,8 +110,8 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **organization** | **string**| | | -| **project** | **string**| | | +| **organization** | **string**| Organization identifier | | +| **project** | **string**| Project identifier | | ### Return type @@ -155,7 +155,7 @@ $apiInstance = new QuantClient\Api\ProjectsApi( new GuzzleHttp\Client(), $config ); -$organization = 'organization_example'; // string +$organization = test-org; // string | Organization identifier try { $result = $apiInstance->projectsList($organization); @@ -169,7 +169,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **organization** | **string**| | | +| **organization** | **string**| Organization identifier | | ### Return type @@ -213,8 +213,8 @@ $apiInstance = new QuantClient\Api\ProjectsApi( new GuzzleHttp\Client(), $config ); -$organization = 'organization_example'; // string -$project = 'project_example'; // string +$organization = test-org; // string | Organization identifier +$project = test-project; // string | Project identifier $with_token = false; // bool try { @@ -229,8 +229,8 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **organization** | **string**| | | -| **project** | **string**| | | +| **organization** | **string**| Organization identifier | | +| **project** | **string**| Project identifier | | | **with_token** | **bool**| | [default to false] | ### Return type @@ -275,8 +275,8 @@ $apiInstance = new QuantClient\Api\ProjectsApi( new GuzzleHttp\Client(), $config ); -$organization = 'organization_example'; // string -$project = 'project_example'; // string +$organization = test-org; // string | Organization identifier +$project = test-project; // string | Project identifier $v2_project_request = new \QuantClient\Model\V2ProjectRequest(); // \QuantClient\Model\V2ProjectRequest try { @@ -291,8 +291,8 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **organization** | **string**| | | -| **project** | **string**| | | +| **organization** | **string**| Organization identifier | | +| **project** | **string**| Project identifier | | | **v2_project_request** | [**\QuantClient\Model\V2ProjectRequest**](../Model/V2ProjectRequest.md)| | | ### Return type diff --git a/docs/Api/PurgeApi.md b/docs/Api/PurgeApi.md index 4382b49..9867270 100644 --- a/docs/Api/PurgeApi.md +++ b/docs/Api/PurgeApi.md @@ -32,8 +32,8 @@ $apiInstance = new QuantClient\Api\PurgeApi( new GuzzleHttp\Client(), $config ); -$organization = 'organization_example'; // string -$project = 'project_example'; // string +$organization = test-org; // string | Organization identifier +$project = test-project; // string | Project identifier $purge_create_request = new \QuantClient\Model\PurgeCreateRequest(); // \QuantClient\Model\PurgeCreateRequest try { @@ -48,8 +48,8 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **organization** | **string**| | | -| **project** | **string**| | | +| **organization** | **string**| Organization identifier | | +| **project** | **string**| Project identifier | | | **purge_create_request** | [**\QuantClient\Model\PurgeCreateRequest**](../Model/PurgeCreateRequest.md)| | | ### Return type diff --git a/docs/Api/SSHAccessApi.md b/docs/Api/SSHAccessApi.md index 0dd19cb..bda27f4 100644 --- a/docs/Api/SSHAccessApi.md +++ b/docs/Api/SSHAccessApi.md @@ -32,9 +32,9 @@ $apiInstance = new QuantClient\Api\SSHAccessApi( new GuzzleHttp\Client(), $config ); -$organisation = 'organisation_example'; // string | The organisation machine name -$application = 'application_example'; // string | The application name -$environment = 'environment_example'; // string | The environment name +$organisation = test-org; // string | The organisation ID +$application = test-app; // string | The application ID +$environment = test-env; // string | The environment ID try { $result = $apiInstance->getSshAccessCredentials($organisation, $application, $environment); @@ -48,9 +48,9 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **organisation** | **string**| The organisation machine name | | -| **application** | **string**| The application name | | -| **environment** | **string**| The environment name | | +| **organisation** | **string**| The organisation ID | | +| **application** | **string**| The application ID | | +| **environment** | **string**| The environment ID | | ### Return type diff --git a/docs/Api/ScalingPolicyApi.md b/docs/Api/ScalingPolicyApi.md index befed8b..4542b7c 100644 --- a/docs/Api/ScalingPolicyApi.md +++ b/docs/Api/ScalingPolicyApi.md @@ -34,9 +34,9 @@ $apiInstance = new QuantClient\Api\ScalingPolicyApi( new GuzzleHttp\Client(), $config ); -$organisation = 'organisation_example'; // string | The organisation ID -$application = 'application_example'; // string | The application ID -$environment = 'environment_example'; // string | The environment ID +$organisation = test-org; // string | The organisation ID +$application = test-app; // string | The application ID +$environment = test-env; // string | The environment ID $policy_name = 'policy_name_example'; // string | The policy name try { @@ -97,9 +97,9 @@ $apiInstance = new QuantClient\Api\ScalingPolicyApi( new GuzzleHttp\Client(), $config ); -$organisation = 'organisation_example'; // string | The organisation ID -$application = 'application_example'; // string | The application ID -$environment = 'environment_example'; // string | The environment ID +$organisation = test-org; // string | The organisation ID +$application = test-app; // string | The application ID +$environment = test-env; // string | The environment ID try { $apiInstance->getScalingPolicies($organisation, $application, $environment); @@ -158,9 +158,9 @@ $apiInstance = new QuantClient\Api\ScalingPolicyApi( new GuzzleHttp\Client(), $config ); -$organisation = 'organisation_example'; // string | The organisation ID -$application = 'application_example'; // string | The application ID -$environment = 'environment_example'; // string | The environment ID +$organisation = test-org; // string | The organisation ID +$application = test-app; // string | The application ID +$environment = test-env; // string | The environment ID $scaling_policy = new \QuantClient\Model\ScalingPolicy(); // \QuantClient\Model\ScalingPolicy try { diff --git a/docs/Api/VariablesApi.md b/docs/Api/VariablesApi.md index 107b218..2e5d7f1 100644 --- a/docs/Api/VariablesApi.md +++ b/docs/Api/VariablesApi.md @@ -35,9 +35,9 @@ $apiInstance = new QuantClient\Api\VariablesApi( new GuzzleHttp\Client(), $config ); -$api_organisation = 'api_organisation_example'; // string | The organisation ID -$api_application = 'api_application_example'; // string | The application ID -$api_environment = 'api_environment_example'; // string | The environment ID +$api_organisation = test-org; // string | The organisation ID +$api_application = test-app; // string | The application ID +$api_environment = test-env; // string | The environment ID $bulk_set_environment_variables_request = new \QuantClient\Model\BulkSetEnvironmentVariablesRequest(); // \QuantClient\Model\BulkSetEnvironmentVariablesRequest try { @@ -161,9 +161,9 @@ $apiInstance = new QuantClient\Api\VariablesApi( new GuzzleHttp\Client(), $config ); -$api_organisation = 'api_organisation_example'; // string | The organisation ID -$api_application = 'api_application_example'; // string | The application ID -$api_environment = 'api_environment_example'; // string | The environment ID +$api_organisation = test-org; // string | The organisation ID +$api_application = test-app; // string | The application ID +$api_environment = test-env; // string | The environment ID try { $apiInstance->listEnvironmentVariables($api_organisation, $api_application, $api_environment); @@ -222,9 +222,9 @@ $apiInstance = new QuantClient\Api\VariablesApi( new GuzzleHttp\Client(), $config ); -$api_organisation = 'api_organisation_example'; // string | The organisation ID -$api_application = 'api_application_example'; // string | The application ID -$api_environment = 'api_environment_example'; // string | The environment ID +$api_organisation = test-org; // string | The organisation ID +$api_application = test-app; // string | The application ID +$api_environment = test-env; // string | The environment ID $api_variable = 'api_variable_example'; // string | The variable key $update_environment_variable_request = new \QuantClient\Model\UpdateEnvironmentVariableRequest(); // \QuantClient\Model\UpdateEnvironmentVariableRequest diff --git a/docs/Api/VolumesApi.md b/docs/Api/VolumesApi.md index a795ffa..9ec1b07 100644 --- a/docs/Api/VolumesApi.md +++ b/docs/Api/VolumesApi.md @@ -35,9 +35,9 @@ $apiInstance = new QuantClient\Api\VolumesApi( new GuzzleHttp\Client(), $config ); -$organisation = 'organisation_example'; // string | The organisation ID -$application = 'application_example'; // string | The application ID -$environment = 'environment_example'; // string | The environment ID +$organisation = test-org; // string | The organisation ID +$application = test-app; // string | The application ID +$environment = test-env; // string | The environment ID $create_volume_request = new \QuantClient\Model\CreateVolumeRequest(); // \QuantClient\Model\CreateVolumeRequest try { @@ -99,9 +99,9 @@ $apiInstance = new QuantClient\Api\VolumesApi( new GuzzleHttp\Client(), $config ); -$organisation = 'organisation_example'; // string | The organisation ID -$application = 'application_example'; // string | The application ID -$environment = 'environment_example'; // string | The environment ID +$organisation = test-org; // string | The organisation ID +$application = test-app; // string | The application ID +$environment = test-env; // string | The environment ID $volume = 'volume_example'; // string | The volume ID try { @@ -162,9 +162,9 @@ $apiInstance = new QuantClient\Api\VolumesApi( new GuzzleHttp\Client(), $config ); -$organisation = 'organisation_example'; // string | The organisation ID -$application = 'application_example'; // string | The application ID -$environment = 'environment_example'; // string | The environment ID +$organisation = test-org; // string | The organisation ID +$application = test-app; // string | The application ID +$environment = test-env; // string | The environment ID $volume = 'volume_example'; // string | The volume ID try { @@ -226,9 +226,9 @@ $apiInstance = new QuantClient\Api\VolumesApi( new GuzzleHttp\Client(), $config ); -$organisation = 'organisation_example'; // string | The organisation ID -$application = 'application_example'; // string | The application ID -$environment = 'environment_example'; // string | The environment ID +$organisation = test-org; // string | The organisation ID +$application = test-app; // string | The application ID +$environment = test-env; // string | The environment ID try { $result = $apiInstance->listVolumes($organisation, $application, $environment); diff --git a/docs/Model/V2RuleProxyAction.md b/docs/Model/V2RuleProxyAction.md index 8d45787..fb127ed 100644 --- a/docs/Model/V2RuleProxyAction.md +++ b/docs/Model/V2RuleProxyAction.md @@ -22,7 +22,7 @@ Name | Type | Description | Notes **notify** | **string** | Notification type (none, slack) | [optional] [default to 'none'] **notify_config** | [**\QuantClient\Model\V2RuleProxyActionNotifyConfig**](V2RuleProxyActionNotifyConfig.md) | | [optional] **waf_enabled** | **bool** | WAF enabled | [optional] [default to false] -**waf_config** | [**\QuantClient\Model\WafConfig**](WafConfig.md) | | [optional] +**waf_config** | [**\QuantClient\Model\V2RuleProxyActionWafConfig**](V2RuleProxyActionWafConfig.md) | | [optional] **proxy_alert_enabled** | **bool** | Proxy alert enabled | [optional] **proxy_inline_fn_enabled** | **bool** | Proxy inline function enabled | [optional] [default to false] **application_proxy** | **bool** | Enable Quant Cloud application proxy mode | [optional] [default to false] diff --git a/docs/Model/V2RuleProxyActionWafConfig.md b/docs/Model/V2RuleProxyActionWafConfig.md new file mode 100644 index 0000000..2ee2cdc --- /dev/null +++ b/docs/Model/V2RuleProxyActionWafConfig.md @@ -0,0 +1,22 @@ +# # V2RuleProxyActionWafConfig + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mode** | **string** | WAF operation mode | [optional] [default to 'report'] +**paranoia_level** | **int** | OWASP paranoia level | [optional] [default to 1] +**allow_rules** | **string[]** | WAF rule IDs to allow/whitelist | [optional] +**allow_ip** | **string[]** | IP addresses to allow | [optional] +**block_ip** | **string[]** | IP addresses to block | [optional] +**block_asn** | **string[]** | ASN numbers to block | [optional] +**block_ua** | **string[]** | User agent patterns to block | [optional] +**block_referer** | **string[]** | Referer patterns to block | [optional] +**notify_slack** | **string** | Slack webhook URL for notifications | [optional] +**notify_slack_hits_rpm** | **int** | Minimum hits per minute to trigger Slack notification | [optional] +**notify_email** | **string[]** | Email addresses for notifications | [optional] +**httpbl** | [**\QuantClient\Model\WafConfigHttpbl**](WafConfigHttpbl.md) | | [optional] +**block_lists** | [**\QuantClient\Model\WafConfigBlockLists**](WafConfigBlockLists.md) | | [optional] +**thresholds** | [**\QuantClient\Model\WafConfigThresholdsInner[]**](WafConfigThresholdsInner.md) | Rate limiting thresholds | [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/V2RuleProxyRequest.md b/docs/Model/V2RuleProxyRequest.md index 59d567f..998f849 100644 --- a/docs/Model/V2RuleProxyRequest.md +++ b/docs/Model/V2RuleProxyRequest.md @@ -36,7 +36,7 @@ Name | Type | Description | Notes **failover_lifetime** | **string** | Failover cache lifetime in seconds | [optional] [default to '300'] **proxy_alert_enabled** | **bool** | Proxy alert enabled | [optional] [default to false] **waf_enabled** | **bool** | WAF enabled | [optional] [default to false] -**waf_config** | [**\QuantClient\Model\WafConfig**](WafConfig.md) | | [optional] +**waf_config** | [**\QuantClient\Model\V2RuleProxyActionWafConfig**](V2RuleProxyActionWafConfig.md) | | [optional] **application_proxy** | **bool** | Enable Quant Cloud application proxy mode | [optional] [default to false] **application_name** | **string** | Quant Cloud application name (required when application_proxy is true) | [optional] **application_environment** | **string** | Quant Cloud application environment (required when application_proxy is true) | [optional] diff --git a/docs/Model/ValidateComposeRequestOneOf.md b/docs/Model/ValidateComposeRequestOneOf.md new file mode 100644 index 0000000..06c23fa --- /dev/null +++ b/docs/Model/ValidateComposeRequestOneOf.md @@ -0,0 +1,11 @@ +# # ValidateComposeRequestOneOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**compose** | **string** | The docker-compose.yml file content as a string | +**image_suffix** | **string** | Optional image tag suffix (query parameter takes precedence) | [optional] +**application** | **string** | Optional application name for context | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/src/Api/AIAgentsApi.php b/src/Api/AIAgentsApi.php index ce5b961..b91e4c6 100644 --- a/src/Api/AIAgentsApi.php +++ b/src/Api/AIAgentsApi.php @@ -1,7 +1,7 @@ client = $client ?: new Client(); $this->config = $config ?: Configuration::getDefaultConfiguration(); @@ -203,14 +200,33 @@ public function chatWithAIAgentWithHttpInfo($organisation, $agent_id, $chat_with switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\ChatWithAIAgent200Response', - $request, - $response, - ); - } + if ('\QuantClient\Model\ChatWithAIAgent200Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\ChatWithAIAgent200Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\ChatWithAIAgent200Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -225,11 +241,34 @@ public function chatWithAIAgentWithHttpInfo($organisation, $agent_id, $chat_with ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\ChatWithAIAgent200Response', - $request, - $response, - ); + $returnType = '\QuantClient\Model\ChatWithAIAgent200Response'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -239,10 +278,8 @@ public function chatWithAIAgentWithHttpInfo($organisation, $agent_id, $chat_with $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -512,14 +549,33 @@ public function createAIAgentWithHttpInfo($organisation, $create_ai_agent_reques switch($statusCode) { case 201: - return $this->handleResponseWithDataType( - '\QuantClient\Model\CreateAIAgent201Response', - $request, - $response, - ); - } + if ('\QuantClient\Model\CreateAIAgent201Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\CreateAIAgent201Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\CreateAIAgent201Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -534,11 +590,34 @@ public function createAIAgentWithHttpInfo($organisation, $create_ai_agent_reques ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\CreateAIAgent201Response', - $request, - $response, - ); + $returnType = '\QuantClient\Model\CreateAIAgent201Response'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -548,10 +627,8 @@ public function createAIAgentWithHttpInfo($organisation, $create_ai_agent_reques $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -803,14 +880,33 @@ public function deleteAIAgentWithHttpInfo($organisation, $agent_id, string $cont switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\DeleteAIAgent200Response', - $request, - $response, - ); - } + if ('\QuantClient\Model\DeleteAIAgent200Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\DeleteAIAgent200Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\DeleteAIAgent200Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -825,11 +921,34 @@ public function deleteAIAgentWithHttpInfo($organisation, $agent_id, string $cont ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\DeleteAIAgent200Response', - $request, - $response, - ); + $returnType = '\QuantClient\Model\DeleteAIAgent200Response'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -839,10 +958,8 @@ public function deleteAIAgentWithHttpInfo($organisation, $agent_id, string $cont $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -1095,14 +1212,33 @@ public function getAIAgentWithHttpInfo($organisation, $agent_id, string $content switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\GetAIAgent200Response', - $request, - $response, - ); - } + if ('\QuantClient\Model\GetAIAgent200Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\GetAIAgent200Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\GetAIAgent200Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1117,11 +1253,34 @@ public function getAIAgentWithHttpInfo($organisation, $agent_id, string $content ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\GetAIAgent200Response', - $request, - $response, - ); + $returnType = '\QuantClient\Model\GetAIAgent200Response'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1131,10 +1290,8 @@ public function getAIAgentWithHttpInfo($organisation, $agent_id, string $content $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -1332,7 +1489,7 @@ public function getAIAgentRequest($organisation, $agent_id, string $contentType * List AI Agents * * @param string $organisation The organisation ID (required) - * @param string|null $group Optional group filter (e.g., 'development', 'compliance') (optional) + * @param string $group Optional group filter (e.g., 'development', 'compliance') (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listAIAgents'] to see the possible values for this operation * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format @@ -1351,7 +1508,7 @@ public function listAIAgents($organisation, $group = null, string $contentType = * List AI Agents * * @param string $organisation The organisation ID (required) - * @param string|null $group Optional group filter (e.g., 'development', 'compliance') (optional) + * @param string $group Optional group filter (e.g., 'development', 'compliance') (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listAIAgents'] to see the possible values for this operation * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format @@ -1387,14 +1544,33 @@ public function listAIAgentsWithHttpInfo($organisation, $group = null, string $c switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\ListAIAgents200Response', - $request, - $response, - ); - } + if ('\QuantClient\Model\ListAIAgents200Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\ListAIAgents200Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\ListAIAgents200Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1409,11 +1585,34 @@ public function listAIAgentsWithHttpInfo($organisation, $group = null, string $c ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\ListAIAgents200Response', - $request, - $response, - ); + $returnType = '\QuantClient\Model\ListAIAgents200Response'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1423,10 +1622,8 @@ public function listAIAgentsWithHttpInfo($organisation, $group = null, string $c $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -1437,7 +1634,7 @@ public function listAIAgentsWithHttpInfo($organisation, $group = null, string $c * List AI Agents * * @param string $organisation The organisation ID (required) - * @param string|null $group Optional group filter (e.g., 'development', 'compliance') (optional) + * @param string $group Optional group filter (e.g., 'development', 'compliance') (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listAIAgents'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1459,7 +1656,7 @@ function ($response) { * List AI Agents * * @param string $organisation The organisation ID (required) - * @param string|null $group Optional group filter (e.g., 'development', 'compliance') (optional) + * @param string $group Optional group filter (e.g., 'development', 'compliance') (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listAIAgents'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1510,7 +1707,7 @@ function ($exception) { * Create request for operation 'listAIAgents' * * @param string $organisation The organisation ID (required) - * @param string|null $group Optional group filter (e.g., 'development', 'compliance') (optional) + * @param string $group Optional group filter (e.g., 'development', 'compliance') (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listAIAgents'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1676,14 +1873,33 @@ public function updateAIAgentWithHttpInfo($organisation, $agent_id, $update_ai_a switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\UpdateAIAgent200Response', - $request, - $response, - ); - } + if ('\QuantClient\Model\UpdateAIAgent200Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\UpdateAIAgent200Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\UpdateAIAgent200Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1698,11 +1914,34 @@ public function updateAIAgentWithHttpInfo($organisation, $agent_id, $update_ai_a ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\UpdateAIAgent200Response', - $request, - $response, - ); + $returnType = '\QuantClient\Model\UpdateAIAgent200Response'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1712,10 +1951,8 @@ public function updateAIAgentWithHttpInfo($organisation, $agent_id, $update_ai_a $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -1942,47 +2179,4 @@ protected function createHttpClientOption() 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/src/Api/AICustomToolsApi.php b/src/Api/AICustomToolsApi.php index bb03f5e..8a60d19 100644 --- a/src/Api/AICustomToolsApi.php +++ b/src/Api/AICustomToolsApi.php @@ -1,7 +1,7 @@ client = $client ?: new Client(); $this->config = $config ?: Configuration::getDefaultConfiguration(); @@ -192,14 +189,33 @@ public function createCustomToolWithHttpInfo($organisation, $create_custom_tool_ switch($statusCode) { case 201: - return $this->handleResponseWithDataType( - '\QuantClient\Model\CreateCustomTool201Response', - $request, - $response, - ); - } + if ('\QuantClient\Model\CreateCustomTool201Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\CreateCustomTool201Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\CreateCustomTool201Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -214,11 +230,34 @@ public function createCustomToolWithHttpInfo($organisation, $create_custom_tool_ ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\CreateCustomTool201Response', - $request, - $response, - ); + $returnType = '\QuantClient\Model\CreateCustomTool201Response'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -228,10 +267,8 @@ public function createCustomToolWithHttpInfo($organisation, $create_custom_tool_ $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -483,14 +520,33 @@ public function deleteCustomToolWithHttpInfo($organisation, $tool_name, string $ switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\DeleteCustomTool200Response', - $request, - $response, - ); - } + if ('\QuantClient\Model\DeleteCustomTool200Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\DeleteCustomTool200Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\DeleteCustomTool200Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -505,11 +561,34 @@ public function deleteCustomToolWithHttpInfo($organisation, $tool_name, string $ ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\DeleteCustomTool200Response', - $request, - $response, - ); + $returnType = '\QuantClient\Model\DeleteCustomTool200Response'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -519,10 +598,8 @@ public function deleteCustomToolWithHttpInfo($organisation, $tool_name, string $ $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -773,14 +850,33 @@ public function listCustomToolsWithHttpInfo($organisation, string $contentType = switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\ListCustomTools200Response', - $request, - $response, - ); - } + if ('\QuantClient\Model\ListCustomTools200Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\ListCustomTools200Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\ListCustomTools200Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -795,11 +891,34 @@ public function listCustomToolsWithHttpInfo($organisation, string $contentType = ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\ListCustomTools200Response', - $request, - $response, - ); + $returnType = '\QuantClient\Model\ListCustomTools200Response'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -809,10 +928,8 @@ public function listCustomToolsWithHttpInfo($organisation, string $contentType = $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -1004,47 +1121,4 @@ protected function createHttpClientOption() 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/src/Api/AIInferenceApi.php b/src/Api/AIInferenceApi.php index 89f007e..220544b 100644 --- a/src/Api/AIInferenceApi.php +++ b/src/Api/AIInferenceApi.php @@ -1,7 +1,7 @@ client = $client ?: new Client(); $this->config = $config ?: Configuration::getDefaultConfiguration(); @@ -195,14 +192,33 @@ public function chatInferenceWithHttpInfo($organisation, $chat_inference_request switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\ChatInference200Response', - $request, - $response, - ); - } + if ('\QuantClient\Model\ChatInference200Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\ChatInference200Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\ChatInference200Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -217,11 +233,34 @@ public function chatInferenceWithHttpInfo($organisation, $chat_inference_request ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\ChatInference200Response', - $request, - $response, - ); + $returnType = '\QuantClient\Model\ChatInference200Response'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -231,10 +270,8 @@ public function chatInferenceWithHttpInfo($organisation, $chat_inference_request $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -486,14 +523,33 @@ public function chatInferenceStreamWithHttpInfo($organisation, $chat_inference_s switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - 'string', - $request, - $response, - ); - } + if ('string' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('string' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, 'string', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -508,11 +564,34 @@ public function chatInferenceStreamWithHttpInfo($organisation, $chat_inference_s ); } - return $this->handleResponseWithDataType( - 'string', - $request, - $response, - ); + $returnType = 'string'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -522,10 +601,8 @@ public function chatInferenceStreamWithHttpInfo($organisation, $chat_inference_s $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -777,14 +854,33 @@ public function embeddingsWithHttpInfo($organisation, $embeddings_request, strin switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\Embeddings200Response', - $request, - $response, - ); - } + if ('\QuantClient\Model\Embeddings200Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\Embeddings200Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\Embeddings200Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -799,11 +895,34 @@ public function embeddingsWithHttpInfo($organisation, $embeddings_request, strin ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\Embeddings200Response', - $request, - $response, - ); + $returnType = '\QuantClient\Model\Embeddings200Response'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -813,10 +932,8 @@ public function embeddingsWithHttpInfo($organisation, $embeddings_request, strin $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -1068,14 +1185,33 @@ public function imageGenerationWithHttpInfo($organisation, $image_generation_req switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\ImageGeneration200Response', - $request, - $response, - ); - } + if ('\QuantClient\Model\ImageGeneration200Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\ImageGeneration200Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\ImageGeneration200Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1090,11 +1226,34 @@ public function imageGenerationWithHttpInfo($organisation, $image_generation_req ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\ImageGeneration200Response', - $request, - $response, - ); + $returnType = '\QuantClient\Model\ImageGeneration200Response'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1104,10 +1263,8 @@ public function imageGenerationWithHttpInfo($organisation, $image_generation_req $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -1316,47 +1473,4 @@ protected function createHttpClientOption() 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/src/Api/AIModelsApi.php b/src/Api/AIModelsApi.php index 28a46d9..69c4dc0 100644 --- a/src/Api/AIModelsApi.php +++ b/src/Api/AIModelsApi.php @@ -1,7 +1,7 @@ client = $client ?: new Client(); $this->config = $config ?: Configuration::getDefaultConfiguration(); @@ -189,20 +186,60 @@ public function getAIModelWithHttpInfo($organisation, $model_id, string $content switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\GetAIModel200Response', - $request, - $response, - ); + if ('\QuantClient\Model\GetAIModel200Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\GetAIModel200Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\GetAIModel200Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 404: - return $this->handleResponseWithDataType( - '\QuantClient\Model\GetAIModel404Response', - $request, - $response, - ); - } + if ('\QuantClient\Model\GetAIModel404Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\GetAIModel404Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\GetAIModel404Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -217,11 +254,34 @@ public function getAIModelWithHttpInfo($organisation, $model_id, string $content ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\GetAIModel200Response', - $request, - $response, - ); + $returnType = '\QuantClient\Model\GetAIModel200Response'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -231,7 +291,7 @@ public function getAIModelWithHttpInfo($organisation, $model_id, string $content $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -239,10 +299,8 @@ public function getAIModelWithHttpInfo($organisation, $model_id, string $content $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -440,7 +498,7 @@ public function getAIModelRequest($organisation, $model_id, string $contentType * List available AI models for an organization * * @param string $organisation The organisation ID (required) - * @param string|null $feature Filter models by supported feature (optional, default to 'all') + * @param string $feature Filter models by supported feature (optional, default to 'all') * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listAIModels'] to see the possible values for this operation * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format @@ -459,7 +517,7 @@ public function listAIModels($organisation, $feature = 'all', string $contentTyp * List available AI models for an organization * * @param string $organisation The organisation ID (required) - * @param string|null $feature Filter models by supported feature (optional, default to 'all') + * @param string $feature Filter models by supported feature (optional, default to 'all') * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listAIModels'] to see the possible values for this operation * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format @@ -495,14 +553,33 @@ public function listAIModelsWithHttpInfo($organisation, $feature = 'all', string switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\ListAIModels200Response', - $request, - $response, - ); - } + if ('\QuantClient\Model\ListAIModels200Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\ListAIModels200Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\ListAIModels200Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -517,11 +594,34 @@ public function listAIModelsWithHttpInfo($organisation, $feature = 'all', string ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\ListAIModels200Response', - $request, - $response, - ); + $returnType = '\QuantClient\Model\ListAIModels200Response'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -531,10 +631,8 @@ public function listAIModelsWithHttpInfo($organisation, $feature = 'all', string $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -545,7 +643,7 @@ public function listAIModelsWithHttpInfo($organisation, $feature = 'all', string * List available AI models for an organization * * @param string $organisation The organisation ID (required) - * @param string|null $feature Filter models by supported feature (optional, default to 'all') + * @param string $feature Filter models by supported feature (optional, default to 'all') * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listAIModels'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -567,7 +665,7 @@ function ($response) { * List available AI models for an organization * * @param string $organisation The organisation ID (required) - * @param string|null $feature Filter models by supported feature (optional, default to 'all') + * @param string $feature Filter models by supported feature (optional, default to 'all') * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listAIModels'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -618,7 +716,7 @@ function ($exception) { * Create request for operation 'listAIModels' * * @param string $organisation The organisation ID (required) - * @param string|null $feature Filter models by supported feature (optional, default to 'all') + * @param string $feature Filter models by supported feature (optional, default to 'all') * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listAIModels'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -739,47 +837,4 @@ protected function createHttpClientOption() 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/src/Api/AIMonitoringApi.php b/src/Api/AIMonitoringApi.php index a21ae23..8328d0a 100644 --- a/src/Api/AIMonitoringApi.php +++ b/src/Api/AIMonitoringApi.php @@ -1,7 +1,7 @@ client = $client ?: new Client(); $this->config = $config ?: Configuration::getDefaultConfiguration(); @@ -131,7 +128,7 @@ public function getConfig() * Get AI usage statistics * * @param string $organisation The organisation ID (required) - * @param string|null $month Month to retrieve statistics for (YYYY-MM format) (optional) + * @param string $month Month to retrieve statistics for (YYYY-MM format) (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAIUsageStats'] to see the possible values for this operation * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format @@ -150,7 +147,7 @@ public function getAIUsageStats($organisation, $month = null, string $contentTyp * Get AI usage statistics * * @param string $organisation The organisation ID (required) - * @param string|null $month Month to retrieve statistics for (YYYY-MM format) (optional) + * @param string $month Month to retrieve statistics for (YYYY-MM format) (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAIUsageStats'] to see the possible values for this operation * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format @@ -186,14 +183,33 @@ public function getAIUsageStatsWithHttpInfo($organisation, $month = null, string switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\GetAIUsageStats200Response', - $request, - $response, - ); - } + if ('\QuantClient\Model\GetAIUsageStats200Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\GetAIUsageStats200Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\GetAIUsageStats200Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -208,11 +224,34 @@ public function getAIUsageStatsWithHttpInfo($organisation, $month = null, string ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\GetAIUsageStats200Response', - $request, - $response, - ); + $returnType = '\QuantClient\Model\GetAIUsageStats200Response'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -222,10 +261,8 @@ public function getAIUsageStatsWithHttpInfo($organisation, $month = null, string $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -236,7 +273,7 @@ public function getAIUsageStatsWithHttpInfo($organisation, $month = null, string * Get AI usage statistics * * @param string $organisation The organisation ID (required) - * @param string|null $month Month to retrieve statistics for (YYYY-MM format) (optional) + * @param string $month Month to retrieve statistics for (YYYY-MM format) (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAIUsageStats'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -258,7 +295,7 @@ function ($response) { * Get AI usage statistics * * @param string $organisation The organisation ID (required) - * @param string|null $month Month to retrieve statistics for (YYYY-MM format) (optional) + * @param string $month Month to retrieve statistics for (YYYY-MM format) (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAIUsageStats'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -309,7 +346,7 @@ function ($exception) { * Create request for operation 'getAIUsageStats' * * @param string $organisation The organisation ID (required) - * @param string|null $month Month to retrieve statistics for (YYYY-MM format) (optional) + * @param string $month Month to retrieve statistics for (YYYY-MM format) (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAIUsageStats'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -430,47 +467,4 @@ protected function createHttpClientOption() 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/src/Api/AISessionsApi.php b/src/Api/AISessionsApi.php index 4ed22d8..1daed68 100644 --- a/src/Api/AISessionsApi.php +++ b/src/Api/AISessionsApi.php @@ -1,7 +1,7 @@ client = $client ?: new Client(); $this->config = $config ?: Configuration::getDefaultConfiguration(); @@ -201,14 +198,33 @@ public function createAISessionWithHttpInfo($organisation, $create_ai_session_re switch($statusCode) { case 201: - return $this->handleResponseWithDataType( - '\QuantClient\Model\CreateAISession201Response', - $request, - $response, - ); - } + if ('\QuantClient\Model\CreateAISession201Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\CreateAISession201Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\CreateAISession201Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -223,11 +239,34 @@ public function createAISessionWithHttpInfo($organisation, $create_ai_session_re ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\CreateAISession201Response', - $request, - $response, - ); + $returnType = '\QuantClient\Model\CreateAISession201Response'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -237,10 +276,8 @@ public function createAISessionWithHttpInfo($organisation, $create_ai_session_re $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -492,14 +529,33 @@ public function deleteAISessionWithHttpInfo($organisation, $session_id, string $ switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\DeleteAISession200Response', - $request, - $response, - ); - } + if ('\QuantClient\Model\DeleteAISession200Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\DeleteAISession200Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\DeleteAISession200Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -514,11 +570,34 @@ public function deleteAISessionWithHttpInfo($organisation, $session_id, string $ ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\DeleteAISession200Response', - $request, - $response, - ); + $returnType = '\QuantClient\Model\DeleteAISession200Response'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -528,10 +607,8 @@ public function deleteAISessionWithHttpInfo($organisation, $session_id, string $ $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -730,7 +807,7 @@ public function deleteAISessionRequest($organisation, $session_id, string $conte * * @param string $organisation The organisation ID (required) * @param string $session_id The session ID (required) - * @param \QuantClient\Model\ExtendAISessionRequest|null $extend_ai_session_request extend_ai_session_request (optional) + * @param \QuantClient\Model\ExtendAISessionRequest $extend_ai_session_request extend_ai_session_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['extendAISession'] to see the possible values for this operation * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format @@ -750,7 +827,7 @@ public function extendAISession($organisation, $session_id, $extend_ai_session_r * * @param string $organisation The organisation ID (required) * @param string $session_id The session ID (required) - * @param \QuantClient\Model\ExtendAISessionRequest|null $extend_ai_session_request (optional) + * @param \QuantClient\Model\ExtendAISessionRequest $extend_ai_session_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['extendAISession'] to see the possible values for this operation * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format @@ -786,14 +863,33 @@ public function extendAISessionWithHttpInfo($organisation, $session_id, $extend_ switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\ExtendAISession200Response', - $request, - $response, - ); - } + if ('\QuantClient\Model\ExtendAISession200Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\ExtendAISession200Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\ExtendAISession200Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -808,11 +904,34 @@ public function extendAISessionWithHttpInfo($organisation, $session_id, $extend_ ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\ExtendAISession200Response', - $request, - $response, - ); + $returnType = '\QuantClient\Model\ExtendAISession200Response'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -822,10 +941,8 @@ public function extendAISessionWithHttpInfo($organisation, $session_id, $extend_ $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -837,7 +954,7 @@ public function extendAISessionWithHttpInfo($organisation, $session_id, $extend_ * * @param string $organisation The organisation ID (required) * @param string $session_id The session ID (required) - * @param \QuantClient\Model\ExtendAISessionRequest|null $extend_ai_session_request (optional) + * @param \QuantClient\Model\ExtendAISessionRequest $extend_ai_session_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['extendAISession'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -860,7 +977,7 @@ function ($response) { * * @param string $organisation The organisation ID (required) * @param string $session_id The session ID (required) - * @param \QuantClient\Model\ExtendAISessionRequest|null $extend_ai_session_request (optional) + * @param \QuantClient\Model\ExtendAISessionRequest $extend_ai_session_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['extendAISession'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -912,7 +1029,7 @@ function ($exception) { * * @param string $organisation The organisation ID (required) * @param string $session_id The session ID (required) - * @param \QuantClient\Model\ExtendAISessionRequest|null $extend_ai_session_request (optional) + * @param \QuantClient\Model\ExtendAISessionRequest $extend_ai_session_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['extendAISession'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1089,14 +1206,33 @@ public function getAISessionWithHttpInfo($organisation, $session_id, string $con switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\GetAISession200Response', - $request, - $response, - ); - } + if ('\QuantClient\Model\GetAISession200Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\GetAISession200Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\GetAISession200Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1111,11 +1247,34 @@ public function getAISessionWithHttpInfo($organisation, $session_id, string $con ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\GetAISession200Response', - $request, - $response, - ); + $returnType = '\QuantClient\Model\GetAISession200Response'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1125,10 +1284,8 @@ public function getAISessionWithHttpInfo($organisation, $session_id, string $con $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -1326,11 +1483,11 @@ public function getAISessionRequest($organisation, $session_id, string $contentT * List chat sessions with multi-tenant filtering * * @param string $organisation The organisation ID (required) - * @param string|null $user_id Filter sessions by user ID (optional) - * @param string|null $session_group Filter by session group. Returns only sessions matching the specified group. (optional) - * @param int|null $limit Maximum number of sessions to return (default 50, max 100) (optional, default to 50) - * @param int|null $offset Offset for pagination (optional) - * @param string|null $model Filter by model ID (optional) + * @param string $user_id Filter sessions by user ID (optional) + * @param string $session_group Filter by session group. Returns only sessions matching the specified group. (optional) + * @param int $limit Maximum number of sessions to return (default 50, max 100) (optional, default to 50) + * @param int $offset Offset for pagination (optional) + * @param string $model Filter by model ID (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listAISessions'] to see the possible values for this operation * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format @@ -1349,11 +1506,11 @@ public function listAISessions($organisation, $user_id = null, $session_group = * List chat sessions with multi-tenant filtering * * @param string $organisation The organisation ID (required) - * @param string|null $user_id Filter sessions by user ID (optional) - * @param string|null $session_group Filter by session group. Returns only sessions matching the specified group. (optional) - * @param int|null $limit Maximum number of sessions to return (default 50, max 100) (optional, default to 50) - * @param int|null $offset Offset for pagination (optional) - * @param string|null $model Filter by model ID (optional) + * @param string $user_id Filter sessions by user ID (optional) + * @param string $session_group Filter by session group. Returns only sessions matching the specified group. (optional) + * @param int $limit Maximum number of sessions to return (default 50, max 100) (optional, default to 50) + * @param int $offset Offset for pagination (optional) + * @param string $model Filter by model ID (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listAISessions'] to see the possible values for this operation * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format @@ -1389,14 +1546,33 @@ public function listAISessionsWithHttpInfo($organisation, $user_id = null, $sess switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\ListAISessions200ResponseInner[]', - $request, - $response, - ); - } + if ('\QuantClient\Model\ListAISessions200ResponseInner[]' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\ListAISessions200ResponseInner[]' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\ListAISessions200ResponseInner[]', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1411,11 +1587,34 @@ public function listAISessionsWithHttpInfo($organisation, $user_id = null, $sess ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\ListAISessions200ResponseInner[]', - $request, - $response, - ); + $returnType = '\QuantClient\Model\ListAISessions200ResponseInner[]'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1425,10 +1624,8 @@ public function listAISessionsWithHttpInfo($organisation, $user_id = null, $sess $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -1439,11 +1636,11 @@ public function listAISessionsWithHttpInfo($organisation, $user_id = null, $sess * List chat sessions with multi-tenant filtering * * @param string $organisation The organisation ID (required) - * @param string|null $user_id Filter sessions by user ID (optional) - * @param string|null $session_group Filter by session group. Returns only sessions matching the specified group. (optional) - * @param int|null $limit Maximum number of sessions to return (default 50, max 100) (optional, default to 50) - * @param int|null $offset Offset for pagination (optional) - * @param string|null $model Filter by model ID (optional) + * @param string $user_id Filter sessions by user ID (optional) + * @param string $session_group Filter by session group. Returns only sessions matching the specified group. (optional) + * @param int $limit Maximum number of sessions to return (default 50, max 100) (optional, default to 50) + * @param int $offset Offset for pagination (optional) + * @param string $model Filter by model ID (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listAISessions'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1465,11 +1662,11 @@ function ($response) { * List chat sessions with multi-tenant filtering * * @param string $organisation The organisation ID (required) - * @param string|null $user_id Filter sessions by user ID (optional) - * @param string|null $session_group Filter by session group. Returns only sessions matching the specified group. (optional) - * @param int|null $limit Maximum number of sessions to return (default 50, max 100) (optional, default to 50) - * @param int|null $offset Offset for pagination (optional) - * @param string|null $model Filter by model ID (optional) + * @param string $user_id Filter sessions by user ID (optional) + * @param string $session_group Filter by session group. Returns only sessions matching the specified group. (optional) + * @param int $limit Maximum number of sessions to return (default 50, max 100) (optional, default to 50) + * @param int $offset Offset for pagination (optional) + * @param string $model Filter by model ID (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listAISessions'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1520,11 +1717,11 @@ function ($exception) { * Create request for operation 'listAISessions' * * @param string $organisation The organisation ID (required) - * @param string|null $user_id Filter sessions by user ID (optional) - * @param string|null $session_group Filter by session group. Returns only sessions matching the specified group. (optional) - * @param int|null $limit Maximum number of sessions to return (default 50, max 100) (optional, default to 50) - * @param int|null $offset Offset for pagination (optional) - * @param string|null $model Filter by model ID (optional) + * @param string $user_id Filter sessions by user ID (optional) + * @param string $session_group Filter by session group. Returns only sessions matching the specified group. (optional) + * @param int $limit Maximum number of sessions to return (default 50, max 100) (optional, default to 50) + * @param int $offset Offset for pagination (optional) + * @param string $model Filter by model ID (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listAISessions'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1736,14 +1933,33 @@ public function updateAISessionWithHttpInfo($organisation, $session_id, $update_ switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\UpdateAISession200Response', - $request, - $response, - ); - } + if ('\QuantClient\Model\UpdateAISession200Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\UpdateAISession200Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\UpdateAISession200Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1758,11 +1974,34 @@ public function updateAISessionWithHttpInfo($organisation, $session_id, $update_ ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\UpdateAISession200Response', - $request, - $response, - ); + $returnType = '\QuantClient\Model\UpdateAISession200Response'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1772,10 +2011,8 @@ public function updateAISessionWithHttpInfo($organisation, $session_id, $update_ $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -2002,47 +2239,4 @@ protected function createHttpClientOption() 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/src/Api/AIToolsApi.php b/src/Api/AIToolsApi.php index 00516dc..5439c21 100644 --- a/src/Api/AIToolsApi.php +++ b/src/Api/AIToolsApi.php @@ -1,7 +1,7 @@ client = $client ?: new Client(); $this->config = $config ?: Configuration::getDefaultConfiguration(); @@ -195,20 +192,60 @@ public function getAIToolExecutionStatusWithHttpInfo($organisation, $execution_i switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\GetAIToolExecutionStatus200Response', - $request, - $response, - ); + if ('\QuantClient\Model\GetAIToolExecutionStatus200Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\GetAIToolExecutionStatus200Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\GetAIToolExecutionStatus200Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 404: - return $this->handleResponseWithDataType( - '\QuantClient\Model\GetAIToolExecutionStatus404Response', - $request, - $response, - ); - } + if ('\QuantClient\Model\GetAIToolExecutionStatus404Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\GetAIToolExecutionStatus404Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\GetAIToolExecutionStatus404Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -223,11 +260,34 @@ public function getAIToolExecutionStatusWithHttpInfo($organisation, $execution_i ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\GetAIToolExecutionStatus200Response', - $request, - $response, - ); + $returnType = '\QuantClient\Model\GetAIToolExecutionStatus200Response'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -237,7 +297,7 @@ public function getAIToolExecutionStatusWithHttpInfo($organisation, $execution_i $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -245,10 +305,8 @@ public function getAIToolExecutionStatusWithHttpInfo($organisation, $execution_i $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -449,8 +507,8 @@ public function getAIToolExecutionStatusRequest($organisation, $execution_id, st * List tool executions for monitoring and debugging * * @param string $organisation The organisation ID (required) - * @param string|null $status Filter by execution status (optional) - * @param int|null $limit Maximum number of executions to return (optional, default to 50) + * @param string $status Filter by execution status (optional) + * @param int $limit Maximum number of executions to return (optional, default to 50) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listAIToolExecutions'] to see the possible values for this operation * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format @@ -469,8 +527,8 @@ public function listAIToolExecutions($organisation, $status = null, $limit = 50, * List tool executions for monitoring and debugging * * @param string $organisation The organisation ID (required) - * @param string|null $status Filter by execution status (optional) - * @param int|null $limit Maximum number of executions to return (optional, default to 50) + * @param string $status Filter by execution status (optional) + * @param int $limit Maximum number of executions to return (optional, default to 50) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listAIToolExecutions'] to see the possible values for this operation * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format @@ -506,14 +564,33 @@ public function listAIToolExecutionsWithHttpInfo($organisation, $status = null, switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\ListAIToolExecutions200Response', - $request, - $response, - ); - } + if ('\QuantClient\Model\ListAIToolExecutions200Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\ListAIToolExecutions200Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\ListAIToolExecutions200Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -528,11 +605,34 @@ public function listAIToolExecutionsWithHttpInfo($organisation, $status = null, ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\ListAIToolExecutions200Response', - $request, - $response, - ); + $returnType = '\QuantClient\Model\ListAIToolExecutions200Response'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -542,10 +642,8 @@ public function listAIToolExecutionsWithHttpInfo($organisation, $status = null, $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -556,8 +654,8 @@ public function listAIToolExecutionsWithHttpInfo($organisation, $status = null, * List tool executions for monitoring and debugging * * @param string $organisation The organisation ID (required) - * @param string|null $status Filter by execution status (optional) - * @param int|null $limit Maximum number of executions to return (optional, default to 50) + * @param string $status Filter by execution status (optional) + * @param int $limit Maximum number of executions to return (optional, default to 50) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listAIToolExecutions'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -579,8 +677,8 @@ function ($response) { * List tool executions for monitoring and debugging * * @param string $organisation The organisation ID (required) - * @param string|null $status Filter by execution status (optional) - * @param int|null $limit Maximum number of executions to return (optional, default to 50) + * @param string $status Filter by execution status (optional) + * @param int $limit Maximum number of executions to return (optional, default to 50) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listAIToolExecutions'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -631,8 +729,8 @@ function ($exception) { * Create request for operation 'listAIToolExecutions' * * @param string $organisation The organisation ID (required) - * @param string|null $status Filter by execution status (optional) - * @param int|null $limit Maximum number of executions to return (optional, default to 50) + * @param string $status Filter by execution status (optional) + * @param int $limit Maximum number of executions to return (optional, default to 50) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listAIToolExecutions'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -810,14 +908,33 @@ public function listAIToolNamesWithHttpInfo($organisation, string $contentType = switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\ListAIToolNames200Response', - $request, - $response, - ); - } + if ('\QuantClient\Model\ListAIToolNames200Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\ListAIToolNames200Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\ListAIToolNames200Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -832,11 +949,34 @@ public function listAIToolNamesWithHttpInfo($organisation, string $contentType = ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\ListAIToolNames200Response', - $request, - $response, - ); + $returnType = '\QuantClient\Model\ListAIToolNames200Response'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -846,10 +986,8 @@ public function listAIToolNamesWithHttpInfo($organisation, string $contentType = $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -1082,14 +1220,33 @@ public function listAIToolsWithHttpInfo($organisation, string $contentType = sel switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\ListAITools200Response', - $request, - $response, - ); - } + if ('\QuantClient\Model\ListAITools200Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\ListAITools200Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\ListAITools200Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1104,11 +1261,34 @@ public function listAIToolsWithHttpInfo($organisation, string $contentType = sel ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\ListAITools200Response', - $request, - $response, - ); + $returnType = '\QuantClient\Model\ListAITools200Response'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1118,10 +1298,8 @@ public function listAIToolsWithHttpInfo($organisation, string $contentType = sel $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -1313,47 +1491,4 @@ protected function createHttpClientOption() 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/src/Api/AIVectorDatabaseApi.php b/src/Api/AIVectorDatabaseApi.php index 55b8dbf..5b372a7 100644 --- a/src/Api/AIVectorDatabaseApi.php +++ b/src/Api/AIVectorDatabaseApi.php @@ -1,7 +1,7 @@ client = $client ?: new Client(); $this->config = $config ?: Configuration::getDefaultConfiguration(); @@ -201,14 +198,33 @@ public function createVectorCollectionWithHttpInfo($organisation, $create_vector switch($statusCode) { case 201: - return $this->handleResponseWithDataType( - '\QuantClient\Model\CreateVectorCollection201Response', - $request, - $response, - ); - } + if ('\QuantClient\Model\CreateVectorCollection201Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\CreateVectorCollection201Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\CreateVectorCollection201Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -223,11 +239,34 @@ public function createVectorCollectionWithHttpInfo($organisation, $create_vector ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\CreateVectorCollection201Response', - $request, - $response, - ); + $returnType = '\QuantClient\Model\CreateVectorCollection201Response'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -237,10 +276,8 @@ public function createVectorCollectionWithHttpInfo($organisation, $create_vector $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -492,14 +529,33 @@ public function deleteVectorCollectionWithHttpInfo($organisation, $collection_id switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\DeleteVectorCollection200Response', - $request, - $response, - ); - } + if ('\QuantClient\Model\DeleteVectorCollection200Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\DeleteVectorCollection200Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\DeleteVectorCollection200Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -514,11 +570,34 @@ public function deleteVectorCollectionWithHttpInfo($organisation, $collection_id ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\DeleteVectorCollection200Response', - $request, - $response, - ); + $returnType = '\QuantClient\Model\DeleteVectorCollection200Response'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -528,10 +607,8 @@ public function deleteVectorCollectionWithHttpInfo($organisation, $collection_id $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -784,14 +861,33 @@ public function getVectorCollectionWithHttpInfo($organisation, $collection_id, s switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\GetVectorCollection200Response', - $request, - $response, - ); - } + if ('\QuantClient\Model\GetVectorCollection200Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\GetVectorCollection200Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\GetVectorCollection200Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -806,11 +902,34 @@ public function getVectorCollectionWithHttpInfo($organisation, $collection_id, s ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\GetVectorCollection200Response', - $request, - $response, - ); + $returnType = '\QuantClient\Model\GetVectorCollection200Response'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -820,10 +939,8 @@ public function getVectorCollectionWithHttpInfo($organisation, $collection_id, s $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -1074,14 +1191,33 @@ public function listVectorCollectionsWithHttpInfo($organisation, string $content switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\ListVectorCollections200Response', - $request, - $response, - ); - } + if ('\QuantClient\Model\ListVectorCollections200Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\ListVectorCollections200Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\ListVectorCollections200Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1096,11 +1232,34 @@ public function listVectorCollectionsWithHttpInfo($organisation, string $content ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\ListVectorCollections200Response', - $request, - $response, - ); + $returnType = '\QuantClient\Model\ListVectorCollections200Response'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1110,10 +1269,8 @@ public function listVectorCollectionsWithHttpInfo($organisation, string $content $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -1350,14 +1507,33 @@ public function queryVectorCollectionWithHttpInfo($organisation, $collection_id, switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\QueryVectorCollection200Response', - $request, - $response, - ); - } + if ('\QuantClient\Model\QueryVectorCollection200Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\QueryVectorCollection200Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\QueryVectorCollection200Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1372,11 +1548,34 @@ public function queryVectorCollectionWithHttpInfo($organisation, $collection_id, ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\QueryVectorCollection200Response', - $request, - $response, - ); + $returnType = '\QuantClient\Model\QueryVectorCollection200Response'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1386,10 +1585,8 @@ public function queryVectorCollectionWithHttpInfo($organisation, $collection_id, $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -1661,14 +1858,33 @@ public function uploadVectorDocumentsWithHttpInfo($organisation, $collection_id, switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\UploadVectorDocuments200Response', - $request, - $response, - ); - } + if ('\QuantClient\Model\UploadVectorDocuments200Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\UploadVectorDocuments200Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\UploadVectorDocuments200Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1683,11 +1899,34 @@ public function uploadVectorDocumentsWithHttpInfo($organisation, $collection_id, ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\UploadVectorDocuments200Response', - $request, - $response, - ); + $returnType = '\QuantClient\Model\UploadVectorDocuments200Response'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1697,10 +1936,8 @@ public function uploadVectorDocumentsWithHttpInfo($organisation, $collection_id, $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -1927,47 +2164,4 @@ protected function createHttpClientOption() 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/src/Api/ApplicationsApi.php b/src/Api/ApplicationsApi.php index 975e933..8f04ce7 100644 --- a/src/Api/ApplicationsApi.php +++ b/src/Api/ApplicationsApi.php @@ -1,7 +1,7 @@ client = $client ?: new Client(); $this->config = $config ?: Configuration::getDefaultConfiguration(); @@ -198,20 +195,60 @@ public function createApplicationWithHttpInfo($organisation, $create_application switch($statusCode) { case 201: - return $this->handleResponseWithDataType( - '\QuantClient\Model\Application', - $request, - $response, - ); + if ('\QuantClient\Model\Application' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\Application' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\Application', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\CreateApplication403Response', - $request, - $response, - ); - } + if ('\QuantClient\Model\CreateApplication403Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\CreateApplication403Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\CreateApplication403Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -226,11 +263,34 @@ public function createApplicationWithHttpInfo($organisation, $create_application ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\Application', - $request, - $response, - ); + $returnType = '\QuantClient\Model\Application'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -240,7 +300,7 @@ public function createApplicationWithHttpInfo($organisation, $create_application $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -248,10 +308,8 @@ public function createApplicationWithHttpInfo($organisation, $create_application $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -501,11 +559,10 @@ public function deleteApplicationWithHttpInfo($organisation, $application, strin return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { switch ($e->getCode()) { } - - throw $e; } } @@ -745,14 +802,33 @@ public function getApplicationWithHttpInfo($organisation, $application, string $ switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\Application', - $request, - $response, - ); - } + if ('\QuantClient\Model\Application' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\Application' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\Application', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -767,11 +843,34 @@ public function getApplicationWithHttpInfo($organisation, $application, string $ ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\Application', - $request, - $response, - ); + $returnType = '\QuantClient\Model\Application'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -781,10 +880,8 @@ public function getApplicationWithHttpInfo($organisation, $application, string $ $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -1035,14 +1132,33 @@ public function getEcrLoginCredentialsWithHttpInfo($organisation, string $conten switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\GetEcrLoginCredentials200Response', - $request, - $response, - ); - } + if ('\QuantClient\Model\GetEcrLoginCredentials200Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\GetEcrLoginCredentials200Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\GetEcrLoginCredentials200Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1057,11 +1173,34 @@ public function getEcrLoginCredentialsWithHttpInfo($organisation, string $conten ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\GetEcrLoginCredentials200Response', - $request, - $response, - ); + $returnType = '\QuantClient\Model\GetEcrLoginCredentials200Response'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1071,10 +1210,8 @@ public function getEcrLoginCredentialsWithHttpInfo($organisation, string $conten $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -1307,14 +1444,33 @@ public function listApplicationsWithHttpInfo($organisation, string $contentType switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\Application[]', - $request, - $response, - ); - } + if ('\QuantClient\Model\Application[]' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\Application[]' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\Application[]', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1329,11 +1485,34 @@ public function listApplicationsWithHttpInfo($organisation, string $contentType ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\Application[]', - $request, - $response, - ); + $returnType = '\QuantClient\Model\Application[]'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1343,10 +1522,8 @@ public function listApplicationsWithHttpInfo($organisation, string $contentType $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -1538,47 +1715,4 @@ protected function createHttpClientOption() 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/src/Api/BackupManagementApi.php b/src/Api/BackupManagementApi.php index b6623b4..3949676 100644 --- a/src/Api/BackupManagementApi.php +++ b/src/Api/BackupManagementApi.php @@ -1,7 +1,7 @@ client = $client ?: new Client(); $this->config = $config ?: Configuration::getDefaultConfiguration(); @@ -143,7 +140,7 @@ public function getConfig() * @param string $application The application ID (required) * @param string $environment The environment ID (required) * @param string $type The backup type (required) - * @param \QuantClient\Model\CreateBackupRequest|null $create_backup_request create_backup_request (optional) + * @param \QuantClient\Model\CreateBackupRequest $create_backup_request create_backup_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createBackup'] to see the possible values for this operation * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format @@ -165,7 +162,7 @@ public function createBackup($organisation, $application, $environment, $type, $ * @param string $application The application ID (required) * @param string $environment The environment ID (required) * @param string $type The backup type (required) - * @param \QuantClient\Model\CreateBackupRequest|null $create_backup_request (optional) + * @param \QuantClient\Model\CreateBackupRequest $create_backup_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createBackup'] to see the possible values for this operation * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format @@ -201,14 +198,33 @@ public function createBackupWithHttpInfo($organisation, $application, $environme switch($statusCode) { case 202: - return $this->handleResponseWithDataType( - '\QuantClient\Model\CreateBackup202Response', - $request, - $response, - ); - } + if ('\QuantClient\Model\CreateBackup202Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\CreateBackup202Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\CreateBackup202Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -223,11 +239,34 @@ public function createBackupWithHttpInfo($organisation, $application, $environme ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\CreateBackup202Response', - $request, - $response, - ); + $returnType = '\QuantClient\Model\CreateBackup202Response'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 202: @@ -237,10 +276,8 @@ public function createBackupWithHttpInfo($organisation, $application, $environme $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -254,7 +291,7 @@ public function createBackupWithHttpInfo($organisation, $application, $environme * @param string $application The application ID (required) * @param string $environment The environment ID (required) * @param string $type The backup type (required) - * @param \QuantClient\Model\CreateBackupRequest|null $create_backup_request (optional) + * @param \QuantClient\Model\CreateBackupRequest $create_backup_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createBackup'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -279,7 +316,7 @@ function ($response) { * @param string $application The application ID (required) * @param string $environment The environment ID (required) * @param string $type The backup type (required) - * @param \QuantClient\Model\CreateBackupRequest|null $create_backup_request (optional) + * @param \QuantClient\Model\CreateBackupRequest $create_backup_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createBackup'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -333,7 +370,7 @@ function ($exception) { * @param string $application The application ID (required) * @param string $environment The environment ID (required) * @param string $type The backup type (required) - * @param \QuantClient\Model\CreateBackupRequest|null $create_backup_request (optional) + * @param \QuantClient\Model\CreateBackupRequest $create_backup_request (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createBackup'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -546,14 +583,33 @@ public function deleteBackupWithHttpInfo($organisation, $application, $environme switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\DeleteBackup200Response', - $request, - $response, - ); - } + if ('\QuantClient\Model\DeleteBackup200Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\DeleteBackup200Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\DeleteBackup200Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -568,11 +624,34 @@ public function deleteBackupWithHttpInfo($organisation, $application, $environme ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\DeleteBackup200Response', - $request, - $response, - ); + $returnType = '\QuantClient\Model\DeleteBackup200Response'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -582,10 +661,8 @@ public function deleteBackupWithHttpInfo($organisation, $application, $environme $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -898,14 +975,33 @@ public function downloadBackupWithHttpInfo($organisation, $application, $environ switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\DownloadBackup200Response', - $request, - $response, - ); - } + if ('\QuantClient\Model\DownloadBackup200Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\DownloadBackup200Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\DownloadBackup200Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -920,11 +1016,34 @@ public function downloadBackupWithHttpInfo($organisation, $application, $environ ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\DownloadBackup200Response', - $request, - $response, - ); + $returnType = '\QuantClient\Model\DownloadBackup200Response'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -934,10 +1053,8 @@ public function downloadBackupWithHttpInfo($organisation, $application, $environ $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -1192,12 +1309,12 @@ public function downloadBackupRequest($organisation, $application, $environment, * @param string $application The application ID (required) * @param string $environment The environment ID (required) * @param string $type The backup type (required) - * @param string|null $order Sort order for backups by creation date (asc = oldest first, desc = newest first) (optional, default to 'desc') - * @param int|null $limit Maximum number of backups to return (max 100) (optional, default to 50) - * @param \DateTime|null $created_before Only return backups created before this ISO 8601 timestamp (e.g., 2025-01-01T00:00:00Z) (optional) - * @param \DateTime|null $created_after Only return backups created after this ISO 8601 timestamp (e.g., 2024-12-01T00:00:00Z) (optional) - * @param string|null $status Filter backups by status (optional) - * @param string|null $next_token Token for retrieving the next page of results (optional) + * @param string $order Sort order for backups by creation date (asc = oldest first, desc = newest first) (optional, default to 'desc') + * @param int $limit Maximum number of backups to return (max 100) (optional, default to 50) + * @param \DateTime $created_before Only return backups created before this ISO 8601 timestamp (e.g., 2025-01-01T00:00:00Z) (optional) + * @param \DateTime $created_after Only return backups created after this ISO 8601 timestamp (e.g., 2024-12-01T00:00:00Z) (optional) + * @param string $status Filter backups by status (optional) + * @param string $next_token Token for retrieving the next page of results (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listBackups'] to see the possible values for this operation * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format @@ -1219,12 +1336,12 @@ public function listBackups($organisation, $application, $environment, $type, $o * @param string $application The application ID (required) * @param string $environment The environment ID (required) * @param string $type The backup type (required) - * @param string|null $order Sort order for backups by creation date (asc = oldest first, desc = newest first) (optional, default to 'desc') - * @param int|null $limit Maximum number of backups to return (max 100) (optional, default to 50) - * @param \DateTime|null $created_before Only return backups created before this ISO 8601 timestamp (e.g., 2025-01-01T00:00:00Z) (optional) - * @param \DateTime|null $created_after Only return backups created after this ISO 8601 timestamp (e.g., 2024-12-01T00:00:00Z) (optional) - * @param string|null $status Filter backups by status (optional) - * @param string|null $next_token Token for retrieving the next page of results (optional) + * @param string $order Sort order for backups by creation date (asc = oldest first, desc = newest first) (optional, default to 'desc') + * @param int $limit Maximum number of backups to return (max 100) (optional, default to 50) + * @param \DateTime $created_before Only return backups created before this ISO 8601 timestamp (e.g., 2025-01-01T00:00:00Z) (optional) + * @param \DateTime $created_after Only return backups created after this ISO 8601 timestamp (e.g., 2024-12-01T00:00:00Z) (optional) + * @param string $status Filter backups by status (optional) + * @param string $next_token Token for retrieving the next page of results (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listBackups'] to see the possible values for this operation * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format @@ -1260,20 +1377,60 @@ public function listBackupsWithHttpInfo($organisation, $application, $environmen switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\ListBackups200Response', - $request, - $response, - ); + if ('\QuantClient\Model\ListBackups200Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\ListBackups200Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\ListBackups200Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 422: - return $this->handleResponseWithDataType( - '\QuantClient\Model\ListBackups422Response', - $request, - $response, - ); - } + if ('\QuantClient\Model\ListBackups422Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\ListBackups422Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\ListBackups422Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1288,11 +1445,34 @@ public function listBackupsWithHttpInfo($organisation, $application, $environmen ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\ListBackups200Response', - $request, - $response, - ); + $returnType = '\QuantClient\Model\ListBackups200Response'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1302,7 +1482,7 @@ public function listBackupsWithHttpInfo($organisation, $application, $environmen $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 422: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1310,10 +1490,8 @@ public function listBackupsWithHttpInfo($organisation, $application, $environmen $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -1327,12 +1505,12 @@ public function listBackupsWithHttpInfo($organisation, $application, $environmen * @param string $application The application ID (required) * @param string $environment The environment ID (required) * @param string $type The backup type (required) - * @param string|null $order Sort order for backups by creation date (asc = oldest first, desc = newest first) (optional, default to 'desc') - * @param int|null $limit Maximum number of backups to return (max 100) (optional, default to 50) - * @param \DateTime|null $created_before Only return backups created before this ISO 8601 timestamp (e.g., 2025-01-01T00:00:00Z) (optional) - * @param \DateTime|null $created_after Only return backups created after this ISO 8601 timestamp (e.g., 2024-12-01T00:00:00Z) (optional) - * @param string|null $status Filter backups by status (optional) - * @param string|null $next_token Token for retrieving the next page of results (optional) + * @param string $order Sort order for backups by creation date (asc = oldest first, desc = newest first) (optional, default to 'desc') + * @param int $limit Maximum number of backups to return (max 100) (optional, default to 50) + * @param \DateTime $created_before Only return backups created before this ISO 8601 timestamp (e.g., 2025-01-01T00:00:00Z) (optional) + * @param \DateTime $created_after Only return backups created after this ISO 8601 timestamp (e.g., 2024-12-01T00:00:00Z) (optional) + * @param string $status Filter backups by status (optional) + * @param string $next_token Token for retrieving the next page of results (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listBackups'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1357,12 +1535,12 @@ function ($response) { * @param string $application The application ID (required) * @param string $environment The environment ID (required) * @param string $type The backup type (required) - * @param string|null $order Sort order for backups by creation date (asc = oldest first, desc = newest first) (optional, default to 'desc') - * @param int|null $limit Maximum number of backups to return (max 100) (optional, default to 50) - * @param \DateTime|null $created_before Only return backups created before this ISO 8601 timestamp (e.g., 2025-01-01T00:00:00Z) (optional) - * @param \DateTime|null $created_after Only return backups created after this ISO 8601 timestamp (e.g., 2024-12-01T00:00:00Z) (optional) - * @param string|null $status Filter backups by status (optional) - * @param string|null $next_token Token for retrieving the next page of results (optional) + * @param string $order Sort order for backups by creation date (asc = oldest first, desc = newest first) (optional, default to 'desc') + * @param int $limit Maximum number of backups to return (max 100) (optional, default to 50) + * @param \DateTime $created_before Only return backups created before this ISO 8601 timestamp (e.g., 2025-01-01T00:00:00Z) (optional) + * @param \DateTime $created_after Only return backups created after this ISO 8601 timestamp (e.g., 2024-12-01T00:00:00Z) (optional) + * @param string $status Filter backups by status (optional) + * @param string $next_token Token for retrieving the next page of results (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listBackups'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1416,12 +1594,12 @@ function ($exception) { * @param string $application The application ID (required) * @param string $environment The environment ID (required) * @param string $type The backup type (required) - * @param string|null $order Sort order for backups by creation date (asc = oldest first, desc = newest first) (optional, default to 'desc') - * @param int|null $limit Maximum number of backups to return (max 100) (optional, default to 50) - * @param \DateTime|null $created_before Only return backups created before this ISO 8601 timestamp (e.g., 2025-01-01T00:00:00Z) (optional) - * @param \DateTime|null $created_after Only return backups created after this ISO 8601 timestamp (e.g., 2024-12-01T00:00:00Z) (optional) - * @param string|null $status Filter backups by status (optional) - * @param string|null $next_token Token for retrieving the next page of results (optional) + * @param string $order Sort order for backups by creation date (asc = oldest first, desc = newest first) (optional, default to 'desc') + * @param int $limit Maximum number of backups to return (max 100) (optional, default to 50) + * @param \DateTime $created_before Only return backups created before this ISO 8601 timestamp (e.g., 2025-01-01T00:00:00Z) (optional) + * @param \DateTime $created_after Only return backups created after this ISO 8601 timestamp (e.g., 2024-12-01T00:00:00Z) (optional) + * @param string $status Filter backups by status (optional) + * @param string $next_token Token for retrieving the next page of results (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listBackups'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1643,47 +1821,4 @@ protected function createHttpClientOption() 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/src/Api/CommandsApi.php b/src/Api/CommandsApi.php index 17dae5d..d057ea2 100644 --- a/src/Api/CommandsApi.php +++ b/src/Api/CommandsApi.php @@ -1,7 +1,7 @@ client = $client ?: new Client(); $this->config = $config ?: Configuration::getDefaultConfiguration(); @@ -194,14 +191,33 @@ public function createCommandWithHttpInfo($organisation, $environment, $create_c switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\Command', - $request, - $response, - ); - } + if ('\QuantClient\Model\Command' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\Command' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\Command', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -216,11 +232,34 @@ public function createCommandWithHttpInfo($organisation, $environment, $create_c ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\Command', - $request, - $response, - ); + $returnType = '\QuantClient\Model\Command'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -230,10 +269,8 @@ public function createCommandWithHttpInfo($organisation, $environment, $create_c $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -505,14 +542,33 @@ public function getCommandWithHttpInfo($organisation, $environment, $command, st switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\Command', - $request, - $response, - ); - } + if ('\QuantClient\Model\Command' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\Command' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\Command', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -527,11 +583,34 @@ public function getCommandWithHttpInfo($organisation, $environment, $command, st ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\Command', - $request, - $response, - ); + $returnType = '\QuantClient\Model\Command'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -541,10 +620,8 @@ public function getCommandWithHttpInfo($organisation, $environment, $command, st $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -815,14 +892,33 @@ public function listCommandsWithHttpInfo($organisation, $environment, string $co switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\Command', - $request, - $response, - ); - } + if ('\QuantClient\Model\Command' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\Command' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\Command', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -837,11 +933,34 @@ public function listCommandsWithHttpInfo($organisation, $environment, string $co ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\Command', - $request, - $response, - ); + $returnType = '\QuantClient\Model\Command'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -851,10 +970,8 @@ public function listCommandsWithHttpInfo($organisation, $environment, string $co $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -1064,47 +1181,4 @@ protected function createHttpClientOption() 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/src/Api/ComposeApi.php b/src/Api/ComposeApi.php index 835706b..7584a80 100644 --- a/src/Api/ComposeApi.php +++ b/src/Api/ComposeApi.php @@ -1,7 +1,7 @@ client = $client ?: new Client(); $this->config = $config ?: Configuration::getDefaultConfiguration(); @@ -194,14 +191,33 @@ public function getEnvironmentComposeWithHttpInfo($organisation, $application, $ switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\Compose', - $request, - $response, - ); - } + if ('\QuantClient\Model\Compose' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\Compose' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\Compose', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -216,11 +232,34 @@ public function getEnvironmentComposeWithHttpInfo($organisation, $application, $ ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\Compose', - $request, - $response, - ); + $returnType = '\QuantClient\Model\Compose'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -230,10 +269,8 @@ public function getEnvironmentComposeWithHttpInfo($organisation, $application, $ $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -508,20 +545,60 @@ public function patchEnvironmentComposeWithHttpInfo($organisation, $application, switch($statusCode) { case 202: - return $this->handleResponseWithDataType( - '\QuantClient\Model\PatchEnvironmentCompose202Response', - $request, - $response, - ); + if ('\QuantClient\Model\PatchEnvironmentCompose202Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\PatchEnvironmentCompose202Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\PatchEnvironmentCompose202Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\PatchEnvironmentCompose400Response', - $request, - $response, - ); - } + if ('\QuantClient\Model\PatchEnvironmentCompose400Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\PatchEnvironmentCompose400Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\PatchEnvironmentCompose400Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -536,11 +613,34 @@ public function patchEnvironmentComposeWithHttpInfo($organisation, $application, ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\PatchEnvironmentCompose202Response', - $request, - $response, - ); + $returnType = '\QuantClient\Model\PatchEnvironmentCompose202Response'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 202: @@ -550,7 +650,7 @@ public function patchEnvironmentComposeWithHttpInfo($organisation, $application, $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -558,10 +658,8 @@ public function patchEnvironmentComposeWithHttpInfo($organisation, $application, $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -795,7 +893,7 @@ public function patchEnvironmentComposeRequest($organisation, $application, $env * * @param string $organisation The organisation ID (required) * @param \QuantClient\Model\ValidateComposeRequest $validate_compose_request The docker-compose.yml file content. Can be sent as raw YAML string or as a JSON wrapper containing both yamlContent (string) and imageSuffix (string) fields. Query parameter imageSuffix takes precedence if both are provided. (required) - * @param string|null $image_suffix Optional. Image tag suffix to apply during translation. Transforms internal image tags to consistent '{containerName}-{suffix}' format (e.g., 'nginx-pr-456'). External images are left unchanged. Useful for feature branch deployments. (optional) + * @param string $image_suffix Optional. Image tag suffix to apply during translation. Transforms internal image tags to consistent '{containerName}-{suffix}' format (e.g., 'nginx-pr-456'). External images are left unchanged. Useful for feature branch deployments. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['validateCompose'] to see the possible values for this operation * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format @@ -815,7 +913,7 @@ public function validateCompose($organisation, $validate_compose_request, $image * * @param string $organisation The organisation ID (required) * @param \QuantClient\Model\ValidateComposeRequest $validate_compose_request The docker-compose.yml file content. Can be sent as raw YAML string or as a JSON wrapper containing both yamlContent (string) and imageSuffix (string) fields. Query parameter imageSuffix takes precedence if both are provided. (required) - * @param string|null $image_suffix Optional. Image tag suffix to apply during translation. Transforms internal image tags to consistent '{containerName}-{suffix}' format (e.g., 'nginx-pr-456'). External images are left unchanged. Useful for feature branch deployments. (optional) + * @param string $image_suffix Optional. Image tag suffix to apply during translation. Transforms internal image tags to consistent '{containerName}-{suffix}' format (e.g., 'nginx-pr-456'). External images are left unchanged. Useful for feature branch deployments. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['validateCompose'] to see the possible values for this operation * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format @@ -851,20 +949,60 @@ public function validateComposeWithHttpInfo($organisation, $validate_compose_req switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\ValidateCompose200Response', - $request, - $response, - ); + if ('\QuantClient\Model\ValidateCompose200Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\ValidateCompose200Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\ValidateCompose200Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 422: - return $this->handleResponseWithDataType( - '\QuantClient\Model\ValidateCompose422Response', - $request, - $response, - ); - } + if ('\QuantClient\Model\ValidateCompose422Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\ValidateCompose422Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\ValidateCompose422Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -879,11 +1017,34 @@ public function validateComposeWithHttpInfo($organisation, $validate_compose_req ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\ValidateCompose200Response', - $request, - $response, - ); + $returnType = '\QuantClient\Model\ValidateCompose200Response'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -893,7 +1054,7 @@ public function validateComposeWithHttpInfo($organisation, $validate_compose_req $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 422: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -901,10 +1062,8 @@ public function validateComposeWithHttpInfo($organisation, $validate_compose_req $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -916,7 +1075,7 @@ public function validateComposeWithHttpInfo($organisation, $validate_compose_req * * @param string $organisation The organisation ID (required) * @param \QuantClient\Model\ValidateComposeRequest $validate_compose_request The docker-compose.yml file content. Can be sent as raw YAML string or as a JSON wrapper containing both yamlContent (string) and imageSuffix (string) fields. Query parameter imageSuffix takes precedence if both are provided. (required) - * @param string|null $image_suffix Optional. Image tag suffix to apply during translation. Transforms internal image tags to consistent '{containerName}-{suffix}' format (e.g., 'nginx-pr-456'). External images are left unchanged. Useful for feature branch deployments. (optional) + * @param string $image_suffix Optional. Image tag suffix to apply during translation. Transforms internal image tags to consistent '{containerName}-{suffix}' format (e.g., 'nginx-pr-456'). External images are left unchanged. Useful for feature branch deployments. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['validateCompose'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -939,7 +1098,7 @@ function ($response) { * * @param string $organisation The organisation ID (required) * @param \QuantClient\Model\ValidateComposeRequest $validate_compose_request The docker-compose.yml file content. Can be sent as raw YAML string or as a JSON wrapper containing both yamlContent (string) and imageSuffix (string) fields. Query parameter imageSuffix takes precedence if both are provided. (required) - * @param string|null $image_suffix Optional. Image tag suffix to apply during translation. Transforms internal image tags to consistent '{containerName}-{suffix}' format (e.g., 'nginx-pr-456'). External images are left unchanged. Useful for feature branch deployments. (optional) + * @param string $image_suffix Optional. Image tag suffix to apply during translation. Transforms internal image tags to consistent '{containerName}-{suffix}' format (e.g., 'nginx-pr-456'). External images are left unchanged. Useful for feature branch deployments. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['validateCompose'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -991,7 +1150,7 @@ function ($exception) { * * @param string $organisation The organisation ID (required) * @param \QuantClient\Model\ValidateComposeRequest $validate_compose_request The docker-compose.yml file content. Can be sent as raw YAML string or as a JSON wrapper containing both yamlContent (string) and imageSuffix (string) fields. Query parameter imageSuffix takes precedence if both are provided. (required) - * @param string|null $image_suffix Optional. Image tag suffix to apply during translation. Transforms internal image tags to consistent '{containerName}-{suffix}' format (e.g., 'nginx-pr-456'). External images are left unchanged. Useful for feature branch deployments. (optional) + * @param string $image_suffix Optional. Image tag suffix to apply during translation. Transforms internal image tags to consistent '{containerName}-{suffix}' format (e.g., 'nginx-pr-456'). External images are left unchanged. Useful for feature branch deployments. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['validateCompose'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1129,47 +1288,4 @@ protected function createHttpClientOption() 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/src/Api/ContainersApi.php b/src/Api/ContainersApi.php index 2749ee2..0ee99e0 100644 --- a/src/Api/ContainersApi.php +++ b/src/Api/ContainersApi.php @@ -1,7 +1,7 @@ client = $client ?: new Client(); $this->config = $config ?: Configuration::getDefaultConfiguration(); @@ -189,11 +186,10 @@ public function listContainersWithHttpInfo($organisation, $application, $environ return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { switch ($e->getCode()) { } - - throw $e; } } @@ -455,11 +451,10 @@ public function updateContainerWithHttpInfo($organisation, $application, $enviro return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { switch ($e->getCode()) { } - - throw $e; } } @@ -709,47 +704,4 @@ protected function createHttpClientOption() 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/src/Api/CrawlerSchedulesApi.php b/src/Api/CrawlerSchedulesApi.php index 9de8986..422a217 100644 --- a/src/Api/CrawlerSchedulesApi.php +++ b/src/Api/CrawlerSchedulesApi.php @@ -1,7 +1,7 @@ client = $client ?: new Client(); $this->config = $config ?: Configuration::getDefaultConfiguration(); @@ -202,26 +199,87 @@ public function crawlerSchedulesAddWithHttpInfo($organization, $project, $crawle switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2CrawlerSchedule', - $request, - $response, - ); + if ('\QuantClient\Model\V2CrawlerSchedule' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2CrawlerSchedule' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2CrawlerSchedule', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -236,11 +294,34 @@ public function crawlerSchedulesAddWithHttpInfo($organization, $project, $crawle ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2CrawlerSchedule', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2CrawlerSchedule'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -250,7 +331,7 @@ public function crawlerSchedulesAddWithHttpInfo($organization, $project, $crawle $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -258,7 +339,7 @@ public function crawlerSchedulesAddWithHttpInfo($organization, $project, $crawle $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -266,10 +347,8 @@ public function crawlerSchedulesAddWithHttpInfo($organization, $project, $crawle $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -559,6 +638,7 @@ public function crawlerSchedulesDeleteWithHttpInfo($organization, $project, $cra return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { switch ($e->getCode()) { case 400: @@ -568,7 +648,7 @@ public function crawlerSchedulesDeleteWithHttpInfo($organization, $project, $cra $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -576,10 +656,8 @@ public function crawlerSchedulesDeleteWithHttpInfo($organization, $project, $cra $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -861,26 +939,87 @@ public function crawlerSchedulesEditWithHttpInfo($organization, $project, $crawl switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2CrawlerSchedule', - $request, - $response, - ); + if ('\QuantClient\Model\V2CrawlerSchedule' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2CrawlerSchedule' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2CrawlerSchedule', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -895,11 +1034,34 @@ public function crawlerSchedulesEditWithHttpInfo($organization, $project, $crawl ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2CrawlerSchedule', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2CrawlerSchedule'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -909,7 +1071,7 @@ public function crawlerSchedulesEditWithHttpInfo($organization, $project, $crawl $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -917,7 +1079,7 @@ public function crawlerSchedulesEditWithHttpInfo($organization, $project, $crawl $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -925,10 +1087,8 @@ public function crawlerSchedulesEditWithHttpInfo($organization, $project, $crawl $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -1236,26 +1396,87 @@ public function crawlerSchedulesListWithHttpInfo($organization, $project, $crawl switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2CrawlerSchedule[]', - $request, - $response, - ); + if ('\QuantClient\Model\V2CrawlerSchedule[]' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2CrawlerSchedule[]' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2CrawlerSchedule[]', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1270,11 +1491,34 @@ public function crawlerSchedulesListWithHttpInfo($organization, $project, $crawl ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2CrawlerSchedule[]', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2CrawlerSchedule[]'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1284,7 +1528,7 @@ public function crawlerSchedulesListWithHttpInfo($organization, $project, $crawl $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1292,7 +1536,7 @@ public function crawlerSchedulesListWithHttpInfo($organization, $project, $crawl $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1300,10 +1544,8 @@ public function crawlerSchedulesListWithHttpInfo($organization, $project, $crawl $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -1578,26 +1820,87 @@ public function crawlerSchedulesShowWithHttpInfo($organization, $project, $crawl switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2CrawlerSchedule', - $request, - $response, - ); + if ('\QuantClient\Model\V2CrawlerSchedule' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2CrawlerSchedule' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2CrawlerSchedule', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1612,11 +1915,34 @@ public function crawlerSchedulesShowWithHttpInfo($organization, $project, $crawl ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2CrawlerSchedule', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2CrawlerSchedule'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1626,7 +1952,7 @@ public function crawlerSchedulesShowWithHttpInfo($organization, $project, $crawl $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1634,7 +1960,7 @@ public function crawlerSchedulesShowWithHttpInfo($organization, $project, $crawl $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1642,10 +1968,8 @@ public function crawlerSchedulesShowWithHttpInfo($organization, $project, $crawl $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -1891,47 +2215,4 @@ protected function createHttpClientOption() 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/src/Api/CrawlersApi.php b/src/Api/CrawlersApi.php index 2b69192..4ca13cf 100644 --- a/src/Api/CrawlersApi.php +++ b/src/Api/CrawlersApi.php @@ -1,7 +1,7 @@ client = $client ?: new Client(); $this->config = $config ?: Configuration::getDefaultConfiguration(); @@ -209,26 +206,87 @@ public function crawlersCreateWithHttpInfo($organization, $project, $v2_crawler_ switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Crawler', - $request, - $response, - ); + if ('\QuantClient\Model\V2Crawler' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Crawler' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Crawler', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -243,11 +301,34 @@ public function crawlersCreateWithHttpInfo($organization, $project, $v2_crawler_ ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Crawler', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2Crawler'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -257,7 +338,7 @@ public function crawlersCreateWithHttpInfo($organization, $project, $v2_crawler_ $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -265,7 +346,7 @@ public function crawlersCreateWithHttpInfo($organization, $project, $v2_crawler_ $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -273,10 +354,8 @@ public function crawlersCreateWithHttpInfo($organization, $project, $v2_crawler_ $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -492,7 +571,7 @@ public function crawlersCreateRequest($organization, $project, $v2_crawler_reque * * @param string $organization Organization identifier (required) * @param string $project Project identifier (required) - * @param string $crawler crawler (required) + * @param string $crawler The UUID of the crawler (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crawlersDelete'] to see the possible values for this operation * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format @@ -511,7 +590,7 @@ public function crawlersDelete($organization, $project, $crawler, string $conten * * @param string $organization Organization identifier (required) * @param string $project Project identifier (required) - * @param string $crawler (required) + * @param string $crawler The UUID of the crawler (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crawlersDelete'] to see the possible values for this operation * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format @@ -546,6 +625,7 @@ public function crawlersDeleteWithHttpInfo($organization, $project, $crawler, st return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { switch ($e->getCode()) { case 400: @@ -555,7 +635,7 @@ public function crawlersDeleteWithHttpInfo($organization, $project, $crawler, st $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -563,10 +643,8 @@ public function crawlersDeleteWithHttpInfo($organization, $project, $crawler, st $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -578,7 +656,7 @@ public function crawlersDeleteWithHttpInfo($organization, $project, $crawler, st * * @param string $organization Organization identifier (required) * @param string $project Project identifier (required) - * @param string $crawler (required) + * @param string $crawler The UUID of the crawler (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crawlersDelete'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -601,7 +679,7 @@ function ($response) { * * @param string $organization Organization identifier (required) * @param string $project Project identifier (required) - * @param string $crawler (required) + * @param string $crawler The UUID of the crawler (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crawlersDelete'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -640,7 +718,7 @@ function ($exception) { * * @param string $organization Organization identifier (required) * @param string $project Project identifier (required) - * @param string $crawler (required) + * @param string $crawler The UUID of the crawler (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crawlersDelete'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -828,38 +906,141 @@ public function crawlersGetRunByIdWithHttpInfo($organization, $project, $crawler switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2CrawlerRun', - $request, - $response, - ); + if ('\QuantClient\Model\V2CrawlerRun' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2CrawlerRun' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2CrawlerRun', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 404: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 500: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -874,11 +1055,34 @@ public function crawlersGetRunByIdWithHttpInfo($organization, $project, $crawler ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2CrawlerRun', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2CrawlerRun'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -888,7 +1092,7 @@ public function crawlersGetRunByIdWithHttpInfo($organization, $project, $crawler $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -896,7 +1100,7 @@ public function crawlersGetRunByIdWithHttpInfo($organization, $project, $crawler $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -904,7 +1108,7 @@ public function crawlersGetRunByIdWithHttpInfo($organization, $project, $crawler $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -912,7 +1116,7 @@ public function crawlersGetRunByIdWithHttpInfo($organization, $project, $crawler $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -920,10 +1124,8 @@ public function crawlersGetRunByIdWithHttpInfo($organization, $project, $crawler $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -1214,38 +1416,141 @@ public function crawlersGetRunsWithHttpInfo($organization, $project, $crawler, s switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2CrawlerRun[]', - $request, - $response, - ); + if ('\QuantClient\Model\V2CrawlerRun[]' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2CrawlerRun[]' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2CrawlerRun[]', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 404: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 500: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1260,11 +1565,34 @@ public function crawlersGetRunsWithHttpInfo($organization, $project, $crawler, s ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2CrawlerRun[]', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2CrawlerRun[]'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1274,7 +1602,7 @@ public function crawlersGetRunsWithHttpInfo($organization, $project, $crawler, s $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1282,7 +1610,7 @@ public function crawlersGetRunsWithHttpInfo($organization, $project, $crawler, s $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1290,7 +1618,7 @@ public function crawlersGetRunsWithHttpInfo($organization, $project, $crawler, s $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1298,7 +1626,7 @@ public function crawlersGetRunsWithHttpInfo($organization, $project, $crawler, s $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1306,10 +1634,8 @@ public function crawlersGetRunsWithHttpInfo($organization, $project, $crawler, s $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -1530,12 +1856,11 @@ public function crawlersGetRunsRequest($organization, $project, $crawler, string * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \QuantClient\Model\V2Crawler[]|\QuantClient\Model\V2Error|\QuantClient\Model\V2Error + * @return void */ public function crawlersList($organization, $project, string $contentType = self::contentTypes['crawlersList'][0]) { - list($response) = $this->crawlersListWithHttpInfo($organization, $project, $contentType); - return $response; + $this->crawlersListWithHttpInfo($organization, $project, $contentType); } /** @@ -1549,7 +1874,7 @@ public function crawlersList($organization, $project, string $contentType = self * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \QuantClient\Model\V2Crawler[]|\QuantClient\Model\V2Error|\QuantClient\Model\V2Error, HTTP status code, HTTP response headers (array of strings) + * @return array of null, HTTP status code, HTTP response headers (array of strings) */ public function crawlersListWithHttpInfo($organization, $project, string $contentType = self::contentTypes['crawlersList'][0]) { @@ -1578,57 +1903,10 @@ public function crawlersListWithHttpInfo($organization, $project, string $conten $statusCode = $response->getStatusCode(); - switch($statusCode) { - case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Crawler[]', - $request, - $response, - ); - case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } - - - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } + return [null, $statusCode, $response->getHeaders()]; - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Crawler[]', - $request, - $response, - ); } catch (ApiException $e) { switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\QuantClient\Model\V2Crawler[]', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - throw $e; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1636,7 +1914,7 @@ public function crawlersListWithHttpInfo($organization, $project, string $conten $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1644,10 +1922,8 @@ public function crawlersListWithHttpInfo($organization, $project, string $conten $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -1688,27 +1964,14 @@ function ($response) { */ public function crawlersListAsyncWithHttpInfo($organization, $project, string $contentType = self::contentTypes['crawlersList'][0]) { - $returnType = '\QuantClient\Model\V2Crawler[]'; + $returnType = ''; $request = $this->crawlersListRequest($organization, $project, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { $response = $exception->getResponse(); @@ -1846,7 +2109,7 @@ public function crawlersListRequest($organization, $project, string $contentType * * @param string $organization Organization identifier (required) * @param string $project Project identifier (required) - * @param string $crawler crawler (required) + * @param string $crawler The UUID of the crawler (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crawlersRead'] to see the possible values for this operation * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format @@ -1866,7 +2129,7 @@ public function crawlersRead($organization, $project, $crawler, string $contentT * * @param string $organization Organization identifier (required) * @param string $project Project identifier (required) - * @param string $crawler (required) + * @param string $crawler The UUID of the crawler (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crawlersRead'] to see the possible values for this operation * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format @@ -1902,26 +2165,87 @@ public function crawlersReadWithHttpInfo($organization, $project, $crawler, stri switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Crawler', - $request, - $response, - ); + if ('\QuantClient\Model\V2Crawler' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Crawler' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Crawler', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1936,11 +2260,34 @@ public function crawlersReadWithHttpInfo($organization, $project, $crawler, stri ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Crawler', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2Crawler'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1950,7 +2297,7 @@ public function crawlersReadWithHttpInfo($organization, $project, $crawler, stri $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1958,7 +2305,7 @@ public function crawlersReadWithHttpInfo($organization, $project, $crawler, stri $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1966,10 +2313,8 @@ public function crawlersReadWithHttpInfo($organization, $project, $crawler, stri $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -1981,7 +2326,7 @@ public function crawlersReadWithHttpInfo($organization, $project, $crawler, stri * * @param string $organization Organization identifier (required) * @param string $project Project identifier (required) - * @param string $crawler (required) + * @param string $crawler The UUID of the crawler (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crawlersRead'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -2004,7 +2349,7 @@ function ($response) { * * @param string $organization Organization identifier (required) * @param string $project Project identifier (required) - * @param string $crawler (required) + * @param string $crawler The UUID of the crawler (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crawlersRead'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -2056,7 +2401,7 @@ function ($exception) { * * @param string $organization Organization identifier (required) * @param string $project Project identifier (required) - * @param string $crawler (required) + * @param string $crawler The UUID of the crawler (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crawlersRead'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -2244,38 +2589,141 @@ public function crawlersRunWithHttpInfo($organization, $project, $crawler, $craw switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\CrawlersRun200Response', - $request, - $response, - ); + if ('\QuantClient\Model\CrawlersRun200Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\CrawlersRun200Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\CrawlersRun200Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 404: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 500: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2290,11 +2738,34 @@ public function crawlersRunWithHttpInfo($organization, $project, $crawler, $craw ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\CrawlersRun200Response', - $request, - $response, - ); + $returnType = '\QuantClient\Model\CrawlersRun200Response'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2304,7 +2775,7 @@ public function crawlersRunWithHttpInfo($organization, $project, $crawler, $craw $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -2312,7 +2783,7 @@ public function crawlersRunWithHttpInfo($organization, $project, $crawler, $craw $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -2320,7 +2791,7 @@ public function crawlersRunWithHttpInfo($organization, $project, $crawler, $craw $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -2328,7 +2799,7 @@ public function crawlersRunWithHttpInfo($organization, $project, $crawler, $craw $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -2336,10 +2807,8 @@ public function crawlersRunWithHttpInfo($organization, $project, $crawler, $craw $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -2573,7 +3042,7 @@ public function crawlersRunRequest($organization, $project, $crawler, $crawlers_ * * @param string $organization Organization identifier (required) * @param string $project Project identifier (required) - * @param string $crawler crawler (required) + * @param string $crawler The UUID of the crawler (required) * @param \QuantClient\Model\V2CrawlerRequest $v2_crawler_request v2_crawler_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crawlersUpdate'] to see the possible values for this operation * @@ -2594,7 +3063,7 @@ public function crawlersUpdate($organization, $project, $crawler, $v2_crawler_re * * @param string $organization Organization identifier (required) * @param string $project Project identifier (required) - * @param string $crawler (required) + * @param string $crawler The UUID of the crawler (required) * @param \QuantClient\Model\V2CrawlerRequest $v2_crawler_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crawlersUpdate'] to see the possible values for this operation * @@ -2631,26 +3100,87 @@ public function crawlersUpdateWithHttpInfo($organization, $project, $crawler, $v switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Crawler', - $request, - $response, - ); + if ('\QuantClient\Model\V2Crawler' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Crawler' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Crawler', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2665,11 +3195,34 @@ public function crawlersUpdateWithHttpInfo($organization, $project, $crawler, $v ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Crawler', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2Crawler'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2679,7 +3232,7 @@ public function crawlersUpdateWithHttpInfo($organization, $project, $crawler, $v $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -2687,7 +3240,7 @@ public function crawlersUpdateWithHttpInfo($organization, $project, $crawler, $v $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -2695,10 +3248,8 @@ public function crawlersUpdateWithHttpInfo($organization, $project, $crawler, $v $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -2710,7 +3261,7 @@ public function crawlersUpdateWithHttpInfo($organization, $project, $crawler, $v * * @param string $organization Organization identifier (required) * @param string $project Project identifier (required) - * @param string $crawler (required) + * @param string $crawler The UUID of the crawler (required) * @param \QuantClient\Model\V2CrawlerRequest $v2_crawler_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crawlersUpdate'] to see the possible values for this operation * @@ -2734,7 +3285,7 @@ function ($response) { * * @param string $organization Organization identifier (required) * @param string $project Project identifier (required) - * @param string $crawler (required) + * @param string $crawler The UUID of the crawler (required) * @param \QuantClient\Model\V2CrawlerRequest $v2_crawler_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crawlersUpdate'] to see the possible values for this operation * @@ -2787,7 +3338,7 @@ function ($exception) { * * @param string $organization Organization identifier (required) * @param string $project Project identifier (required) - * @param string $crawler (required) + * @param string $crawler The UUID of the crawler (required) * @param \QuantClient\Model\V2CrawlerRequest $v2_crawler_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crawlersUpdate'] to see the possible values for this operation * @@ -2943,47 +3494,4 @@ protected function createHttpClientOption() 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/src/Api/CronApi.php b/src/Api/CronApi.php index f872c4d..7640a7f 100644 --- a/src/Api/CronApi.php +++ b/src/Api/CronApi.php @@ -1,7 +1,7 @@ client = $client ?: new Client(); $this->config = $config ?: Configuration::getDefaultConfiguration(); @@ -208,20 +205,60 @@ public function createCronJobWithHttpInfo($organisation, $application, $environm switch($statusCode) { case 201: - return $this->handleResponseWithDataType( - '\QuantClient\Model\Cron', - $request, - $response, - ); + if ('\QuantClient\Model\Cron' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\Cron' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\Cron', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 422: - return $this->handleResponseWithDataType( - '\QuantClient\Model\PatchEnvironmentCompose400Response', - $request, - $response, - ); - } + if ('\QuantClient\Model\PatchEnvironmentCompose400Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\PatchEnvironmentCompose400Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\PatchEnvironmentCompose400Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -236,11 +273,34 @@ public function createCronJobWithHttpInfo($organisation, $application, $environm ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\Cron', - $request, - $response, - ); + $returnType = '\QuantClient\Model\Cron'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -250,7 +310,7 @@ public function createCronJobWithHttpInfo($organisation, $application, $environm $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 422: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -258,10 +318,8 @@ public function createCronJobWithHttpInfo($organisation, $application, $environm $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -551,11 +609,10 @@ public function deleteCronJobWithHttpInfo($organisation, $application, $environm return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { switch ($e->getCode()) { } - - throw $e; } } @@ -835,14 +892,33 @@ public function getCronJobWithHttpInfo($organisation, $application, $environment switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\Cron', - $request, - $response, - ); - } + if ('\QuantClient\Model\Cron' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\Cron' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\Cron', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -857,11 +933,34 @@ public function getCronJobWithHttpInfo($organisation, $application, $environment ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\Cron', - $request, - $response, - ); + $returnType = '\QuantClient\Model\Cron'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -871,10 +970,8 @@ public function getCronJobWithHttpInfo($organisation, $application, $environment $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -1169,14 +1266,33 @@ public function getCronRunWithHttpInfo($organisation, $application, $environment switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\CronRun', - $request, - $response, - ); - } + if ('\QuantClient\Model\CronRun' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\CronRun' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\CronRun', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1191,11 +1307,34 @@ public function getCronRunWithHttpInfo($organisation, $application, $environment ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\CronRun', - $request, - $response, - ); + $returnType = '\QuantClient\Model\CronRun'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1205,10 +1344,8 @@ public function getCronRunWithHttpInfo($organisation, $application, $environment $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -1519,14 +1656,33 @@ public function listCronJobRunsWithHttpInfo($organisation, $application, $enviro switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\CronRun[]', - $request, - $response, - ); - } + if ('\QuantClient\Model\CronRun[]' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\CronRun[]' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\CronRun[]', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1541,11 +1697,34 @@ public function listCronJobRunsWithHttpInfo($organisation, $application, $enviro ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\CronRun[]', - $request, - $response, - ); + $returnType = '\QuantClient\Model\CronRun[]'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1555,10 +1734,8 @@ public function listCronJobRunsWithHttpInfo($organisation, $application, $enviro $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -1849,14 +2026,33 @@ public function listCronJobsWithHttpInfo($organisation, $application, $environme switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\Cron', - $request, - $response, - ); - } + if ('\QuantClient\Model\Cron' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\Cron' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\Cron', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1871,11 +2067,34 @@ public function listCronJobsWithHttpInfo($organisation, $application, $environme ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\Cron', - $request, - $response, - ); + $returnType = '\QuantClient\Model\Cron'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1885,10 +2104,8 @@ public function listCronJobsWithHttpInfo($organisation, $application, $environme $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -2165,14 +2382,33 @@ public function updateCronJobWithHttpInfo($organisation, $application, $environm switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\Cron', - $request, - $response, - ); - } + if ('\QuantClient\Model\Cron' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\Cron' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\Cron', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2187,11 +2423,34 @@ public function updateCronJobWithHttpInfo($organisation, $application, $environm ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\Cron', - $request, - $response, - ); + $returnType = '\QuantClient\Model\Cron'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2201,10 +2460,8 @@ public function updateCronJobWithHttpInfo($organisation, $application, $environm $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -2467,47 +2724,4 @@ protected function createHttpClientOption() 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/src/Api/DomainsApi.php b/src/Api/DomainsApi.php index fb1f176..409f149 100644 --- a/src/Api/DomainsApi.php +++ b/src/Api/DomainsApi.php @@ -1,7 +1,7 @@ client = $client ?: new Client(); $this->config = $config ?: Configuration::getDefaultConfiguration(); @@ -200,26 +197,87 @@ public function domainsCreateWithHttpInfo($organization, $project, $v2_domain_re switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Domain', - $request, - $response, - ); + if ('\QuantClient\Model\V2Domain' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Domain' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Domain', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -234,11 +292,34 @@ public function domainsCreateWithHttpInfo($organization, $project, $v2_domain_re ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Domain', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2Domain'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -248,7 +329,7 @@ public function domainsCreateWithHttpInfo($organization, $project, $v2_domain_re $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -256,7 +337,7 @@ public function domainsCreateWithHttpInfo($organization, $project, $v2_domain_re $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -264,10 +345,8 @@ public function domainsCreateWithHttpInfo($organization, $project, $v2_domain_re $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -483,7 +562,7 @@ public function domainsCreateRequest($organization, $project, $v2_domain_request * * @param string $organization Organization identifier (required) * @param string $project Project identifier (required) - * @param string $domain Domain identifier (required) + * @param string $domain Domain id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['domainsDelete'] to see the possible values for this operation * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format @@ -502,7 +581,7 @@ public function domainsDelete($organization, $project, $domain, string $contentT * * @param string $organization Organization identifier (required) * @param string $project Project identifier (required) - * @param string $domain Domain identifier (required) + * @param string $domain Domain id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['domainsDelete'] to see the possible values for this operation * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format @@ -537,6 +616,7 @@ public function domainsDeleteWithHttpInfo($organization, $project, $domain, stri return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { switch ($e->getCode()) { case 400: @@ -546,7 +626,7 @@ public function domainsDeleteWithHttpInfo($organization, $project, $domain, stri $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -554,10 +634,8 @@ public function domainsDeleteWithHttpInfo($organization, $project, $domain, stri $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -569,7 +647,7 @@ public function domainsDeleteWithHttpInfo($organization, $project, $domain, stri * * @param string $organization Organization identifier (required) * @param string $project Project identifier (required) - * @param string $domain Domain identifier (required) + * @param string $domain Domain id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['domainsDelete'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -592,7 +670,7 @@ function ($response) { * * @param string $organization Organization identifier (required) * @param string $project Project identifier (required) - * @param string $domain Domain identifier (required) + * @param string $domain Domain id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['domainsDelete'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -631,7 +709,7 @@ function ($exception) { * * @param string $organization Organization identifier (required) * @param string $project Project identifier (required) - * @param string $domain Domain identifier (required) + * @param string $domain Domain id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['domainsDelete'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -815,26 +893,87 @@ public function domainsListWithHttpInfo($organization, $project, string $content switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Domain[]', - $request, - $response, - ); + if ('\QuantClient\Model\V2Domain[]' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Domain[]' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Domain[]', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -849,11 +988,34 @@ public function domainsListWithHttpInfo($organization, $project, string $content ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Domain[]', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2Domain[]'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -863,7 +1025,7 @@ public function domainsListWithHttpInfo($organization, $project, string $content $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -871,7 +1033,7 @@ public function domainsListWithHttpInfo($organization, $project, string $content $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -879,10 +1041,8 @@ public function domainsListWithHttpInfo($organization, $project, string $content $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -1081,7 +1241,7 @@ public function domainsListRequest($organization, $project, string $contentType * * @param string $organization Organization identifier (required) * @param string $project Project identifier (required) - * @param string $domain Domain identifier (required) + * @param string $domain Domain id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['domainsRead'] to see the possible values for this operation * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format @@ -1101,7 +1261,7 @@ public function domainsRead($organization, $project, $domain, string $contentTyp * * @param string $organization Organization identifier (required) * @param string $project Project identifier (required) - * @param string $domain Domain identifier (required) + * @param string $domain Domain id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['domainsRead'] to see the possible values for this operation * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format @@ -1137,26 +1297,87 @@ public function domainsReadWithHttpInfo($organization, $project, $domain, string switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Domain', - $request, - $response, - ); + if ('\QuantClient\Model\V2Domain' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Domain' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Domain', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1171,11 +1392,34 @@ public function domainsReadWithHttpInfo($organization, $project, $domain, string ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Domain', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2Domain'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1185,7 +1429,7 @@ public function domainsReadWithHttpInfo($organization, $project, $domain, string $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1193,7 +1437,7 @@ public function domainsReadWithHttpInfo($organization, $project, $domain, string $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1201,10 +1445,8 @@ public function domainsReadWithHttpInfo($organization, $project, $domain, string $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -1216,7 +1458,7 @@ public function domainsReadWithHttpInfo($organization, $project, $domain, string * * @param string $organization Organization identifier (required) * @param string $project Project identifier (required) - * @param string $domain Domain identifier (required) + * @param string $domain Domain id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['domainsRead'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1239,7 +1481,7 @@ function ($response) { * * @param string $organization Organization identifier (required) * @param string $project Project identifier (required) - * @param string $domain Domain identifier (required) + * @param string $domain Domain id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['domainsRead'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1291,7 +1533,7 @@ function ($exception) { * * @param string $organization Organization identifier (required) * @param string $project Project identifier (required) - * @param string $domain Domain identifier (required) + * @param string $domain Domain id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['domainsRead'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1421,7 +1663,7 @@ public function domainsReadRequest($organization, $project, $domain, string $con * * @param string $organization Organization identifier (required) * @param string $project Project identifier (required) - * @param string $domain Domain identifier (required) + * @param string $domain Domain id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['domainsRenew'] to see the possible values for this operation * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format @@ -1440,7 +1682,7 @@ public function domainsRenew($organization, $project, $domain, string $contentTy * * @param string $organization Organization identifier (required) * @param string $project Project identifier (required) - * @param string $domain Domain identifier (required) + * @param string $domain Domain id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['domainsRenew'] to see the possible values for this operation * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format @@ -1475,6 +1717,7 @@ public function domainsRenewWithHttpInfo($organization, $project, $domain, strin return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { switch ($e->getCode()) { case 400: @@ -1484,7 +1727,7 @@ public function domainsRenewWithHttpInfo($organization, $project, $domain, strin $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1492,10 +1735,8 @@ public function domainsRenewWithHttpInfo($organization, $project, $domain, strin $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -1507,7 +1748,7 @@ public function domainsRenewWithHttpInfo($organization, $project, $domain, strin * * @param string $organization Organization identifier (required) * @param string $project Project identifier (required) - * @param string $domain Domain identifier (required) + * @param string $domain Domain id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['domainsRenew'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1530,7 +1771,7 @@ function ($response) { * * @param string $organization Organization identifier (required) * @param string $project Project identifier (required) - * @param string $domain Domain identifier (required) + * @param string $domain Domain id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['domainsRenew'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1569,7 +1810,7 @@ function ($exception) { * * @param string $organization Organization identifier (required) * @param string $project Project identifier (required) - * @param string $domain Domain identifier (required) + * @param string $domain Domain id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['domainsRenew'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1710,47 +1951,4 @@ protected function createHttpClientOption() 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/src/Api/EnvironmentsApi.php b/src/Api/EnvironmentsApi.php index b9d73ab..b92c972 100644 --- a/src/Api/EnvironmentsApi.php +++ b/src/Api/EnvironmentsApi.php @@ -1,7 +1,7 @@ client = $client ?: new Client(); $this->config = $config ?: Configuration::getDefaultConfiguration(); @@ -215,20 +212,60 @@ public function createEnvironmentWithHttpInfo($organisation, $application, $crea switch($statusCode) { case 201: - return $this->handleResponseWithDataType( - '\QuantClient\Model\EnvironmentResponse', - $request, - $response, - ); + if ('\QuantClient\Model\EnvironmentResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\EnvironmentResponse' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\EnvironmentResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\CreateEnvironment403Response', - $request, - $response, - ); - } + if ('\QuantClient\Model\CreateEnvironment403Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\CreateEnvironment403Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\CreateEnvironment403Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -243,11 +280,34 @@ public function createEnvironmentWithHttpInfo($organisation, $application, $crea ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\EnvironmentResponse', - $request, - $response, - ); + $returnType = '\QuantClient\Model\EnvironmentResponse'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -257,7 +317,7 @@ public function createEnvironmentWithHttpInfo($organisation, $application, $crea $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -265,10 +325,8 @@ public function createEnvironmentWithHttpInfo($organisation, $application, $crea $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -538,11 +596,10 @@ public function deleteEnvironmentWithHttpInfo($organisation, $application, $envi return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { switch ($e->getCode()) { } - - throw $e; } } @@ -802,14 +859,33 @@ public function getEnvironmentWithHttpInfo($organisation, $application, $environ switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\EnvironmentResponse', - $request, - $response, - ); - } + if ('\QuantClient\Model\EnvironmentResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\EnvironmentResponse' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\EnvironmentResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -824,11 +900,34 @@ public function getEnvironmentWithHttpInfo($organisation, $application, $environ ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\EnvironmentResponse', - $request, - $response, - ); + $returnType = '\QuantClient\Model\EnvironmentResponse'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -838,10 +937,8 @@ public function getEnvironmentWithHttpInfo($organisation, $application, $environ $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -1059,12 +1156,12 @@ public function getEnvironmentRequest($organisation, $application, $environment, * @param string $organisation The organisation ID (required) * @param string $application The application ID (required) * @param string $environment The environment ID (required) - * @param string|null $start_time Start time for log retrieval (ISO 8601 format or Unix timestamp) (optional) - * @param string|null $end_time End time for log retrieval (ISO 8601 format or Unix timestamp) (optional) - * @param string|null $container_name Filter logs by specific container name (optional) - * @param string|null $filter_pattern CloudWatch Logs filter pattern for searching log content (optional) - * @param int|null $limit Maximum number of log entries to return per page (optional) - * @param string|null $next_token Pagination token from previous response for retrieving next page of results (optional) + * @param string $start_time Start time for log retrieval (ISO 8601 format or Unix timestamp) (optional) + * @param string $end_time End time for log retrieval (ISO 8601 format or Unix timestamp) (optional) + * @param string $container_name Filter logs by specific container name (optional) + * @param string $filter_pattern CloudWatch Logs filter pattern for searching log content (optional) + * @param int $limit Maximum number of log entries to return per page (optional) + * @param string $next_token Pagination token from previous response for retrieving next page of results (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEnvironmentLogs'] to see the possible values for this operation * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format @@ -1085,12 +1182,12 @@ public function getEnvironmentLogs($organisation, $application, $environment, $s * @param string $organisation The organisation ID (required) * @param string $application The application ID (required) * @param string $environment The environment ID (required) - * @param string|null $start_time Start time for log retrieval (ISO 8601 format or Unix timestamp) (optional) - * @param string|null $end_time End time for log retrieval (ISO 8601 format or Unix timestamp) (optional) - * @param string|null $container_name Filter logs by specific container name (optional) - * @param string|null $filter_pattern CloudWatch Logs filter pattern for searching log content (optional) - * @param int|null $limit Maximum number of log entries to return per page (optional) - * @param string|null $next_token Pagination token from previous response for retrieving next page of results (optional) + * @param string $start_time Start time for log retrieval (ISO 8601 format or Unix timestamp) (optional) + * @param string $end_time End time for log retrieval (ISO 8601 format or Unix timestamp) (optional) + * @param string $container_name Filter logs by specific container name (optional) + * @param string $filter_pattern CloudWatch Logs filter pattern for searching log content (optional) + * @param int $limit Maximum number of log entries to return per page (optional) + * @param string $next_token Pagination token from previous response for retrieving next page of results (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEnvironmentLogs'] to see the possible values for this operation * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format @@ -1126,14 +1223,33 @@ public function getEnvironmentLogsWithHttpInfo($organisation, $application, $env switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\GetEnvironmentLogs200Response', - $request, - $response, - ); - } + if ('\QuantClient\Model\GetEnvironmentLogs200Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\GetEnvironmentLogs200Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\GetEnvironmentLogs200Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1148,11 +1264,34 @@ public function getEnvironmentLogsWithHttpInfo($organisation, $application, $env ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\GetEnvironmentLogs200Response', - $request, - $response, - ); + $returnType = '\QuantClient\Model\GetEnvironmentLogs200Response'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1162,10 +1301,8 @@ public function getEnvironmentLogsWithHttpInfo($organisation, $application, $env $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -1178,12 +1315,12 @@ public function getEnvironmentLogsWithHttpInfo($organisation, $application, $env * @param string $organisation The organisation ID (required) * @param string $application The application ID (required) * @param string $environment The environment ID (required) - * @param string|null $start_time Start time for log retrieval (ISO 8601 format or Unix timestamp) (optional) - * @param string|null $end_time End time for log retrieval (ISO 8601 format or Unix timestamp) (optional) - * @param string|null $container_name Filter logs by specific container name (optional) - * @param string|null $filter_pattern CloudWatch Logs filter pattern for searching log content (optional) - * @param int|null $limit Maximum number of log entries to return per page (optional) - * @param string|null $next_token Pagination token from previous response for retrieving next page of results (optional) + * @param string $start_time Start time for log retrieval (ISO 8601 format or Unix timestamp) (optional) + * @param string $end_time End time for log retrieval (ISO 8601 format or Unix timestamp) (optional) + * @param string $container_name Filter logs by specific container name (optional) + * @param string $filter_pattern CloudWatch Logs filter pattern for searching log content (optional) + * @param int $limit Maximum number of log entries to return per page (optional) + * @param string $next_token Pagination token from previous response for retrieving next page of results (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEnvironmentLogs'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1207,12 +1344,12 @@ function ($response) { * @param string $organisation The organisation ID (required) * @param string $application The application ID (required) * @param string $environment The environment ID (required) - * @param string|null $start_time Start time for log retrieval (ISO 8601 format or Unix timestamp) (optional) - * @param string|null $end_time End time for log retrieval (ISO 8601 format or Unix timestamp) (optional) - * @param string|null $container_name Filter logs by specific container name (optional) - * @param string|null $filter_pattern CloudWatch Logs filter pattern for searching log content (optional) - * @param int|null $limit Maximum number of log entries to return per page (optional) - * @param string|null $next_token Pagination token from previous response for retrieving next page of results (optional) + * @param string $start_time Start time for log retrieval (ISO 8601 format or Unix timestamp) (optional) + * @param string $end_time End time for log retrieval (ISO 8601 format or Unix timestamp) (optional) + * @param string $container_name Filter logs by specific container name (optional) + * @param string $filter_pattern CloudWatch Logs filter pattern for searching log content (optional) + * @param int $limit Maximum number of log entries to return per page (optional) + * @param string $next_token Pagination token from previous response for retrieving next page of results (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEnvironmentLogs'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1265,12 +1402,12 @@ function ($exception) { * @param string $organisation The organisation ID (required) * @param string $application The application ID (required) * @param string $environment The environment ID (required) - * @param string|null $start_time Start time for log retrieval (ISO 8601 format or Unix timestamp) (optional) - * @param string|null $end_time End time for log retrieval (ISO 8601 format or Unix timestamp) (optional) - * @param string|null $container_name Filter logs by specific container name (optional) - * @param string|null $filter_pattern CloudWatch Logs filter pattern for searching log content (optional) - * @param int|null $limit Maximum number of log entries to return per page (optional) - * @param string|null $next_token Pagination token from previous response for retrieving next page of results (optional) + * @param string $start_time Start time for log retrieval (ISO 8601 format or Unix timestamp) (optional) + * @param string $end_time End time for log retrieval (ISO 8601 format or Unix timestamp) (optional) + * @param string $container_name Filter logs by specific container name (optional) + * @param string $filter_pattern CloudWatch Logs filter pattern for searching log content (optional) + * @param int $limit Maximum number of log entries to return per page (optional) + * @param string $next_token Pagination token from previous response for retrieving next page of results (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEnvironmentLogs'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1467,11 +1604,11 @@ public function getEnvironmentLogsRequest($organisation, $application, $environm * @param string $organisation The organisation ID (required) * @param string $application The application ID (required) * @param string $environment The environment ID (required) - * @param int|null $start_time Start time for metrics retrieval (Unix timestamp in milliseconds) (optional) - * @param int|null $end_time End time for metrics retrieval (Unix timestamp in milliseconds) (optional) - * @param int|null $period Period in seconds for metric aggregation (e.g., 60 for 1 minute, 300 for 5 minutes) (optional) - * @param string|null $statistics Comma-separated list of CloudWatch statistics (e.g., Average, Maximum, Minimum, Sum, SampleCount) (optional) - * @param string|null $container_name Filter metrics by specific container name (optional) + * @param int $start_time Start time for metrics retrieval (Unix timestamp in milliseconds) (optional) + * @param int $end_time End time for metrics retrieval (Unix timestamp in milliseconds) (optional) + * @param int $period Period in seconds for metric aggregation (e.g., 60 for 1 minute, 300 for 5 minutes) (optional) + * @param string $statistics Comma-separated list of CloudWatch statistics (e.g., Average, Maximum, Minimum, Sum, SampleCount) (optional) + * @param string $container_name Filter metrics by specific container name (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEnvironmentMetrics'] to see the possible values for this operation * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format @@ -1492,11 +1629,11 @@ public function getEnvironmentMetrics($organisation, $application, $environment, * @param string $organisation The organisation ID (required) * @param string $application The application ID (required) * @param string $environment The environment ID (required) - * @param int|null $start_time Start time for metrics retrieval (Unix timestamp in milliseconds) (optional) - * @param int|null $end_time End time for metrics retrieval (Unix timestamp in milliseconds) (optional) - * @param int|null $period Period in seconds for metric aggregation (e.g., 60 for 1 minute, 300 for 5 minutes) (optional) - * @param string|null $statistics Comma-separated list of CloudWatch statistics (e.g., Average, Maximum, Minimum, Sum, SampleCount) (optional) - * @param string|null $container_name Filter metrics by specific container name (optional) + * @param int $start_time Start time for metrics retrieval (Unix timestamp in milliseconds) (optional) + * @param int $end_time End time for metrics retrieval (Unix timestamp in milliseconds) (optional) + * @param int $period Period in seconds for metric aggregation (e.g., 60 for 1 minute, 300 for 5 minutes) (optional) + * @param string $statistics Comma-separated list of CloudWatch statistics (e.g., Average, Maximum, Minimum, Sum, SampleCount) (optional) + * @param string $container_name Filter metrics by specific container name (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEnvironmentMetrics'] to see the possible values for this operation * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format @@ -1532,14 +1669,33 @@ public function getEnvironmentMetricsWithHttpInfo($organisation, $application, $ switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - 'object', - $request, - $response, - ); - } + if ('object' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('object' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, 'object', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1554,11 +1710,34 @@ public function getEnvironmentMetricsWithHttpInfo($organisation, $application, $ ); } - return $this->handleResponseWithDataType( - 'object', - $request, - $response, - ); + $returnType = 'object'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1568,10 +1747,8 @@ public function getEnvironmentMetricsWithHttpInfo($organisation, $application, $ $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -1584,11 +1761,11 @@ public function getEnvironmentMetricsWithHttpInfo($organisation, $application, $ * @param string $organisation The organisation ID (required) * @param string $application The application ID (required) * @param string $environment The environment ID (required) - * @param int|null $start_time Start time for metrics retrieval (Unix timestamp in milliseconds) (optional) - * @param int|null $end_time End time for metrics retrieval (Unix timestamp in milliseconds) (optional) - * @param int|null $period Period in seconds for metric aggregation (e.g., 60 for 1 minute, 300 for 5 minutes) (optional) - * @param string|null $statistics Comma-separated list of CloudWatch statistics (e.g., Average, Maximum, Minimum, Sum, SampleCount) (optional) - * @param string|null $container_name Filter metrics by specific container name (optional) + * @param int $start_time Start time for metrics retrieval (Unix timestamp in milliseconds) (optional) + * @param int $end_time End time for metrics retrieval (Unix timestamp in milliseconds) (optional) + * @param int $period Period in seconds for metric aggregation (e.g., 60 for 1 minute, 300 for 5 minutes) (optional) + * @param string $statistics Comma-separated list of CloudWatch statistics (e.g., Average, Maximum, Minimum, Sum, SampleCount) (optional) + * @param string $container_name Filter metrics by specific container name (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEnvironmentMetrics'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1612,11 +1789,11 @@ function ($response) { * @param string $organisation The organisation ID (required) * @param string $application The application ID (required) * @param string $environment The environment ID (required) - * @param int|null $start_time Start time for metrics retrieval (Unix timestamp in milliseconds) (optional) - * @param int|null $end_time End time for metrics retrieval (Unix timestamp in milliseconds) (optional) - * @param int|null $period Period in seconds for metric aggregation (e.g., 60 for 1 minute, 300 for 5 minutes) (optional) - * @param string|null $statistics Comma-separated list of CloudWatch statistics (e.g., Average, Maximum, Minimum, Sum, SampleCount) (optional) - * @param string|null $container_name Filter metrics by specific container name (optional) + * @param int $start_time Start time for metrics retrieval (Unix timestamp in milliseconds) (optional) + * @param int $end_time End time for metrics retrieval (Unix timestamp in milliseconds) (optional) + * @param int $period Period in seconds for metric aggregation (e.g., 60 for 1 minute, 300 for 5 minutes) (optional) + * @param string $statistics Comma-separated list of CloudWatch statistics (e.g., Average, Maximum, Minimum, Sum, SampleCount) (optional) + * @param string $container_name Filter metrics by specific container name (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEnvironmentMetrics'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1669,11 +1846,11 @@ function ($exception) { * @param string $organisation The organisation ID (required) * @param string $application The application ID (required) * @param string $environment The environment ID (required) - * @param int|null $start_time Start time for metrics retrieval (Unix timestamp in milliseconds) (optional) - * @param int|null $end_time End time for metrics retrieval (Unix timestamp in milliseconds) (optional) - * @param int|null $period Period in seconds for metric aggregation (e.g., 60 for 1 minute, 300 for 5 minutes) (optional) - * @param string|null $statistics Comma-separated list of CloudWatch statistics (e.g., Average, Maximum, Minimum, Sum, SampleCount) (optional) - * @param string|null $container_name Filter metrics by specific container name (optional) + * @param int $start_time Start time for metrics retrieval (Unix timestamp in milliseconds) (optional) + * @param int $end_time End time for metrics retrieval (Unix timestamp in milliseconds) (optional) + * @param int $period Period in seconds for metric aggregation (e.g., 60 for 1 minute, 300 for 5 minutes) (optional) + * @param string $statistics Comma-separated list of CloudWatch statistics (e.g., Average, Maximum, Minimum, Sum, SampleCount) (optional) + * @param string $container_name Filter metrics by specific container name (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEnvironmentMetrics'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1907,14 +2084,33 @@ public function listEnvironmentsWithHttpInfo($organisation, $application, string switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\EnvironmentSummary[]', - $request, - $response, - ); - } + if ('\QuantClient\Model\EnvironmentSummary[]' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\EnvironmentSummary[]' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\EnvironmentSummary[]', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1929,11 +2125,34 @@ public function listEnvironmentsWithHttpInfo($organisation, $application, string ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\EnvironmentSummary[]', - $request, - $response, - ); + $returnType = '\QuantClient\Model\EnvironmentSummary[]'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1943,10 +2162,8 @@ public function listEnvironmentsWithHttpInfo($organisation, $application, string $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -2203,14 +2420,33 @@ public function listSyncOperationsWithHttpInfo($organisation, $application, $env switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\SyncOperation[]', - $request, - $response, - ); - } + if ('\QuantClient\Model\SyncOperation[]' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\SyncOperation[]' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\SyncOperation[]', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2225,11 +2461,34 @@ public function listSyncOperationsWithHttpInfo($organisation, $application, $env ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\SyncOperation[]', - $request, - $response, - ); + $returnType = '\QuantClient\Model\SyncOperation[]'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2239,10 +2498,8 @@ public function listSyncOperationsWithHttpInfo($organisation, $application, $env $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -2537,14 +2794,33 @@ public function syncToEnvironmentWithHttpInfo($organisation, $application, $envi switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\SyncOperation', - $request, - $response, - ); - } + if ('\QuantClient\Model\SyncOperation' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\SyncOperation' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\SyncOperation', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2559,11 +2835,34 @@ public function syncToEnvironmentWithHttpInfo($organisation, $application, $envi ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\SyncOperation', - $request, - $response, - ); + $returnType = '\QuantClient\Model\SyncOperation'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2573,10 +2872,8 @@ public function syncToEnvironmentWithHttpInfo($organisation, $application, $envi $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -2884,6 +3181,7 @@ public function updateEnvironmentWithHttpInfo($organisation, $application, $envi return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { switch ($e->getCode()) { case 400: @@ -2893,10 +3191,8 @@ public function updateEnvironmentWithHttpInfo($organisation, $application, $envi $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -3173,11 +3469,10 @@ public function updateEnvironmentStateWithHttpInfo($organisation, $application, return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { switch ($e->getCode()) { } - - throw $e; } } @@ -3409,47 +3704,4 @@ protected function createHttpClientOption() 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/src/Api/HeadersApi.php b/src/Api/HeadersApi.php index 2ac7c15..eabc648 100644 --- a/src/Api/HeadersApi.php +++ b/src/Api/HeadersApi.php @@ -1,7 +1,7 @@ client = $client ?: new Client(); $this->config = $config ?: Configuration::getDefaultConfiguration(); @@ -136,8 +133,8 @@ public function getConfig() * * Create or update custom headers * - * @param string $organization organization (required) - * @param string $project project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param \QuantClient\Model\V2CustomHeaderRequest $v2_custom_header_request v2_custom_header_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['headersCreate'] to see the possible values for this operation * @@ -156,8 +153,8 @@ public function headersCreate($organization, $project, $v2_custom_header_request * * Create or update custom headers * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param \QuantClient\Model\V2CustomHeaderRequest $v2_custom_header_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['headersCreate'] to see the possible values for this operation * @@ -194,26 +191,87 @@ public function headersCreateWithHttpInfo($organization, $project, $v2_custom_he switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - 'array', - $request, - $response, - ); + if ('array' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('array' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, 'array', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -228,11 +286,34 @@ public function headersCreateWithHttpInfo($organization, $project, $v2_custom_he ); } - return $this->handleResponseWithDataType( - 'array', - $request, - $response, - ); + $returnType = 'array'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -242,7 +323,7 @@ public function headersCreateWithHttpInfo($organization, $project, $v2_custom_he $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -250,7 +331,7 @@ public function headersCreateWithHttpInfo($organization, $project, $v2_custom_he $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -258,10 +339,8 @@ public function headersCreateWithHttpInfo($organization, $project, $v2_custom_he $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -271,8 +350,8 @@ public function headersCreateWithHttpInfo($organization, $project, $v2_custom_he * * Create or update custom headers * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param \QuantClient\Model\V2CustomHeaderRequest $v2_custom_header_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['headersCreate'] to see the possible values for this operation * @@ -294,8 +373,8 @@ function ($response) { * * Create or update custom headers * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param \QuantClient\Model\V2CustomHeaderRequest $v2_custom_header_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['headersCreate'] to see the possible values for this operation * @@ -346,8 +425,8 @@ function ($exception) { /** * Create request for operation 'headersCreate' * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param \QuantClient\Model\V2CustomHeaderRequest $v2_custom_header_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['headersCreate'] to see the possible values for this operation * @@ -475,8 +554,8 @@ public function headersCreateRequest($organization, $project, $v2_custom_header_ * * Delete custom headers * - * @param string $organization organization (required) - * @param string $project project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param \QuantClient\Model\V2CustomHeaderRequest $v2_custom_header_request v2_custom_header_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['headersDelete'] to see the possible values for this operation * @@ -494,8 +573,8 @@ public function headersDelete($organization, $project, $v2_custom_header_request * * Delete custom headers * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param \QuantClient\Model\V2CustomHeaderRequest $v2_custom_header_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['headersDelete'] to see the possible values for this operation * @@ -531,6 +610,7 @@ public function headersDeleteWithHttpInfo($organization, $project, $v2_custom_he return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { switch ($e->getCode()) { case 400: @@ -540,7 +620,7 @@ public function headersDeleteWithHttpInfo($organization, $project, $v2_custom_he $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -548,10 +628,8 @@ public function headersDeleteWithHttpInfo($organization, $project, $v2_custom_he $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -561,8 +639,8 @@ public function headersDeleteWithHttpInfo($organization, $project, $v2_custom_he * * Delete custom headers * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param \QuantClient\Model\V2CustomHeaderRequest $v2_custom_header_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['headersDelete'] to see the possible values for this operation * @@ -584,8 +662,8 @@ function ($response) { * * Delete custom headers * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param \QuantClient\Model\V2CustomHeaderRequest $v2_custom_header_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['headersDelete'] to see the possible values for this operation * @@ -623,8 +701,8 @@ function ($exception) { /** * Create request for operation 'headersDelete' * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param \QuantClient\Model\V2CustomHeaderRequest $v2_custom_header_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['headersDelete'] to see the possible values for this operation * @@ -752,8 +830,8 @@ public function headersDeleteRequest($organization, $project, $v2_custom_header_ * * List custom headers for a project * - * @param string $organization organization (required) - * @param string $project project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['headersList'] to see the possible values for this operation * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format @@ -771,8 +849,8 @@ public function headersList($organization, $project, string $contentType = self: * * List custom headers for a project * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['headersList'] to see the possible values for this operation * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format @@ -808,26 +886,87 @@ public function headersListWithHttpInfo($organization, $project, string $content switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - 'array', - $request, - $response, - ); + if ('array' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('array' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, 'array', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -842,11 +981,34 @@ public function headersListWithHttpInfo($organization, $project, string $content ); } - return $this->handleResponseWithDataType( - 'array', - $request, - $response, - ); + $returnType = 'array'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -856,7 +1018,7 @@ public function headersListWithHttpInfo($organization, $project, string $content $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -864,7 +1026,7 @@ public function headersListWithHttpInfo($organization, $project, string $content $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -872,10 +1034,8 @@ public function headersListWithHttpInfo($organization, $project, string $content $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -885,8 +1045,8 @@ public function headersListWithHttpInfo($organization, $project, string $content * * List custom headers for a project * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['headersList'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -907,8 +1067,8 @@ function ($response) { * * List custom headers for a project * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['headersList'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -958,8 +1118,8 @@ function ($exception) { /** * Create request for operation 'headersList' * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['headersList'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1085,47 +1245,4 @@ protected function createHttpClientOption() 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/src/Api/KVApi.php b/src/Api/KVApi.php index 962f225..f109d74 100644 --- a/src/Api/KVApi.php +++ b/src/Api/KVApi.php @@ -1,7 +1,7 @@ client = $client ?: new Client(); $this->config = $config ?: Configuration::getDefaultConfiguration(); @@ -154,8 +151,8 @@ public function getConfig() * * Add a kv store * - * @param string $organization organization (required) - * @param string $project project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param \QuantClient\Model\V2StoreRequest $v2_store_request v2_store_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVCreate'] to see the possible values for this operation * @@ -174,8 +171,8 @@ public function kVCreate($organization, $project, $v2_store_request, string $con * * Add a kv store * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param \QuantClient\Model\V2StoreRequest $v2_store_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVCreate'] to see the possible values for this operation * @@ -212,26 +209,87 @@ public function kVCreateWithHttpInfo($organization, $project, $v2_store_request, switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Store', - $request, - $response, - ); + if ('\QuantClient\Model\V2Store' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Store' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Store', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -246,11 +304,34 @@ public function kVCreateWithHttpInfo($organization, $project, $v2_store_request, ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Store', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2Store'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -260,7 +341,7 @@ public function kVCreateWithHttpInfo($organization, $project, $v2_store_request, $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -268,7 +349,7 @@ public function kVCreateWithHttpInfo($organization, $project, $v2_store_request, $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -276,10 +357,8 @@ public function kVCreateWithHttpInfo($organization, $project, $v2_store_request, $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -289,8 +368,8 @@ public function kVCreateWithHttpInfo($organization, $project, $v2_store_request, * * Add a kv store * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param \QuantClient\Model\V2StoreRequest $v2_store_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVCreate'] to see the possible values for this operation * @@ -312,8 +391,8 @@ function ($response) { * * Add a kv store * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param \QuantClient\Model\V2StoreRequest $v2_store_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVCreate'] to see the possible values for this operation * @@ -364,8 +443,8 @@ function ($exception) { /** * Create request for operation 'kVCreate' * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param \QuantClient\Model\V2StoreRequest $v2_store_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVCreate'] to see the possible values for this operation * @@ -493,8 +572,8 @@ public function kVCreateRequest($organization, $project, $v2_store_request, stri * * Delete a kv store * - * @param string $organization organization (required) - * @param string $project project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $store_id store_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVDelete'] to see the possible values for this operation * @@ -512,8 +591,8 @@ public function kVDelete($organization, $project, $store_id, string $contentType * * Delete a kv store * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $store_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVDelete'] to see the possible values for this operation * @@ -549,6 +628,7 @@ public function kVDeleteWithHttpInfo($organization, $project, $store_id, string return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { switch ($e->getCode()) { case 400: @@ -558,7 +638,7 @@ public function kVDeleteWithHttpInfo($organization, $project, $store_id, string $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -566,10 +646,8 @@ public function kVDeleteWithHttpInfo($organization, $project, $store_id, string $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -579,8 +657,8 @@ public function kVDeleteWithHttpInfo($organization, $project, $store_id, string * * Delete a kv store * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $store_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVDelete'] to see the possible values for this operation * @@ -602,8 +680,8 @@ function ($response) { * * Delete a kv store * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $store_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVDelete'] to see the possible values for this operation * @@ -641,8 +719,8 @@ function ($exception) { /** * Create request for operation 'kVDelete' * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $store_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVDelete'] to see the possible values for this operation * @@ -771,8 +849,8 @@ public function kVDeleteRequest($organization, $project, $store_id, string $cont * * Add an item to a kv store * - * @param string $organization organization (required) - * @param string $project project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $store_id store_id (required) * @param \QuantClient\Model\V2StoreItemRequest $v2_store_item_request v2_store_item_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVItemsCreate'] to see the possible values for this operation @@ -792,8 +870,8 @@ public function kVItemsCreate($organization, $project, $store_id, $v2_store_item * * Add an item to a kv store * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $store_id (required) * @param \QuantClient\Model\V2StoreItemRequest $v2_store_item_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVItemsCreate'] to see the possible values for this operation @@ -831,32 +909,114 @@ public function kVItemsCreateWithHttpInfo($organization, $project, $store_id, $v switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\KVItemsCreate200Response', - $request, - $response, - ); + if ('\QuantClient\Model\KVItemsCreate200Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\KVItemsCreate200Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\KVItemsCreate200Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 422: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -871,11 +1031,34 @@ public function kVItemsCreateWithHttpInfo($organization, $project, $store_id, $v ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\KVItemsCreate200Response', - $request, - $response, - ); + $returnType = '\QuantClient\Model\KVItemsCreate200Response'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -885,7 +1068,7 @@ public function kVItemsCreateWithHttpInfo($organization, $project, $store_id, $v $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -893,7 +1076,7 @@ public function kVItemsCreateWithHttpInfo($organization, $project, $store_id, $v $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -901,7 +1084,7 @@ public function kVItemsCreateWithHttpInfo($organization, $project, $store_id, $v $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 422: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -909,10 +1092,8 @@ public function kVItemsCreateWithHttpInfo($organization, $project, $store_id, $v $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -922,8 +1103,8 @@ public function kVItemsCreateWithHttpInfo($organization, $project, $store_id, $v * * Add an item to a kv store * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $store_id (required) * @param \QuantClient\Model\V2StoreItemRequest $v2_store_item_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVItemsCreate'] to see the possible values for this operation @@ -946,8 +1127,8 @@ function ($response) { * * Add an item to a kv store * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $store_id (required) * @param \QuantClient\Model\V2StoreItemRequest $v2_store_item_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVItemsCreate'] to see the possible values for this operation @@ -999,8 +1180,8 @@ function ($exception) { /** * Create request for operation 'kVItemsCreate' * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $store_id (required) * @param \QuantClient\Model\V2StoreItemRequest $v2_store_item_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVItemsCreate'] to see the possible values for this operation @@ -1144,8 +1325,8 @@ public function kVItemsCreateRequest($organization, $project, $store_id, $v2_sto * * Delete an item from a kv store * - * @param string $organization organization (required) - * @param string $project project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $store_id store_id (required) * @param string $key key (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVItemsDelete'] to see the possible values for this operation @@ -1165,8 +1346,8 @@ public function kVItemsDelete($organization, $project, $store_id, $key, string $ * * Delete an item from a kv store * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $store_id (required) * @param string $key (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVItemsDelete'] to see the possible values for this operation @@ -1204,26 +1385,87 @@ public function kVItemsDeleteWithHttpInfo($organization, $project, $store_id, $k switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\KVItemsDelete200Response', - $request, - $response, - ); + if ('\QuantClient\Model\KVItemsDelete200Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\KVItemsDelete200Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\KVItemsDelete200Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1238,11 +1480,34 @@ public function kVItemsDeleteWithHttpInfo($organization, $project, $store_id, $k ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\KVItemsDelete200Response', - $request, - $response, - ); + $returnType = '\QuantClient\Model\KVItemsDelete200Response'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1252,7 +1517,7 @@ public function kVItemsDeleteWithHttpInfo($organization, $project, $store_id, $k $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1260,7 +1525,7 @@ public function kVItemsDeleteWithHttpInfo($organization, $project, $store_id, $k $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1268,10 +1533,8 @@ public function kVItemsDeleteWithHttpInfo($organization, $project, $store_id, $k $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -1281,8 +1544,8 @@ public function kVItemsDeleteWithHttpInfo($organization, $project, $store_id, $k * * Delete an item from a kv store * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $store_id (required) * @param string $key (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVItemsDelete'] to see the possible values for this operation @@ -1305,8 +1568,8 @@ function ($response) { * * Delete an item from a kv store * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $store_id (required) * @param string $key (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVItemsDelete'] to see the possible values for this operation @@ -1358,8 +1621,8 @@ function ($exception) { /** * Create request for operation 'kVItemsDelete' * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $store_id (required) * @param string $key (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVItemsDelete'] to see the possible values for this operation @@ -1504,13 +1767,13 @@ public function kVItemsDeleteRequest($organization, $project, $store_id, $key, s * * List items in a kv store * - * @param string $organization organization (required) - * @param string $project project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $store_id store_id (required) - * @param string|null $cursor Cursor for pagination (optional) - * @param int|null $limit Number of items to return (optional, default to 10) - * @param string|null $search Search filter for keys (optional) - * @param bool|null $include_values Include values in the response. Secret values will be redacted as '[ENCRYPTED]' for security. (optional, default to false) + * @param string $cursor Cursor for pagination (optional) + * @param int $limit Number of items to return (optional, default to 10) + * @param string $search Search filter for keys (optional) + * @param bool $include_values Include values in the response. Secret values will be redacted as '[ENCRYPTED]' for security. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVItemsList'] to see the possible values for this operation * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format @@ -1528,13 +1791,13 @@ public function kVItemsList($organization, $project, $store_id, $cursor = null, * * List items in a kv store * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $store_id (required) - * @param string|null $cursor Cursor for pagination (optional) - * @param int|null $limit Number of items to return (optional, default to 10) - * @param string|null $search Search filter for keys (optional) - * @param bool|null $include_values Include values in the response. Secret values will be redacted as '[ENCRYPTED]' for security. (optional, default to false) + * @param string $cursor Cursor for pagination (optional) + * @param int $limit Number of items to return (optional, default to 10) + * @param string $search Search filter for keys (optional) + * @param bool $include_values Include values in the response. Secret values will be redacted as '[ENCRYPTED]' for security. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVItemsList'] to see the possible values for this operation * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format @@ -1570,26 +1833,87 @@ public function kVItemsListWithHttpInfo($organization, $project, $store_id, $cur switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2StoreItemsListResponse', - $request, - $response, - ); + if ('\QuantClient\Model\V2StoreItemsListResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2StoreItemsListResponse' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2StoreItemsListResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1604,11 +1928,34 @@ public function kVItemsListWithHttpInfo($organization, $project, $store_id, $cur ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2StoreItemsListResponse', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2StoreItemsListResponse'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1618,7 +1965,7 @@ public function kVItemsListWithHttpInfo($organization, $project, $store_id, $cur $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1626,7 +1973,7 @@ public function kVItemsListWithHttpInfo($organization, $project, $store_id, $cur $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1634,10 +1981,8 @@ public function kVItemsListWithHttpInfo($organization, $project, $store_id, $cur $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -1647,13 +1992,13 @@ public function kVItemsListWithHttpInfo($organization, $project, $store_id, $cur * * List items in a kv store * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $store_id (required) - * @param string|null $cursor Cursor for pagination (optional) - * @param int|null $limit Number of items to return (optional, default to 10) - * @param string|null $search Search filter for keys (optional) - * @param bool|null $include_values Include values in the response. Secret values will be redacted as '[ENCRYPTED]' for security. (optional, default to false) + * @param string $cursor Cursor for pagination (optional) + * @param int $limit Number of items to return (optional, default to 10) + * @param string $search Search filter for keys (optional) + * @param bool $include_values Include values in the response. Secret values will be redacted as '[ENCRYPTED]' for security. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVItemsList'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1674,13 +2019,13 @@ function ($response) { * * List items in a kv store * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $store_id (required) - * @param string|null $cursor Cursor for pagination (optional) - * @param int|null $limit Number of items to return (optional, default to 10) - * @param string|null $search Search filter for keys (optional) - * @param bool|null $include_values Include values in the response. Secret values will be redacted as '[ENCRYPTED]' for security. (optional, default to false) + * @param string $cursor Cursor for pagination (optional) + * @param int $limit Number of items to return (optional, default to 10) + * @param string $search Search filter for keys (optional) + * @param bool $include_values Include values in the response. Secret values will be redacted as '[ENCRYPTED]' for security. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVItemsList'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1730,13 +2075,13 @@ function ($exception) { /** * Create request for operation 'kVItemsList' * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $store_id (required) - * @param string|null $cursor Cursor for pagination (optional) - * @param int|null $limit Number of items to return (optional, default to 10) - * @param string|null $search Search filter for keys (optional) - * @param bool|null $include_values Include values in the response. Secret values will be redacted as '[ENCRYPTED]' for security. (optional, default to false) + * @param string $cursor Cursor for pagination (optional) + * @param int $limit Number of items to return (optional, default to 10) + * @param string $search Search filter for keys (optional) + * @param bool $include_values Include values in the response. Secret values will be redacted as '[ENCRYPTED]' for security. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVItemsList'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1904,8 +2249,8 @@ public function kVItemsListRequest($organization, $project, $store_id, $cursor = * * Get an item from a kv store * - * @param string $organization organization (required) - * @param string $project project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $store_id store_id (required) * @param string $key key (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVItemsShow'] to see the possible values for this operation @@ -1925,8 +2270,8 @@ public function kVItemsShow($organization, $project, $store_id, $key, string $co * * Get an item from a kv store * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $store_id (required) * @param string $key (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVItemsShow'] to see the possible values for this operation @@ -1964,26 +2309,87 @@ public function kVItemsShowWithHttpInfo($organization, $project, $store_id, $key switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\KVItemsShow200Response', - $request, - $response, - ); + if ('\QuantClient\Model\KVItemsShow200Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\KVItemsShow200Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\KVItemsShow200Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 404: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1998,11 +2404,34 @@ public function kVItemsShowWithHttpInfo($organization, $project, $store_id, $key ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\KVItemsShow200Response', - $request, - $response, - ); + $returnType = '\QuantClient\Model\KVItemsShow200Response'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2012,7 +2441,7 @@ public function kVItemsShowWithHttpInfo($organization, $project, $store_id, $key $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -2020,7 +2449,7 @@ public function kVItemsShowWithHttpInfo($organization, $project, $store_id, $key $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -2028,10 +2457,8 @@ public function kVItemsShowWithHttpInfo($organization, $project, $store_id, $key $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -2041,8 +2468,8 @@ public function kVItemsShowWithHttpInfo($organization, $project, $store_id, $key * * Get an item from a kv store * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $store_id (required) * @param string $key (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVItemsShow'] to see the possible values for this operation @@ -2065,8 +2492,8 @@ function ($response) { * * Get an item from a kv store * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $store_id (required) * @param string $key (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVItemsShow'] to see the possible values for this operation @@ -2118,8 +2545,8 @@ function ($exception) { /** * Create request for operation 'kVItemsShow' * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $store_id (required) * @param string $key (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVItemsShow'] to see the possible values for this operation @@ -2264,8 +2691,8 @@ public function kVItemsShowRequest($organization, $project, $store_id, $key, str * * Update an item in a kv store * - * @param string $organization organization (required) - * @param string $project project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $store_id store_id (required) * @param string $key key (required) * @param \QuantClient\Model\V2StoreItemUpdateRequest $v2_store_item_update_request v2_store_item_update_request (required) @@ -2286,8 +2713,8 @@ public function kVItemsUpdate($organization, $project, $store_id, $key, $v2_stor * * Update an item in a kv store * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $store_id (required) * @param string $key (required) * @param \QuantClient\Model\V2StoreItemUpdateRequest $v2_store_item_update_request (required) @@ -2326,32 +2753,114 @@ public function kVItemsUpdateWithHttpInfo($organization, $project, $store_id, $k switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\KVItemsCreate200Response', - $request, - $response, - ); + if ('\QuantClient\Model\KVItemsCreate200Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\KVItemsCreate200Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\KVItemsCreate200Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 422: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2366,11 +2875,34 @@ public function kVItemsUpdateWithHttpInfo($organization, $project, $store_id, $k ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\KVItemsCreate200Response', - $request, - $response, - ); + $returnType = '\QuantClient\Model\KVItemsCreate200Response'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2380,7 +2912,7 @@ public function kVItemsUpdateWithHttpInfo($organization, $project, $store_id, $k $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -2388,7 +2920,7 @@ public function kVItemsUpdateWithHttpInfo($organization, $project, $store_id, $k $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -2396,7 +2928,7 @@ public function kVItemsUpdateWithHttpInfo($organization, $project, $store_id, $k $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 422: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -2404,10 +2936,8 @@ public function kVItemsUpdateWithHttpInfo($organization, $project, $store_id, $k $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -2417,8 +2947,8 @@ public function kVItemsUpdateWithHttpInfo($organization, $project, $store_id, $k * * Update an item in a kv store * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $store_id (required) * @param string $key (required) * @param \QuantClient\Model\V2StoreItemUpdateRequest $v2_store_item_update_request (required) @@ -2442,8 +2972,8 @@ function ($response) { * * Update an item in a kv store * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $store_id (required) * @param string $key (required) * @param \QuantClient\Model\V2StoreItemUpdateRequest $v2_store_item_update_request (required) @@ -2496,8 +3026,8 @@ function ($exception) { /** * Create request for operation 'kVItemsUpdate' * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $store_id (required) * @param string $key (required) * @param \QuantClient\Model\V2StoreItemUpdateRequest $v2_store_item_update_request (required) @@ -2657,8 +3187,8 @@ public function kVItemsUpdateRequest($organization, $project, $store_id, $key, $ * * List key-value stores * - * @param string $organization organization (required) - * @param string $project project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVList'] to see the possible values for this operation * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format @@ -2676,8 +3206,8 @@ public function kVList($organization, $project, string $contentType = self::cont * * List key-value stores * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVList'] to see the possible values for this operation * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format @@ -2713,26 +3243,87 @@ public function kVListWithHttpInfo($organization, $project, string $contentType switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Store[]', - $request, - $response, - ); + if ('\QuantClient\Model\V2Store[]' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Store[]' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Store[]', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2747,11 +3338,34 @@ public function kVListWithHttpInfo($organization, $project, string $contentType ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Store[]', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2Store[]'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2761,7 +3375,7 @@ public function kVListWithHttpInfo($organization, $project, string $contentType $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -2769,7 +3383,7 @@ public function kVListWithHttpInfo($organization, $project, string $contentType $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -2777,10 +3391,8 @@ public function kVListWithHttpInfo($organization, $project, string $contentType $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -2790,8 +3402,8 @@ public function kVListWithHttpInfo($organization, $project, string $contentType * * List key-value stores * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVList'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -2812,8 +3424,8 @@ function ($response) { * * List key-value stores * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVList'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -2863,8 +3475,8 @@ function ($exception) { /** * Create request for operation 'kVList' * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVList'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -2977,8 +3589,8 @@ public function kVListRequest($organization, $project, string $contentType = sel * * Get a kv store * - * @param string $organization organization (required) - * @param string $project project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $store_id store_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVShow'] to see the possible values for this operation * @@ -2997,8 +3609,8 @@ public function kVShow($organization, $project, $store_id, string $contentType = * * Get a kv store * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $store_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVShow'] to see the possible values for this operation * @@ -3035,26 +3647,87 @@ public function kVShowWithHttpInfo($organization, $project, $store_id, string $c switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Store', - $request, - $response, - ); + if ('\QuantClient\Model\V2Store' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Store' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Store', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 404: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3069,11 +3742,34 @@ public function kVShowWithHttpInfo($organization, $project, $store_id, string $c ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Store', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2Store'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3083,7 +3779,7 @@ public function kVShowWithHttpInfo($organization, $project, $store_id, string $c $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -3091,7 +3787,7 @@ public function kVShowWithHttpInfo($organization, $project, $store_id, string $c $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -3099,10 +3795,8 @@ public function kVShowWithHttpInfo($organization, $project, $store_id, string $c $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -3112,8 +3806,8 @@ public function kVShowWithHttpInfo($organization, $project, $store_id, string $c * * Get a kv store * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $store_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVShow'] to see the possible values for this operation * @@ -3135,8 +3829,8 @@ function ($response) { * * Get a kv store * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $store_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVShow'] to see the possible values for this operation * @@ -3187,8 +3881,8 @@ function ($exception) { /** * Create request for operation 'kVShow' * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $store_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVShow'] to see the possible values for this operation * @@ -3330,47 +4024,4 @@ protected function createHttpClientOption() 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/src/Api/OrganizationsApi.php b/src/Api/OrganizationsApi.php index f9eea29..abfc286 100644 --- a/src/Api/OrganizationsApi.php +++ b/src/Api/OrganizationsApi.php @@ -1,7 +1,7 @@ client = $client ?: new Client(); $this->config = $config ?: Configuration::getDefaultConfiguration(); @@ -185,26 +182,87 @@ public function organizationsListWithHttpInfo(string $contentType = self::conten switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\OrganizationsList200ResponseInner[]', - $request, - $response, - ); + if ('\QuantClient\Model\OrganizationsList200ResponseInner[]' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\OrganizationsList200ResponseInner[]' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\OrganizationsList200ResponseInner[]', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -219,11 +277,34 @@ public function organizationsListWithHttpInfo(string $contentType = self::conten ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\OrganizationsList200ResponseInner[]', - $request, - $response, - ); + $returnType = '\QuantClient\Model\OrganizationsList200ResponseInner[]'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -233,7 +314,7 @@ public function organizationsListWithHttpInfo(string $contentType = self::conten $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -241,7 +322,7 @@ public function organizationsListWithHttpInfo(string $contentType = self::conten $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -249,10 +330,8 @@ public function organizationsListWithHttpInfo(string $contentType = self::conten $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -413,12 +492,12 @@ public function organizationsListRequest(string $contentType = self::contentType * * Get details of a single organization * - * @param string $organization organization (required) + * @param string $organization Organization identifier (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['organizationsRead'] to see the possible values for this operation * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \QuantClient\Model\V2Organization|\QuantClient\Model\V2Error|\QuantClient\Model\V2Error + * @return \QuantClient\Model\V2Organization|\QuantClient\Model\V2Error|\QuantClient\Model\V2Error|\QuantClient\Model\V2Error */ public function organizationsRead($organization, string $contentType = self::contentTypes['organizationsRead'][0]) { @@ -431,12 +510,12 @@ public function organizationsRead($organization, string $contentType = self::con * * Get details of a single organization * - * @param string $organization (required) + * @param string $organization Organization identifier (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['organizationsRead'] to see the possible values for this operation * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \QuantClient\Model\V2Organization|\QuantClient\Model\V2Error|\QuantClient\Model\V2Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \QuantClient\Model\V2Organization|\QuantClient\Model\V2Error|\QuantClient\Model\V2Error|\QuantClient\Model\V2Error, HTTP status code, HTTP response headers (array of strings) */ public function organizationsReadWithHttpInfo($organization, string $contentType = self::contentTypes['organizationsRead'][0]) { @@ -467,26 +546,114 @@ public function organizationsReadWithHttpInfo($organization, string $contentType switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Organization', - $request, - $response, - ); + if ('\QuantClient\Model\V2Organization' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Organization' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Organization', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -501,11 +668,34 @@ public function organizationsReadWithHttpInfo($organization, string $contentType ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Organization', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2Organization'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -515,7 +705,15 @@ public function organizationsReadWithHttpInfo($organization, string $contentType $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\QuantClient\Model\V2Error', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -523,7 +721,7 @@ public function organizationsReadWithHttpInfo($organization, string $contentType $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -531,10 +729,8 @@ public function organizationsReadWithHttpInfo($organization, string $contentType $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -544,7 +740,7 @@ public function organizationsReadWithHttpInfo($organization, string $contentType * * Get details of a single organization * - * @param string $organization (required) + * @param string $organization Organization identifier (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['organizationsRead'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -565,7 +761,7 @@ function ($response) { * * Get details of a single organization * - * @param string $organization (required) + * @param string $organization Organization identifier (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['organizationsRead'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -615,7 +811,7 @@ function ($exception) { /** * Create request for operation 'organizationsRead' * - * @param string $organization (required) + * @param string $organization Organization identifier (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['organizationsRead'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -726,47 +922,4 @@ protected function createHttpClientOption() 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/src/Api/ProjectsApi.php b/src/Api/ProjectsApi.php index eab52ec..fc99efd 100644 --- a/src/Api/ProjectsApi.php +++ b/src/Api/ProjectsApi.php @@ -1,7 +1,7 @@ client = $client ?: new Client(); $this->config = $config ?: Configuration::getDefaultConfiguration(); @@ -142,7 +139,7 @@ public function getConfig() * * Create a new project * - * @param string $organization organization (required) + * @param string $organization Organization identifier (required) * @param \QuantClient\Model\V2ProjectRequest $v2_project_request v2_project_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['projectsCreate'] to see the possible values for this operation * @@ -161,7 +158,7 @@ public function projectsCreate($organization, $v2_project_request, string $conte * * Create a new project * - * @param string $organization (required) + * @param string $organization Organization identifier (required) * @param \QuantClient\Model\V2ProjectRequest $v2_project_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['projectsCreate'] to see the possible values for this operation * @@ -198,26 +195,87 @@ public function projectsCreateWithHttpInfo($organization, $v2_project_request, s switch($statusCode) { case 201: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Project', - $request, - $response, - ); + if ('\QuantClient\Model\V2Project' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Project' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Project', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -232,11 +290,34 @@ public function projectsCreateWithHttpInfo($organization, $v2_project_request, s ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Project', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2Project'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -246,7 +327,7 @@ public function projectsCreateWithHttpInfo($organization, $v2_project_request, s $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -254,7 +335,7 @@ public function projectsCreateWithHttpInfo($organization, $v2_project_request, s $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -262,10 +343,8 @@ public function projectsCreateWithHttpInfo($organization, $v2_project_request, s $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -275,7 +354,7 @@ public function projectsCreateWithHttpInfo($organization, $v2_project_request, s * * Create a new project * - * @param string $organization (required) + * @param string $organization Organization identifier (required) * @param \QuantClient\Model\V2ProjectRequest $v2_project_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['projectsCreate'] to see the possible values for this operation * @@ -297,7 +376,7 @@ function ($response) { * * Create a new project * - * @param string $organization (required) + * @param string $organization Organization identifier (required) * @param \QuantClient\Model\V2ProjectRequest $v2_project_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['projectsCreate'] to see the possible values for this operation * @@ -348,7 +427,7 @@ function ($exception) { /** * Create request for operation 'projectsCreate' * - * @param string $organization (required) + * @param string $organization Organization identifier (required) * @param \QuantClient\Model\V2ProjectRequest $v2_project_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['projectsCreate'] to see the possible values for this operation * @@ -461,8 +540,8 @@ public function projectsCreateRequest($organization, $v2_project_request, string * * Delete a project * - * @param string $organization organization (required) - * @param string $project project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['projectsDelete'] to see the possible values for this operation * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format @@ -479,8 +558,8 @@ public function projectsDelete($organization, $project, string $contentType = se * * Delete a project * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['projectsDelete'] to see the possible values for this operation * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format @@ -515,6 +594,7 @@ public function projectsDeleteWithHttpInfo($organization, $project, string $cont return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { switch ($e->getCode()) { case 400: @@ -524,7 +604,7 @@ public function projectsDeleteWithHttpInfo($organization, $project, string $cont $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -532,10 +612,8 @@ public function projectsDeleteWithHttpInfo($organization, $project, string $cont $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -545,8 +623,8 @@ public function projectsDeleteWithHttpInfo($organization, $project, string $cont * * Delete a project * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['projectsDelete'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -567,8 +645,8 @@ function ($response) { * * Delete a project * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['projectsDelete'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -605,8 +683,8 @@ function ($exception) { /** * Create request for operation 'projectsDelete' * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['projectsDelete'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -719,7 +797,7 @@ public function projectsDeleteRequest($organization, $project, string $contentTy * * Retrieve all projects for an organization * - * @param string $organization organization (required) + * @param string $organization Organization identifier (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['projectsList'] to see the possible values for this operation * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format @@ -737,7 +815,7 @@ public function projectsList($organization, string $contentType = self::contentT * * Retrieve all projects for an organization * - * @param string $organization (required) + * @param string $organization Organization identifier (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['projectsList'] to see the possible values for this operation * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format @@ -773,26 +851,87 @@ public function projectsListWithHttpInfo($organization, string $contentType = se switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Project[]', - $request, - $response, - ); + if ('\QuantClient\Model\V2Project[]' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Project[]' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Project[]', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -807,11 +946,34 @@ public function projectsListWithHttpInfo($organization, string $contentType = se ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Project[]', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2Project[]'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -821,7 +983,7 @@ public function projectsListWithHttpInfo($organization, string $contentType = se $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -829,7 +991,7 @@ public function projectsListWithHttpInfo($organization, string $contentType = se $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -837,10 +999,8 @@ public function projectsListWithHttpInfo($organization, string $contentType = se $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -850,7 +1010,7 @@ public function projectsListWithHttpInfo($organization, string $contentType = se * * Retrieve all projects for an organization * - * @param string $organization (required) + * @param string $organization Organization identifier (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['projectsList'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -871,7 +1031,7 @@ function ($response) { * * Retrieve all projects for an organization * - * @param string $organization (required) + * @param string $organization Organization identifier (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['projectsList'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -921,7 +1081,7 @@ function ($exception) { /** * Create request for operation 'projectsList' * - * @param string $organization (required) + * @param string $organization Organization identifier (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['projectsList'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1019,8 +1179,8 @@ public function projectsListRequest($organization, string $contentType = self::c * * Get details of a single project * - * @param string $organization organization (required) - * @param string $project project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param bool $with_token with_token (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['projectsRead'] to see the possible values for this operation * @@ -1039,8 +1199,8 @@ public function projectsRead($organization, $project, $with_token, string $conte * * Get details of a single project * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param bool $with_token (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['projectsRead'] to see the possible values for this operation * @@ -1077,26 +1237,87 @@ public function projectsReadWithHttpInfo($organization, $project, $with_token, s switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Project', - $request, - $response, - ); + if ('\QuantClient\Model\V2Project' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Project' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Project', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1111,11 +1332,34 @@ public function projectsReadWithHttpInfo($organization, $project, $with_token, s ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Project', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2Project'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1125,7 +1369,7 @@ public function projectsReadWithHttpInfo($organization, $project, $with_token, s $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1133,7 +1377,7 @@ public function projectsReadWithHttpInfo($organization, $project, $with_token, s $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1141,10 +1385,8 @@ public function projectsReadWithHttpInfo($organization, $project, $with_token, s $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -1154,8 +1396,8 @@ public function projectsReadWithHttpInfo($organization, $project, $with_token, s * * Get details of a single project * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param bool $with_token (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['projectsRead'] to see the possible values for this operation * @@ -1177,8 +1419,8 @@ function ($response) { * * Get details of a single project * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param bool $with_token (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['projectsRead'] to see the possible values for this operation * @@ -1229,8 +1471,8 @@ function ($exception) { /** * Create request for operation 'projectsRead' * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param bool $with_token (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['projectsRead'] to see the possible values for this operation * @@ -1360,8 +1602,8 @@ public function projectsReadRequest($organization, $project, $with_token, string * * Update a project * - * @param string $organization organization (required) - * @param string $project project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param \QuantClient\Model\V2ProjectRequest $v2_project_request v2_project_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['projectsUpdate'] to see the possible values for this operation * @@ -1380,8 +1622,8 @@ public function projectsUpdate($organization, $project, $v2_project_request, str * * Update a project * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param \QuantClient\Model\V2ProjectRequest $v2_project_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['projectsUpdate'] to see the possible values for this operation * @@ -1418,26 +1660,87 @@ public function projectsUpdateWithHttpInfo($organization, $project, $v2_project_ switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Project', - $request, - $response, - ); + if ('\QuantClient\Model\V2Project' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Project' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Project', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1452,11 +1755,34 @@ public function projectsUpdateWithHttpInfo($organization, $project, $v2_project_ ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Project', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2Project'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1466,7 +1792,7 @@ public function projectsUpdateWithHttpInfo($organization, $project, $v2_project_ $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1474,7 +1800,7 @@ public function projectsUpdateWithHttpInfo($organization, $project, $v2_project_ $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1482,10 +1808,8 @@ public function projectsUpdateWithHttpInfo($organization, $project, $v2_project_ $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -1495,8 +1819,8 @@ public function projectsUpdateWithHttpInfo($organization, $project, $v2_project_ * * Update a project * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param \QuantClient\Model\V2ProjectRequest $v2_project_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['projectsUpdate'] to see the possible values for this operation * @@ -1518,8 +1842,8 @@ function ($response) { * * Update a project * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param \QuantClient\Model\V2ProjectRequest $v2_project_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['projectsUpdate'] to see the possible values for this operation * @@ -1570,8 +1894,8 @@ function ($exception) { /** * Create request for operation 'projectsUpdate' * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param \QuantClient\Model\V2ProjectRequest $v2_project_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['projectsUpdate'] to see the possible values for this operation * @@ -1712,47 +2036,4 @@ protected function createHttpClientOption() 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/src/Api/PurgeApi.php b/src/Api/PurgeApi.php index 73ddaee..35d8948 100644 --- a/src/Api/PurgeApi.php +++ b/src/Api/PurgeApi.php @@ -1,7 +1,7 @@ client = $client ?: new Client(); $this->config = $config ?: Configuration::getDefaultConfiguration(); @@ -130,8 +127,8 @@ public function getConfig() * * Purge cache via URL or cache keys * - * @param string $organization organization (required) - * @param string $project project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param \QuantClient\Model\PurgeCreateRequest $purge_create_request purge_create_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['purgeCreate'] to see the possible values for this operation * @@ -150,8 +147,8 @@ public function purgeCreate($organization, $project, $purge_create_request, stri * * Purge cache via URL or cache keys * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param \QuantClient\Model\PurgeCreateRequest $purge_create_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['purgeCreate'] to see the possible values for this operation * @@ -188,26 +185,87 @@ public function purgeCreateWithHttpInfo($organization, $project, $purge_create_r switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - 'string', - $request, - $response, - ); + if ('string' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('string' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, 'string', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -222,11 +280,34 @@ public function purgeCreateWithHttpInfo($organization, $project, $purge_create_r ); } - return $this->handleResponseWithDataType( - 'string', - $request, - $response, - ); + $returnType = 'string'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -236,7 +317,7 @@ public function purgeCreateWithHttpInfo($organization, $project, $purge_create_r $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -244,7 +325,7 @@ public function purgeCreateWithHttpInfo($organization, $project, $purge_create_r $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -252,10 +333,8 @@ public function purgeCreateWithHttpInfo($organization, $project, $purge_create_r $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -265,8 +344,8 @@ public function purgeCreateWithHttpInfo($organization, $project, $purge_create_r * * Purge cache via URL or cache keys * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param \QuantClient\Model\PurgeCreateRequest $purge_create_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['purgeCreate'] to see the possible values for this operation * @@ -288,8 +367,8 @@ function ($response) { * * Purge cache via URL or cache keys * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param \QuantClient\Model\PurgeCreateRequest $purge_create_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['purgeCreate'] to see the possible values for this operation * @@ -340,8 +419,8 @@ function ($exception) { /** * Create request for operation 'purgeCreate' * - * @param string $organization (required) - * @param string $project (required) + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) * @param \QuantClient\Model\PurgeCreateRequest $purge_create_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['purgeCreate'] to see the possible values for this operation * @@ -482,47 +561,4 @@ protected function createHttpClientOption() 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/src/Api/RulesApi.php b/src/Api/RulesApi.php index 926f83c..1385104 100644 --- a/src/Api/RulesApi.php +++ b/src/Api/RulesApi.php @@ -1,7 +1,7 @@ client = $client ?: new Client(); $this->config = $config ?: Configuration::getDefaultConfiguration(); @@ -320,26 +317,87 @@ public function rulesAuthCreateWithHttpInfo($organization, $project, $v2_rule_au switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleAuth', - $request, - $response, - ); + if ('\QuantClient\Model\V2RuleAuth' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2RuleAuth' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2RuleAuth', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -354,11 +412,34 @@ public function rulesAuthCreateWithHttpInfo($organization, $project, $v2_rule_au ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleAuth', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2RuleAuth'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -368,7 +449,7 @@ public function rulesAuthCreateWithHttpInfo($organization, $project, $v2_rule_au $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -376,7 +457,7 @@ public function rulesAuthCreateWithHttpInfo($organization, $project, $v2_rule_au $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -384,10 +465,8 @@ public function rulesAuthCreateWithHttpInfo($organization, $project, $v2_rule_au $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -657,6 +736,7 @@ public function rulesAuthDeleteWithHttpInfo($organization, $project, $rule, stri return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { switch ($e->getCode()) { case 400: @@ -666,7 +746,7 @@ public function rulesAuthDeleteWithHttpInfo($organization, $project, $rule, stri $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -674,10 +754,8 @@ public function rulesAuthDeleteWithHttpInfo($organization, $project, $rule, stri $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -935,26 +1013,87 @@ public function rulesAuthListWithHttpInfo($organization, $project, string $conte switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleAuth[]', - $request, - $response, - ); + if ('\QuantClient\Model\V2RuleAuth[]' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2RuleAuth[]' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2RuleAuth[]', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -969,11 +1108,34 @@ public function rulesAuthListWithHttpInfo($organization, $project, string $conte ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleAuth[]', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2RuleAuth[]'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -983,7 +1145,7 @@ public function rulesAuthListWithHttpInfo($organization, $project, string $conte $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -991,7 +1153,7 @@ public function rulesAuthListWithHttpInfo($organization, $project, string $conte $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -999,10 +1161,8 @@ public function rulesAuthListWithHttpInfo($organization, $project, string $conte $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -1257,26 +1417,87 @@ public function rulesAuthReadWithHttpInfo($organization, $project, $rule, string switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleAuth', - $request, - $response, - ); + if ('\QuantClient\Model\V2RuleAuth' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2RuleAuth' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2RuleAuth', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1291,11 +1512,34 @@ public function rulesAuthReadWithHttpInfo($organization, $project, $rule, string ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleAuth', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2RuleAuth'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1305,7 +1549,7 @@ public function rulesAuthReadWithHttpInfo($organization, $project, $rule, string $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1313,7 +1557,7 @@ public function rulesAuthReadWithHttpInfo($organization, $project, $rule, string $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1321,10 +1565,8 @@ public function rulesAuthReadWithHttpInfo($organization, $project, $rule, string $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -1599,26 +1841,87 @@ public function rulesAuthUpdateWithHttpInfo($organization, $project, $rule, $v2_ switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleAuth', - $request, - $response, - ); + if ('\QuantClient\Model\V2RuleAuth' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2RuleAuth' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2RuleAuth', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1633,11 +1936,34 @@ public function rulesAuthUpdateWithHttpInfo($organization, $project, $rule, $v2_ ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleAuth', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2RuleAuth'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1647,7 +1973,7 @@ public function rulesAuthUpdateWithHttpInfo($organization, $project, $rule, $v2_ $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1655,7 +1981,7 @@ public function rulesAuthUpdateWithHttpInfo($organization, $project, $rule, $v2_ $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1663,10 +1989,8 @@ public function rulesAuthUpdateWithHttpInfo($organization, $project, $rule, $v2_ $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -1956,26 +2280,87 @@ public function rulesBotChallengeCreateWithHttpInfo($organization, $project, $v2 switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleBotChallenge', - $request, - $response, - ); + if ('\QuantClient\Model\V2RuleBotChallenge' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2RuleBotChallenge' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2RuleBotChallenge', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1990,11 +2375,34 @@ public function rulesBotChallengeCreateWithHttpInfo($organization, $project, $v2 ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleBotChallenge', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2RuleBotChallenge'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2004,7 +2412,7 @@ public function rulesBotChallengeCreateWithHttpInfo($organization, $project, $v2 $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -2012,7 +2420,7 @@ public function rulesBotChallengeCreateWithHttpInfo($organization, $project, $v2 $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -2020,10 +2428,8 @@ public function rulesBotChallengeCreateWithHttpInfo($organization, $project, $v2 $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -2293,6 +2699,7 @@ public function rulesBotChallengeDeleteWithHttpInfo($organization, $project, $ru return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { switch ($e->getCode()) { case 400: @@ -2302,7 +2709,7 @@ public function rulesBotChallengeDeleteWithHttpInfo($organization, $project, $ru $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -2310,10 +2717,8 @@ public function rulesBotChallengeDeleteWithHttpInfo($organization, $project, $ru $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -2571,45 +2976,129 @@ public function rulesBotChallengeListWithHttpInfo($organization, $project, strin switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleBotChallenge[]', - $request, - $response, - ); - case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } - - + if ('\QuantClient\Model\V2RuleBotChallenge[]' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2RuleBotChallenge[]' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2RuleBotChallenge[]', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 403: + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), $statusCode, $response->getHeaders(), (string) $response->getBody() ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleBotChallenge[]', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2RuleBotChallenge[]'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2619,7 +3108,7 @@ public function rulesBotChallengeListWithHttpInfo($organization, $project, strin $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -2627,7 +3116,7 @@ public function rulesBotChallengeListWithHttpInfo($organization, $project, strin $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -2635,10 +3124,8 @@ public function rulesBotChallengeListWithHttpInfo($organization, $project, strin $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -2893,26 +3380,87 @@ public function rulesBotChallengeReadWithHttpInfo($organization, $project, $rule switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleBotChallenge', - $request, - $response, - ); + if ('\QuantClient\Model\V2RuleBotChallenge' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2RuleBotChallenge' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2RuleBotChallenge', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2927,11 +3475,34 @@ public function rulesBotChallengeReadWithHttpInfo($organization, $project, $rule ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleBotChallenge', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2RuleBotChallenge'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2941,7 +3512,7 @@ public function rulesBotChallengeReadWithHttpInfo($organization, $project, $rule $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -2949,7 +3520,7 @@ public function rulesBotChallengeReadWithHttpInfo($organization, $project, $rule $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -2957,10 +3528,8 @@ public function rulesBotChallengeReadWithHttpInfo($organization, $project, $rule $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -3235,26 +3804,87 @@ public function rulesBotChallengeUpdateWithHttpInfo($organization, $project, $ru switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleBotChallenge', - $request, - $response, - ); + if ('\QuantClient\Model\V2RuleBotChallenge' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2RuleBotChallenge' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2RuleBotChallenge', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3269,11 +3899,34 @@ public function rulesBotChallengeUpdateWithHttpInfo($organization, $project, $ru ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleBotChallenge', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2RuleBotChallenge'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3283,7 +3936,7 @@ public function rulesBotChallengeUpdateWithHttpInfo($organization, $project, $ru $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -3291,7 +3944,7 @@ public function rulesBotChallengeUpdateWithHttpInfo($organization, $project, $ru $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -3299,10 +3952,8 @@ public function rulesBotChallengeUpdateWithHttpInfo($organization, $project, $ru $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -3592,26 +4243,87 @@ public function rulesContentFilterCreateWithHttpInfo($organization, $project, $v switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleContentFilter', - $request, - $response, - ); + if ('\QuantClient\Model\V2RuleContentFilter' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2RuleContentFilter' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2RuleContentFilter', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3626,11 +4338,34 @@ public function rulesContentFilterCreateWithHttpInfo($organization, $project, $v ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleContentFilter', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2RuleContentFilter'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3640,7 +4375,7 @@ public function rulesContentFilterCreateWithHttpInfo($organization, $project, $v $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -3648,7 +4383,7 @@ public function rulesContentFilterCreateWithHttpInfo($organization, $project, $v $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -3656,10 +4391,8 @@ public function rulesContentFilterCreateWithHttpInfo($organization, $project, $v $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -3929,6 +4662,7 @@ public function rulesContentFilterDeleteWithHttpInfo($organization, $project, $r return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { switch ($e->getCode()) { case 400: @@ -3938,7 +4672,7 @@ public function rulesContentFilterDeleteWithHttpInfo($organization, $project, $r $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -3946,10 +4680,8 @@ public function rulesContentFilterDeleteWithHttpInfo($organization, $project, $r $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -4207,26 +4939,87 @@ public function rulesContentFilterListWithHttpInfo($organization, $project, stri switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleContentFilter[]', - $request, - $response, - ); + if ('\QuantClient\Model\V2RuleContentFilter[]' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2RuleContentFilter[]' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2RuleContentFilter[]', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -4241,11 +5034,34 @@ public function rulesContentFilterListWithHttpInfo($organization, $project, stri ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleContentFilter[]', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2RuleContentFilter[]'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -4255,7 +5071,7 @@ public function rulesContentFilterListWithHttpInfo($organization, $project, stri $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -4263,7 +5079,7 @@ public function rulesContentFilterListWithHttpInfo($organization, $project, stri $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -4271,10 +5087,8 @@ public function rulesContentFilterListWithHttpInfo($organization, $project, stri $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -4529,26 +5343,87 @@ public function rulesContentFilterReadWithHttpInfo($organization, $project, $rul switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleContentFilter', - $request, - $response, - ); + if ('\QuantClient\Model\V2RuleContentFilter' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2RuleContentFilter' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2RuleContentFilter', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -4563,11 +5438,34 @@ public function rulesContentFilterReadWithHttpInfo($organization, $project, $rul ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleContentFilter', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2RuleContentFilter'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -4577,7 +5475,7 @@ public function rulesContentFilterReadWithHttpInfo($organization, $project, $rul $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -4585,7 +5483,7 @@ public function rulesContentFilterReadWithHttpInfo($organization, $project, $rul $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -4593,10 +5491,8 @@ public function rulesContentFilterReadWithHttpInfo($organization, $project, $rul $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -4871,26 +5767,87 @@ public function rulesContentFilterUpdateWithHttpInfo($organization, $project, $r switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleContentFilter', - $request, - $response, - ); + if ('\QuantClient\Model\V2RuleContentFilter' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2RuleContentFilter' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2RuleContentFilter', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -4905,11 +5862,34 @@ public function rulesContentFilterUpdateWithHttpInfo($organization, $project, $r ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleContentFilter', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2RuleContentFilter'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -4919,7 +5899,7 @@ public function rulesContentFilterUpdateWithHttpInfo($organization, $project, $r $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -4927,7 +5907,7 @@ public function rulesContentFilterUpdateWithHttpInfo($organization, $project, $r $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -4935,10 +5915,8 @@ public function rulesContentFilterUpdateWithHttpInfo($organization, $project, $r $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -5228,26 +6206,87 @@ public function rulesCustomResponseCreateWithHttpInfo($organization, $project, $ switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleCustomResponse', - $request, - $response, - ); + if ('\QuantClient\Model\V2RuleCustomResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2RuleCustomResponse' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2RuleCustomResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -5262,11 +6301,34 @@ public function rulesCustomResponseCreateWithHttpInfo($organization, $project, $ ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleCustomResponse', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2RuleCustomResponse'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -5276,7 +6338,7 @@ public function rulesCustomResponseCreateWithHttpInfo($organization, $project, $ $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -5284,7 +6346,7 @@ public function rulesCustomResponseCreateWithHttpInfo($organization, $project, $ $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -5292,10 +6354,8 @@ public function rulesCustomResponseCreateWithHttpInfo($organization, $project, $ $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -5565,6 +6625,7 @@ public function rulesCustomResponseDeleteWithHttpInfo($organization, $project, $ return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { switch ($e->getCode()) { case 400: @@ -5574,7 +6635,7 @@ public function rulesCustomResponseDeleteWithHttpInfo($organization, $project, $ $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -5582,10 +6643,8 @@ public function rulesCustomResponseDeleteWithHttpInfo($organization, $project, $ $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -5843,26 +6902,87 @@ public function rulesCustomResponseListWithHttpInfo($organization, $project, str switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleCustomResponse[]', - $request, - $response, - ); + if ('\QuantClient\Model\V2RuleCustomResponse[]' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2RuleCustomResponse[]' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2RuleCustomResponse[]', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -5877,11 +6997,34 @@ public function rulesCustomResponseListWithHttpInfo($organization, $project, str ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleCustomResponse[]', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2RuleCustomResponse[]'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -5891,7 +7034,7 @@ public function rulesCustomResponseListWithHttpInfo($organization, $project, str $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -5899,7 +7042,7 @@ public function rulesCustomResponseListWithHttpInfo($organization, $project, str $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -5907,10 +7050,8 @@ public function rulesCustomResponseListWithHttpInfo($organization, $project, str $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -6165,26 +7306,87 @@ public function rulesCustomResponseReadWithHttpInfo($organization, $project, $ru switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleCustomResponse', - $request, - $response, - ); + if ('\QuantClient\Model\V2RuleCustomResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2RuleCustomResponse' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2RuleCustomResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -6199,11 +7401,34 @@ public function rulesCustomResponseReadWithHttpInfo($organization, $project, $ru ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleCustomResponse', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2RuleCustomResponse'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -6213,7 +7438,7 @@ public function rulesCustomResponseReadWithHttpInfo($organization, $project, $ru $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -6221,7 +7446,7 @@ public function rulesCustomResponseReadWithHttpInfo($organization, $project, $ru $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -6229,10 +7454,8 @@ public function rulesCustomResponseReadWithHttpInfo($organization, $project, $ru $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -6507,26 +7730,87 @@ public function rulesCustomResponseUpdateWithHttpInfo($organization, $project, $ switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleCustomResponse', - $request, - $response, - ); + if ('\QuantClient\Model\V2RuleCustomResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2RuleCustomResponse' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2RuleCustomResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -6541,11 +7825,34 @@ public function rulesCustomResponseUpdateWithHttpInfo($organization, $project, $ ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleCustomResponse', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2RuleCustomResponse'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -6555,7 +7862,7 @@ public function rulesCustomResponseUpdateWithHttpInfo($organization, $project, $ $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -6563,7 +7870,7 @@ public function rulesCustomResponseUpdateWithHttpInfo($organization, $project, $ $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -6571,10 +7878,8 @@ public function rulesCustomResponseUpdateWithHttpInfo($organization, $project, $ $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -6864,26 +8169,87 @@ public function rulesFunctionCreateWithHttpInfo($organization, $project, $v2_rul switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleFunction', - $request, - $response, - ); + if ('\QuantClient\Model\V2RuleFunction' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2RuleFunction' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2RuleFunction', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -6898,11 +8264,34 @@ public function rulesFunctionCreateWithHttpInfo($organization, $project, $v2_rul ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleFunction', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2RuleFunction'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -6912,7 +8301,7 @@ public function rulesFunctionCreateWithHttpInfo($organization, $project, $v2_rul $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -6920,7 +8309,7 @@ public function rulesFunctionCreateWithHttpInfo($organization, $project, $v2_rul $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -6928,10 +8317,8 @@ public function rulesFunctionCreateWithHttpInfo($organization, $project, $v2_rul $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -7201,6 +8588,7 @@ public function rulesFunctionDeleteWithHttpInfo($organization, $project, $rule, return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { switch ($e->getCode()) { case 400: @@ -7210,7 +8598,7 @@ public function rulesFunctionDeleteWithHttpInfo($organization, $project, $rule, $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -7218,10 +8606,8 @@ public function rulesFunctionDeleteWithHttpInfo($organization, $project, $rule, $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -7479,26 +8865,87 @@ public function rulesFunctionListWithHttpInfo($organization, $project, string $c switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleFunction[]', - $request, - $response, - ); + if ('\QuantClient\Model\V2RuleFunction[]' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2RuleFunction[]' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2RuleFunction[]', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -7513,11 +8960,34 @@ public function rulesFunctionListWithHttpInfo($organization, $project, string $c ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleFunction[]', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2RuleFunction[]'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -7527,7 +8997,7 @@ public function rulesFunctionListWithHttpInfo($organization, $project, string $c $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -7535,7 +9005,7 @@ public function rulesFunctionListWithHttpInfo($organization, $project, string $c $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -7543,10 +9013,8 @@ public function rulesFunctionListWithHttpInfo($organization, $project, string $c $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -7801,26 +9269,87 @@ public function rulesFunctionReadWithHttpInfo($organization, $project, $rule, st switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleFunction', - $request, - $response, - ); + if ('\QuantClient\Model\V2RuleFunction' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2RuleFunction' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2RuleFunction', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -7835,11 +9364,34 @@ public function rulesFunctionReadWithHttpInfo($organization, $project, $rule, st ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleFunction', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2RuleFunction'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -7849,7 +9401,7 @@ public function rulesFunctionReadWithHttpInfo($organization, $project, $rule, st $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -7857,7 +9409,7 @@ public function rulesFunctionReadWithHttpInfo($organization, $project, $rule, st $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -7865,10 +9417,8 @@ public function rulesFunctionReadWithHttpInfo($organization, $project, $rule, st $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -8143,26 +9693,87 @@ public function rulesFunctionUpdateWithHttpInfo($organization, $project, $rule, switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleFunction', - $request, - $response, - ); + if ('\QuantClient\Model\V2RuleFunction' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2RuleFunction' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2RuleFunction', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -8177,11 +9788,34 @@ public function rulesFunctionUpdateWithHttpInfo($organization, $project, $rule, ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleFunction', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2RuleFunction'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -8191,7 +9825,7 @@ public function rulesFunctionUpdateWithHttpInfo($organization, $project, $rule, $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -8199,7 +9833,7 @@ public function rulesFunctionUpdateWithHttpInfo($organization, $project, $rule, $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -8207,10 +9841,8 @@ public function rulesFunctionUpdateWithHttpInfo($organization, $project, $rule, $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -8500,26 +10132,87 @@ public function rulesHeadersCreateWithHttpInfo($organization, $project, $v2_rule switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleHeader', - $request, - $response, - ); + if ('\QuantClient\Model\V2RuleHeader' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2RuleHeader' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2RuleHeader', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -8534,11 +10227,34 @@ public function rulesHeadersCreateWithHttpInfo($organization, $project, $v2_rule ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleHeader', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2RuleHeader'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -8548,7 +10264,7 @@ public function rulesHeadersCreateWithHttpInfo($organization, $project, $v2_rule $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -8556,7 +10272,7 @@ public function rulesHeadersCreateWithHttpInfo($organization, $project, $v2_rule $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -8564,10 +10280,8 @@ public function rulesHeadersCreateWithHttpInfo($organization, $project, $v2_rule $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -8837,6 +10551,7 @@ public function rulesHeadersDeleteWithHttpInfo($organization, $project, $rule, s return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { switch ($e->getCode()) { case 400: @@ -8846,7 +10561,7 @@ public function rulesHeadersDeleteWithHttpInfo($organization, $project, $rule, s $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -8854,10 +10569,8 @@ public function rulesHeadersDeleteWithHttpInfo($organization, $project, $rule, s $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -9115,26 +10828,87 @@ public function rulesHeadersListWithHttpInfo($organization, $project, string $co switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleHeader[]', - $request, - $response, - ); + if ('\QuantClient\Model\V2RuleHeader[]' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2RuleHeader[]' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2RuleHeader[]', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -9149,11 +10923,34 @@ public function rulesHeadersListWithHttpInfo($organization, $project, string $co ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleHeader[]', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2RuleHeader[]'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -9163,7 +10960,7 @@ public function rulesHeadersListWithHttpInfo($organization, $project, string $co $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -9171,7 +10968,7 @@ public function rulesHeadersListWithHttpInfo($organization, $project, string $co $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -9179,10 +10976,8 @@ public function rulesHeadersListWithHttpInfo($organization, $project, string $co $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -9437,26 +11232,87 @@ public function rulesHeadersReadWithHttpInfo($organization, $project, $rule, str switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleHeader', - $request, - $response, - ); + if ('\QuantClient\Model\V2RuleHeader' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2RuleHeader' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2RuleHeader', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -9471,11 +11327,34 @@ public function rulesHeadersReadWithHttpInfo($organization, $project, $rule, str ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleHeader', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2RuleHeader'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -9485,7 +11364,7 @@ public function rulesHeadersReadWithHttpInfo($organization, $project, $rule, str $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -9493,7 +11372,7 @@ public function rulesHeadersReadWithHttpInfo($organization, $project, $rule, str $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -9501,10 +11380,8 @@ public function rulesHeadersReadWithHttpInfo($organization, $project, $rule, str $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -9779,26 +11656,87 @@ public function rulesHeadersUpdateWithHttpInfo($organization, $project, $rule, $ switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleHeader', - $request, - $response, - ); + if ('\QuantClient\Model\V2RuleHeader' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2RuleHeader' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2RuleHeader', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -9813,11 +11751,34 @@ public function rulesHeadersUpdateWithHttpInfo($organization, $project, $rule, $ ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleHeader', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2RuleHeader'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -9827,7 +11788,7 @@ public function rulesHeadersUpdateWithHttpInfo($organization, $project, $rule, $ $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -9835,7 +11796,7 @@ public function rulesHeadersUpdateWithHttpInfo($organization, $project, $rule, $ $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -9843,10 +11804,8 @@ public function rulesHeadersUpdateWithHttpInfo($organization, $project, $rule, $ $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -10136,26 +12095,87 @@ public function rulesProxyCreateWithHttpInfo($organization, $project, $v2_rule_p switch($statusCode) { case 201: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleProxy', - $request, - $response, - ); + if ('\QuantClient\Model\V2RuleProxy' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2RuleProxy' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2RuleProxy', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -10170,11 +12190,34 @@ public function rulesProxyCreateWithHttpInfo($organization, $project, $v2_rule_p ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleProxy', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2RuleProxy'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -10184,7 +12227,7 @@ public function rulesProxyCreateWithHttpInfo($organization, $project, $v2_rule_p $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -10192,7 +12235,7 @@ public function rulesProxyCreateWithHttpInfo($organization, $project, $v2_rule_p $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -10200,10 +12243,8 @@ public function rulesProxyCreateWithHttpInfo($organization, $project, $v2_rule_p $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -10473,6 +12514,7 @@ public function rulesProxyDeleteWithHttpInfo($organization, $project, $rule, str return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { switch ($e->getCode()) { case 400: @@ -10482,7 +12524,7 @@ public function rulesProxyDeleteWithHttpInfo($organization, $project, $rule, str $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -10490,10 +12532,8 @@ public function rulesProxyDeleteWithHttpInfo($organization, $project, $rule, str $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -10749,28 +12789,89 @@ public function rulesProxyListWithHttpInfo($organization, $project, string $cont $statusCode = $response->getStatusCode(); - switch($statusCode) { - case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleProxy[]', - $request, - $response, - ); - case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + switch($statusCode) { + case 200: + if ('\QuantClient\Model\V2RuleProxy[]' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2RuleProxy[]' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2RuleProxy[]', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -10785,11 +12886,34 @@ public function rulesProxyListWithHttpInfo($organization, $project, string $cont ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleProxy[]', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2RuleProxy[]'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -10799,7 +12923,7 @@ public function rulesProxyListWithHttpInfo($organization, $project, string $cont $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -10807,7 +12931,7 @@ public function rulesProxyListWithHttpInfo($organization, $project, string $cont $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -10815,10 +12939,8 @@ public function rulesProxyListWithHttpInfo($organization, $project, string $cont $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -11073,26 +13195,87 @@ public function rulesProxyReadWithHttpInfo($organization, $project, $rule, strin switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleProxy', - $request, - $response, - ); + if ('\QuantClient\Model\V2RuleProxy' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2RuleProxy' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2RuleProxy', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -11107,11 +13290,34 @@ public function rulesProxyReadWithHttpInfo($organization, $project, $rule, strin ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleProxy', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2RuleProxy'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -11121,7 +13327,7 @@ public function rulesProxyReadWithHttpInfo($organization, $project, $rule, strin $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -11129,7 +13335,7 @@ public function rulesProxyReadWithHttpInfo($organization, $project, $rule, strin $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -11137,10 +13343,8 @@ public function rulesProxyReadWithHttpInfo($organization, $project, $rule, strin $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -11415,26 +13619,87 @@ public function rulesProxyUpdateWithHttpInfo($organization, $project, $rule, $v2 switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleProxy', - $request, - $response, - ); + if ('\QuantClient\Model\V2RuleProxy' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2RuleProxy' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2RuleProxy', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -11449,11 +13714,34 @@ public function rulesProxyUpdateWithHttpInfo($organization, $project, $rule, $v2 ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleProxy', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2RuleProxy'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -11463,7 +13751,7 @@ public function rulesProxyUpdateWithHttpInfo($organization, $project, $rule, $v2 $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -11471,7 +13759,7 @@ public function rulesProxyUpdateWithHttpInfo($organization, $project, $rule, $v2 $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -11479,10 +13767,8 @@ public function rulesProxyUpdateWithHttpInfo($organization, $project, $rule, $v2 $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -11772,26 +14058,87 @@ public function rulesRedirectCreateWithHttpInfo($organization, $project, $v2_rul switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleRedirect', - $request, - $response, - ); + if ('\QuantClient\Model\V2RuleRedirect' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2RuleRedirect' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2RuleRedirect', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -11806,11 +14153,34 @@ public function rulesRedirectCreateWithHttpInfo($organization, $project, $v2_rul ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleRedirect', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2RuleRedirect'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -11820,7 +14190,7 @@ public function rulesRedirectCreateWithHttpInfo($organization, $project, $v2_rul $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -11828,7 +14198,7 @@ public function rulesRedirectCreateWithHttpInfo($organization, $project, $v2_rul $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -11836,10 +14206,8 @@ public function rulesRedirectCreateWithHttpInfo($organization, $project, $v2_rul $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -12109,6 +14477,7 @@ public function rulesRedirectDeleteWithHttpInfo($organization, $project, $rule, return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { switch ($e->getCode()) { case 400: @@ -12118,7 +14487,7 @@ public function rulesRedirectDeleteWithHttpInfo($organization, $project, $rule, $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -12126,10 +14495,8 @@ public function rulesRedirectDeleteWithHttpInfo($organization, $project, $rule, $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -12387,26 +14754,87 @@ public function rulesRedirectListWithHttpInfo($organization, $project, string $c switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleRedirect[]', - $request, - $response, - ); + if ('\QuantClient\Model\V2RuleRedirect[]' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2RuleRedirect[]' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2RuleRedirect[]', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -12421,11 +14849,34 @@ public function rulesRedirectListWithHttpInfo($organization, $project, string $c ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleRedirect[]', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2RuleRedirect[]'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -12435,7 +14886,7 @@ public function rulesRedirectListWithHttpInfo($organization, $project, string $c $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -12443,7 +14894,7 @@ public function rulesRedirectListWithHttpInfo($organization, $project, string $c $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -12451,10 +14902,8 @@ public function rulesRedirectListWithHttpInfo($organization, $project, string $c $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -12709,26 +15158,87 @@ public function rulesRedirectReadWithHttpInfo($organization, $project, $rule, st switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleRedirect', - $request, - $response, - ); + if ('\QuantClient\Model\V2RuleRedirect' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2RuleRedirect' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2RuleRedirect', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -12743,11 +15253,34 @@ public function rulesRedirectReadWithHttpInfo($organization, $project, $rule, st ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleRedirect', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2RuleRedirect'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -12757,7 +15290,7 @@ public function rulesRedirectReadWithHttpInfo($organization, $project, $rule, st $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -12765,7 +15298,7 @@ public function rulesRedirectReadWithHttpInfo($organization, $project, $rule, st $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -12773,10 +15306,8 @@ public function rulesRedirectReadWithHttpInfo($organization, $project, $rule, st $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -13051,26 +15582,87 @@ public function rulesRedirectUpdateWithHttpInfo($organization, $project, $rule, switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleRedirect', - $request, - $response, - ); + if ('\QuantClient\Model\V2RuleRedirect' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2RuleRedirect' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2RuleRedirect', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -13085,11 +15677,34 @@ public function rulesRedirectUpdateWithHttpInfo($organization, $project, $rule, ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleRedirect', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2RuleRedirect'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -13099,7 +15714,7 @@ public function rulesRedirectUpdateWithHttpInfo($organization, $project, $rule, $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -13107,7 +15722,7 @@ public function rulesRedirectUpdateWithHttpInfo($organization, $project, $rule, $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -13115,10 +15730,8 @@ public function rulesRedirectUpdateWithHttpInfo($organization, $project, $rule, $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -13408,26 +16021,87 @@ public function rulesServeStaticCreateWithHttpInfo($organization, $project, $v2_ switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleServeStatic', - $request, - $response, - ); + if ('\QuantClient\Model\V2RuleServeStatic' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2RuleServeStatic' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2RuleServeStatic', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -13442,11 +16116,34 @@ public function rulesServeStaticCreateWithHttpInfo($organization, $project, $v2_ ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleServeStatic', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2RuleServeStatic'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -13456,7 +16153,7 @@ public function rulesServeStaticCreateWithHttpInfo($organization, $project, $v2_ $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -13464,7 +16161,7 @@ public function rulesServeStaticCreateWithHttpInfo($organization, $project, $v2_ $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -13472,10 +16169,8 @@ public function rulesServeStaticCreateWithHttpInfo($organization, $project, $v2_ $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -13745,6 +16440,7 @@ public function rulesServeStaticDeleteWithHttpInfo($organization, $project, $rul return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { switch ($e->getCode()) { case 400: @@ -13754,7 +16450,7 @@ public function rulesServeStaticDeleteWithHttpInfo($organization, $project, $rul $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -13762,10 +16458,8 @@ public function rulesServeStaticDeleteWithHttpInfo($organization, $project, $rul $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -14023,26 +16717,87 @@ public function rulesServeStaticListWithHttpInfo($organization, $project, string switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleServeStatic[]', - $request, - $response, - ); + if ('\QuantClient\Model\V2RuleServeStatic[]' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2RuleServeStatic[]' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2RuleServeStatic[]', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -14057,11 +16812,34 @@ public function rulesServeStaticListWithHttpInfo($organization, $project, string ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleServeStatic[]', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2RuleServeStatic[]'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -14071,7 +16849,7 @@ public function rulesServeStaticListWithHttpInfo($organization, $project, string $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -14079,7 +16857,7 @@ public function rulesServeStaticListWithHttpInfo($organization, $project, string $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -14087,10 +16865,8 @@ public function rulesServeStaticListWithHttpInfo($organization, $project, string $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -14345,26 +17121,87 @@ public function rulesServeStaticReadWithHttpInfo($organization, $project, $rule, switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleServeStatic', - $request, - $response, - ); + if ('\QuantClient\Model\V2RuleServeStatic' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2RuleServeStatic' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2RuleServeStatic', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -14379,11 +17216,34 @@ public function rulesServeStaticReadWithHttpInfo($organization, $project, $rule, ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleServeStatic', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2RuleServeStatic'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -14393,7 +17253,7 @@ public function rulesServeStaticReadWithHttpInfo($organization, $project, $rule, $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -14401,7 +17261,7 @@ public function rulesServeStaticReadWithHttpInfo($organization, $project, $rule, $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -14409,10 +17269,8 @@ public function rulesServeStaticReadWithHttpInfo($organization, $project, $rule, $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -14687,26 +17545,87 @@ public function rulesServeStaticUpdateWithHttpInfo($organization, $project, $rul switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleServeStatic', - $request, - $response, - ); + if ('\QuantClient\Model\V2RuleServeStatic' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2RuleServeStatic' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2RuleServeStatic', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 400: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 403: - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Error', - $request, - $response, - ); - } + if ('\QuantClient\Model\V2Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\V2Error' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\V2Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -14721,11 +17640,34 @@ public function rulesServeStaticUpdateWithHttpInfo($organization, $project, $rul ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\V2RuleServeStatic', - $request, - $response, - ); + $returnType = '\QuantClient\Model\V2RuleServeStatic'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -14735,7 +17677,7 @@ public function rulesServeStaticUpdateWithHttpInfo($organization, $project, $rul $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -14743,7 +17685,7 @@ public function rulesServeStaticUpdateWithHttpInfo($organization, $project, $rul $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -14751,10 +17693,8 @@ public function rulesServeStaticUpdateWithHttpInfo($organization, $project, $rul $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -14999,47 +17939,4 @@ protected function createHttpClientOption() 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/src/Api/SSHAccessApi.php b/src/Api/SSHAccessApi.php index 17c8c4f..7a76693 100644 --- a/src/Api/SSHAccessApi.php +++ b/src/Api/SSHAccessApi.php @@ -1,7 +1,7 @@ client = $client ?: new Client(); $this->config = $config ?: Configuration::getDefaultConfiguration(); @@ -130,9 +127,9 @@ public function getConfig() * * Get SSH access credentials for an environment * - * @param string $organisation The organisation machine name (required) - * @param string $application The application name (required) - * @param string $environment The environment name (required) + * @param string $organisation The organisation ID (required) + * @param string $application The application ID (required) + * @param string $environment The environment ID (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSshAccessCredentials'] to see the possible values for this operation * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format @@ -150,9 +147,9 @@ public function getSshAccessCredentials($organisation, $application, $environmen * * Get SSH access credentials for an environment * - * @param string $organisation The organisation machine name (required) - * @param string $application The application name (required) - * @param string $environment The environment name (required) + * @param string $organisation The organisation ID (required) + * @param string $application The application ID (required) + * @param string $environment The environment ID (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSshAccessCredentials'] to see the possible values for this operation * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format @@ -188,14 +185,33 @@ public function getSshAccessCredentialsWithHttpInfo($organisation, $application, switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\GetSshAccessCredentials200Response', - $request, - $response, - ); - } + if ('\QuantClient\Model\GetSshAccessCredentials200Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\GetSshAccessCredentials200Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\GetSshAccessCredentials200Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -210,11 +226,34 @@ public function getSshAccessCredentialsWithHttpInfo($organisation, $application, ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\GetSshAccessCredentials200Response', - $request, - $response, - ); + $returnType = '\QuantClient\Model\GetSshAccessCredentials200Response'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -224,10 +263,8 @@ public function getSshAccessCredentialsWithHttpInfo($organisation, $application, $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -237,9 +274,9 @@ public function getSshAccessCredentialsWithHttpInfo($organisation, $application, * * Get SSH access credentials for an environment * - * @param string $organisation The organisation machine name (required) - * @param string $application The application name (required) - * @param string $environment The environment name (required) + * @param string $organisation The organisation ID (required) + * @param string $application The application ID (required) + * @param string $environment The environment ID (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSshAccessCredentials'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -260,9 +297,9 @@ function ($response) { * * Get SSH access credentials for an environment * - * @param string $organisation The organisation machine name (required) - * @param string $application The application name (required) - * @param string $environment The environment name (required) + * @param string $organisation The organisation ID (required) + * @param string $application The application ID (required) + * @param string $environment The environment ID (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSshAccessCredentials'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -312,9 +349,9 @@ function ($exception) { /** * Create request for operation 'getSshAccessCredentials' * - * @param string $organisation The organisation machine name (required) - * @param string $application The application name (required) - * @param string $environment The environment name (required) + * @param string $organisation The organisation ID (required) + * @param string $application The application ID (required) + * @param string $environment The environment ID (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSshAccessCredentials'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -455,47 +492,4 @@ protected function createHttpClientOption() 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/src/Api/ScalingPolicyApi.php b/src/Api/ScalingPolicyApi.php index fa9dc49..5a79d68 100644 --- a/src/Api/ScalingPolicyApi.php +++ b/src/Api/ScalingPolicyApi.php @@ -1,7 +1,7 @@ client = $client ?: new Client(); $this->config = $config ?: Configuration::getDefaultConfiguration(); @@ -194,11 +191,10 @@ public function deleteScalingPolicyWithHttpInfo($organisation, $application, $en return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { switch ($e->getCode()) { } - - throw $e; } } @@ -474,11 +470,10 @@ public function getScalingPoliciesWithHttpInfo($organisation, $application, $env return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { switch ($e->getCode()) { } - - throw $e; } } @@ -738,11 +733,10 @@ public function updateScalingPolicyWithHttpInfo($organisation, $application, $en return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { switch ($e->getCode()) { } - - throw $e; } } @@ -974,47 +968,4 @@ protected function createHttpClientOption() 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/src/Api/VariablesApi.php b/src/Api/VariablesApi.php index ec56c8c..2bed851 100644 --- a/src/Api/VariablesApi.php +++ b/src/Api/VariablesApi.php @@ -1,7 +1,7 @@ client = $client ?: new Client(); $this->config = $config ?: Configuration::getDefaultConfiguration(); @@ -197,11 +194,10 @@ public function bulkSetEnvironmentVariablesWithHttpInfo($api_organisation, $api_ return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { switch ($e->getCode()) { } - - throw $e; } } @@ -478,11 +474,10 @@ public function deleteEnvironmentVariableWithHttpInfo($api_organisation, $api_ap return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { switch ($e->getCode()) { } - - throw $e; } } @@ -758,11 +753,10 @@ public function listEnvironmentVariablesWithHttpInfo($api_organisation, $api_app return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { switch ($e->getCode()) { } - - throw $e; } } @@ -1024,11 +1018,10 @@ public function updateEnvironmentVariableWithHttpInfo($api_organisation, $api_ap return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { switch ($e->getCode()) { } - - throw $e; } } @@ -1278,47 +1271,4 @@ protected function createHttpClientOption() 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/src/Api/VolumesApi.php b/src/Api/VolumesApi.php index 3a13068..9709ae4 100644 --- a/src/Api/VolumesApi.php +++ b/src/Api/VolumesApi.php @@ -1,7 +1,7 @@ client = $client ?: new Client(); $this->config = $config ?: Configuration::getDefaultConfiguration(); @@ -199,14 +196,33 @@ public function createVolumeWithHttpInfo($organisation, $application, $environme switch($statusCode) { case 201: - return $this->handleResponseWithDataType( - '\QuantClient\Model\Volume', - $request, - $response, - ); - } + if ('\QuantClient\Model\Volume' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\Volume' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\Volume', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -221,11 +237,34 @@ public function createVolumeWithHttpInfo($organisation, $application, $environme ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\Volume', - $request, - $response, - ); + $returnType = '\QuantClient\Model\Volume'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -235,10 +274,8 @@ public function createVolumeWithHttpInfo($organisation, $application, $environme $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -528,11 +565,10 @@ public function deleteVolumeWithHttpInfo($organisation, $application, $environme return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { switch ($e->getCode()) { } - - throw $e; } } @@ -812,14 +848,33 @@ public function getVolumeWithHttpInfo($organisation, $application, $environment, switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\Volume', - $request, - $response, - ); - } + if ('\QuantClient\Model\Volume' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\Volume' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\Volume', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -834,11 +889,34 @@ public function getVolumeWithHttpInfo($organisation, $application, $environment, ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\Volume', - $request, - $response, - ); + $returnType = '\QuantClient\Model\Volume'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -848,10 +926,8 @@ public function getVolumeWithHttpInfo($organisation, $application, $environment, $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -1142,14 +1218,33 @@ public function listVolumesWithHttpInfo($organisation, $application, $environmen switch($statusCode) { case 200: - return $this->handleResponseWithDataType( - '\QuantClient\Model\Volume', - $request, - $response, - ); - } + if ('\QuantClient\Model\Volume' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\QuantClient\Model\Volume' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } - + return [ + ObjectSerializer::deserialize($content, '\QuantClient\Model\Volume', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1164,11 +1259,34 @@ public function listVolumesWithHttpInfo($organisation, $application, $environmen ); } - return $this->handleResponseWithDataType( - '\QuantClient\Model\Volume', - $request, - $response, - ); + $returnType = '\QuantClient\Model\Volume'; + 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() + ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1178,10 +1296,8 @@ public function listVolumesWithHttpInfo($organisation, $application, $environmen $e->getResponseHeaders() ); $e->setResponseObject($data); - throw $e; + break; } - - throw $e; } } @@ -1409,47 +1525,4 @@ protected function createHttpClientOption() 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/src/ApiException.php b/src/ApiException.php index 97922dd..71f6e3e 100644 --- a/src/ApiException.php +++ b/src/ApiException.php @@ -1,7 +1,7 @@ $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; - } - - $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/src/HeaderSelector.php b/src/HeaderSelector.php index 0d66f6c..1bce742 100644 --- a/src/HeaderSelector.php +++ b/src/HeaderSelector.php @@ -1,7 +1,7 @@ setIfExists('app_name', $data ?? [], null); $this->setIfExists('organisation', $data ?? [], null); diff --git a/src/Model/ApplicationDatabase.php b/src/Model/ApplicationDatabase.php index 5ff3333..ef1232c 100644 --- a/src/Model/ApplicationDatabase.php +++ b/src/Model/ApplicationDatabase.php @@ -2,7 +2,7 @@ /** * ApplicationDatabase * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -273,10 +273,10 @@ public function getRdsInstanceEngineAllowableValues() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('rds_instance_identifier', $data ?? [], null); $this->setIfExists('rds_instance_endpoint', $data ?? [], null); diff --git a/src/Model/ApplicationDeploymentInformationInner.php b/src/Model/ApplicationDeploymentInformationInner.php index d919018..eb08e08 100644 --- a/src/Model/ApplicationDeploymentInformationInner.php +++ b/src/Model/ApplicationDeploymentInformationInner.php @@ -2,7 +2,7 @@ /** * ApplicationDeploymentInformationInner * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -263,10 +263,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('deployment_id', $data ?? [], null); $this->setIfExists('task_definition_arn', $data ?? [], null); diff --git a/src/Model/ApplicationEnvironmentsInner.php b/src/Model/ApplicationEnvironmentsInner.php index 517c665..9f91b23 100644 --- a/src/Model/ApplicationEnvironmentsInner.php +++ b/src/Model/ApplicationEnvironmentsInner.php @@ -2,7 +2,7 @@ /** * ApplicationEnvironmentsInner * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -257,10 +257,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('env_name', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); diff --git a/src/Model/ApplicationFilesystem.php b/src/Model/ApplicationFilesystem.php index 8964b20..84e657e 100644 --- a/src/Model/ApplicationFilesystem.php +++ b/src/Model/ApplicationFilesystem.php @@ -2,7 +2,7 @@ /** * ApplicationFilesystem * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -246,10 +246,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('filesystem_id', $data ?? [], null); $this->setIfExists('mount_path', $data ?? [], null); diff --git a/src/Model/ApplicationImageReference.php b/src/Model/ApplicationImageReference.php index c7d18b1..c38d362 100644 --- a/src/Model/ApplicationImageReference.php +++ b/src/Model/ApplicationImageReference.php @@ -2,7 +2,7 @@ /** * ApplicationImageReference * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -261,10 +261,10 @@ public function getTypeAllowableValues() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('type', $data ?? [], null); $this->setIfExists('identifier', $data ?? [], null); diff --git a/src/Model/BulkSetEnvironmentVariablesRequest.php b/src/Model/BulkSetEnvironmentVariablesRequest.php index fb66f1d..a29d1e4 100644 --- a/src/Model/BulkSetEnvironmentVariablesRequest.php +++ b/src/Model/BulkSetEnvironmentVariablesRequest.php @@ -2,7 +2,7 @@ /** * BulkSetEnvironmentVariablesRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('environment', $data ?? [], null); } diff --git a/src/Model/BulkSetEnvironmentVariablesRequestEnvironmentInner.php b/src/Model/BulkSetEnvironmentVariablesRequestEnvironmentInner.php index 90d2a4c..a38a558 100644 --- a/src/Model/BulkSetEnvironmentVariablesRequestEnvironmentInner.php +++ b/src/Model/BulkSetEnvironmentVariablesRequestEnvironmentInner.php @@ -2,7 +2,7 @@ /** * BulkSetEnvironmentVariablesRequestEnvironmentInner * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('value', $data ?? [], null); diff --git a/src/Model/ChatInference200Response.php b/src/Model/ChatInference200Response.php index 3706b17..c84ce8d 100644 --- a/src/Model/ChatInference200Response.php +++ b/src/Model/ChatInference200Response.php @@ -2,7 +2,7 @@ /** * ChatInference200Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -282,10 +282,10 @@ public function getFinishReasonAllowableValues() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('response', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); diff --git a/src/Model/ChatInference200ResponseResponse.php b/src/Model/ChatInference200ResponseResponse.php index 524c843..bef6226 100644 --- a/src/Model/ChatInference200ResponseResponse.php +++ b/src/Model/ChatInference200ResponseResponse.php @@ -2,7 +2,7 @@ /** * ChatInference200ResponseResponse * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -265,10 +265,10 @@ public function getRoleAllowableValues() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('role', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); diff --git a/src/Model/ChatInference200ResponseResponseToolUse.php b/src/Model/ChatInference200ResponseResponseToolUse.php index 1f40752..d235b97 100644 --- a/src/Model/ChatInference200ResponseResponseToolUse.php +++ b/src/Model/ChatInference200ResponseResponseToolUse.php @@ -2,7 +2,7 @@ /** * ChatInference200ResponseResponseToolUse * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -270,10 +270,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('tool_use_id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/src/Model/ChatInference200ResponseResponseToolUseOneOf.php b/src/Model/ChatInference200ResponseResponseToolUseOneOf.php index e7285b2..648f0da 100644 --- a/src/Model/ChatInference200ResponseResponseToolUseOneOf.php +++ b/src/Model/ChatInference200ResponseResponseToolUseOneOf.php @@ -2,7 +2,7 @@ /** * ChatInference200ResponseResponseToolUseOneOf * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -270,10 +270,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('tool_use_id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/src/Model/ChatInference200ResponseResponseToolUseOneOf1Inner.php b/src/Model/ChatInference200ResponseResponseToolUseOneOf1Inner.php index 0a0897a..e303689 100644 --- a/src/Model/ChatInference200ResponseResponseToolUseOneOf1Inner.php +++ b/src/Model/ChatInference200ResponseResponseToolUseOneOf1Inner.php @@ -2,7 +2,7 @@ /** * ChatInference200ResponseResponseToolUseOneOf1Inner * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -269,10 +269,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('tool_use_id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/src/Model/ChatInference200ResponseResponseToolUseOneOfResult.php b/src/Model/ChatInference200ResponseResponseToolUseOneOfResult.php index 009d1bd..424b790 100644 --- a/src/Model/ChatInference200ResponseResponseToolUseOneOfResult.php +++ b/src/Model/ChatInference200ResponseResponseToolUseOneOfResult.php @@ -2,7 +2,7 @@ /** * ChatInference200ResponseResponseToolUseOneOfResult * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -246,10 +246,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('images', $data ?? [], null); $this->setIfExists('s3_urls', $data ?? [], null); diff --git a/src/Model/ChatInference200ResponseUsage.php b/src/Model/ChatInference200ResponseUsage.php index dcf0b75..9395d06 100644 --- a/src/Model/ChatInference200ResponseUsage.php +++ b/src/Model/ChatInference200ResponseUsage.php @@ -2,7 +2,7 @@ /** * ChatInference200ResponseUsage * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -252,10 +252,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('input_tokens', $data ?? [], null); $this->setIfExists('output_tokens', $data ?? [], null); diff --git a/src/Model/ChatInferenceRequest.php b/src/Model/ChatInferenceRequest.php index 55a5917..746f067 100644 --- a/src/Model/ChatInferenceRequest.php +++ b/src/Model/ChatInferenceRequest.php @@ -2,7 +2,7 @@ /** * ChatInferenceRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -293,10 +293,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('messages', $data ?? [], null); $this->setIfExists('model_id', $data ?? [], null); diff --git a/src/Model/ChatInferenceRequestMessagesInner.php b/src/Model/ChatInferenceRequestMessagesInner.php index 1ebc276..2f38215 100644 --- a/src/Model/ChatInferenceRequestMessagesInner.php +++ b/src/Model/ChatInferenceRequestMessagesInner.php @@ -2,7 +2,7 @@ /** * ChatInferenceRequestMessagesInner * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -262,10 +262,10 @@ public function getRoleAllowableValues() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('role', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); diff --git a/src/Model/ChatInferenceRequestMessagesInnerContent.php b/src/Model/ChatInferenceRequestMessagesInnerContent.php index 296ec66..1ef1fe7 100644 --- a/src/Model/ChatInferenceRequestMessagesInnerContent.php +++ b/src/Model/ChatInferenceRequestMessagesInnerContent.php @@ -2,7 +2,7 @@ /** * ChatInferenceRequestMessagesInnerContent * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { } diff --git a/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInner.php b/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInner.php index 8bce754..1389d10 100644 --- a/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInner.php +++ b/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInner.php @@ -2,7 +2,7 @@ /** * ChatInferenceRequestMessagesInnerContentOneOfInner * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -257,10 +257,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('text', $data ?? [], null); $this->setIfExists('image', $data ?? [], null); diff --git a/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf.php b/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf.php index 572ae6f..59fa446 100644 --- a/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf.php +++ b/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf.php @@ -2,7 +2,7 @@ /** * ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('text', $data ?? [], null); } diff --git a/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf1.php b/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf1.php index 8078c41..32f065c 100644 --- a/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf1.php +++ b/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf1.php @@ -2,7 +2,7 @@ /** * ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf1 * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('image', $data ?? [], null); } diff --git a/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf1Image.php b/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf1Image.php index 508f021..1bc84ad 100644 --- a/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf1Image.php +++ b/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf1Image.php @@ -2,7 +2,7 @@ /** * ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf1Image * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -264,10 +264,10 @@ public function getFormatAllowableValues() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('format', $data ?? [], null); $this->setIfExists('source', $data ?? [], null); diff --git a/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf1ImageSource.php b/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf1ImageSource.php index a072b00..f8534e5 100644 --- a/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf1ImageSource.php +++ b/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf1ImageSource.php @@ -2,7 +2,7 @@ /** * ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf1ImageSource * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('bytes', $data ?? [], null); } diff --git a/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf2.php b/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf2.php index 7a0ed2f..cfa3890 100644 --- a/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf2.php +++ b/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf2.php @@ -2,7 +2,7 @@ /** * ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf2 * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('video', $data ?? [], null); } diff --git a/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf2Video.php b/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf2Video.php index 494266e..e478480 100644 --- a/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf2Video.php +++ b/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf2Video.php @@ -2,7 +2,7 @@ /** * ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf2Video * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -264,10 +264,10 @@ public function getFormatAllowableValues() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('format', $data ?? [], null); $this->setIfExists('source', $data ?? [], null); diff --git a/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf2VideoSource.php b/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf2VideoSource.php index 1859bb9..d7f2233 100644 --- a/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf2VideoSource.php +++ b/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf2VideoSource.php @@ -2,7 +2,7 @@ /** * ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf2VideoSource * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('bytes', $data ?? [], null); } diff --git a/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf3.php b/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf3.php index 381fc47..780b985 100644 --- a/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf3.php +++ b/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf3.php @@ -2,7 +2,7 @@ /** * ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf3 * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('document', $data ?? [], null); } diff --git a/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf3Document.php b/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf3Document.php index bb04eb2..55d6bb4 100644 --- a/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf3Document.php +++ b/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf3Document.php @@ -2,7 +2,7 @@ /** * ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf3Document * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -270,10 +270,10 @@ public function getFormatAllowableValues() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('format', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf3DocumentSource.php b/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf3DocumentSource.php index b8905ae..cf4f03a 100644 --- a/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf3DocumentSource.php +++ b/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf3DocumentSource.php @@ -2,7 +2,7 @@ /** * ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf3DocumentSource * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('bytes', $data ?? [], null); } diff --git a/src/Model/ChatInferenceRequestResponseFormat.php b/src/Model/ChatInferenceRequestResponseFormat.php index 7c7be3e..3245c77 100644 --- a/src/Model/ChatInferenceRequestResponseFormat.php +++ b/src/Model/ChatInferenceRequestResponseFormat.php @@ -2,7 +2,7 @@ /** * ChatInferenceRequestResponseFormat * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -259,10 +259,10 @@ public function getTypeAllowableValues() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('type', $data ?? [], null); $this->setIfExists('json_schema', $data ?? [], null); diff --git a/src/Model/ChatInferenceRequestToolConfig.php b/src/Model/ChatInferenceRequestToolConfig.php index bb0d1ad..7f8b4b8 100644 --- a/src/Model/ChatInferenceRequestToolConfig.php +++ b/src/Model/ChatInferenceRequestToolConfig.php @@ -2,7 +2,7 @@ /** * ChatInferenceRequestToolConfig * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -252,10 +252,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('tools', $data ?? [], null); $this->setIfExists('auto_execute', $data ?? [], false); diff --git a/src/Model/ChatInferenceRequestToolConfigToolsInner.php b/src/Model/ChatInferenceRequestToolConfigToolsInner.php index 620824c..d9e37df 100644 --- a/src/Model/ChatInferenceRequestToolConfigToolsInner.php +++ b/src/Model/ChatInferenceRequestToolConfigToolsInner.php @@ -2,7 +2,7 @@ /** * ChatInferenceRequestToolConfigToolsInner * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('tool_spec', $data ?? [], null); } diff --git a/src/Model/ChatInferenceRequestToolConfigToolsInnerToolSpec.php b/src/Model/ChatInferenceRequestToolConfigToolsInnerToolSpec.php index 843cd85..604ce5d 100644 --- a/src/Model/ChatInferenceRequestToolConfigToolsInnerToolSpec.php +++ b/src/Model/ChatInferenceRequestToolConfigToolsInnerToolSpec.php @@ -2,7 +2,7 @@ /** * ChatInferenceRequestToolConfigToolsInnerToolSpec * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -251,10 +251,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); diff --git a/src/Model/ChatInferenceRequestToolConfigToolsInnerToolSpecInputSchema.php b/src/Model/ChatInferenceRequestToolConfigToolsInnerToolSpecInputSchema.php index f6ac9fb..ef87da6 100644 --- a/src/Model/ChatInferenceRequestToolConfigToolsInnerToolSpecInputSchema.php +++ b/src/Model/ChatInferenceRequestToolConfigToolsInnerToolSpecInputSchema.php @@ -2,7 +2,7 @@ /** * ChatInferenceRequestToolConfigToolsInnerToolSpecInputSchema * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('json', $data ?? [], null); } diff --git a/src/Model/ChatInferenceStreamRequest.php b/src/Model/ChatInferenceStreamRequest.php index 0b0058e..45a9aef 100644 --- a/src/Model/ChatInferenceStreamRequest.php +++ b/src/Model/ChatInferenceStreamRequest.php @@ -2,7 +2,7 @@ /** * ChatInferenceStreamRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -287,10 +287,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('messages', $data ?? [], null); $this->setIfExists('model_id', $data ?? [], null); diff --git a/src/Model/ChatInferenceStreamRequestMessagesInner.php b/src/Model/ChatInferenceStreamRequestMessagesInner.php index 307e051..38f3f7a 100644 --- a/src/Model/ChatInferenceStreamRequestMessagesInner.php +++ b/src/Model/ChatInferenceStreamRequestMessagesInner.php @@ -2,7 +2,7 @@ /** * ChatInferenceStreamRequestMessagesInner * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -262,10 +262,10 @@ public function getRoleAllowableValues() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('role', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); diff --git a/src/Model/ChatInferenceStreamRequestMessagesInnerContent.php b/src/Model/ChatInferenceStreamRequestMessagesInnerContent.php index 397c7e8..38d0f55 100644 --- a/src/Model/ChatInferenceStreamRequestMessagesInnerContent.php +++ b/src/Model/ChatInferenceStreamRequestMessagesInnerContent.php @@ -2,7 +2,7 @@ /** * ChatInferenceStreamRequestMessagesInnerContent * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { } diff --git a/src/Model/ChatWithAIAgent200Response.php b/src/Model/ChatWithAIAgent200Response.php index ddad450..979f096 100644 --- a/src/Model/ChatWithAIAgent200Response.php +++ b/src/Model/ChatWithAIAgent200Response.php @@ -2,7 +2,7 @@ /** * ChatWithAIAgent200Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('session_id', $data ?? [], null); $this->setIfExists('response', $data ?? [], null); diff --git a/src/Model/ChatWithAIAgent200ResponseResponse.php b/src/Model/ChatWithAIAgent200ResponseResponse.php index 9e10789..59cb66f 100644 --- a/src/Model/ChatWithAIAgent200ResponseResponse.php +++ b/src/Model/ChatWithAIAgent200ResponseResponse.php @@ -2,7 +2,7 @@ /** * ChatWithAIAgent200ResponseResponse * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -257,10 +257,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('text', $data ?? [], null); $this->setIfExists('stop_reason', $data ?? [], null); diff --git a/src/Model/ChatWithAIAgent200ResponseResponseUsage.php b/src/Model/ChatWithAIAgent200ResponseResponseUsage.php index 4df3843..0b187dc 100644 --- a/src/Model/ChatWithAIAgent200ResponseResponseUsage.php +++ b/src/Model/ChatWithAIAgent200ResponseResponseUsage.php @@ -2,7 +2,7 @@ /** * ChatWithAIAgent200ResponseResponseUsage * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('input_tokens', $data ?? [], null); $this->setIfExists('output_tokens', $data ?? [], null); diff --git a/src/Model/ChatWithAIAgentRequest.php b/src/Model/ChatWithAIAgentRequest.php index 0d7ea4a..5a0ac9f 100644 --- a/src/Model/ChatWithAIAgentRequest.php +++ b/src/Model/ChatWithAIAgentRequest.php @@ -2,7 +2,7 @@ /** * ChatWithAIAgentRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -257,10 +257,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('message', $data ?? [], null); $this->setIfExists('session_id', $data ?? [], null); diff --git a/src/Model/Command.php b/src/Model/Command.php index b5b01fb..e947ac6 100644 --- a/src/Model/Command.php +++ b/src/Model/Command.php @@ -2,7 +2,7 @@ /** * Command * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -293,10 +293,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('run_id', $data ?? [], null); $this->setIfExists('run_type', $data ?? [], null); diff --git a/src/Model/Compose.php b/src/Model/Compose.php index 3cff146..b0cc208 100644 --- a/src/Model/Compose.php +++ b/src/Model/Compose.php @@ -2,7 +2,7 @@ /** * Compose * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -287,10 +287,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('containers', $data ?? [], null); $this->setIfExists('architecture', $data ?? [], null); diff --git a/src/Model/Container.php b/src/Model/Container.php index 6d3ead1..02507fb 100644 --- a/src/Model/Container.php +++ b/src/Model/Container.php @@ -2,7 +2,7 @@ /** * Container * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -347,10 +347,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('image_reference', $data ?? [], null); diff --git a/src/Model/ContainerDependsOnInner.php b/src/Model/ContainerDependsOnInner.php index 3519c79..3f3af46 100644 --- a/src/Model/ContainerDependsOnInner.php +++ b/src/Model/ContainerDependsOnInner.php @@ -2,7 +2,7 @@ /** * ContainerDependsOnInner * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -264,10 +264,10 @@ public function getConditionAllowableValues() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('container_name', $data ?? [], null); $this->setIfExists('condition', $data ?? [], null); diff --git a/src/Model/ContainerEnvironmentInner.php b/src/Model/ContainerEnvironmentInner.php index 35dc14c..cc1fed8 100644 --- a/src/Model/ContainerEnvironmentInner.php +++ b/src/Model/ContainerEnvironmentInner.php @@ -2,7 +2,7 @@ /** * ContainerEnvironmentInner * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('value', $data ?? [], null); diff --git a/src/Model/ContainerHealthCheck.php b/src/Model/ContainerHealthCheck.php index ff3a652..b40b2e0 100644 --- a/src/Model/ContainerHealthCheck.php +++ b/src/Model/ContainerHealthCheck.php @@ -2,7 +2,7 @@ /** * ContainerHealthCheck * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -264,10 +264,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('command', $data ?? [], null); $this->setIfExists('interval', $data ?? [], 30); diff --git a/src/Model/ContainerImageReference.php b/src/Model/ContainerImageReference.php index 72cd32e..ca155de 100644 --- a/src/Model/ContainerImageReference.php +++ b/src/Model/ContainerImageReference.php @@ -2,7 +2,7 @@ /** * ContainerImageReference * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -260,10 +260,10 @@ public function getTypeAllowableValues() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('type', $data ?? [], null); $this->setIfExists('identifier', $data ?? [], null); diff --git a/src/Model/ContainerMountPointsInner.php b/src/Model/ContainerMountPointsInner.php index eacb2a1..cbb991e 100644 --- a/src/Model/ContainerMountPointsInner.php +++ b/src/Model/ContainerMountPointsInner.php @@ -2,7 +2,7 @@ /** * ContainerMountPointsInner * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -251,10 +251,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('source_volume', $data ?? [], null); $this->setIfExists('container_path', $data ?? [], null); diff --git a/src/Model/ContainerOriginProtectionConfig.php b/src/Model/ContainerOriginProtectionConfig.php index 1b226e6..25a2330 100644 --- a/src/Model/ContainerOriginProtectionConfig.php +++ b/src/Model/ContainerOriginProtectionConfig.php @@ -2,7 +2,7 @@ /** * ContainerOriginProtectionConfig * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -246,10 +246,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('enabled', $data ?? [], true); $this->setIfExists('ip_allow', $data ?? [], null); diff --git a/src/Model/ContainerSecretsInner.php b/src/Model/ContainerSecretsInner.php index af7d56e..af708f0 100644 --- a/src/Model/ContainerSecretsInner.php +++ b/src/Model/ContainerSecretsInner.php @@ -2,7 +2,7 @@ /** * ContainerSecretsInner * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('value_from', $data ?? [], null); diff --git a/src/Model/CrawlersRun200Response.php b/src/Model/CrawlersRun200Response.php index e6fea20..c56d3f9 100644 --- a/src/Model/CrawlersRun200Response.php +++ b/src/Model/CrawlersRun200Response.php @@ -2,7 +2,7 @@ /** * CrawlersRun200Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('run_id', $data ?? [], null); } diff --git a/src/Model/CrawlersRunRequest.php b/src/Model/CrawlersRunRequest.php index 29ed9b7..1a858d5 100644 --- a/src/Model/CrawlersRunRequest.php +++ b/src/Model/CrawlersRunRequest.php @@ -2,7 +2,7 @@ /** * CrawlersRunRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('urls', $data ?? [], null); } diff --git a/src/Model/CreateAIAgent201Response.php b/src/Model/CreateAIAgent201Response.php index 0f8e39e..11ad49d 100644 --- a/src/Model/CreateAIAgent201Response.php +++ b/src/Model/CreateAIAgent201Response.php @@ -2,7 +2,7 @@ /** * CreateAIAgent201Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -251,10 +251,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('success', $data ?? [], null); $this->setIfExists('agent', $data ?? [], null); diff --git a/src/Model/CreateAIAgentRequest.php b/src/Model/CreateAIAgentRequest.php index fcaea8a..e37211b 100644 --- a/src/Model/CreateAIAgentRequest.php +++ b/src/Model/CreateAIAgentRequest.php @@ -2,7 +2,7 @@ /** * CreateAIAgentRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -293,10 +293,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); diff --git a/src/Model/CreateAISession201Response.php b/src/Model/CreateAISession201Response.php index 9546d05..b687a9a 100644 --- a/src/Model/CreateAISession201Response.php +++ b/src/Model/CreateAISession201Response.php @@ -2,7 +2,7 @@ /** * CreateAISession201Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -270,10 +270,10 @@ public function getStatusAllowableValues() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('session_id', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); diff --git a/src/Model/CreateAISessionRequest.php b/src/Model/CreateAISessionRequest.php index 2bfb817..252b45c 100644 --- a/src/Model/CreateAISessionRequest.php +++ b/src/Model/CreateAISessionRequest.php @@ -2,7 +2,7 @@ /** * CreateAISessionRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -263,10 +263,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('user_id', $data ?? [], null); $this->setIfExists('session_group', $data ?? [], null); diff --git a/src/Model/CreateAISessionRequestInitialMessagesInner.php b/src/Model/CreateAISessionRequestInitialMessagesInner.php index bdcffcf..cea6516 100644 --- a/src/Model/CreateAISessionRequestInitialMessagesInner.php +++ b/src/Model/CreateAISessionRequestInitialMessagesInner.php @@ -2,7 +2,7 @@ /** * CreateAISessionRequestInitialMessagesInner * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -262,10 +262,10 @@ public function getRoleAllowableValues() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('role', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); diff --git a/src/Model/CreateApplication403Response.php b/src/Model/CreateApplication403Response.php index 566b558..2554d4b 100644 --- a/src/Model/CreateApplication403Response.php +++ b/src/Model/CreateApplication403Response.php @@ -2,7 +2,7 @@ /** * CreateApplication403Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('message', $data ?? [], null); $this->setIfExists('error', $data ?? [], null); diff --git a/src/Model/CreateApplicationRequest.php b/src/Model/CreateApplicationRequest.php index 4838d7c..9e449fd 100644 --- a/src/Model/CreateApplicationRequest.php +++ b/src/Model/CreateApplicationRequest.php @@ -2,7 +2,7 @@ /** * CreateApplicationRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -275,10 +275,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('app_name', $data ?? [], null); $this->setIfExists('compose_definition', $data ?? [], null); diff --git a/src/Model/CreateApplicationRequestDatabase.php b/src/Model/CreateApplicationRequestDatabase.php index 3e2d0ab..86ad9dd 100644 --- a/src/Model/CreateApplicationRequestDatabase.php +++ b/src/Model/CreateApplicationRequestDatabase.php @@ -2,7 +2,7 @@ /** * CreateApplicationRequestDatabase * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -273,10 +273,10 @@ public function getEngineAllowableValues() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('engine', $data ?? [], 'mysql'); $this->setIfExists('instance_class', $data ?? [], 'db.t4g.micro'); diff --git a/src/Model/CreateApplicationRequestEnvironmentInner.php b/src/Model/CreateApplicationRequestEnvironmentInner.php index 450acff..84b386f 100644 --- a/src/Model/CreateApplicationRequestEnvironmentInner.php +++ b/src/Model/CreateApplicationRequestEnvironmentInner.php @@ -2,7 +2,7 @@ /** * CreateApplicationRequestEnvironmentInner * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('value', $data ?? [], null); diff --git a/src/Model/CreateApplicationRequestFilesystem.php b/src/Model/CreateApplicationRequestFilesystem.php index 4d6e6f9..5d72526 100644 --- a/src/Model/CreateApplicationRequestFilesystem.php +++ b/src/Model/CreateApplicationRequestFilesystem.php @@ -2,7 +2,7 @@ /** * CreateApplicationRequestFilesystem * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -246,10 +246,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('required', $data ?? [], true); $this->setIfExists('mount_path', $data ?? [], '/mnt/data'); diff --git a/src/Model/CreateBackup202Response.php b/src/Model/CreateBackup202Response.php index 7d6ae9a..33085fd 100644 --- a/src/Model/CreateBackup202Response.php +++ b/src/Model/CreateBackup202Response.php @@ -2,7 +2,7 @@ /** * CreateBackup202Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -251,10 +251,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('backup_id', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); diff --git a/src/Model/CreateBackupRequest.php b/src/Model/CreateBackupRequest.php index bf00d85..8ca2f22 100644 --- a/src/Model/CreateBackupRequest.php +++ b/src/Model/CreateBackupRequest.php @@ -2,7 +2,7 @@ /** * CreateBackupRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('description', $data ?? [], null); } diff --git a/src/Model/CreateCommandRequest.php b/src/Model/CreateCommandRequest.php index b5aaca2..816330c 100644 --- a/src/Model/CreateCommandRequest.php +++ b/src/Model/CreateCommandRequest.php @@ -2,7 +2,7 @@ /** * CreateCommandRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('command', $data ?? [], null); } diff --git a/src/Model/CreateCronJobRequest.php b/src/Model/CreateCronJobRequest.php index 796a2f6..0560e14 100644 --- a/src/Model/CreateCronJobRequest.php +++ b/src/Model/CreateCronJobRequest.php @@ -2,7 +2,7 @@ /** * CreateCronJobRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -269,10 +269,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); diff --git a/src/Model/CreateCustomTool201Response.php b/src/Model/CreateCustomTool201Response.php index a10716a..5ab4eab 100644 --- a/src/Model/CreateCustomTool201Response.php +++ b/src/Model/CreateCustomTool201Response.php @@ -2,7 +2,7 @@ /** * CreateCustomTool201Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -251,10 +251,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('success', $data ?? [], null); $this->setIfExists('tool', $data ?? [], null); diff --git a/src/Model/CreateCustomToolRequest.php b/src/Model/CreateCustomToolRequest.php index 980d714..6311319 100644 --- a/src/Model/CreateCustomToolRequest.php +++ b/src/Model/CreateCustomToolRequest.php @@ -2,7 +2,7 @@ /** * CreateCustomToolRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -269,10 +269,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); diff --git a/src/Model/CreateEnvironment403Response.php b/src/Model/CreateEnvironment403Response.php index 7908c1c..23b9a69 100644 --- a/src/Model/CreateEnvironment403Response.php +++ b/src/Model/CreateEnvironment403Response.php @@ -2,7 +2,7 @@ /** * CreateEnvironment403Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('message', $data ?? [], null); $this->setIfExists('error', $data ?? [], null); diff --git a/src/Model/CreateEnvironmentRequest.php b/src/Model/CreateEnvironmentRequest.php index ad88869..935099f 100644 --- a/src/Model/CreateEnvironmentRequest.php +++ b/src/Model/CreateEnvironmentRequest.php @@ -2,7 +2,7 @@ /** * CreateEnvironmentRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -287,10 +287,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('env_name', $data ?? [], null); $this->setIfExists('min_capacity', $data ?? [], null); diff --git a/src/Model/CreateEnvironmentRequestEnvironmentInner.php b/src/Model/CreateEnvironmentRequestEnvironmentInner.php index 4ad8614..7d9c8a4 100644 --- a/src/Model/CreateEnvironmentRequestEnvironmentInner.php +++ b/src/Model/CreateEnvironmentRequestEnvironmentInner.php @@ -2,7 +2,7 @@ /** * CreateEnvironmentRequestEnvironmentInner * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('value', $data ?? [], null); diff --git a/src/Model/CreateVectorCollection201Response.php b/src/Model/CreateVectorCollection201Response.php index c45c340..9e7b589 100644 --- a/src/Model/CreateVectorCollection201Response.php +++ b/src/Model/CreateVectorCollection201Response.php @@ -2,7 +2,7 @@ /** * CreateVectorCollection201Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -251,10 +251,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('success', $data ?? [], null); $this->setIfExists('collection', $data ?? [], null); diff --git a/src/Model/CreateVectorCollection201ResponseCollection.php b/src/Model/CreateVectorCollection201ResponseCollection.php index 7413fd3..6b75edb 100644 --- a/src/Model/CreateVectorCollection201ResponseCollection.php +++ b/src/Model/CreateVectorCollection201ResponseCollection.php @@ -2,7 +2,7 @@ /** * CreateVectorCollection201ResponseCollection * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -263,10 +263,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('collection_id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/src/Model/CreateVectorCollectionRequest.php b/src/Model/CreateVectorCollectionRequest.php index d570241..539422d 100644 --- a/src/Model/CreateVectorCollectionRequest.php +++ b/src/Model/CreateVectorCollectionRequest.php @@ -2,7 +2,7 @@ /** * CreateVectorCollectionRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -257,10 +257,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); diff --git a/src/Model/CreateVolumeRequest.php b/src/Model/CreateVolumeRequest.php index b16ad71..50f6141 100644 --- a/src/Model/CreateVolumeRequest.php +++ b/src/Model/CreateVolumeRequest.php @@ -2,7 +2,7 @@ /** * CreateVolumeRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -251,10 +251,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('volume_name', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); diff --git a/src/Model/Cron.php b/src/Model/Cron.php index 281ff14..02a1835 100644 --- a/src/Model/Cron.php +++ b/src/Model/Cron.php @@ -2,7 +2,7 @@ /** * Cron * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -251,10 +251,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('schedule', $data ?? [], null); diff --git a/src/Model/CronRun.php b/src/Model/CronRun.php index e8f553e..1d955d8 100644 --- a/src/Model/CronRun.php +++ b/src/Model/CronRun.php @@ -2,7 +2,7 @@ /** * CronRun * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -331,10 +331,10 @@ public function getStatusAllowableValues() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('run_id', $data ?? [], null); $this->setIfExists('run_type', $data ?? [], null); diff --git a/src/Model/DeleteAIAgent200Response.php b/src/Model/DeleteAIAgent200Response.php index 770df4f..1b7ca87 100644 --- a/src/Model/DeleteAIAgent200Response.php +++ b/src/Model/DeleteAIAgent200Response.php @@ -2,7 +2,7 @@ /** * DeleteAIAgent200Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('success', $data ?? [], null); $this->setIfExists('message', $data ?? [], null); diff --git a/src/Model/DeleteAISession200Response.php b/src/Model/DeleteAISession200Response.php index 3b8cc75..4605d1d 100644 --- a/src/Model/DeleteAISession200Response.php +++ b/src/Model/DeleteAISession200Response.php @@ -2,7 +2,7 @@ /** * DeleteAISession200Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('message', $data ?? [], null); } diff --git a/src/Model/DeleteBackup200Response.php b/src/Model/DeleteBackup200Response.php index 3125653..5060595 100644 --- a/src/Model/DeleteBackup200Response.php +++ b/src/Model/DeleteBackup200Response.php @@ -2,7 +2,7 @@ /** * DeleteBackup200Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('message', $data ?? [], null); $this->setIfExists('backup_id', $data ?? [], null); diff --git a/src/Model/DeleteCustomTool200Response.php b/src/Model/DeleteCustomTool200Response.php index 82f4652..4843c31 100644 --- a/src/Model/DeleteCustomTool200Response.php +++ b/src/Model/DeleteCustomTool200Response.php @@ -2,7 +2,7 @@ /** * DeleteCustomTool200Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('success', $data ?? [], null); $this->setIfExists('message', $data ?? [], null); diff --git a/src/Model/DeleteVectorCollection200Response.php b/src/Model/DeleteVectorCollection200Response.php index f1f796e..6535353 100644 --- a/src/Model/DeleteVectorCollection200Response.php +++ b/src/Model/DeleteVectorCollection200Response.php @@ -2,7 +2,7 @@ /** * DeleteVectorCollection200Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('success', $data ?? [], null); $this->setIfExists('message', $data ?? [], null); diff --git a/src/Model/DownloadBackup200Response.php b/src/Model/DownloadBackup200Response.php index 93aa415..455306d 100644 --- a/src/Model/DownloadBackup200Response.php +++ b/src/Model/DownloadBackup200Response.php @@ -2,7 +2,7 @@ /** * DownloadBackup200Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -251,10 +251,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('download_url', $data ?? [], null); $this->setIfExists('expires_at', $data ?? [], null); diff --git a/src/Model/Embeddings200Response.php b/src/Model/Embeddings200Response.php index 77e8c7c..3fd8fa1 100644 --- a/src/Model/Embeddings200Response.php +++ b/src/Model/Embeddings200Response.php @@ -2,7 +2,7 @@ /** * Embeddings200Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -257,10 +257,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('embeddings', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); diff --git a/src/Model/Embeddings200ResponseEmbeddings.php b/src/Model/Embeddings200ResponseEmbeddings.php index 6ea9658..0b6b8ac 100644 --- a/src/Model/Embeddings200ResponseEmbeddings.php +++ b/src/Model/Embeddings200ResponseEmbeddings.php @@ -2,7 +2,7 @@ /** * Embeddings200ResponseEmbeddings * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -240,10 +240,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { } diff --git a/src/Model/Embeddings200ResponseUsage.php b/src/Model/Embeddings200ResponseUsage.php index 0bb2f9e..c16373c 100644 --- a/src/Model/Embeddings200ResponseUsage.php +++ b/src/Model/Embeddings200ResponseUsage.php @@ -2,7 +2,7 @@ /** * Embeddings200ResponseUsage * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('input_tokens', $data ?? [], null); $this->setIfExists('total_tokens', $data ?? [], null); diff --git a/src/Model/EmbeddingsRequest.php b/src/Model/EmbeddingsRequest.php index a13091d..e15bbdb 100644 --- a/src/Model/EmbeddingsRequest.php +++ b/src/Model/EmbeddingsRequest.php @@ -2,7 +2,7 @@ /** * EmbeddingsRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -276,10 +276,10 @@ public function getDimensionsAllowableValues() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('input', $data ?? [], null); $this->setIfExists('model_id', $data ?? [], 'amazon.titan-embed-text-v2:0'); diff --git a/src/Model/EmbeddingsRequestInput.php b/src/Model/EmbeddingsRequestInput.php index b25b4e8..db918fb 100644 --- a/src/Model/EmbeddingsRequestInput.php +++ b/src/Model/EmbeddingsRequestInput.php @@ -2,7 +2,7 @@ /** * EmbeddingsRequestInput * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -240,10 +240,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { } diff --git a/src/Model/Environment.php b/src/Model/Environment.php index 6e44135..36709ea 100644 --- a/src/Model/Environment.php +++ b/src/Model/Environment.php @@ -2,7 +2,7 @@ /** * Environment * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -270,10 +270,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('env_name', $data ?? [], null); $this->setIfExists('desired_count', $data ?? [], null); diff --git a/src/Model/EnvironmentResponse.php b/src/Model/EnvironmentResponse.php index f81331a..d67fc0d 100644 --- a/src/Model/EnvironmentResponse.php +++ b/src/Model/EnvironmentResponse.php @@ -2,7 +2,7 @@ /** * EnvironmentResponse * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -383,10 +383,10 @@ public function getDeploymentStatusAllowableValues() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('env_name', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); diff --git a/src/Model/EnvironmentSummary.php b/src/Model/EnvironmentSummary.php index 1cb2ca2..d10637d 100644 --- a/src/Model/EnvironmentSummary.php +++ b/src/Model/EnvironmentSummary.php @@ -2,7 +2,7 @@ /** * EnvironmentSummary * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -293,10 +293,10 @@ public function getDeploymentStatusAllowableValues() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('env_name', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); diff --git a/src/Model/ExtendAISession200Response.php b/src/Model/ExtendAISession200Response.php index 6f68da5..8d65acc 100644 --- a/src/Model/ExtendAISession200Response.php +++ b/src/Model/ExtendAISession200Response.php @@ -2,7 +2,7 @@ /** * ExtendAISession200Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -251,10 +251,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('session_id', $data ?? [], null); $this->setIfExists('expires_at', $data ?? [], null); diff --git a/src/Model/ExtendAISessionRequest.php b/src/Model/ExtendAISessionRequest.php index 71e93ee..a4c6f63 100644 --- a/src/Model/ExtendAISessionRequest.php +++ b/src/Model/ExtendAISessionRequest.php @@ -2,7 +2,7 @@ /** * ExtendAISessionRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('additional_minutes', $data ?? [], 60); } diff --git a/src/Model/GetAIAgent200Response.php b/src/Model/GetAIAgent200Response.php index 1e0ad98..de9f1cd 100644 --- a/src/Model/GetAIAgent200Response.php +++ b/src/Model/GetAIAgent200Response.php @@ -2,7 +2,7 @@ /** * GetAIAgent200Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('agent', $data ?? [], null); } diff --git a/src/Model/GetAIAgent200ResponseAgent.php b/src/Model/GetAIAgent200ResponseAgent.php index f68e9b2..e85ad4c 100644 --- a/src/Model/GetAIAgent200ResponseAgent.php +++ b/src/Model/GetAIAgent200ResponseAgent.php @@ -2,7 +2,7 @@ /** * GetAIAgent200ResponseAgent * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -311,10 +311,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('agent_id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/src/Model/GetAIModel200Response.php b/src/Model/GetAIModel200Response.php index dff4723..949e03e 100644 --- a/src/Model/GetAIModel200Response.php +++ b/src/Model/GetAIModel200Response.php @@ -2,7 +2,7 @@ /** * GetAIModel200Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -299,10 +299,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/src/Model/GetAIModel200ResponseCapabilities.php b/src/Model/GetAIModel200ResponseCapabilities.php index c5ee2cf..ea98419 100644 --- a/src/Model/GetAIModel200ResponseCapabilities.php +++ b/src/Model/GetAIModel200ResponseCapabilities.php @@ -2,7 +2,7 @@ /** * GetAIModel200ResponseCapabilities * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -263,10 +263,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('supports_tools', $data ?? [], null); $this->setIfExists('supports_structured_output', $data ?? [], null); diff --git a/src/Model/GetAIModel200ResponsePricing.php b/src/Model/GetAIModel200ResponsePricing.php index 6b99690..9677ba4 100644 --- a/src/Model/GetAIModel200ResponsePricing.php +++ b/src/Model/GetAIModel200ResponsePricing.php @@ -2,7 +2,7 @@ /** * GetAIModel200ResponsePricing * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -251,10 +251,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('input_per_m_token', $data ?? [], null); $this->setIfExists('output_per_m_token', $data ?? [], null); diff --git a/src/Model/GetAIModel404Response.php b/src/Model/GetAIModel404Response.php index 6fd1fe9..a2fb39b 100644 --- a/src/Model/GetAIModel404Response.php +++ b/src/Model/GetAIModel404Response.php @@ -2,7 +2,7 @@ /** * GetAIModel404Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('message', $data ?? [], null); $this->setIfExists('code', $data ?? [], null); diff --git a/src/Model/GetAISession200Response.php b/src/Model/GetAISession200Response.php index 9c1dfc6..d13855b 100644 --- a/src/Model/GetAISession200Response.php +++ b/src/Model/GetAISession200Response.php @@ -2,7 +2,7 @@ /** * GetAISession200Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -263,10 +263,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('id', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); diff --git a/src/Model/GetAIToolExecutionStatus200Response.php b/src/Model/GetAIToolExecutionStatus200Response.php index 2d4b90e..e4606db 100644 --- a/src/Model/GetAIToolExecutionStatus200Response.php +++ b/src/Model/GetAIToolExecutionStatus200Response.php @@ -2,7 +2,7 @@ /** * GetAIToolExecutionStatus200Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -287,10 +287,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('execution_id', $data ?? [], null); $this->setIfExists('tool_name', $data ?? [], null); diff --git a/src/Model/GetAIToolExecutionStatus200ResponseResult.php b/src/Model/GetAIToolExecutionStatus200ResponseResult.php index f261a8b..c551689 100644 --- a/src/Model/GetAIToolExecutionStatus200ResponseResult.php +++ b/src/Model/GetAIToolExecutionStatus200ResponseResult.php @@ -2,7 +2,7 @@ /** * GetAIToolExecutionStatus200ResponseResult * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -246,10 +246,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('images', $data ?? [], null); $this->setIfExists('s3_urls', $data ?? [], null); diff --git a/src/Model/GetAIToolExecutionStatus404Response.php b/src/Model/GetAIToolExecutionStatus404Response.php index 4793eee..8745209 100644 --- a/src/Model/GetAIToolExecutionStatus404Response.php +++ b/src/Model/GetAIToolExecutionStatus404Response.php @@ -2,7 +2,7 @@ /** * GetAIToolExecutionStatus404Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('error', $data ?? [], null); $this->setIfExists('execution_id', $data ?? [], null); diff --git a/src/Model/GetAIUsageStats200Response.php b/src/Model/GetAIUsageStats200Response.php index b01b032..972a8d6 100644 --- a/src/Model/GetAIUsageStats200Response.php +++ b/src/Model/GetAIUsageStats200Response.php @@ -2,7 +2,7 @@ /** * GetAIUsageStats200Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -251,10 +251,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('total_requests', $data ?? [], null); $this->setIfExists('total_tokens', $data ?? [], null); diff --git a/src/Model/GetAIUsageStats200ResponseByModelValue.php b/src/Model/GetAIUsageStats200ResponseByModelValue.php index 7ca8eb2..c5f9e89 100644 --- a/src/Model/GetAIUsageStats200ResponseByModelValue.php +++ b/src/Model/GetAIUsageStats200ResponseByModelValue.php @@ -2,7 +2,7 @@ /** * GetAIUsageStats200ResponseByModelValue * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('requests', $data ?? [], null); $this->setIfExists('tokens', $data ?? [], null); diff --git a/src/Model/GetEcrLoginCredentials200Response.php b/src/Model/GetEcrLoginCredentials200Response.php index a72bd51..6ac96d1 100644 --- a/src/Model/GetEcrLoginCredentials200Response.php +++ b/src/Model/GetEcrLoginCredentials200Response.php @@ -2,7 +2,7 @@ /** * GetEcrLoginCredentials200Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -257,10 +257,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('username', $data ?? [], null); $this->setIfExists('password', $data ?? [], null); diff --git a/src/Model/GetEnvironmentLogs200Response.php b/src/Model/GetEnvironmentLogs200Response.php index 2a86b9d..d8eaf65 100644 --- a/src/Model/GetEnvironmentLogs200Response.php +++ b/src/Model/GetEnvironmentLogs200Response.php @@ -2,7 +2,7 @@ /** * GetEnvironmentLogs200Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('log_events', $data ?? [], null); $this->setIfExists('next_token', $data ?? [], null); diff --git a/src/Model/GetEnvironmentLogs200ResponseLogEventsInner.php b/src/Model/GetEnvironmentLogs200ResponseLogEventsInner.php index 3b0cfc7..a0e6ce4 100644 --- a/src/Model/GetEnvironmentLogs200ResponseLogEventsInner.php +++ b/src/Model/GetEnvironmentLogs200ResponseLogEventsInner.php @@ -2,7 +2,7 @@ /** * GetEnvironmentLogs200ResponseLogEventsInner * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('timestamp', $data ?? [], null); $this->setIfExists('message', $data ?? [], null); diff --git a/src/Model/GetSshAccessCredentials200Response.php b/src/Model/GetSshAccessCredentials200Response.php index 37fcacf..149c1bb 100644 --- a/src/Model/GetSshAccessCredentials200Response.php +++ b/src/Model/GetSshAccessCredentials200Response.php @@ -2,7 +2,7 @@ /** * GetSshAccessCredentials200Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -287,10 +287,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('success', $data ?? [], null); $this->setIfExists('credentials', $data ?? [], null); diff --git a/src/Model/GetSshAccessCredentials200ResponseCredentials.php b/src/Model/GetSshAccessCredentials200ResponseCredentials.php index 79aa433..733217a 100644 --- a/src/Model/GetSshAccessCredentials200ResponseCredentials.php +++ b/src/Model/GetSshAccessCredentials200ResponseCredentials.php @@ -2,7 +2,7 @@ /** * GetSshAccessCredentials200ResponseCredentials * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -257,10 +257,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('access_key_id', $data ?? [], null); $this->setIfExists('secret_access_key', $data ?? [], null); diff --git a/src/Model/GetVectorCollection200Response.php b/src/Model/GetVectorCollection200Response.php index d775ee9..38728a1 100644 --- a/src/Model/GetVectorCollection200Response.php +++ b/src/Model/GetVectorCollection200Response.php @@ -2,7 +2,7 @@ /** * GetVectorCollection200Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('collection', $data ?? [], null); } diff --git a/src/Model/GetVectorCollection200ResponseCollection.php b/src/Model/GetVectorCollection200ResponseCollection.php index ddc30e0..f8dc8ce 100644 --- a/src/Model/GetVectorCollection200ResponseCollection.php +++ b/src/Model/GetVectorCollection200ResponseCollection.php @@ -2,7 +2,7 @@ /** * GetVectorCollection200ResponseCollection * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -281,10 +281,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('collection_id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/src/Model/ImageGeneration200Response.php b/src/Model/ImageGeneration200Response.php index bb0b007..8ca5498 100644 --- a/src/Model/ImageGeneration200Response.php +++ b/src/Model/ImageGeneration200Response.php @@ -2,7 +2,7 @@ /** * ImageGeneration200Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -251,10 +251,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('images', $data ?? [], null); $this->setIfExists('mask_image', $data ?? [], null); diff --git a/src/Model/ImageGenerationRequest.php b/src/Model/ImageGenerationRequest.php index 07169d2..639587e 100644 --- a/src/Model/ImageGenerationRequest.php +++ b/src/Model/ImageGenerationRequest.php @@ -2,7 +2,7 @@ /** * ImageGenerationRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -341,10 +341,10 @@ public function getRegionAllowableValues() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('model_id', $data ?? [], 'amazon.nova-canvas-v1:0'); $this->setIfExists('task_type', $data ?? [], null); diff --git a/src/Model/ImageGenerationRequestBackgroundRemovalParams.php b/src/Model/ImageGenerationRequestBackgroundRemovalParams.php index 22683f2..d62920b 100644 --- a/src/Model/ImageGenerationRequestBackgroundRemovalParams.php +++ b/src/Model/ImageGenerationRequestBackgroundRemovalParams.php @@ -2,7 +2,7 @@ /** * ImageGenerationRequestBackgroundRemovalParams * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -240,10 +240,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('image', $data ?? [], null); } diff --git a/src/Model/ImageGenerationRequestColorGuidedGenerationParams.php b/src/Model/ImageGenerationRequestColorGuidedGenerationParams.php index 51d4cf7..3b63736 100644 --- a/src/Model/ImageGenerationRequestColorGuidedGenerationParams.php +++ b/src/Model/ImageGenerationRequestColorGuidedGenerationParams.php @@ -2,7 +2,7 @@ /** * ImageGenerationRequestColorGuidedGenerationParams * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -258,10 +258,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('colors', $data ?? [], null); $this->setIfExists('reference_image', $data ?? [], null); diff --git a/src/Model/ImageGenerationRequestImageGenerationConfig.php b/src/Model/ImageGenerationRequestImageGenerationConfig.php index 5067a91..8bbf8e9 100644 --- a/src/Model/ImageGenerationRequestImageGenerationConfig.php +++ b/src/Model/ImageGenerationRequestImageGenerationConfig.php @@ -2,7 +2,7 @@ /** * ImageGenerationRequestImageGenerationConfig * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -285,10 +285,10 @@ public function getQualityAllowableValues() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('width', $data ?? [], null); $this->setIfExists('height', $data ?? [], null); diff --git a/src/Model/ImageGenerationRequestImageVariationParams.php b/src/Model/ImageGenerationRequestImageVariationParams.php index 94f7034..2723754 100644 --- a/src/Model/ImageGenerationRequestImageVariationParams.php +++ b/src/Model/ImageGenerationRequestImageVariationParams.php @@ -2,7 +2,7 @@ /** * ImageGenerationRequestImageVariationParams * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -258,10 +258,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('images', $data ?? [], null); $this->setIfExists('similarity_strength', $data ?? [], null); diff --git a/src/Model/ImageGenerationRequestInPaintingParams.php b/src/Model/ImageGenerationRequestInPaintingParams.php index 015455b..7a99279 100644 --- a/src/Model/ImageGenerationRequestInPaintingParams.php +++ b/src/Model/ImageGenerationRequestInPaintingParams.php @@ -2,7 +2,7 @@ /** * ImageGenerationRequestInPaintingParams * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -264,10 +264,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('image', $data ?? [], null); $this->setIfExists('mask_image', $data ?? [], null); diff --git a/src/Model/ImageGenerationRequestOutPaintingParams.php b/src/Model/ImageGenerationRequestOutPaintingParams.php index 08734ab..372b208 100644 --- a/src/Model/ImageGenerationRequestOutPaintingParams.php +++ b/src/Model/ImageGenerationRequestOutPaintingParams.php @@ -2,7 +2,7 @@ /** * ImageGenerationRequestOutPaintingParams * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -285,10 +285,10 @@ public function getOutPaintingModeAllowableValues() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('image', $data ?? [], null); $this->setIfExists('mask_image', $data ?? [], null); diff --git a/src/Model/ImageGenerationRequestTextToImageParams.php b/src/Model/ImageGenerationRequestTextToImageParams.php index ebe9238..6811824 100644 --- a/src/Model/ImageGenerationRequestTextToImageParams.php +++ b/src/Model/ImageGenerationRequestTextToImageParams.php @@ -2,7 +2,7 @@ /** * ImageGenerationRequestTextToImageParams * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -312,10 +312,10 @@ public function getControlModeAllowableValues() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('text', $data ?? [], null); $this->setIfExists('negative_text', $data ?? [], null); diff --git a/src/Model/KVItemsCreate200Response.php b/src/Model/KVItemsCreate200Response.php index c47c8de..9713b98 100644 --- a/src/Model/KVItemsCreate200Response.php +++ b/src/Model/KVItemsCreate200Response.php @@ -2,7 +2,7 @@ /** * KVItemsCreate200Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -251,10 +251,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('success', $data ?? [], null); $this->setIfExists('key', $data ?? [], null); diff --git a/src/Model/KVItemsDelete200Response.php b/src/Model/KVItemsDelete200Response.php index b5dc51a..6a4037d 100644 --- a/src/Model/KVItemsDelete200Response.php +++ b/src/Model/KVItemsDelete200Response.php @@ -2,7 +2,7 @@ /** * KVItemsDelete200Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('success', $data ?? [], null); $this->setIfExists('key', $data ?? [], null); diff --git a/src/Model/KVItemsShow200Response.php b/src/Model/KVItemsShow200Response.php index dadd610..11e684d 100644 --- a/src/Model/KVItemsShow200Response.php +++ b/src/Model/KVItemsShow200Response.php @@ -2,7 +2,7 @@ /** * KVItemsShow200Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('key', $data ?? [], null); $this->setIfExists('value', $data ?? [], null); diff --git a/src/Model/KVItemsShow200ResponseValue.php b/src/Model/KVItemsShow200ResponseValue.php index 81e346d..bd78693 100644 --- a/src/Model/KVItemsShow200ResponseValue.php +++ b/src/Model/KVItemsShow200ResponseValue.php @@ -2,7 +2,7 @@ /** * KVItemsShow200ResponseValue * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -240,10 +240,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { } diff --git a/src/Model/ListAIAgents200Response.php b/src/Model/ListAIAgents200Response.php index 171c454..3c3da9f 100644 --- a/src/Model/ListAIAgents200Response.php +++ b/src/Model/ListAIAgents200Response.php @@ -2,7 +2,7 @@ /** * ListAIAgents200Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('agents', $data ?? [], null); } diff --git a/src/Model/ListAIAgents200ResponseAgentsInner.php b/src/Model/ListAIAgents200ResponseAgentsInner.php index 707aa70..82e50ec 100644 --- a/src/Model/ListAIAgents200ResponseAgentsInner.php +++ b/src/Model/ListAIAgents200ResponseAgentsInner.php @@ -2,7 +2,7 @@ /** * ListAIAgents200ResponseAgentsInner * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -293,10 +293,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('agent_id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/src/Model/ListAIModels200Response.php b/src/Model/ListAIModels200Response.php index ce1b8ca..7d605e8 100644 --- a/src/Model/ListAIModels200Response.php +++ b/src/Model/ListAIModels200Response.php @@ -2,7 +2,7 @@ /** * ListAIModels200Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('count', $data ?? [], null); $this->setIfExists('models', $data ?? [], null); diff --git a/src/Model/ListAIModels200ResponseModelsInner.php b/src/Model/ListAIModels200ResponseModelsInner.php index 2afb77a..c621b3c 100644 --- a/src/Model/ListAIModels200ResponseModelsInner.php +++ b/src/Model/ListAIModels200ResponseModelsInner.php @@ -2,7 +2,7 @@ /** * ListAIModels200ResponseModelsInner * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -257,10 +257,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/src/Model/ListAIModels200ResponseModelsInnerCapabilities.php b/src/Model/ListAIModels200ResponseModelsInnerCapabilities.php index 7b14b09..ffac478 100644 --- a/src/Model/ListAIModels200ResponseModelsInnerCapabilities.php +++ b/src/Model/ListAIModels200ResponseModelsInnerCapabilities.php @@ -2,7 +2,7 @@ /** * ListAIModels200ResponseModelsInnerCapabilities * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -264,10 +264,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('text', $data ?? [], null); $this->setIfExists('multimodal', $data ?? [], null); diff --git a/src/Model/ListAISessions200ResponseInner.php b/src/Model/ListAISessions200ResponseInner.php index 92eb68a..27f6b11 100644 --- a/src/Model/ListAISessions200ResponseInner.php +++ b/src/Model/ListAISessions200ResponseInner.php @@ -2,7 +2,7 @@ /** * ListAISessions200ResponseInner * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -263,10 +263,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('id', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); diff --git a/src/Model/ListAIToolExecutions200Response.php b/src/Model/ListAIToolExecutions200Response.php index 84b9077..f40463c 100644 --- a/src/Model/ListAIToolExecutions200Response.php +++ b/src/Model/ListAIToolExecutions200Response.php @@ -2,7 +2,7 @@ /** * ListAIToolExecutions200Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -257,10 +257,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('executions', $data ?? [], null); $this->setIfExists('count', $data ?? [], null); diff --git a/src/Model/ListAIToolExecutions200ResponseExecutionsInner.php b/src/Model/ListAIToolExecutions200ResponseExecutionsInner.php index a616b7e..af1577b 100644 --- a/src/Model/ListAIToolExecutions200ResponseExecutionsInner.php +++ b/src/Model/ListAIToolExecutions200ResponseExecutionsInner.php @@ -2,7 +2,7 @@ /** * ListAIToolExecutions200ResponseExecutionsInner * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -263,10 +263,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('execution_id', $data ?? [], null); $this->setIfExists('tool_name', $data ?? [], null); diff --git a/src/Model/ListAIToolNames200Response.php b/src/Model/ListAIToolNames200Response.php index 7460f8c..230b88b 100644 --- a/src/Model/ListAIToolNames200Response.php +++ b/src/Model/ListAIToolNames200Response.php @@ -2,7 +2,7 @@ /** * ListAIToolNames200Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('tools', $data ?? [], null); $this->setIfExists('count', $data ?? [], null); diff --git a/src/Model/ListAITools200Response.php b/src/Model/ListAITools200Response.php index 0495953..5d8a6f9 100644 --- a/src/Model/ListAITools200Response.php +++ b/src/Model/ListAITools200Response.php @@ -2,7 +2,7 @@ /** * ListAITools200Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('tools', $data ?? [], null); $this->setIfExists('count', $data ?? [], null); diff --git a/src/Model/ListAITools200ResponseToolsInner.php b/src/Model/ListAITools200ResponseToolsInner.php index 7b88abc..067f65b 100644 --- a/src/Model/ListAITools200ResponseToolsInner.php +++ b/src/Model/ListAITools200ResponseToolsInner.php @@ -2,7 +2,7 @@ /** * ListAITools200ResponseToolsInner * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('tool_spec', $data ?? [], null); } diff --git a/src/Model/ListAITools200ResponseToolsInnerToolSpec.php b/src/Model/ListAITools200ResponseToolsInnerToolSpec.php index 7988841..9e2fdc2 100644 --- a/src/Model/ListAITools200ResponseToolsInnerToolSpec.php +++ b/src/Model/ListAITools200ResponseToolsInnerToolSpec.php @@ -2,7 +2,7 @@ /** * ListAITools200ResponseToolsInnerToolSpec * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -251,10 +251,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); diff --git a/src/Model/ListAITools200ResponseToolsInnerToolSpecInputSchema.php b/src/Model/ListAITools200ResponseToolsInnerToolSpecInputSchema.php index d2901d5..c1cda61 100644 --- a/src/Model/ListAITools200ResponseToolsInnerToolSpecInputSchema.php +++ b/src/Model/ListAITools200ResponseToolsInnerToolSpecInputSchema.php @@ -2,7 +2,7 @@ /** * ListAITools200ResponseToolsInnerToolSpecInputSchema * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('json', $data ?? [], null); } diff --git a/src/Model/ListBackups200Response.php b/src/Model/ListBackups200Response.php index f6cc65d..80a51f8 100644 --- a/src/Model/ListBackups200Response.php +++ b/src/Model/ListBackups200Response.php @@ -2,7 +2,7 @@ /** * ListBackups200Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -257,10 +257,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('backups', $data ?? [], null); $this->setIfExists('count', $data ?? [], null); diff --git a/src/Model/ListBackups200ResponseBackupsInner.php b/src/Model/ListBackups200ResponseBackupsInner.php index 4a7e9ed..3d6bb3f 100644 --- a/src/Model/ListBackups200ResponseBackupsInner.php +++ b/src/Model/ListBackups200ResponseBackupsInner.php @@ -2,7 +2,7 @@ /** * ListBackups200ResponseBackupsInner * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -311,10 +311,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('backup_id', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); diff --git a/src/Model/ListBackups422Response.php b/src/Model/ListBackups422Response.php index b4d4377..eef8c80 100644 --- a/src/Model/ListBackups422Response.php +++ b/src/Model/ListBackups422Response.php @@ -2,7 +2,7 @@ /** * ListBackups422Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('error', $data ?? [], null); } diff --git a/src/Model/ListCustomTools200Response.php b/src/Model/ListCustomTools200Response.php index fb3d56b..f03784a 100644 --- a/src/Model/ListCustomTools200Response.php +++ b/src/Model/ListCustomTools200Response.php @@ -2,7 +2,7 @@ /** * ListCustomTools200Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('tools', $data ?? [], null); $this->setIfExists('count', $data ?? [], null); diff --git a/src/Model/ListCustomTools200ResponseToolsInner.php b/src/Model/ListCustomTools200ResponseToolsInner.php index d0fbd37..28b3b9c 100644 --- a/src/Model/ListCustomTools200ResponseToolsInner.php +++ b/src/Model/ListCustomTools200ResponseToolsInner.php @@ -2,7 +2,7 @@ /** * ListCustomTools200ResponseToolsInner * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -269,10 +269,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); diff --git a/src/Model/ListVectorCollections200Response.php b/src/Model/ListVectorCollections200Response.php index 258fa3e..558bed0 100644 --- a/src/Model/ListVectorCollections200Response.php +++ b/src/Model/ListVectorCollections200Response.php @@ -2,7 +2,7 @@ /** * ListVectorCollections200Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('collections', $data ?? [], null); $this->setIfExists('count', $data ?? [], null); diff --git a/src/Model/ListVectorCollections200ResponseCollectionsInner.php b/src/Model/ListVectorCollections200ResponseCollectionsInner.php index 4b6b768..3f5caf3 100644 --- a/src/Model/ListVectorCollections200ResponseCollectionsInner.php +++ b/src/Model/ListVectorCollections200ResponseCollectionsInner.php @@ -2,7 +2,7 @@ /** * ListVectorCollections200ResponseCollectionsInner * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -269,10 +269,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('collection_id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/src/Model/ModelInterface.php b/src/Model/ModelInterface.php index 84ff2f8..f6d2660 100644 --- a/src/Model/ModelInterface.php +++ b/src/Model/ModelInterface.php @@ -2,7 +2,7 @@ /** * ModelInterface * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient\Model @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** diff --git a/src/Model/OrganizationsList200ResponseInner.php b/src/Model/OrganizationsList200ResponseInner.php index 54dd677..6b43650 100644 --- a/src/Model/OrganizationsList200ResponseInner.php +++ b/src/Model/OrganizationsList200ResponseInner.php @@ -2,7 +2,7 @@ /** * OrganizationsList200ResponseInner * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('machine_name', $data ?? [], null); diff --git a/src/Model/PatchEnvironmentCompose202Response.php b/src/Model/PatchEnvironmentCompose202Response.php index 8ea3c76..40c4edc 100644 --- a/src/Model/PatchEnvironmentCompose202Response.php +++ b/src/Model/PatchEnvironmentCompose202Response.php @@ -2,7 +2,7 @@ /** * PatchEnvironmentCompose202Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -287,10 +287,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('architecture', $data ?? [], null); $this->setIfExists('task_cpu', $data ?? [], null); diff --git a/src/Model/PatchEnvironmentCompose202ResponseSpotConfiguration.php b/src/Model/PatchEnvironmentCompose202ResponseSpotConfiguration.php index 254afc8..7338f1f 100644 --- a/src/Model/PatchEnvironmentCompose202ResponseSpotConfiguration.php +++ b/src/Model/PatchEnvironmentCompose202ResponseSpotConfiguration.php @@ -2,7 +2,7 @@ /** * PatchEnvironmentCompose202ResponseSpotConfiguration * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('strategy', $data ?? [], null); $this->setIfExists('tolerate_downtime', $data ?? [], null); diff --git a/src/Model/PatchEnvironmentCompose400Response.php b/src/Model/PatchEnvironmentCompose400Response.php index e965ab7..036f10e 100644 --- a/src/Model/PatchEnvironmentCompose400Response.php +++ b/src/Model/PatchEnvironmentCompose400Response.php @@ -2,7 +2,7 @@ /** * PatchEnvironmentCompose400Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('message', $data ?? [], null); $this->setIfExists('errors', $data ?? [], null); diff --git a/src/Model/PatchEnvironmentComposeRequest.php b/src/Model/PatchEnvironmentComposeRequest.php index 1bb5fc8..294074e 100644 --- a/src/Model/PatchEnvironmentComposeRequest.php +++ b/src/Model/PatchEnvironmentComposeRequest.php @@ -2,7 +2,7 @@ /** * PatchEnvironmentComposeRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -287,10 +287,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('architecture', $data ?? [], null); $this->setIfExists('task_cpu', $data ?? [], null); diff --git a/src/Model/PatchEnvironmentComposeRequestSpotConfiguration.php b/src/Model/PatchEnvironmentComposeRequestSpotConfiguration.php index 3551bb9..34cfc69 100644 --- a/src/Model/PatchEnvironmentComposeRequestSpotConfiguration.php +++ b/src/Model/PatchEnvironmentComposeRequestSpotConfiguration.php @@ -2,7 +2,7 @@ /** * PatchEnvironmentComposeRequestSpotConfiguration * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -258,10 +258,10 @@ public function getStrategyAllowableValues() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('strategy', $data ?? [], null); } diff --git a/src/Model/PurgeCreateRequest.php b/src/Model/PurgeCreateRequest.php index e4a19ec..c3e34eb 100644 --- a/src/Model/PurgeCreateRequest.php +++ b/src/Model/PurgeCreateRequest.php @@ -2,7 +2,7 @@ /** * PurgeCreateRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -257,10 +257,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('cache_keys', $data ?? [], null); $this->setIfExists('urls', $data ?? [], null); diff --git a/src/Model/QueryVectorCollection200Response.php b/src/Model/QueryVectorCollection200Response.php index d292aed..0f11129 100644 --- a/src/Model/QueryVectorCollection200Response.php +++ b/src/Model/QueryVectorCollection200Response.php @@ -2,7 +2,7 @@ /** * QueryVectorCollection200Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -257,10 +257,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('results', $data ?? [], null); $this->setIfExists('query', $data ?? [], null); diff --git a/src/Model/QueryVectorCollection200ResponseResultsInner.php b/src/Model/QueryVectorCollection200ResponseResultsInner.php index 9d35b5c..15b86f8 100644 --- a/src/Model/QueryVectorCollection200ResponseResultsInner.php +++ b/src/Model/QueryVectorCollection200ResponseResultsInner.php @@ -2,7 +2,7 @@ /** * QueryVectorCollection200ResponseResultsInner * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -251,10 +251,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('content', $data ?? [], null); $this->setIfExists('score', $data ?? [], null); diff --git a/src/Model/QueryVectorCollection200ResponseResultsInnerMetadata.php b/src/Model/QueryVectorCollection200ResponseResultsInnerMetadata.php index e8a0444..071a724 100644 --- a/src/Model/QueryVectorCollection200ResponseResultsInnerMetadata.php +++ b/src/Model/QueryVectorCollection200ResponseResultsInnerMetadata.php @@ -2,7 +2,7 @@ /** * QueryVectorCollection200ResponseResultsInnerMetadata * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -251,10 +251,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('title', $data ?? [], null); $this->setIfExists('source_url', $data ?? [], null); diff --git a/src/Model/QueryVectorCollectionRequest.php b/src/Model/QueryVectorCollectionRequest.php index 1a68a25..6d4f9a3 100644 --- a/src/Model/QueryVectorCollectionRequest.php +++ b/src/Model/QueryVectorCollectionRequest.php @@ -2,7 +2,7 @@ /** * QueryVectorCollectionRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('query', $data ?? [], null); $this->setIfExists('count', $data ?? [], 5); diff --git a/src/Model/ScalingPolicy.php b/src/Model/ScalingPolicy.php index 4d30a2f..495cd2f 100644 --- a/src/Model/ScalingPolicy.php +++ b/src/Model/ScalingPolicy.php @@ -2,7 +2,7 @@ /** * ScalingPolicy * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -274,10 +274,10 @@ public function getMetricAllowableValues() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('metric', $data ?? [], null); $this->setIfExists('target_value', $data ?? [], null); diff --git a/src/Model/SpotConfiguration.php b/src/Model/SpotConfiguration.php index 9e0acef..3c4fee5 100644 --- a/src/Model/SpotConfiguration.php +++ b/src/Model/SpotConfiguration.php @@ -2,7 +2,7 @@ /** * SpotConfiguration * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -259,10 +259,10 @@ public function getStrategyAllowableValues() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('strategy', $data ?? [], 'spot-only'); } diff --git a/src/Model/SyncOperation.php b/src/Model/SyncOperation.php index 6d0bbd8..5025cd3 100644 --- a/src/Model/SyncOperation.php +++ b/src/Model/SyncOperation.php @@ -2,7 +2,7 @@ /** * SyncOperation * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -275,10 +275,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('sync_id', $data ?? [], null); $this->setIfExists('sync_type', $data ?? [], null); diff --git a/src/Model/SyncToEnvironmentRequest.php b/src/Model/SyncToEnvironmentRequest.php index 5840d02..634f7b1 100644 --- a/src/Model/SyncToEnvironmentRequest.php +++ b/src/Model/SyncToEnvironmentRequest.php @@ -2,7 +2,7 @@ /** * SyncToEnvironmentRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('source_environment', $data ?? [], null); } diff --git a/src/Model/UpdateAIAgent200Response.php b/src/Model/UpdateAIAgent200Response.php index 17fe180..da3d1b8 100644 --- a/src/Model/UpdateAIAgent200Response.php +++ b/src/Model/UpdateAIAgent200Response.php @@ -2,7 +2,7 @@ /** * UpdateAIAgent200Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -251,10 +251,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('success', $data ?? [], null); $this->setIfExists('agent', $data ?? [], null); diff --git a/src/Model/UpdateAIAgentRequest.php b/src/Model/UpdateAIAgentRequest.php index c383575..032d9c9 100644 --- a/src/Model/UpdateAIAgentRequest.php +++ b/src/Model/UpdateAIAgentRequest.php @@ -2,7 +2,7 @@ /** * UpdateAIAgentRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -287,10 +287,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); diff --git a/src/Model/UpdateAISession200Response.php b/src/Model/UpdateAISession200Response.php index 007e19d..406ec43 100644 --- a/src/Model/UpdateAISession200Response.php +++ b/src/Model/UpdateAISession200Response.php @@ -2,7 +2,7 @@ /** * UpdateAISession200Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -263,10 +263,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('session_id', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); diff --git a/src/Model/UpdateAISessionRequest.php b/src/Model/UpdateAISessionRequest.php index 2404bc8..4e54b49 100644 --- a/src/Model/UpdateAISessionRequest.php +++ b/src/Model/UpdateAISessionRequest.php @@ -2,7 +2,7 @@ /** * UpdateAISessionRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -272,10 +272,10 @@ public function getStatusAllowableValues() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('new_messages', $data ?? [], null); $this->setIfExists('tokens_used', $data ?? [], null); diff --git a/src/Model/UpdateAISessionRequestNewMessagesInner.php b/src/Model/UpdateAISessionRequestNewMessagesInner.php index d2ad7c6..35d8ae9 100644 --- a/src/Model/UpdateAISessionRequestNewMessagesInner.php +++ b/src/Model/UpdateAISessionRequestNewMessagesInner.php @@ -2,7 +2,7 @@ /** * UpdateAISessionRequestNewMessagesInner * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -260,10 +260,10 @@ public function getRoleAllowableValues() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('role', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); diff --git a/src/Model/UpdateCronJobRequest.php b/src/Model/UpdateCronJobRequest.php index 3d378c5..d6801f1 100644 --- a/src/Model/UpdateCronJobRequest.php +++ b/src/Model/UpdateCronJobRequest.php @@ -2,7 +2,7 @@ /** * UpdateCronJobRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -263,10 +263,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('description', $data ?? [], null); $this->setIfExists('schedule_expression', $data ?? [], null); diff --git a/src/Model/UpdateEnvironmentRequest.php b/src/Model/UpdateEnvironmentRequest.php index f839b3b..e0b0f3d 100644 --- a/src/Model/UpdateEnvironmentRequest.php +++ b/src/Model/UpdateEnvironmentRequest.php @@ -2,7 +2,7 @@ /** * UpdateEnvironmentRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -251,10 +251,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('compose_definition', $data ?? [], null); $this->setIfExists('min_capacity', $data ?? [], null); diff --git a/src/Model/UpdateEnvironmentStateRequest.php b/src/Model/UpdateEnvironmentStateRequest.php index cefbff0..0ebd84d 100644 --- a/src/Model/UpdateEnvironmentStateRequest.php +++ b/src/Model/UpdateEnvironmentStateRequest.php @@ -2,7 +2,7 @@ /** * UpdateEnvironmentStateRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('action', $data ?? [], null); $this->setIfExists('image_tag', $data ?? [], null); diff --git a/src/Model/UpdateEnvironmentVariableRequest.php b/src/Model/UpdateEnvironmentVariableRequest.php index 531d320..34d9a98 100644 --- a/src/Model/UpdateEnvironmentVariableRequest.php +++ b/src/Model/UpdateEnvironmentVariableRequest.php @@ -2,7 +2,7 @@ /** * UpdateEnvironmentVariableRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('value', $data ?? [], null); } diff --git a/src/Model/UploadVectorDocuments200Response.php b/src/Model/UploadVectorDocuments200Response.php index e736d31..3b3af94 100644 --- a/src/Model/UploadVectorDocuments200Response.php +++ b/src/Model/UploadVectorDocuments200Response.php @@ -2,7 +2,7 @@ /** * UploadVectorDocuments200Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -257,10 +257,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('success', $data ?? [], null); $this->setIfExists('document_ids', $data ?? [], null); diff --git a/src/Model/UploadVectorDocumentsRequest.php b/src/Model/UploadVectorDocumentsRequest.php index aa4232d..2e410f4 100644 --- a/src/Model/UploadVectorDocumentsRequest.php +++ b/src/Model/UploadVectorDocumentsRequest.php @@ -2,7 +2,7 @@ /** * UploadVectorDocumentsRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('documents', $data ?? [], null); } diff --git a/src/Model/UploadVectorDocumentsRequestDocumentsInner.php b/src/Model/UploadVectorDocumentsRequestDocumentsInner.php index f98aad2..9be16e0 100644 --- a/src/Model/UploadVectorDocumentsRequestDocumentsInner.php +++ b/src/Model/UploadVectorDocumentsRequestDocumentsInner.php @@ -2,7 +2,7 @@ /** * UploadVectorDocumentsRequestDocumentsInner * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('content', $data ?? [], null); $this->setIfExists('metadata', $data ?? [], null); diff --git a/src/Model/UploadVectorDocumentsRequestDocumentsInnerMetadata.php b/src/Model/UploadVectorDocumentsRequestDocumentsInnerMetadata.php index dc5f959..0d43926 100644 --- a/src/Model/UploadVectorDocumentsRequestDocumentsInnerMetadata.php +++ b/src/Model/UploadVectorDocumentsRequestDocumentsInnerMetadata.php @@ -2,7 +2,7 @@ /** * UploadVectorDocumentsRequestDocumentsInnerMetadata * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -257,10 +257,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('title', $data ?? [], null); $this->setIfExists('source_url', $data ?? [], null); diff --git a/src/Model/V1ContentItem.php b/src/Model/V1ContentItem.php index 7e69e2e..f68ef68 100644 --- a/src/Model/V1ContentItem.php +++ b/src/Model/V1ContentItem.php @@ -2,7 +2,7 @@ /** * V1ContentItem * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -269,10 +269,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('url', $data ?? [], null); $this->setIfExists('date_timestamp', $data ?? [], null); diff --git a/src/Model/V1ContentListResponse.php b/src/Model/V1ContentListResponse.php index eb02f2d..54d8001 100644 --- a/src/Model/V1ContentListResponse.php +++ b/src/Model/V1ContentListResponse.php @@ -2,7 +2,7 @@ /** * V1ContentListResponse * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -257,10 +257,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('draw', $data ?? [], null); $this->setIfExists('i_total_records', $data ?? [], null); diff --git a/src/Model/V1ContentRequest.php b/src/Model/V1ContentRequest.php index 0b8ca3b..99bdb7c 100644 --- a/src/Model/V1ContentRequest.php +++ b/src/Model/V1ContentRequest.php @@ -2,7 +2,7 @@ /** * V1ContentRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -269,10 +269,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('url', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); diff --git a/src/Model/V1DeleteResponse.php b/src/Model/V1DeleteResponse.php index d79437a..a790b6b 100644 --- a/src/Model/V1DeleteResponse.php +++ b/src/Model/V1DeleteResponse.php @@ -2,7 +2,7 @@ /** * V1DeleteResponse * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -251,10 +251,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('error', $data ?? [], null); $this->setIfExists('errors', $data ?? [], null); diff --git a/src/Model/V1Error.php b/src/Model/V1Error.php index a79c9b8..7efbba6 100644 --- a/src/Model/V1Error.php +++ b/src/Model/V1Error.php @@ -2,7 +2,7 @@ /** * V1Error * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('error', $data ?? [], null); $this->setIfExists('message', $data ?? [], null); diff --git a/src/Model/V1FormSubmissionItem.php b/src/Model/V1FormSubmissionItem.php index 5cfc683..446a4b3 100644 --- a/src/Model/V1FormSubmissionItem.php +++ b/src/Model/V1FormSubmissionItem.php @@ -2,7 +2,7 @@ /** * V1FormSubmissionItem * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -269,10 +269,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('uuid', $data ?? [], null); $this->setIfExists('country_ip', $data ?? [], null); diff --git a/src/Model/V1FormSubmissionListResponse.php b/src/Model/V1FormSubmissionListResponse.php index 51e7bf8..306546b 100644 --- a/src/Model/V1FormSubmissionListResponse.php +++ b/src/Model/V1FormSubmissionListResponse.php @@ -2,7 +2,7 @@ /** * V1FormSubmissionListResponse * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -257,10 +257,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('draw', $data ?? [], null); $this->setIfExists('i_total_records', $data ?? [], null); diff --git a/src/Model/V1GetMetricSeriesResponse.php b/src/Model/V1GetMetricSeriesResponse.php index c4c886b..cf765f0 100644 --- a/src/Model/V1GetMetricSeriesResponse.php +++ b/src/Model/V1GetMetricSeriesResponse.php @@ -2,7 +2,7 @@ /** * V1GetMetricSeriesResponse * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('success', $data ?? [], null); $this->setIfExists('data', $data ?? [], null); diff --git a/src/Model/V1GetMetricSeriesResponseData.php b/src/Model/V1GetMetricSeriesResponseData.php index 097680a..3da903c 100644 --- a/src/Model/V1GetMetricSeriesResponseData.php +++ b/src/Model/V1GetMetricSeriesResponseData.php @@ -2,7 +2,7 @@ /** * V1GetMetricSeriesResponseData * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { } diff --git a/src/Model/V1GetMetricsResponse.php b/src/Model/V1GetMetricsResponse.php index a964d7b..e8d8ab1 100644 --- a/src/Model/V1GetMetricsResponse.php +++ b/src/Model/V1GetMetricsResponse.php @@ -2,7 +2,7 @@ /** * V1GetMetricsResponse * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('success', $data ?? [], null); $this->setIfExists('data', $data ?? [], null); diff --git a/src/Model/V1GetMetricsResponseData.php b/src/Model/V1GetMetricsResponseData.php index 43a3331..3fac4f6 100644 --- a/src/Model/V1GetMetricsResponseData.php +++ b/src/Model/V1GetMetricsResponseData.php @@ -2,7 +2,7 @@ /** * V1GetMetricsResponseData * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { } diff --git a/src/Model/V1GlobalMetaResponse.php b/src/Model/V1GlobalMetaResponse.php index 8fc2857..5ce4f79 100644 --- a/src/Model/V1GlobalMetaResponse.php +++ b/src/Model/V1GlobalMetaResponse.php @@ -2,7 +2,7 @@ /** * V1GlobalMetaResponse * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -269,10 +269,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('global_meta', $data ?? [], null); $this->setIfExists('total_records', $data ?? [], null); diff --git a/src/Model/V1GlobalMetaResponseGlobalMeta.php b/src/Model/V1GlobalMetaResponseGlobalMeta.php index 4a57223..5364e3c 100644 --- a/src/Model/V1GlobalMetaResponseGlobalMeta.php +++ b/src/Model/V1GlobalMetaResponseGlobalMeta.php @@ -2,7 +2,7 @@ /** * V1GlobalMetaResponseGlobalMeta * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('records', $data ?? [], null); } diff --git a/src/Model/V1Info.php b/src/Model/V1Info.php index 20fca35..df46225 100644 --- a/src/Model/V1Info.php +++ b/src/Model/V1Info.php @@ -2,7 +2,7 @@ /** * V1Info * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -275,10 +275,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('author_user', $data ?? [], null); $this->setIfExists('author_name', $data ?? [], null); diff --git a/src/Model/V1Meta.php b/src/Model/V1Meta.php index 4121a9c..686fc2c 100644 --- a/src/Model/V1Meta.php +++ b/src/Model/V1Meta.php @@ -2,7 +2,7 @@ /** * V1Meta * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -317,10 +317,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('url', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); diff --git a/src/Model/V1MetricDayStats.php b/src/Model/V1MetricDayStats.php index 38a4c70..8519b4e 100644 --- a/src/Model/V1MetricDayStats.php +++ b/src/Model/V1MetricDayStats.php @@ -2,7 +2,7 @@ /** * V1MetricDayStats * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -257,10 +257,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('total', $data ?? [], null); $this->setIfExists('day_total', $data ?? [], null); diff --git a/src/Model/V1MetricMinuteStats.php b/src/Model/V1MetricMinuteStats.php index 493c278..01ac1d8 100644 --- a/src/Model/V1MetricMinuteStats.php +++ b/src/Model/V1MetricMinuteStats.php @@ -2,7 +2,7 @@ /** * V1MetricMinuteStats * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -257,10 +257,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('total', $data ?? [], null); $this->setIfExists('minute_total', $data ?? [], null); diff --git a/src/Model/V1MetricMonthStats.php b/src/Model/V1MetricMonthStats.php index e6a8ebc..7242a18 100644 --- a/src/Model/V1MetricMonthStats.php +++ b/src/Model/V1MetricMonthStats.php @@ -2,7 +2,7 @@ /** * V1MetricMonthStats * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -257,10 +257,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('total', $data ?? [], null); $this->setIfExists('month_total', $data ?? [], null); diff --git a/src/Model/V1PingResponse.php b/src/Model/V1PingResponse.php index 15a77b8..ba1dcfa 100644 --- a/src/Model/V1PingResponse.php +++ b/src/Model/V1PingResponse.php @@ -2,7 +2,7 @@ /** * V1PingResponse * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('config', $data ?? [], null); $this->setIfExists('project', $data ?? [], null); diff --git a/src/Model/V1ProxyItem.php b/src/Model/V1ProxyItem.php index dbf4efd..3dd10f7 100644 --- a/src/Model/V1ProxyItem.php +++ b/src/Model/V1ProxyItem.php @@ -2,7 +2,7 @@ /** * V1ProxyItem * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -263,10 +263,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('url', $data ?? [], null); $this->setIfExists('proxy_url', $data ?? [], null); diff --git a/src/Model/V1ProxyListResponse.php b/src/Model/V1ProxyListResponse.php index 8f92a27..1245eb7 100644 --- a/src/Model/V1ProxyListResponse.php +++ b/src/Model/V1ProxyListResponse.php @@ -2,7 +2,7 @@ /** * V1ProxyListResponse * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -257,10 +257,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('draw', $data ?? [], null); $this->setIfExists('i_total_records', $data ?? [], null); diff --git a/src/Model/V1RedirectItem.php b/src/Model/V1RedirectItem.php index 730fbb5..8402a14 100644 --- a/src/Model/V1RedirectItem.php +++ b/src/Model/V1RedirectItem.php @@ -2,7 +2,7 @@ /** * V1RedirectItem * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -269,10 +269,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('url', $data ?? [], null); $this->setIfExists('redirect_url', $data ?? [], null); diff --git a/src/Model/V1RedirectListResponse.php b/src/Model/V1RedirectListResponse.php index 2f1a6d4..d4226e3 100644 --- a/src/Model/V1RedirectListResponse.php +++ b/src/Model/V1RedirectListResponse.php @@ -2,7 +2,7 @@ /** * V1RedirectListResponse * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -257,10 +257,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('draw', $data ?? [], null); $this->setIfExists('i_total_records', $data ?? [], null); diff --git a/src/Model/V1RedirectRequest.php b/src/Model/V1RedirectRequest.php index e3e72c5..0af4651 100644 --- a/src/Model/V1RedirectRequest.php +++ b/src/Model/V1RedirectRequest.php @@ -2,7 +2,7 @@ /** * V1RedirectRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -275,10 +275,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('url', $data ?? [], null); $this->setIfExists('redirect_url', $data ?? [], null); diff --git a/src/Model/V1RedirectResponse.php b/src/Model/V1RedirectResponse.php index 15475d4..e16e6ba 100644 --- a/src/Model/V1RedirectResponse.php +++ b/src/Model/V1RedirectResponse.php @@ -2,7 +2,7 @@ /** * V1RedirectResponse * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -305,10 +305,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('md5', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); diff --git a/src/Model/V1Revision.php b/src/Model/V1Revision.php index e8e89fc..2903ee7 100644 --- a/src/Model/V1Revision.php +++ b/src/Model/V1Revision.php @@ -2,7 +2,7 @@ /** * V1Revision * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -287,10 +287,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('md5', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); diff --git a/src/Model/V1RevisionsResponse.php b/src/Model/V1RevisionsResponse.php index 94d97c3..4cc4b91 100644 --- a/src/Model/V1RevisionsResponse.php +++ b/src/Model/V1RevisionsResponse.php @@ -2,7 +2,7 @@ /** * V1RevisionsResponse * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -275,10 +275,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('revisions', $data ?? [], null); $this->setIfExists('url', $data ?? [], null); diff --git a/src/Model/V1SearchHit.php b/src/Model/V1SearchHit.php index 1a30d3d..7fa6c61 100644 --- a/src/Model/V1SearchHit.php +++ b/src/Model/V1SearchHit.php @@ -2,7 +2,7 @@ /** * V1SearchHit * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -270,10 +270,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('title', $data ?? [], null); $this->setIfExists('url', $data ?? [], null); diff --git a/src/Model/V1SearchItemsResponse.php b/src/Model/V1SearchItemsResponse.php index c9b6cba..79bf9fb 100644 --- a/src/Model/V1SearchItemsResponse.php +++ b/src/Model/V1SearchItemsResponse.php @@ -2,7 +2,7 @@ /** * V1SearchItemsResponse * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('hits', $data ?? [], null); $this->setIfExists('nb_pages', $data ?? [], null); diff --git a/src/Model/V1SearchMutationResponse.php b/src/Model/V1SearchMutationResponse.php index f2c009e..0b1484d 100644 --- a/src/Model/V1SearchMutationResponse.php +++ b/src/Model/V1SearchMutationResponse.php @@ -2,7 +2,7 @@ /** * V1SearchMutationResponse * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -251,10 +251,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('success', $data ?? [], null); $this->setIfExists('message', $data ?? [], null); diff --git a/src/Model/V1SearchRecord.php b/src/Model/V1SearchRecord.php index 90cdac4..fe3b873 100644 --- a/src/Model/V1SearchRecord.php +++ b/src/Model/V1SearchRecord.php @@ -2,7 +2,7 @@ /** * V1SearchRecord * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -257,10 +257,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('title', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); diff --git a/src/Model/V1SearchResponse.php b/src/Model/V1SearchResponse.php index b6a1ec4..1dc488b 100644 --- a/src/Model/V1SearchResponse.php +++ b/src/Model/V1SearchResponse.php @@ -2,7 +2,7 @@ /** * V1SearchResponse * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('settings', $data ?? [], null); $this->setIfExists('index', $data ?? [], null); diff --git a/src/Model/V1SeriesPointDay.php b/src/Model/V1SeriesPointDay.php index a53a921..3876d1f 100644 --- a/src/Model/V1SeriesPointDay.php +++ b/src/Model/V1SeriesPointDay.php @@ -2,7 +2,7 @@ /** * V1SeriesPointDay * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('x', $data ?? [], null); $this->setIfExists('y', $data ?? [], null); diff --git a/src/Model/V1SeriesPointMonth.php b/src/Model/V1SeriesPointMonth.php index 7946b19..343ecd2 100644 --- a/src/Model/V1SeriesPointMonth.php +++ b/src/Model/V1SeriesPointMonth.php @@ -2,7 +2,7 @@ /** * V1SeriesPointMonth * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('x', $data ?? [], null); $this->setIfExists('y', $data ?? [], null); diff --git a/src/Model/V1Transition.php b/src/Model/V1Transition.php index 3f6346b..ff0f9f1 100644 --- a/src/Model/V1Transition.php +++ b/src/Model/V1Transition.php @@ -2,7 +2,7 @@ /** * V1Transition * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -260,10 +260,10 @@ public function getStateAllowableValues() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('state', $data ?? [], null); $this->setIfExists('date_timestamp', $data ?? [], null); diff --git a/src/Model/V1UploadResponse.php b/src/Model/V1UploadResponse.php index c956495..8f999ca 100644 --- a/src/Model/V1UploadResponse.php +++ b/src/Model/V1UploadResponse.php @@ -2,7 +2,7 @@ /** * V1UploadResponse * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('success', $data ?? [], null); $this->setIfExists('url', $data ?? [], null); diff --git a/src/Model/V1UrlMetaRequest.php b/src/Model/V1UrlMetaRequest.php index f3b96f8..12c1fb6 100644 --- a/src/Model/V1UrlMetaRequest.php +++ b/src/Model/V1UrlMetaRequest.php @@ -2,7 +2,7 @@ /** * V1UrlMetaRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('quant_url', $data ?? [], null); } diff --git a/src/Model/V1UrlMetaResponse.php b/src/Model/V1UrlMetaResponse.php index ea0f381..8fda2ce 100644 --- a/src/Model/V1UrlMetaResponse.php +++ b/src/Model/V1UrlMetaResponse.php @@ -2,7 +2,7 @@ /** * V1UrlMetaResponse * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('global_meta', $data ?? [], null); } diff --git a/src/Model/V1WafLogItem.php b/src/Model/V1WafLogItem.php index 50cc2b8..f844630 100644 --- a/src/Model/V1WafLogItem.php +++ b/src/Model/V1WafLogItem.php @@ -2,7 +2,7 @@ /** * V1WafLogItem * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -299,10 +299,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('timestamp', $data ?? [], null); $this->setIfExists('ip_address', $data ?? [], null); diff --git a/src/Model/V1WafLogListResponse.php b/src/Model/V1WafLogListResponse.php index 6134bc8..50e7733 100644 --- a/src/Model/V1WafLogListResponse.php +++ b/src/Model/V1WafLogListResponse.php @@ -2,7 +2,7 @@ /** * V1WafLogListResponse * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -257,10 +257,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('draw', $data ?? [], null); $this->setIfExists('i_total_records', $data ?? [], null); diff --git a/src/Model/V2Crawler.php b/src/Model/V2Crawler.php index 06e7ebb..40d68e3 100644 --- a/src/Model/V2Crawler.php +++ b/src/Model/V2Crawler.php @@ -2,7 +2,7 @@ /** * V2Crawler * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -419,10 +419,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/src/Model/V2CrawlerAssets.php b/src/Model/V2CrawlerAssets.php index 510f0da..10d9ad6 100644 --- a/src/Model/V2CrawlerAssets.php +++ b/src/Model/V2CrawlerAssets.php @@ -2,7 +2,7 @@ /** * V2CrawlerAssets * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -246,10 +246,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('network_intercept', $data ?? [], null); $this->setIfExists('parser', $data ?? [], null); diff --git a/src/Model/V2CrawlerAssetsNetworkIntercept.php b/src/Model/V2CrawlerAssetsNetworkIntercept.php index 3760149..ec33499 100644 --- a/src/Model/V2CrawlerAssetsNetworkIntercept.php +++ b/src/Model/V2CrawlerAssetsNetworkIntercept.php @@ -2,7 +2,7 @@ /** * V2CrawlerAssetsNetworkIntercept * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -252,10 +252,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('enabled', $data ?? [], null); $this->setIfExists('timeout', $data ?? [], null); diff --git a/src/Model/V2CrawlerAssetsParser.php b/src/Model/V2CrawlerAssetsParser.php index 776c6d5..1caf0a2 100644 --- a/src/Model/V2CrawlerAssetsParser.php +++ b/src/Model/V2CrawlerAssetsParser.php @@ -2,7 +2,7 @@ /** * V2CrawlerAssetsParser * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -240,10 +240,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('enabled', $data ?? [], null); } diff --git a/src/Model/V2CrawlerRequest.php b/src/Model/V2CrawlerRequest.php index c459ab5..ab08b89 100644 --- a/src/Model/V2CrawlerRequest.php +++ b/src/Model/V2CrawlerRequest.php @@ -2,7 +2,7 @@ /** * V2CrawlerRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -365,10 +365,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('domain', $data ?? [], null); diff --git a/src/Model/V2CrawlerRun.php b/src/Model/V2CrawlerRun.php index 2ee191a..e1b79bb 100644 --- a/src/Model/V2CrawlerRun.php +++ b/src/Model/V2CrawlerRun.php @@ -2,7 +2,7 @@ /** * V2CrawlerRun * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -287,10 +287,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('id', $data ?? [], null); $this->setIfExists('crawler_config_id', $data ?? [], null); diff --git a/src/Model/V2CrawlerSchedule.php b/src/Model/V2CrawlerSchedule.php index 1513b2e..e47f4c7 100644 --- a/src/Model/V2CrawlerSchedule.php +++ b/src/Model/V2CrawlerSchedule.php @@ -2,7 +2,7 @@ /** * V2CrawlerSchedule * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -287,10 +287,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/src/Model/V2CrawlerScheduleRequest.php b/src/Model/V2CrawlerScheduleRequest.php index 533e33a..1bd8fd1 100644 --- a/src/Model/V2CrawlerScheduleRequest.php +++ b/src/Model/V2CrawlerScheduleRequest.php @@ -2,7 +2,7 @@ /** * V2CrawlerScheduleRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('schedule_cron_string', $data ?? [], null); diff --git a/src/Model/V2CrawlerSitemapInner.php b/src/Model/V2CrawlerSitemapInner.php index 41abde7..c2f4451 100644 --- a/src/Model/V2CrawlerSitemapInner.php +++ b/src/Model/V2CrawlerSitemapInner.php @@ -2,7 +2,7 @@ /** * V2CrawlerSitemapInner * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('url', $data ?? [], null); $this->setIfExists('recursive', $data ?? [], null); diff --git a/src/Model/V2CustomHeaderRequest.php b/src/Model/V2CustomHeaderRequest.php index 713930e..e4a7460 100644 --- a/src/Model/V2CustomHeaderRequest.php +++ b/src/Model/V2CustomHeaderRequest.php @@ -2,7 +2,7 @@ /** * V2CustomHeaderRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('headers', $data ?? [], null); } diff --git a/src/Model/V2Domain.php b/src/Model/V2Domain.php index 8608c01..7d00d42 100644 --- a/src/Model/V2Domain.php +++ b/src/Model/V2Domain.php @@ -2,7 +2,7 @@ /** * V2Domain * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -263,10 +263,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('id', $data ?? [], null); $this->setIfExists('domain', $data ?? [], null); diff --git a/src/Model/V2DomainDnsGoLiveRecordsInner.php b/src/Model/V2DomainDnsGoLiveRecordsInner.php index 74bd22d..d417a9e 100644 --- a/src/Model/V2DomainDnsGoLiveRecordsInner.php +++ b/src/Model/V2DomainDnsGoLiveRecordsInner.php @@ -2,7 +2,7 @@ /** * V2DomainDnsGoLiveRecordsInner * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -257,10 +257,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('type', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/src/Model/V2DomainDnsValidationRecordsInner.php b/src/Model/V2DomainDnsValidationRecordsInner.php index 04f6167..18ffc9a 100644 --- a/src/Model/V2DomainDnsValidationRecordsInner.php +++ b/src/Model/V2DomainDnsValidationRecordsInner.php @@ -2,7 +2,7 @@ /** * V2DomainDnsValidationRecordsInner * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -251,10 +251,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); diff --git a/src/Model/V2DomainRequest.php b/src/Model/V2DomainRequest.php index 74abd6a..0d4aa4f 100644 --- a/src/Model/V2DomainRequest.php +++ b/src/Model/V2DomainRequest.php @@ -2,7 +2,7 @@ /** * V2DomainRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('domain', $data ?? [], null); } diff --git a/src/Model/V2Error.php b/src/Model/V2Error.php index 86eed61..8af471b 100644 --- a/src/Model/V2Error.php +++ b/src/Model/V2Error.php @@ -2,7 +2,7 @@ /** * V2Error * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('message', $data ?? [], null); $this->setIfExists('error', $data ?? [], null); diff --git a/src/Model/V2Organization.php b/src/Model/V2Organization.php index 3280763..876ed19 100644 --- a/src/Model/V2Organization.php +++ b/src/Model/V2Organization.php @@ -2,7 +2,7 @@ /** * V2Organization * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -275,10 +275,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('machine_name', $data ?? [], null); diff --git a/src/Model/V2OrganizationRequest.php b/src/Model/V2OrganizationRequest.php index 140f58e..483bc56 100644 --- a/src/Model/V2OrganizationRequest.php +++ b/src/Model/V2OrganizationRequest.php @@ -2,7 +2,7 @@ /** * V2OrganizationRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('machine_name', $data ?? [], null); diff --git a/src/Model/V2Project.php b/src/Model/V2Project.php index dabe7e9..f65ca63 100644 --- a/src/Model/V2Project.php +++ b/src/Model/V2Project.php @@ -2,7 +2,7 @@ /** * V2Project * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -263,10 +263,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('id', $data ?? [], null); $this->setIfExists('uuid', $data ?? [], null); diff --git a/src/Model/V2ProjectRequest.php b/src/Model/V2ProjectRequest.php index debe0d0..49a2191 100644 --- a/src/Model/V2ProjectRequest.php +++ b/src/Model/V2ProjectRequest.php @@ -2,7 +2,7 @@ /** * V2ProjectRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -281,10 +281,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('machine_name', $data ?? [], null); diff --git a/src/Model/V2Rule.php b/src/Model/V2Rule.php index 74e0394..6199cd8 100644 --- a/src/Model/V2Rule.php +++ b/src/Model/V2Rule.php @@ -2,7 +2,7 @@ /** * V2Rule * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -341,10 +341,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('uuid', $data ?? [], null); diff --git a/src/Model/V2RuleAuth.php b/src/Model/V2RuleAuth.php index 73b4732..788c4fd 100644 --- a/src/Model/V2RuleAuth.php +++ b/src/Model/V2RuleAuth.php @@ -2,7 +2,7 @@ /** * V2RuleAuth * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -347,10 +347,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('uuid', $data ?? [], null); diff --git a/src/Model/V2RuleAuthAction.php b/src/Model/V2RuleAuthAction.php index 9a5641e..d8c176b 100644 --- a/src/Model/V2RuleAuthAction.php +++ b/src/Model/V2RuleAuthAction.php @@ -2,7 +2,7 @@ /** * V2RuleAuthAction * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('auth_user', $data ?? [], null); $this->setIfExists('auth_pass', $data ?? [], null); diff --git a/src/Model/V2RuleAuthRequest.php b/src/Model/V2RuleAuthRequest.php index 6eacae5..fccbc95 100644 --- a/src/Model/V2RuleAuthRequest.php +++ b/src/Model/V2RuleAuthRequest.php @@ -2,7 +2,7 @@ /** * V2RuleAuthRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -335,10 +335,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('domain', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/src/Model/V2RuleBotChallenge.php b/src/Model/V2RuleBotChallenge.php index 727e96e..7558da9 100644 --- a/src/Model/V2RuleBotChallenge.php +++ b/src/Model/V2RuleBotChallenge.php @@ -2,7 +2,7 @@ /** * V2RuleBotChallenge * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -347,10 +347,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('uuid', $data ?? [], null); diff --git a/src/Model/V2RuleBotChallengeAction.php b/src/Model/V2RuleBotChallengeAction.php index 108401f..b802b42 100644 --- a/src/Model/V2RuleBotChallengeAction.php +++ b/src/Model/V2RuleBotChallengeAction.php @@ -2,7 +2,7 @@ /** * V2RuleBotChallengeAction * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -251,10 +251,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('robot_challenge_type', $data ?? [], null); $this->setIfExists('robot_challenge_verification_ttl', $data ?? [], 10800); diff --git a/src/Model/V2RuleBotChallengeRequest.php b/src/Model/V2RuleBotChallengeRequest.php index eed72c7..613b296 100644 --- a/src/Model/V2RuleBotChallengeRequest.php +++ b/src/Model/V2RuleBotChallengeRequest.php @@ -2,7 +2,7 @@ /** * V2RuleBotChallengeRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -341,10 +341,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('domain', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/src/Model/V2RuleContentFilter.php b/src/Model/V2RuleContentFilter.php index 38b9c0b..d6b1f29 100644 --- a/src/Model/V2RuleContentFilter.php +++ b/src/Model/V2RuleContentFilter.php @@ -2,7 +2,7 @@ /** * V2RuleContentFilter * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -347,10 +347,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('uuid', $data ?? [], null); diff --git a/src/Model/V2RuleContentFilterAction.php b/src/Model/V2RuleContentFilterAction.php index 88d9c5c..b57d64b 100644 --- a/src/Model/V2RuleContentFilterAction.php +++ b/src/Model/V2RuleContentFilterAction.php @@ -2,7 +2,7 @@ /** * V2RuleContentFilterAction * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('fn_uuid', $data ?? [], null); } diff --git a/src/Model/V2RuleContentFilterRequest.php b/src/Model/V2RuleContentFilterRequest.php index a88b1bc..d06ce0d 100644 --- a/src/Model/V2RuleContentFilterRequest.php +++ b/src/Model/V2RuleContentFilterRequest.php @@ -2,7 +2,7 @@ /** * V2RuleContentFilterRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -329,10 +329,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('domain', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/src/Model/V2RuleCustomResponse.php b/src/Model/V2RuleCustomResponse.php index 43e37ff..1591eee 100644 --- a/src/Model/V2RuleCustomResponse.php +++ b/src/Model/V2RuleCustomResponse.php @@ -2,7 +2,7 @@ /** * V2RuleCustomResponse * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -347,10 +347,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('uuid', $data ?? [], null); diff --git a/src/Model/V2RuleCustomResponseAction.php b/src/Model/V2RuleCustomResponseAction.php index a202b21..4a3e799 100644 --- a/src/Model/V2RuleCustomResponseAction.php +++ b/src/Model/V2RuleCustomResponseAction.php @@ -2,7 +2,7 @@ /** * V2RuleCustomResponseAction * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('custom_response_body', $data ?? [], null); $this->setIfExists('custom_response_status_code', $data ?? [], 200); diff --git a/src/Model/V2RuleCustomResponseRequest.php b/src/Model/V2RuleCustomResponseRequest.php index 5785c66..3fdcfdd 100644 --- a/src/Model/V2RuleCustomResponseRequest.php +++ b/src/Model/V2RuleCustomResponseRequest.php @@ -2,7 +2,7 @@ /** * V2RuleCustomResponseRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -347,10 +347,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('domain', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/src/Model/V2RuleFunction.php b/src/Model/V2RuleFunction.php index 3cf0151..e27717a 100644 --- a/src/Model/V2RuleFunction.php +++ b/src/Model/V2RuleFunction.php @@ -2,7 +2,7 @@ /** * V2RuleFunction * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -347,10 +347,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('uuid', $data ?? [], null); diff --git a/src/Model/V2RuleFunctionAction.php b/src/Model/V2RuleFunctionAction.php index 2aad7eb..e2f3d60 100644 --- a/src/Model/V2RuleFunctionAction.php +++ b/src/Model/V2RuleFunctionAction.php @@ -2,7 +2,7 @@ /** * V2RuleFunctionAction * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('fn_uuid', $data ?? [], null); } diff --git a/src/Model/V2RuleFunctionRequest.php b/src/Model/V2RuleFunctionRequest.php index 5815fe1..ee51bd3 100644 --- a/src/Model/V2RuleFunctionRequest.php +++ b/src/Model/V2RuleFunctionRequest.php @@ -2,7 +2,7 @@ /** * V2RuleFunctionRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -329,10 +329,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('domain', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/src/Model/V2RuleHeader.php b/src/Model/V2RuleHeader.php index cca1229..4499d36 100644 --- a/src/Model/V2RuleHeader.php +++ b/src/Model/V2RuleHeader.php @@ -2,7 +2,7 @@ /** * V2RuleHeader * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -347,10 +347,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('uuid', $data ?? [], null); diff --git a/src/Model/V2RuleHeaderAction.php b/src/Model/V2RuleHeaderAction.php index 9cb5b3f..008a5e6 100644 --- a/src/Model/V2RuleHeaderAction.php +++ b/src/Model/V2RuleHeaderAction.php @@ -2,7 +2,7 @@ /** * V2RuleHeaderAction * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('headers', $data ?? [], null); } diff --git a/src/Model/V2RuleHeaderRequest.php b/src/Model/V2RuleHeaderRequest.php index 0667e18..20b0280 100644 --- a/src/Model/V2RuleHeaderRequest.php +++ b/src/Model/V2RuleHeaderRequest.php @@ -2,7 +2,7 @@ /** * V2RuleHeaderRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -329,10 +329,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('domain', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/src/Model/V2RuleProxy.php b/src/Model/V2RuleProxy.php index b482444..af39aa9 100644 --- a/src/Model/V2RuleProxy.php +++ b/src/Model/V2RuleProxy.php @@ -2,7 +2,7 @@ /** * V2RuleProxy * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -347,10 +347,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('uuid', $data ?? [], null); diff --git a/src/Model/V2RuleProxyAction.php b/src/Model/V2RuleProxyAction.php index 0f84e08..8f2ea7b 100644 --- a/src/Model/V2RuleProxyAction.php +++ b/src/Model/V2RuleProxyAction.php @@ -2,7 +2,7 @@ /** * V2RuleProxyAction * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -75,7 +75,7 @@ class V2RuleProxyAction implements ModelInterface, ArrayAccess, \JsonSerializabl 'notify' => 'string', 'notify_config' => '\QuantClient\Model\V2RuleProxyActionNotifyConfig', 'waf_enabled' => 'bool', - 'waf_config' => '\QuantClient\Model\WafConfig', + 'waf_config' => '\QuantClient\Model\V2RuleProxyActionWafConfig', 'proxy_alert_enabled' => 'bool', 'proxy_inline_fn_enabled' => 'bool', 'application_proxy' => 'bool', @@ -422,10 +422,10 @@ public function getNotifyAllowableValues() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('to', $data ?? [], null); $this->setIfExists('host', $data ?? [], null); @@ -1032,7 +1032,7 @@ public function setWafEnabled($waf_enabled) /** * Gets waf_config * - * @return \QuantClient\Model\WafConfig|null + * @return \QuantClient\Model\V2RuleProxyActionWafConfig|null */ public function getWafConfig() { @@ -1042,7 +1042,7 @@ public function getWafConfig() /** * Sets waf_config * - * @param \QuantClient\Model\WafConfig|null $waf_config waf_config + * @param \QuantClient\Model\V2RuleProxyActionWafConfig|null $waf_config waf_config * * @return self */ diff --git a/src/Model/V2RuleProxyActionNotifyConfig.php b/src/Model/V2RuleProxyActionNotifyConfig.php index cc5ca4a..6a561c3 100644 --- a/src/Model/V2RuleProxyActionNotifyConfig.php +++ b/src/Model/V2RuleProxyActionNotifyConfig.php @@ -2,7 +2,7 @@ /** * V2RuleProxyActionNotifyConfig * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -240,10 +240,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('webhook_url', $data ?? [], null); } diff --git a/src/Model/V2RuleProxyActionQuantCloudSelection.php b/src/Model/V2RuleProxyActionQuantCloudSelection.php index 34674cf..a79700d 100644 --- a/src/Model/V2RuleProxyActionQuantCloudSelection.php +++ b/src/Model/V2RuleProxyActionQuantCloudSelection.php @@ -2,7 +2,7 @@ /** * V2RuleProxyActionQuantCloudSelection * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -258,10 +258,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('app', $data ?? [], null); $this->setIfExists('env', $data ?? [], null); diff --git a/src/Model/V2RuleProxyActionWafConfig.php b/src/Model/V2RuleProxyActionWafConfig.php new file mode 100644 index 0000000..feaf7a5 --- /dev/null +++ b/src/Model/V2RuleProxyActionWafConfig.php @@ -0,0 +1,902 @@ + + */ +class V2RuleProxyActionWafConfig implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'V2RuleProxyAction_waf_config'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'mode' => 'string', + 'paranoia_level' => 'int', + 'allow_rules' => 'string[]', + 'allow_ip' => 'string[]', + 'block_ip' => 'string[]', + 'block_asn' => 'string[]', + 'block_ua' => 'string[]', + 'block_referer' => 'string[]', + 'notify_slack' => 'string', + 'notify_slack_hits_rpm' => 'int', + 'notify_email' => 'string[]', + 'httpbl' => '\QuantClient\Model\WafConfigHttpbl', + 'block_lists' => '\QuantClient\Model\WafConfigBlockLists', + 'thresholds' => '\QuantClient\Model\WafConfigThresholdsInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'mode' => null, + 'paranoia_level' => null, + 'allow_rules' => null, + 'allow_ip' => null, + 'block_ip' => null, + 'block_asn' => null, + 'block_ua' => null, + 'block_referer' => null, + 'notify_slack' => null, + 'notify_slack_hits_rpm' => null, + 'notify_email' => null, + 'httpbl' => null, + 'block_lists' => null, + 'thresholds' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'mode' => false, + 'paranoia_level' => false, + 'allow_rules' => false, + 'allow_ip' => false, + 'block_ip' => false, + 'block_asn' => false, + 'block_ua' => false, + 'block_referer' => false, + 'notify_slack' => false, + 'notify_slack_hits_rpm' => false, + 'notify_email' => false, + 'httpbl' => false, + 'block_lists' => false, + 'thresholds' => false + ]; + + /** + * 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 = [ + 'mode' => 'mode', + 'paranoia_level' => 'paranoia_level', + 'allow_rules' => 'allow_rules', + 'allow_ip' => 'allow_ip', + 'block_ip' => 'block_ip', + 'block_asn' => 'block_asn', + 'block_ua' => 'block_ua', + 'block_referer' => 'block_referer', + 'notify_slack' => 'notify_slack', + 'notify_slack_hits_rpm' => 'notify_slack_hits_rpm', + 'notify_email' => 'notify_email', + 'httpbl' => 'httpbl', + 'block_lists' => 'block_lists', + 'thresholds' => 'thresholds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'mode' => 'setMode', + 'paranoia_level' => 'setParanoiaLevel', + 'allow_rules' => 'setAllowRules', + 'allow_ip' => 'setAllowIp', + 'block_ip' => 'setBlockIp', + 'block_asn' => 'setBlockAsn', + 'block_ua' => 'setBlockUa', + 'block_referer' => 'setBlockReferer', + 'notify_slack' => 'setNotifySlack', + 'notify_slack_hits_rpm' => 'setNotifySlackHitsRpm', + 'notify_email' => 'setNotifyEmail', + 'httpbl' => 'setHttpbl', + 'block_lists' => 'setBlockLists', + 'thresholds' => 'setThresholds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'mode' => 'getMode', + 'paranoia_level' => 'getParanoiaLevel', + 'allow_rules' => 'getAllowRules', + 'allow_ip' => 'getAllowIp', + 'block_ip' => 'getBlockIp', + 'block_asn' => 'getBlockAsn', + 'block_ua' => 'getBlockUa', + 'block_referer' => 'getBlockReferer', + 'notify_slack' => 'getNotifySlack', + 'notify_slack_hits_rpm' => 'getNotifySlackHitsRpm', + 'notify_email' => 'getNotifyEmail', + 'httpbl' => 'getHttpbl', + 'block_lists' => 'getBlockLists', + 'thresholds' => 'getThresholds' + ]; + + /** + * 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; + } + + public const MODE_REPORT = 'report'; + public const MODE_BLOCK = 'block'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getModeAllowableValues() + { + return [ + self::MODE_REPORT, + self::MODE_BLOCK, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('mode', $data ?? [], 'report'); + $this->setIfExists('paranoia_level', $data ?? [], 1); + $this->setIfExists('allow_rules', $data ?? [], null); + $this->setIfExists('allow_ip', $data ?? [], null); + $this->setIfExists('block_ip', $data ?? [], null); + $this->setIfExists('block_asn', $data ?? [], null); + $this->setIfExists('block_ua', $data ?? [], null); + $this->setIfExists('block_referer', $data ?? [], null); + $this->setIfExists('notify_slack', $data ?? [], null); + $this->setIfExists('notify_slack_hits_rpm', $data ?? [], null); + $this->setIfExists('notify_email', $data ?? [], null); + $this->setIfExists('httpbl', $data ?? [], null); + $this->setIfExists('block_lists', $data ?? [], null); + $this->setIfExists('thresholds', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param 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 = []; + + $allowedValues = $this->getModeAllowableValues(); + if (!is_null($this->container['mode']) && !in_array($this->container['mode'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'mode', must be one of '%s'", + $this->container['mode'], + implode("', '", $allowedValues) + ); + } + + if (!is_null($this->container['paranoia_level']) && ($this->container['paranoia_level'] > 4)) { + $invalidProperties[] = "invalid value for 'paranoia_level', must be smaller than or equal to 4."; + } + + if (!is_null($this->container['paranoia_level']) && ($this->container['paranoia_level'] < 1)) { + $invalidProperties[] = "invalid value for 'paranoia_level', must be bigger than or equal to 1."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets mode + * + * @return string|null + */ + public function getMode() + { + return $this->container['mode']; + } + + /** + * Sets mode + * + * @param string|null $mode WAF operation mode + * + * @return self + */ + public function setMode($mode) + { + if (is_null($mode)) { + throw new \InvalidArgumentException('non-nullable mode cannot be null'); + } + $allowedValues = $this->getModeAllowableValues(); + if (!in_array($mode, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'mode', must be one of '%s'", + $mode, + implode("', '", $allowedValues) + ) + ); + } + $this->container['mode'] = $mode; + + return $this; + } + + /** + * Gets paranoia_level + * + * @return int|null + */ + public function getParanoiaLevel() + { + return $this->container['paranoia_level']; + } + + /** + * Sets paranoia_level + * + * @param int|null $paranoia_level OWASP paranoia level + * + * @return self + */ + public function setParanoiaLevel($paranoia_level) + { + if (is_null($paranoia_level)) { + throw new \InvalidArgumentException('non-nullable paranoia_level cannot be null'); + } + + if (($paranoia_level > 4)) { + throw new \InvalidArgumentException('invalid value for $paranoia_level when calling V2RuleProxyActionWafConfig., must be smaller than or equal to 4.'); + } + if (($paranoia_level < 1)) { + throw new \InvalidArgumentException('invalid value for $paranoia_level when calling V2RuleProxyActionWafConfig., must be bigger than or equal to 1.'); + } + + $this->container['paranoia_level'] = $paranoia_level; + + return $this; + } + + /** + * Gets allow_rules + * + * @return string[]|null + */ + public function getAllowRules() + { + return $this->container['allow_rules']; + } + + /** + * Sets allow_rules + * + * @param string[]|null $allow_rules WAF rule IDs to allow/whitelist + * + * @return self + */ + public function setAllowRules($allow_rules) + { + if (is_null($allow_rules)) { + throw new \InvalidArgumentException('non-nullable allow_rules cannot be null'); + } + $this->container['allow_rules'] = $allow_rules; + + return $this; + } + + /** + * Gets allow_ip + * + * @return string[]|null + */ + public function getAllowIp() + { + return $this->container['allow_ip']; + } + + /** + * Sets allow_ip + * + * @param string[]|null $allow_ip IP addresses to allow + * + * @return self + */ + public function setAllowIp($allow_ip) + { + if (is_null($allow_ip)) { + throw new \InvalidArgumentException('non-nullable allow_ip cannot be null'); + } + $this->container['allow_ip'] = $allow_ip; + + return $this; + } + + /** + * Gets block_ip + * + * @return string[]|null + */ + public function getBlockIp() + { + return $this->container['block_ip']; + } + + /** + * Sets block_ip + * + * @param string[]|null $block_ip IP addresses to block + * + * @return self + */ + public function setBlockIp($block_ip) + { + if (is_null($block_ip)) { + throw new \InvalidArgumentException('non-nullable block_ip cannot be null'); + } + $this->container['block_ip'] = $block_ip; + + return $this; + } + + /** + * Gets block_asn + * + * @return string[]|null + */ + public function getBlockAsn() + { + return $this->container['block_asn']; + } + + /** + * Sets block_asn + * + * @param string[]|null $block_asn ASN numbers to block + * + * @return self + */ + public function setBlockAsn($block_asn) + { + if (is_null($block_asn)) { + throw new \InvalidArgumentException('non-nullable block_asn cannot be null'); + } + $this->container['block_asn'] = $block_asn; + + return $this; + } + + /** + * Gets block_ua + * + * @return string[]|null + */ + public function getBlockUa() + { + return $this->container['block_ua']; + } + + /** + * Sets block_ua + * + * @param string[]|null $block_ua User agent patterns to block + * + * @return self + */ + public function setBlockUa($block_ua) + { + if (is_null($block_ua)) { + throw new \InvalidArgumentException('non-nullable block_ua cannot be null'); + } + $this->container['block_ua'] = $block_ua; + + return $this; + } + + /** + * Gets block_referer + * + * @return string[]|null + */ + public function getBlockReferer() + { + return $this->container['block_referer']; + } + + /** + * Sets block_referer + * + * @param string[]|null $block_referer Referer patterns to block + * + * @return self + */ + public function setBlockReferer($block_referer) + { + if (is_null($block_referer)) { + throw new \InvalidArgumentException('non-nullable block_referer cannot be null'); + } + $this->container['block_referer'] = $block_referer; + + return $this; + } + + /** + * Gets notify_slack + * + * @return string|null + */ + public function getNotifySlack() + { + return $this->container['notify_slack']; + } + + /** + * Sets notify_slack + * + * @param string|null $notify_slack Slack webhook URL for notifications + * + * @return self + */ + public function setNotifySlack($notify_slack) + { + if (is_null($notify_slack)) { + throw new \InvalidArgumentException('non-nullable notify_slack cannot be null'); + } + $this->container['notify_slack'] = $notify_slack; + + return $this; + } + + /** + * Gets notify_slack_hits_rpm + * + * @return int|null + */ + public function getNotifySlackHitsRpm() + { + return $this->container['notify_slack_hits_rpm']; + } + + /** + * Sets notify_slack_hits_rpm + * + * @param int|null $notify_slack_hits_rpm Minimum hits per minute to trigger Slack notification + * + * @return self + */ + public function setNotifySlackHitsRpm($notify_slack_hits_rpm) + { + if (is_null($notify_slack_hits_rpm)) { + throw new \InvalidArgumentException('non-nullable notify_slack_hits_rpm cannot be null'); + } + $this->container['notify_slack_hits_rpm'] = $notify_slack_hits_rpm; + + return $this; + } + + /** + * Gets notify_email + * + * @return string[]|null + */ + public function getNotifyEmail() + { + return $this->container['notify_email']; + } + + /** + * Sets notify_email + * + * @param string[]|null $notify_email Email addresses for notifications + * + * @return self + */ + public function setNotifyEmail($notify_email) + { + if (is_null($notify_email)) { + throw new \InvalidArgumentException('non-nullable notify_email cannot be null'); + } + $this->container['notify_email'] = $notify_email; + + return $this; + } + + /** + * Gets httpbl + * + * @return \QuantClient\Model\WafConfigHttpbl|null + */ + public function getHttpbl() + { + return $this->container['httpbl']; + } + + /** + * Sets httpbl + * + * @param \QuantClient\Model\WafConfigHttpbl|null $httpbl httpbl + * + * @return self + */ + public function setHttpbl($httpbl) + { + if (is_null($httpbl)) { + throw new \InvalidArgumentException('non-nullable httpbl cannot be null'); + } + $this->container['httpbl'] = $httpbl; + + return $this; + } + + /** + * Gets block_lists + * + * @return \QuantClient\Model\WafConfigBlockLists|null + */ + public function getBlockLists() + { + return $this->container['block_lists']; + } + + /** + * Sets block_lists + * + * @param \QuantClient\Model\WafConfigBlockLists|null $block_lists block_lists + * + * @return self + */ + public function setBlockLists($block_lists) + { + if (is_null($block_lists)) { + throw new \InvalidArgumentException('non-nullable block_lists cannot be null'); + } + $this->container['block_lists'] = $block_lists; + + return $this; + } + + /** + * Gets thresholds + * + * @return \QuantClient\Model\WafConfigThresholdsInner[]|null + */ + public function getThresholds() + { + return $this->container['thresholds']; + } + + /** + * Sets thresholds + * + * @param \QuantClient\Model\WafConfigThresholdsInner[]|null $thresholds Rate limiting thresholds + * + * @return self + */ + public function setThresholds($thresholds) + { + if (is_null($thresholds)) { + throw new \InvalidArgumentException('non-nullable thresholds cannot be null'); + } + $this->container['thresholds'] = $thresholds; + + return $this; + } + /** + * 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/src/Model/V2RuleProxyRequest.php b/src/Model/V2RuleProxyRequest.php index 747a6b9..0c95540 100644 --- a/src/Model/V2RuleProxyRequest.php +++ b/src/Model/V2RuleProxyRequest.php @@ -2,7 +2,7 @@ /** * V2RuleProxyRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -89,7 +89,7 @@ class V2RuleProxyRequest implements ModelInterface, ArrayAccess, \JsonSerializab 'failover_lifetime' => 'string', 'proxy_alert_enabled' => 'bool', 'waf_enabled' => 'bool', - 'waf_config' => '\QuantClient\Model\WafConfig', + 'waf_config' => '\QuantClient\Model\V2RuleProxyActionWafConfig', 'application_proxy' => 'bool', 'application_name' => 'string', 'application_environment' => 'string', @@ -473,10 +473,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('domain', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); @@ -1452,7 +1452,7 @@ public function setWafEnabled($waf_enabled) /** * Gets waf_config * - * @return \QuantClient\Model\WafConfig|null + * @return \QuantClient\Model\V2RuleProxyActionWafConfig|null */ public function getWafConfig() { @@ -1462,7 +1462,7 @@ public function getWafConfig() /** * Sets waf_config * - * @param \QuantClient\Model\WafConfig|null $waf_config waf_config + * @param \QuantClient\Model\V2RuleProxyActionWafConfig|null $waf_config waf_config * * @return self */ diff --git a/src/Model/V2RuleRedirect.php b/src/Model/V2RuleRedirect.php index 0ef8eef..130a3f6 100644 --- a/src/Model/V2RuleRedirect.php +++ b/src/Model/V2RuleRedirect.php @@ -2,7 +2,7 @@ /** * V2RuleRedirect * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -347,10 +347,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('uuid', $data ?? [], null); diff --git a/src/Model/V2RuleRedirectAction.php b/src/Model/V2RuleRedirectAction.php index 965636a..2e6caac 100644 --- a/src/Model/V2RuleRedirectAction.php +++ b/src/Model/V2RuleRedirectAction.php @@ -2,7 +2,7 @@ /** * V2RuleRedirectAction * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('to', $data ?? [], null); $this->setIfExists('status_code', $data ?? [], '301'); diff --git a/src/Model/V2RuleRedirectRequest.php b/src/Model/V2RuleRedirectRequest.php index 81b184f..c0396ff 100644 --- a/src/Model/V2RuleRedirectRequest.php +++ b/src/Model/V2RuleRedirectRequest.php @@ -2,7 +2,7 @@ /** * V2RuleRedirectRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -335,10 +335,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('domain', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/src/Model/V2RuleRequest.php b/src/Model/V2RuleRequest.php index 0932a02..ea4fdbb 100644 --- a/src/Model/V2RuleRequest.php +++ b/src/Model/V2RuleRequest.php @@ -2,7 +2,7 @@ /** * V2RuleRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -323,10 +323,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('domain', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/src/Model/V2RuleServeStatic.php b/src/Model/V2RuleServeStatic.php index 8b5b3be..cf9b31e 100644 --- a/src/Model/V2RuleServeStatic.php +++ b/src/Model/V2RuleServeStatic.php @@ -2,7 +2,7 @@ /** * V2RuleServeStatic * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -347,10 +347,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('uuid', $data ?? [], null); diff --git a/src/Model/V2RuleServeStaticAction.php b/src/Model/V2RuleServeStaticAction.php index 798ef04..a423de2 100644 --- a/src/Model/V2RuleServeStaticAction.php +++ b/src/Model/V2RuleServeStaticAction.php @@ -2,7 +2,7 @@ /** * V2RuleServeStaticAction * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('static_file_path', $data ?? [], null); } diff --git a/src/Model/V2RuleServeStaticRequest.php b/src/Model/V2RuleServeStaticRequest.php index 281b857..5fe6e6d 100644 --- a/src/Model/V2RuleServeStaticRequest.php +++ b/src/Model/V2RuleServeStaticRequest.php @@ -2,7 +2,7 @@ /** * V2RuleServeStaticRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -329,10 +329,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('domain', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/src/Model/V2SecretStore.php b/src/Model/V2SecretStore.php index 2b216fb..f4117e5 100644 --- a/src/Model/V2SecretStore.php +++ b/src/Model/V2SecretStore.php @@ -2,7 +2,7 @@ /** * V2SecretStore * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/src/Model/V2SecretStoreRequest.php b/src/Model/V2SecretStoreRequest.php index 3307e28..a0f1bdf 100644 --- a/src/Model/V2SecretStoreRequest.php +++ b/src/Model/V2SecretStoreRequest.php @@ -2,7 +2,7 @@ /** * V2SecretStoreRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('name', $data ?? [], null); } diff --git a/src/Model/V2Store.php b/src/Model/V2Store.php index 92b3f32..e195293 100644 --- a/src/Model/V2Store.php +++ b/src/Model/V2Store.php @@ -2,7 +2,7 @@ /** * V2Store * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/src/Model/V2StoreItem.php b/src/Model/V2StoreItem.php index c9a3f2f..9023e9c 100644 --- a/src/Model/V2StoreItem.php +++ b/src/Model/V2StoreItem.php @@ -2,7 +2,7 @@ /** * V2StoreItem * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('key', $data ?? [], null); $this->setIfExists('value', $data ?? [], null); diff --git a/src/Model/V2StoreItemRequest.php b/src/Model/V2StoreItemRequest.php index 51d29e1..0fd9a75 100644 --- a/src/Model/V2StoreItemRequest.php +++ b/src/Model/V2StoreItemRequest.php @@ -2,7 +2,7 @@ /** * V2StoreItemRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -251,10 +251,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('key', $data ?? [], null); $this->setIfExists('value', $data ?? [], null); diff --git a/src/Model/V2StoreItemUpdateRequest.php b/src/Model/V2StoreItemUpdateRequest.php index af11fdd..12d5d83 100644 --- a/src/Model/V2StoreItemUpdateRequest.php +++ b/src/Model/V2StoreItemUpdateRequest.php @@ -2,7 +2,7 @@ /** * V2StoreItemUpdateRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('value', $data ?? [], null); $this->setIfExists('secret', $data ?? [], null); diff --git a/src/Model/V2StoreItemsListResponse.php b/src/Model/V2StoreItemsListResponse.php index 32c954f..b0ca432 100644 --- a/src/Model/V2StoreItemsListResponse.php +++ b/src/Model/V2StoreItemsListResponse.php @@ -2,7 +2,7 @@ /** * V2StoreItemsListResponse * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('data', $data ?? [], null); $this->setIfExists('next_cursor', $data ?? [], null); diff --git a/src/Model/V2StoreRequest.php b/src/Model/V2StoreRequest.php index 6548f84..a57a68d 100644 --- a/src/Model/V2StoreRequest.php +++ b/src/Model/V2StoreRequest.php @@ -2,7 +2,7 @@ /** * V2StoreRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('name', $data ?? [], null); } diff --git a/src/Model/ValidateCompose200Response.php b/src/Model/ValidateCompose200Response.php index 13b0d83..ae9ba90 100644 --- a/src/Model/ValidateCompose200Response.php +++ b/src/Model/ValidateCompose200Response.php @@ -2,7 +2,7 @@ /** * ValidateCompose200Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -251,10 +251,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('message', $data ?? [], null); $this->setIfExists('translated_compose_definition', $data ?? [], null); diff --git a/src/Model/ValidateCompose422Response.php b/src/Model/ValidateCompose422Response.php index 433ff30..feb5f61 100644 --- a/src/Model/ValidateCompose422Response.php +++ b/src/Model/ValidateCompose422Response.php @@ -2,7 +2,7 @@ /** * ValidateCompose422Response * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('error', $data ?? [], null); } diff --git a/src/Model/ValidateComposeRequest.php b/src/Model/ValidateComposeRequest.php index 5685718..5d0954e 100644 --- a/src/Model/ValidateComposeRequest.php +++ b/src/Model/ValidateComposeRequest.php @@ -2,7 +2,7 @@ /** * ValidateComposeRequest * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -251,10 +251,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('compose', $data ?? [], null); $this->setIfExists('image_suffix', $data ?? [], null); diff --git a/src/Model/ValidateComposeRequestOneOf.php b/src/Model/ValidateComposeRequestOneOf.php new file mode 100644 index 0000000..49d035f --- /dev/null +++ b/src/Model/ValidateComposeRequestOneOf.php @@ -0,0 +1,489 @@ + + */ +class ValidateComposeRequestOneOf implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'validateCompose_request_oneOf'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'compose' => 'string', + 'image_suffix' => 'string', + 'application' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'compose' => null, + 'image_suffix' => null, + 'application' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'compose' => false, + 'image_suffix' => false, + 'application' => false + ]; + + /** + * 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 = [ + 'compose' => 'compose', + 'image_suffix' => 'imageSuffix', + 'application' => 'application' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'compose' => 'setCompose', + 'image_suffix' => 'setImageSuffix', + 'application' => 'setApplication' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'compose' => 'getCompose', + 'image_suffix' => 'getImageSuffix', + 'application' => 'getApplication' + ]; + + /** + * 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[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('compose', $data ?? [], null); + $this->setIfExists('image_suffix', $data ?? [], null); + $this->setIfExists('application', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param 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 = []; + + if ($this->container['compose'] === null) { + $invalidProperties[] = "'compose' can't be null"; + } + if (!is_null($this->container['image_suffix']) && !preg_match("/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/", $this->container['image_suffix'])) { + $invalidProperties[] = "invalid value for 'image_suffix', must be conform to the pattern /^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets compose + * + * @return string + */ + public function getCompose() + { + return $this->container['compose']; + } + + /** + * Sets compose + * + * @param string $compose The docker-compose.yml file content as a string + * + * @return self + */ + public function setCompose($compose) + { + if (is_null($compose)) { + throw new \InvalidArgumentException('non-nullable compose cannot be null'); + } + $this->container['compose'] = $compose; + + return $this; + } + + /** + * Gets image_suffix + * + * @return string|null + */ + public function getImageSuffix() + { + return $this->container['image_suffix']; + } + + /** + * Sets image_suffix + * + * @param string|null $image_suffix Optional image tag suffix (query parameter takes precedence) + * + * @return self + */ + public function setImageSuffix($image_suffix) + { + if (is_null($image_suffix)) { + throw new \InvalidArgumentException('non-nullable image_suffix cannot be null'); + } + + if ((!preg_match("/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/", ObjectSerializer::toString($image_suffix)))) { + throw new \InvalidArgumentException("invalid value for \$image_suffix when calling ValidateComposeRequestOneOf., must conform to the pattern /^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/."); + } + + $this->container['image_suffix'] = $image_suffix; + + return $this; + } + + /** + * Gets application + * + * @return string|null + */ + public function getApplication() + { + return $this->container['application']; + } + + /** + * Sets application + * + * @param string|null $application Optional application name for context + * + * @return self + */ + public function setApplication($application) + { + if (is_null($application)) { + throw new \InvalidArgumentException('non-nullable application cannot be null'); + } + $this->container['application'] = $application; + + return $this; + } + /** + * 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/src/Model/Variable.php b/src/Model/Variable.php index 5804035..2e65d84 100644 --- a/src/Model/Variable.php +++ b/src/Model/Variable.php @@ -2,7 +2,7 @@ /** * Variable * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('key', $data ?? [], null); $this->setIfExists('value', $data ?? [], null); diff --git a/src/Model/Volume.php b/src/Model/Volume.php index 8ef2983..30e83d9 100644 --- a/src/Model/Volume.php +++ b/src/Model/Volume.php @@ -2,7 +2,7 @@ /** * Volume * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -281,10 +281,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('volume_id', $data ?? [], null); $this->setIfExists('volume_name', $data ?? [], null); diff --git a/src/Model/WafConfig.php b/src/Model/WafConfig.php index 809fd10..b834d7a 100644 --- a/src/Model/WafConfig.php +++ b/src/Model/WafConfig.php @@ -2,7 +2,7 @@ /** * WafConfig * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -333,10 +333,10 @@ public function getModeAllowableValues() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('mode', $data ?? [], 'report'); $this->setIfExists('paranoia_level', $data ?? [], 1); diff --git a/src/Model/WafConfigBlockLists.php b/src/Model/WafConfigBlockLists.php index e6642ff..c34f0cb 100644 --- a/src/Model/WafConfigBlockLists.php +++ b/src/Model/WafConfigBlockLists.php @@ -2,7 +2,7 @@ /** * WafConfigBlockLists * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -258,10 +258,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('user_agent', $data ?? [], false); $this->setIfExists('referer', $data ?? [], false); diff --git a/src/Model/WafConfigHttpbl.php b/src/Model/WafConfigHttpbl.php index 64bc26d..60b848a 100644 --- a/src/Model/WafConfigHttpbl.php +++ b/src/Model/WafConfigHttpbl.php @@ -2,7 +2,7 @@ /** * WafConfigHttpbl * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -270,10 +270,10 @@ public function getModelName() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('httpbl_enabled', $data ?? [], false); $this->setIfExists('block_suspicious', $data ?? [], false); diff --git a/src/Model/WafConfigThresholdsInner.php b/src/Model/WafConfigThresholdsInner.php index 13d9d2b..a353ad1 100644 --- a/src/Model/WafConfigThresholdsInner.php +++ b/src/Model/WafConfigThresholdsInner.php @@ -2,7 +2,7 @@ /** * WafConfigThresholdsInner * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -315,10 +315,10 @@ public function getModeAllowableValues() /** * Constructor * - * @param mixed[]|null $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->setIfExists('type', $data ?? [], null); $this->setIfExists('rps', $data ?? [], null); diff --git a/src/ObjectSerializer.php b/src/ObjectSerializer.php index e3c42d6..5d23853 100644 --- a/src/ObjectSerializer.php +++ b/src/ObjectSerializer.php @@ -2,7 +2,7 @@ /** * ObjectSerializer * - * PHP version 8.1 + * PHP version 7.4 * * @category Class * @package QuantClient @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 4.8.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.13.0 + * Generator version: 7.10.0 */ /** @@ -58,8 +58,8 @@ public static function setDateTimeFormat($format) * Serialize data * * @param mixed $data the data to serialize - * @param string|null $type the OpenAPIToolsType of the data - * @param string|null $format the format of the OpenAPITools type of the data + * @param string $type the OpenAPIToolsType of the data + * @param string $format the format of the OpenAPITools type of the data * * @return scalar|object|array|null serialized form of $data */ @@ -323,6 +323,24 @@ 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 @@ -386,7 +404,7 @@ public static function serializeCollection(array $collection, $style, $allowColl * * @param mixed $data object or primitive to be deserialized * @param string $class class name is passed as a string - * @param string[]|null $httpHeaders HTTP headers + * @param string[] $httpHeaders HTTP headers * * @return object|array|null a single or an array of $class instances */