From b5947e2c35b308c89e196514aa052c157c5f00fc Mon Sep 17 00:00:00 2001 From: "quantcloud[bot]" Date: Tue, 31 Mar 2026 12:58:39 +0000 Subject: [PATCH] feat(sdk): v4.15.3 - Auto-generated from unified API spec Generated from unified API spec v4.15.3 Changes: - Auto-generated SDK updates This PR was automatically created by the API generation pipeline. --- .openapi-generator/FILES | 158 +- README.md | 128 +- composer.json | 2 +- composer.lock | 15 +- docs/Api/AIAgentsApi.md | 191 + docs/Api/AIFilterPoliciesApi.md | 434 +++ docs/Api/AIGovernanceApi.md | 186 + docs/Api/AIOrchestrationsApi.md | 581 +++ docs/Api/AISkillsApi.md | 704 ++++ docs/Api/AISlackBotsApi.md | 452 +++ docs/Api/AIToolsApi.md | 6 +- docs/Api/AIUsageApi.md | 66 + docs/Api/AIVectorDatabaseApi.md | 137 +- docs/Api/CDNMetricsApi.md | 214 + docs/Api/KVApi.md | 132 + docs/Api/OrchestrationApi.md | 70 - docs/Api/TokensApi.md | 188 + docs/Model/ChatInferenceRequest.md | 3 + docs/Model/ChatInferenceRequestGuardrails.md | 11 + docs/Model/ChatInferenceStreamRequest.md | 3 + docs/Model/ChatWithAIAgentRequest.md | 3 + docs/Model/CreateAIAgentRequest.md | 4 + docs/Model/CreateFilterPolicyRequest.md | 12 + .../CreateFilterPolicyRequestRulesInner.md | 12 + ...reateFilterPolicyRequestRulesInnerMatch.md | 11 + docs/Model/CreateOrchestrationRequest.md | 20 + .../CreateOrchestrationRequestInputSource.md | 12 + ...CreateOrchestrationRequestStopCondition.md | 11 + docs/Model/CreateSkill201Response.md | 11 + docs/Model/CreateSkillRequest.md | 19 + docs/Model/CreateSlackBot201Response.md | 9 + docs/Model/CreateSlackBotRequest.md | 15 + docs/Model/Cron.md | 7 +- ...se.md => DeleteAgentOverlay200Response.md} | 2 +- docs/Model/DeleteSkill200Response.md | 10 + .../Model/DeleteSkillCollection200Response.md | 10 + docs/Model/DeleteSlackBot200Response.md | 10 + .../Model/DeleteVectorDocuments200Response.md | 11 + docs/Model/DeleteVectorDocumentsRequest.md | 12 + .../DeleteVectorDocumentsRequestMetadata.md | 10 + docs/Model/GetAIAgent200ResponseAgent.md | 5 + docs/Model/GetAgentOverlay200Response.md | 10 + docs/Model/GetAgentOverlay200ResponseBase.md | 13 + .../GetAgentOverlay200ResponseOverlay.md | 19 + docs/Model/GetGovernanceConfig200Response.md | 16 + ...tGovernanceConfig200ResponseSpendLimits.md | 13 + docs/Model/GetMyUsage200Response.md | 13 + docs/Model/GetMyUsage200ResponseDaily.md | 9 + docs/Model/GetMyUsage200ResponseMonthly.md | 10 + docs/Model/GetSkill200Response.md | 9 + docs/Model/GetSkill200ResponseSkill.md | 22 + docs/Model/GetSlackBot200Response.md | 9 + docs/Model/GetSlackBot200ResponseBot.md | 20 + docs/Model/ImportSkill201Response.md | 10 + .../Model/ImportSkillCollection201Response.md | 13 + docs/Model/ImportSkillCollectionRequest.md | 12 + .../ImportSkillCollectionRequestSource.md | 12 + docs/Model/ImportSkillRequest.md | 17 + docs/Model/ImportSkillRequestSource.md | 13 + docs/Model/KVLinkToProject200Response.md | 10 + docs/Model/KVLinkToProjectRequest.md | 9 + .../ListAIAgents200ResponseAgentsInner.md | 5 + .../ListOrchestrationBatches200Response.md | 10 + ...estrationBatches200ResponseBatchesInner.md | 18 + docs/Model/ListOrchestrations200Response.md | 10 + docs/Model/ListSkillCollections200Response.md | 9 + ...lCollections200ResponseCollectionsInner.md | 11 + docs/Model/ListSkills200Response.md | 10 + .../Model/ListSkills200ResponseSkillsInner.md | 17 + docs/Model/ListSlackBots200Response.md | 9 + .../ListSlackBots200ResponseBotsInner.md | 16 + ...SearchSlackWorkspaceChannels200Response.md | 9 + ...orkspaceChannels200ResponseResultsInner.md | 10 + .../SearchSlackWorkspaceUsers200Response.md | 9 + ...ckWorkspaceUsers200ResponseResultsInner.md | 11 + docs/Model/SyncSkillCollection200Response.md | 14 + docs/Model/TokensCreate201Response.md | 16 + docs/Model/TokensCreateRequest.md | 13 + docs/Model/TokensDelete200Response.md | 9 + docs/Model/TokensList200ResponseInner.md | 12 + docs/Model/UpdateAIAgentRequest.md | 4 + docs/Model/UpdateFilterPolicyRequest.md | 12 + .../UpdateGovernanceConfig200Response.md | 10 + docs/Model/UpdateGovernanceConfigRequest.md | 15 + docs/Model/UpdateSkill200Response.md | 11 + docs/Model/UpdateSkillRequest.md | 19 + docs/Model/UpdateSlackBotRequest.md | 15 + ...oadVectorDocumentsRequestDocumentsInner.md | 1 + docs/Model/UpsertAgentOverlay200Response.md | 9 + docs/Model/UpsertAgentOverlayRequest.md | 19 + docs/Model/V2CrawlerSchedule.md | 2 +- docs/Model/V2CrawlerScheduleRequest.md | 4 +- docs/Model/V2MetricData.md | 12 + docs/Model/V2MetricDataPoint.md | 10 + docs/Model/V2MetricDataPointTimestamp.md | 8 + docs/Model/V2MetricsMeta.md | 14 + docs/Model/V2MetricsResponse.md | 10 + docs/Model/V2Rule.md | 3 + docs/Model/V2RuleAuth.md | 3 + docs/Model/V2RuleAuthRequest.md | 3 + docs/Model/V2RuleBotChallenge.md | 3 + docs/Model/V2RuleBotChallengeRequest.md | 3 + docs/Model/V2RuleContentFilter.md | 3 + docs/Model/V2RuleContentFilterRequest.md | 3 + docs/Model/V2RuleCustomResponse.md | 3 + docs/Model/V2RuleCustomResponseRequest.md | 3 + docs/Model/V2RuleFunction.md | 3 + docs/Model/V2RuleFunctionRequest.md | 3 + docs/Model/V2RuleHeader.md | 3 + docs/Model/V2RuleHeaderRequest.md | 3 + docs/Model/V2RuleProxy.md | 3 + docs/Model/V2RuleProxyRequest.md | 3 + docs/Model/V2RuleRedirect.md | 3 + docs/Model/V2RuleRedirectRequest.md | 3 + docs/Model/V2RuleRequest.md | 3 + docs/Model/V2RuleServeStatic.md | 3 + docs/Model/V2RuleServeStaticRequest.md | 3 + src/Api/AIAgentsApi.php | 1180 +++++- src/Api/AICustomToolsApi.php | 2 +- src/Api/AIFileStorageApi.php | 2 +- src/Api/AIFilterPoliciesApi.php | 2249 +++++++++++ src/Api/AIGovernanceApi.php | 1030 +++++ src/Api/AIInferenceApi.php | 2 +- src/Api/AIModelsApi.php | 2 +- src/Api/AIMonitoringApi.php | 2 +- src/Api/AIOrchestrationsApi.php | 2857 ++++++++++++++ src/Api/AISessionsApi.php | 2 +- src/Api/AISkillsApi.php | 3458 +++++++++++++++++ src/Api/AISlackBotsApi.php | 2279 +++++++++++ src/Api/AITaskManagementApi.php | 2 +- src/Api/AIToolsApi.php | 10 +- .../{OrchestrationApi.php => AIUsageApi.php} | 109 +- src/Api/AIVectorDatabaseApi.php | 621 ++- src/Api/ApplicationsApi.php | 2 +- src/Api/BackupManagementApi.php | 2 +- src/Api/CDNMetricsApi.php | 1206 ++++++ src/Api/CommandsApi.php | 2 +- src/Api/ComposeApi.php | 2 +- src/Api/ContainersApi.php | 2 +- src/Api/CrawlerSchedulesApi.php | 2 +- src/Api/CrawlersApi.php | 2 +- src/Api/CronApi.php | 2 +- src/Api/DomainsApi.php | 2 +- src/Api/EnvironmentsApi.php | 2 +- src/Api/HeadersApi.php | 2 +- src/Api/KVApi.php | 907 ++++- src/Api/OrganizationsApi.php | 2 +- src/Api/ProjectsApi.php | 2 +- src/Api/PurgeApi.php | 2 +- src/Api/RulesApi.php | 2 +- src/Api/SSHAccessApi.php | 2 +- src/Api/ScalingPolicyApi.php | 2 +- src/Api/TokensApi.php | 1134 ++++++ src/Api/VariablesApi.php | 2 +- src/Api/VolumesApi.php | 2 +- src/ApiException.php | 2 +- src/Configuration.php | 8 +- src/FormDataProcessor.php | 2 +- src/HeaderSelector.php | 2 +- src/Model/Application.php | 2 +- src/Model/ApplicationDatabase.php | 2 +- .../ApplicationDeploymentInformationInner.php | 2 +- src/Model/ApplicationEnvironmentsInner.php | 2 +- src/Model/ApplicationFilesystem.php | 2 +- src/Model/ApplicationImageReference.php | 2 +- .../BulkSetEnvironmentVariablesRequest.php | 2 +- ...onmentVariablesRequestEnvironmentInner.php | 2 +- src/Model/ChatInference200Response.php | 2 +- .../ChatInference200ResponseResponse.php | 2 +- ...hatInference200ResponseResponseToolUse.php | 2 +- ...ference200ResponseResponseToolUseOneOf.php | 2 +- ...e200ResponseResponseToolUseOneOf1Inner.php | 2 +- ...e200ResponseResponseToolUseOneOfResult.php | 2 +- src/Model/ChatInference200ResponseUsage.php | 2 +- src/Model/ChatInference202Response.php | 2 +- src/Model/ChatInferenceRequest.php | 116 +- src/Model/ChatInferenceRequestGuardrails.php | 512 +++ .../ChatInferenceRequestMessagesInner.php | 2 +- ...atInferenceRequestMessagesInnerContent.php | 2 +- ...eRequestMessagesInnerContentOneOfInner.php | 2 +- ...estMessagesInnerContentOneOfInnerOneOf.php | 2 +- ...stMessagesInnerContentOneOfInnerOneOf1.php | 2 +- ...sagesInnerContentOneOfInnerOneOf1Image.php | 2 +- ...nnerContentOneOfInnerOneOf1ImageSource.php | 2 +- ...stMessagesInnerContentOneOfInnerOneOf2.php | 2 +- ...sagesInnerContentOneOfInnerOneOf2Video.php | 2 +- ...nnerContentOneOfInnerOneOf2VideoSource.php | 2 +- ...stMessagesInnerContentOneOfInnerOneOf3.php | 2 +- ...esInnerContentOneOfInnerOneOf3Document.php | 2 +- ...rContentOneOfInnerOneOf3DocumentSource.php | 2 +- .../ChatInferenceRequestResponseFormat.php | 2 +- src/Model/ChatInferenceRequestToolConfig.php | 2 +- ...atInferenceRequestToolConfigToolsInner.php | 2 +- ...nceRequestToolConfigToolsInnerToolSpec.php | 2 +- ...oolConfigToolsInnerToolSpecInputSchema.php | 2 +- src/Model/ChatInferenceStreamRequest.php | 116 +- ...hatInferenceStreamRequestMessagesInner.php | 2 +- ...renceStreamRequestMessagesInnerContent.php | 2 +- src/Model/ChatWithAIAgent200Response.php | 2 +- .../ChatWithAIAgent200ResponseResponse.php | 2 +- ...hatWithAIAgent200ResponseResponseUsage.php | 2 +- src/Model/ChatWithAIAgent202Response.php | 2 +- src/Model/ChatWithAIAgentRequest.php | 132 +- src/Model/Command.php | 2 +- src/Model/Compose.php | 2 +- src/Model/Container.php | 2 +- src/Model/ContainerDependsOnInner.php | 2 +- src/Model/ContainerEnvironmentInner.php | 2 +- src/Model/ContainerHealthCheck.php | 2 +- src/Model/ContainerImageReference.php | 2 +- src/Model/ContainerMountPointsInner.php | 2 +- src/Model/ContainerOriginProtectionConfig.php | 2 +- src/Model/ContainerSecretsInner.php | 2 +- src/Model/CrawlersRun200Response.php | 2 +- src/Model/CrawlersRunRequest.php | 2 +- src/Model/CreateAIAgent201Response.php | 2 +- src/Model/CreateAIAgentRequest.php | 186 +- src/Model/CreateAISession201Response.php | 2 +- src/Model/CreateAISessionRequest.php | 2 +- ...teAISessionRequestInitialMessagesInner.php | 2 +- src/Model/CreateApplication403Response.php | 2 +- src/Model/CreateApplicationRequest.php | 2 +- .../CreateApplicationRequestDatabase.php | 2 +- ...eateApplicationRequestEnvironmentInner.php | 2 +- .../CreateApplicationRequestFilesystem.php | 2 +- src/Model/CreateBackup202Response.php | 2 +- src/Model/CreateBackupRequest.php | 2 +- src/Model/CreateCommandRequest.php | 2 +- src/Model/CreateCronJobRequest.php | 2 +- src/Model/CreateCustomTool201Response.php | 2 +- src/Model/CreateCustomToolRequest.php | 2 +- src/Model/CreateEnvironment403Response.php | 2 +- src/Model/CreateEnvironmentRequest.php | 2 +- ...eateEnvironmentRequestEnvironmentInner.php | 2 +- src/Model/CreateFilterPolicyRequest.php | 555 +++ .../CreateFilterPolicyRequestRulesInner.php | 581 +++ ...eateFilterPolicyRequestRulesInnerMatch.php | 520 +++ src/Model/CreateOrchestrationRequest.php | 856 ++++ .../CreateOrchestrationRequestInputSource.php | 550 +++ ...reateOrchestrationRequestStopCondition.php | 524 +++ src/Model/CreateSkill201Response.php | 477 +++ src/Model/CreateSkillRequest.php | 758 ++++ src/Model/CreateSlackBot201Response.php | 409 ++ src/Model/CreateSlackBotRequest.php | 669 ++++ src/Model/CreateTask201Response.php | 2 +- src/Model/CreateTaskRequest.php | 2 +- .../CreateVectorCollection201Response.php | 2 +- ...eVectorCollection201ResponseCollection.php | 2 +- src/Model/CreateVectorCollectionRequest.php | 2 +- src/Model/CreateVolumeRequest.php | 2 +- src/Model/Cron.php | 166 +- src/Model/CronRun.php | 2 +- src/Model/DeleteAIAgent200Response.php | 2 +- src/Model/DeleteAISession200Response.php | 2 +- ....php => DeleteAgentOverlay200Response.php} | 10 +- src/Model/DeleteBackup200Response.php | 2 +- src/Model/DeleteCustomTool200Response.php | 2 +- src/Model/DeleteFile200Response.php | 2 +- src/Model/DeleteSkill200Response.php | 443 +++ .../DeleteSkillCollection200Response.php | 443 +++ src/Model/DeleteSlackBot200Response.php | 443 +++ src/Model/DeleteTask200Response.php | 2 +- src/Model/DeleteTask409Response.php | 2 +- .../DeleteVectorDocuments200Response.php | 477 +++ src/Model/DeleteVectorDocumentsRequest.php | 511 +++ .../DeleteVectorDocumentsRequestMetadata.php | 443 +++ src/Model/DownloadBackup200Response.php | 2 +- src/Model/Embeddings200Response.php | 2 +- src/Model/Embeddings200ResponseEmbeddings.php | 2 +- src/Model/Embeddings200ResponseUsage.php | 2 +- src/Model/EmbeddingsRequest.php | 2 +- src/Model/EmbeddingsRequestInput.php | 2 +- src/Model/Environment.php | 2 +- src/Model/EnvironmentResponse.php | 2 +- src/Model/EnvironmentSummary.php | 2 +- src/Model/ExtendAISession200Response.php | 2 +- src/Model/ExtendAISessionRequest.php | 2 +- src/Model/GetAIAgent200Response.php | 2 +- src/Model/GetAIAgent200ResponseAgent.php | 172 +- src/Model/GetAIModel200Response.php | 2 +- .../GetAIModel200ResponseCapabilities.php | 2 +- src/Model/GetAIModel200ResponsePricing.php | 2 +- src/Model/GetAIModel404Response.php | 2 +- .../GetAIOrchestrationStatus200Response.php | 2 +- ...chestrationStatus200ResponseToolsInner.php | 2 +- .../GetAIOrchestrationStatus404Response.php | 2 +- src/Model/GetAISession200Response.php | 2 +- .../GetAIToolExecutionStatus200Response.php | 2 +- ...AIToolExecutionStatus200ResponseResult.php | 2 +- .../GetAIToolExecutionStatus404Response.php | 2 +- src/Model/GetAIUsageStats200Response.php | 2 +- ...GetAIUsageStats200ResponseByModelValue.php | 2 +- src/Model/GetAgentOverlay200Response.php | 450 +++ src/Model/GetAgentOverlay200ResponseBase.php | 546 +++ .../GetAgentOverlay200ResponseOverlay.php | 749 ++++ src/Model/GetDependencyGraph200Response.php | 2 +- .../GetDurableExecutionStatus200Response.php | 2 +- ...DurableExecutionStatus200ResponseError.php | 2 +- ...tionStatus200ResponsePendingToolsInner.php | 2 +- ...urableExecutionStatus200ResponseResult.php | 2 +- ...ecutionStatus200ResponseResultResponse.php | 2 +- ...eExecutionStatus200ResponseResultUsage.php | 2 +- .../GetEcrLoginCredentials200Response.php | 2 +- src/Model/GetEnvironmentLogs200Response.php | 2 +- ...vironmentLogs200ResponseLogEventsInner.php | 2 +- src/Model/GetFile200Response.php | 2 +- src/Model/GetGovernanceConfig200Response.php | 690 ++++ ...GovernanceConfig200ResponseSpendLimits.php | 580 +++ src/Model/GetMyUsage200Response.php | 552 +++ src/Model/GetMyUsage200ResponseDaily.php | 409 ++ src/Model/GetMyUsage200ResponseMonthly.php | 443 +++ src/Model/GetSkill200Response.php | 409 ++ src/Model/GetSkill200ResponseSkill.php | 851 ++++ src/Model/GetSlackBot200Response.php | 409 ++ src/Model/GetSlackBot200ResponseBot.php | 851 ++++ .../GetSshAccessCredentials200Response.php | 2 +- ...ccessCredentials200ResponseCredentials.php | 2 +- src/Model/GetTask200Response.php | 2 +- src/Model/GetVectorCollection200Response.php | 2 +- ...tVectorCollection200ResponseCollection.php | 2 +- src/Model/ImageGeneration200Response.php | 2 +- src/Model/ImageGenerationRequest.php | 2 +- ...nerationRequestBackgroundRemovalParams.php | 2 +- ...tionRequestColorGuidedGenerationParams.php | 2 +- ...GenerationRequestImageGenerationConfig.php | 2 +- ...eGenerationRequestImageVariationParams.php | 2 +- ...ImageGenerationRequestInPaintingParams.php | 2 +- ...mageGenerationRequestOutPaintingParams.php | 2 +- ...mageGenerationRequestTextToImageParams.php | 2 +- src/Model/ImportSkill201Response.php | 443 +++ .../ImportSkillCollection201Response.php | 545 +++ src/Model/ImportSkillCollectionRequest.php | 526 +++ .../ImportSkillCollectionRequestSource.php | 549 +++ src/Model/ImportSkillRequest.php | 684 ++++ src/Model/ImportSkillRequestSource.php | 582 +++ src/Model/KVItemsCreate200Response.php | 2 +- src/Model/KVItemsDelete200Response.php | 2 +- src/Model/KVItemsShow200Response.php | 2 +- src/Model/KVItemsShow200ResponseValue.php | 2 +- src/Model/KVLinkToProject200Response.php | 443 +++ src/Model/KVLinkToProjectRequest.php | 412 ++ src/Model/ListAIAgents200Response.php | 2 +- .../ListAIAgents200ResponseAgentsInner.php | 172 +- src/Model/ListAIModels200Response.php | 2 +- .../ListAIModels200ResponseModelsInner.php | 2 +- ...dels200ResponseModelsInnerCapabilities.php | 2 +- src/Model/ListAISessions200ResponseInner.php | 2 +- src/Model/ListAIToolExecutions200Response.php | 2 +- ...olExecutions200ResponseExecutionsInner.php | 2 +- src/Model/ListAIToolNames200Response.php | 2 +- src/Model/ListAITools200Response.php | 2 +- .../ListAITools200ResponseToolsInner.php | 2 +- ...stAITools200ResponseToolsInnerToolSpec.php | 2 +- ...0ResponseToolsInnerToolSpecInputSchema.php | 2 +- src/Model/ListBackups200Response.php | 2 +- .../ListBackups200ResponseBackupsInner.php | 2 +- src/Model/ListBackups422Response.php | 2 +- src/Model/ListCustomTools200Response.php | 2 +- .../ListCustomTools200ResponseToolsInner.php | 2 +- src/Model/ListFiles200Response.php | 2 +- src/Model/ListFiles200ResponseFilesInner.php | 2 +- .../ListOrchestrationBatches200Response.php | 450 +++ ...strationBatches200ResponseBatchesInner.php | 760 ++++ src/Model/ListOrchestrations200Response.php | 450 +++ src/Model/ListSkillCollections200Response.php | 409 ++ ...Collections200ResponseCollectionsInner.php | 477 +++ src/Model/ListSkills200Response.php | 443 +++ .../ListSkills200ResponseSkillsInner.php | 681 ++++ src/Model/ListSlackBots200Response.php | 409 ++ .../ListSlackBots200ResponseBotsInner.php | 715 ++++ src/Model/ListTasks200Response.php | 2 +- src/Model/ListTasks200ResponseTasksInner.php | 2 +- .../ListVectorCollections200Response.php | 2 +- ...Collections200ResponseCollectionsInner.php | 2 +- src/Model/ModelInterface.php | 2 +- .../OrganizationsList200ResponseInner.php | 2 +- .../PatchEnvironmentCompose202Response.php | 2 +- ...entCompose202ResponseSpotConfiguration.php | 2 +- .../PatchEnvironmentCompose400Response.php | 2 +- src/Model/PatchEnvironmentComposeRequest.php | 2 +- ...ronmentComposeRequestSpotConfiguration.php | 2 +- src/Model/PurgeCreateRequest.php | 2 +- .../QueryVectorCollection200Response.php | 2 +- ...yVectorCollection200ResponsePagination.php | 2 +- ...ectorCollection200ResponseResultsInner.php | 2 +- src/Model/QueryVectorCollectionRequest.php | 2 +- .../QueryVectorCollectionRequestFilter.php | 2 +- src/Model/ScalingPolicy.php | 2 +- ...earchSlackWorkspaceChannels200Response.php | 409 ++ ...rkspaceChannels200ResponseResultsInner.php | 443 +++ .../SearchSlackWorkspaceUsers200Response.php | 409 ++ ...kWorkspaceUsers200ResponseResultsInner.php | 477 +++ src/Model/SpotConfiguration.php | 2 +- src/Model/SubmitToolCallback200Response.php | 2 +- src/Model/SubmitToolCallbackRequest.php | 2 +- ...mitToolCallbackRequestToolResultsInner.php | 2 +- src/Model/SyncOperation.php | 2 +- src/Model/SyncSkillCollection200Response.php | 579 +++ src/Model/SyncToEnvironmentRequest.php | 2 +- src/Model/TokensCreate201Response.php | 675 ++++ src/Model/TokensCreateRequest.php | 614 +++ src/Model/TokensDelete200Response.php | 409 ++ src/Model/TokensList200ResponseInner.php | 518 +++ src/Model/UpdateAIAgent200Response.php | 2 +- src/Model/UpdateAIAgentRequest.php | 186 +- src/Model/UpdateAISession200Response.php | 2 +- src/Model/UpdateAISessionRequest.php | 2 +- ...UpdateAISessionRequestNewMessagesInner.php | 2 +- src/Model/UpdateCronJobRequest.php | 2 +- src/Model/UpdateEnvironmentRequest.php | 2 +- src/Model/UpdateEnvironmentStateRequest.php | 2 +- .../UpdateEnvironmentVariableRequest.php | 2 +- src/Model/UpdateFilterPolicyRequest.php | 549 +++ .../UpdateGovernanceConfig200Response.php | 443 +++ src/Model/UpdateGovernanceConfigRequest.php | 698 ++++ src/Model/UpdateSkill200Response.php | 477 +++ src/Model/UpdateSkillRequest.php | 749 ++++ src/Model/UpdateSlackBotRequest.php | 663 ++++ src/Model/UpdateTask200Response.php | 2 +- src/Model/UpdateTaskRequest.php | 2 +- src/Model/UploadFile201Response.php | 2 +- src/Model/UploadFileRequest.php | 2 +- .../UploadVectorDocuments200Response.php | 2 +- src/Model/UploadVectorDocumentsRequest.php | 2 +- ...adVectorDocumentsRequestDocumentsInner.php | 44 +- ...DocumentsRequestDocumentsInnerMetadata.php | 2 +- src/Model/UpsertAgentOverlay200Response.php | 409 ++ src/Model/UpsertAgentOverlayRequest.php | 810 ++++ src/Model/V1ContentItem.php | 2 +- src/Model/V1ContentListResponse.php | 2 +- src/Model/V1ContentRequest.php | 2 +- src/Model/V1DeleteResponse.php | 2 +- src/Model/V1Error.php | 2 +- src/Model/V1FormSubmissionItem.php | 2 +- src/Model/V1FormSubmissionListResponse.php | 2 +- src/Model/V1GetMetricSeriesResponse.php | 2 +- src/Model/V1GetMetricSeriesResponseData.php | 2 +- src/Model/V1GetMetricsResponse.php | 2 +- src/Model/V1GetMetricsResponseData.php | 2 +- src/Model/V1GlobalMetaResponse.php | 2 +- src/Model/V1GlobalMetaResponseGlobalMeta.php | 2 +- src/Model/V1Info.php | 2 +- src/Model/V1Meta.php | 2 +- src/Model/V1MetricDayStats.php | 2 +- src/Model/V1MetricMinuteStats.php | 2 +- src/Model/V1MetricMonthStats.php | 2 +- src/Model/V1PingResponse.php | 2 +- src/Model/V1ProxyItem.php | 2 +- src/Model/V1ProxyListResponse.php | 2 +- src/Model/V1RedirectItem.php | 2 +- src/Model/V1RedirectListResponse.php | 2 +- src/Model/V1RedirectRequest.php | 2 +- src/Model/V1RedirectResponse.php | 2 +- src/Model/V1Revision.php | 2 +- src/Model/V1RevisionsResponse.php | 2 +- src/Model/V1SearchHit.php | 2 +- src/Model/V1SearchItemsResponse.php | 2 +- src/Model/V1SearchMutationResponse.php | 2 +- src/Model/V1SearchRecord.php | 2 +- src/Model/V1SearchResponse.php | 2 +- src/Model/V1SeriesPointDay.php | 2 +- src/Model/V1SeriesPointMonth.php | 2 +- src/Model/V1Transition.php | 2 +- src/Model/V1UploadResponse.php | 2 +- src/Model/V1UrlMetaRequest.php | 2 +- src/Model/V1UrlMetaResponse.php | 2 +- src/Model/V1WafLogItem.php | 2 +- src/Model/V1WafLogListResponse.php | 2 +- src/Model/V2Crawler.php | 2 +- src/Model/V2CrawlerAssets.php | 2 +- src/Model/V2CrawlerAssetsNetworkIntercept.php | 2 +- src/Model/V2CrawlerAssetsParser.php | 2 +- src/Model/V2CrawlerRequest.php | 2 +- src/Model/V2CrawlerRun.php | 2 +- src/Model/V2CrawlerSchedule.php | 4 +- src/Model/V2CrawlerScheduleRequest.php | 11 +- src/Model/V2CrawlerSitemapInner.php | 2 +- src/Model/V2CustomHeaderRequest.php | 2 +- src/Model/V2Domain.php | 2 +- src/Model/V2DomainDnsGoLiveRecordsInner.php | 2 +- .../V2DomainDnsValidationRecordsInner.php | 2 +- src/Model/V2DomainRequest.php | 2 +- src/Model/V2Error.php | 2 +- src/Model/V2MetricData.php | 523 +++ src/Model/V2MetricDataPoint.php | 449 +++ src/Model/V2MetricDataPointTimestamp.php | 382 ++ src/Model/V2MetricsMeta.php | 673 ++++ src/Model/V2MetricsResponse.php | 449 +++ src/Model/V2Organization.php | 2 +- src/Model/V2OrganizationRequest.php | 2 +- src/Model/V2Project.php | 2 +- src/Model/V2ProjectRequest.php | 2 +- src/Model/V2Rule.php | 104 +- src/Model/V2RuleAuth.php | 104 +- src/Model/V2RuleAuthAction.php | 2 +- src/Model/V2RuleAuthRequest.php | 104 +- src/Model/V2RuleBotChallenge.php | 104 +- src/Model/V2RuleBotChallengeAction.php | 2 +- src/Model/V2RuleBotChallengeRequest.php | 104 +- src/Model/V2RuleContentFilter.php | 104 +- src/Model/V2RuleContentFilterAction.php | 2 +- src/Model/V2RuleContentFilterRequest.php | 104 +- src/Model/V2RuleCustomResponse.php | 104 +- src/Model/V2RuleCustomResponseAction.php | 2 +- src/Model/V2RuleCustomResponseRequest.php | 104 +- src/Model/V2RuleFunction.php | 104 +- src/Model/V2RuleFunctionAction.php | 2 +- src/Model/V2RuleFunctionRequest.php | 104 +- src/Model/V2RuleHeader.php | 104 +- src/Model/V2RuleHeaderAction.php | 2 +- src/Model/V2RuleHeaderRequest.php | 104 +- src/Model/V2RuleProxy.php | 104 +- src/Model/V2RuleProxyAction.php | 2 +- src/Model/V2RuleProxyActionNotifyConfig.php | 2 +- .../V2RuleProxyActionQuantCloudSelection.php | 2 +- src/Model/V2RuleProxyRequest.php | 104 +- src/Model/V2RuleRedirect.php | 104 +- src/Model/V2RuleRedirectAction.php | 2 +- src/Model/V2RuleRedirectRequest.php | 104 +- src/Model/V2RuleRequest.php | 116 +- src/Model/V2RuleServeStatic.php | 104 +- src/Model/V2RuleServeStaticAction.php | 2 +- src/Model/V2RuleServeStaticRequest.php | 104 +- src/Model/V2SecretStore.php | 2 +- src/Model/V2SecretStoreRequest.php | 2 +- src/Model/V2Store.php | 2 +- src/Model/V2StoreItem.php | 2 +- src/Model/V2StoreItemRequest.php | 2 +- src/Model/V2StoreItemUpdateRequest.php | 2 +- src/Model/V2StoreItemsListResponse.php | 2 +- src/Model/V2StoreRequest.php | 2 +- src/Model/ValidateCompose200Response.php | 2 +- src/Model/ValidateCompose422Response.php | 2 +- src/Model/ValidateComposeRequest.php | 2 +- src/Model/Variable.php | 2 +- src/Model/Volume.php | 2 +- src/Model/WafConfig.php | 2 +- src/Model/WafConfigBlockLists.php | 2 +- src/Model/WafConfigHttpbl.php | 2 +- src/Model/WafConfigThresholdsInner.php | 2 +- src/ObjectSerializer.php | 2 +- 541 files changed, 61748 insertions(+), 833 deletions(-) create mode 100644 docs/Api/AIFilterPoliciesApi.md create mode 100644 docs/Api/AIGovernanceApi.md create mode 100644 docs/Api/AIOrchestrationsApi.md create mode 100644 docs/Api/AISkillsApi.md create mode 100644 docs/Api/AISlackBotsApi.md create mode 100644 docs/Api/AIUsageApi.md create mode 100644 docs/Api/CDNMetricsApi.md delete mode 100644 docs/Api/OrchestrationApi.md create mode 100644 docs/Api/TokensApi.md create mode 100644 docs/Model/ChatInferenceRequestGuardrails.md create mode 100644 docs/Model/CreateFilterPolicyRequest.md create mode 100644 docs/Model/CreateFilterPolicyRequestRulesInner.md create mode 100644 docs/Model/CreateFilterPolicyRequestRulesInnerMatch.md create mode 100644 docs/Model/CreateOrchestrationRequest.md create mode 100644 docs/Model/CreateOrchestrationRequestInputSource.md create mode 100644 docs/Model/CreateOrchestrationRequestStopCondition.md create mode 100644 docs/Model/CreateSkill201Response.md create mode 100644 docs/Model/CreateSkillRequest.md create mode 100644 docs/Model/CreateSlackBot201Response.md create mode 100644 docs/Model/CreateSlackBotRequest.md rename docs/Model/{DeleteVectorCollection200Response.md => DeleteAgentOverlay200Response.md} (89%) create mode 100644 docs/Model/DeleteSkill200Response.md create mode 100644 docs/Model/DeleteSkillCollection200Response.md create mode 100644 docs/Model/DeleteSlackBot200Response.md create mode 100644 docs/Model/DeleteVectorDocuments200Response.md create mode 100644 docs/Model/DeleteVectorDocumentsRequest.md create mode 100644 docs/Model/DeleteVectorDocumentsRequestMetadata.md create mode 100644 docs/Model/GetAgentOverlay200Response.md create mode 100644 docs/Model/GetAgentOverlay200ResponseBase.md create mode 100644 docs/Model/GetAgentOverlay200ResponseOverlay.md create mode 100644 docs/Model/GetGovernanceConfig200Response.md create mode 100644 docs/Model/GetGovernanceConfig200ResponseSpendLimits.md create mode 100644 docs/Model/GetMyUsage200Response.md create mode 100644 docs/Model/GetMyUsage200ResponseDaily.md create mode 100644 docs/Model/GetMyUsage200ResponseMonthly.md create mode 100644 docs/Model/GetSkill200Response.md create mode 100644 docs/Model/GetSkill200ResponseSkill.md create mode 100644 docs/Model/GetSlackBot200Response.md create mode 100644 docs/Model/GetSlackBot200ResponseBot.md create mode 100644 docs/Model/ImportSkill201Response.md create mode 100644 docs/Model/ImportSkillCollection201Response.md create mode 100644 docs/Model/ImportSkillCollectionRequest.md create mode 100644 docs/Model/ImportSkillCollectionRequestSource.md create mode 100644 docs/Model/ImportSkillRequest.md create mode 100644 docs/Model/ImportSkillRequestSource.md create mode 100644 docs/Model/KVLinkToProject200Response.md create mode 100644 docs/Model/KVLinkToProjectRequest.md create mode 100644 docs/Model/ListOrchestrationBatches200Response.md create mode 100644 docs/Model/ListOrchestrationBatches200ResponseBatchesInner.md create mode 100644 docs/Model/ListOrchestrations200Response.md create mode 100644 docs/Model/ListSkillCollections200Response.md create mode 100644 docs/Model/ListSkillCollections200ResponseCollectionsInner.md create mode 100644 docs/Model/ListSkills200Response.md create mode 100644 docs/Model/ListSkills200ResponseSkillsInner.md create mode 100644 docs/Model/ListSlackBots200Response.md create mode 100644 docs/Model/ListSlackBots200ResponseBotsInner.md create mode 100644 docs/Model/SearchSlackWorkspaceChannels200Response.md create mode 100644 docs/Model/SearchSlackWorkspaceChannels200ResponseResultsInner.md create mode 100644 docs/Model/SearchSlackWorkspaceUsers200Response.md create mode 100644 docs/Model/SearchSlackWorkspaceUsers200ResponseResultsInner.md create mode 100644 docs/Model/SyncSkillCollection200Response.md create mode 100644 docs/Model/TokensCreate201Response.md create mode 100644 docs/Model/TokensCreateRequest.md create mode 100644 docs/Model/TokensDelete200Response.md create mode 100644 docs/Model/TokensList200ResponseInner.md create mode 100644 docs/Model/UpdateFilterPolicyRequest.md create mode 100644 docs/Model/UpdateGovernanceConfig200Response.md create mode 100644 docs/Model/UpdateGovernanceConfigRequest.md create mode 100644 docs/Model/UpdateSkill200Response.md create mode 100644 docs/Model/UpdateSkillRequest.md create mode 100644 docs/Model/UpdateSlackBotRequest.md create mode 100644 docs/Model/UpsertAgentOverlay200Response.md create mode 100644 docs/Model/UpsertAgentOverlayRequest.md create mode 100644 docs/Model/V2MetricData.md create mode 100644 docs/Model/V2MetricDataPoint.md create mode 100644 docs/Model/V2MetricDataPointTimestamp.md create mode 100644 docs/Model/V2MetricsMeta.md create mode 100644 docs/Model/V2MetricsResponse.md create mode 100644 src/Api/AIFilterPoliciesApi.php create mode 100644 src/Api/AIGovernanceApi.php create mode 100644 src/Api/AIOrchestrationsApi.php create mode 100644 src/Api/AISkillsApi.php create mode 100644 src/Api/AISlackBotsApi.php rename src/Api/{OrchestrationApi.php => AIUsageApi.php} (71%) create mode 100644 src/Api/CDNMetricsApi.php create mode 100644 src/Api/TokensApi.php create mode 100644 src/Model/ChatInferenceRequestGuardrails.php create mode 100644 src/Model/CreateFilterPolicyRequest.php create mode 100644 src/Model/CreateFilterPolicyRequestRulesInner.php create mode 100644 src/Model/CreateFilterPolicyRequestRulesInnerMatch.php create mode 100644 src/Model/CreateOrchestrationRequest.php create mode 100644 src/Model/CreateOrchestrationRequestInputSource.php create mode 100644 src/Model/CreateOrchestrationRequestStopCondition.php create mode 100644 src/Model/CreateSkill201Response.php create mode 100644 src/Model/CreateSkillRequest.php create mode 100644 src/Model/CreateSlackBot201Response.php create mode 100644 src/Model/CreateSlackBotRequest.php rename src/Model/{DeleteVectorCollection200Response.php => DeleteAgentOverlay200Response.php} (96%) create mode 100644 src/Model/DeleteSkill200Response.php create mode 100644 src/Model/DeleteSkillCollection200Response.php create mode 100644 src/Model/DeleteSlackBot200Response.php create mode 100644 src/Model/DeleteVectorDocuments200Response.php create mode 100644 src/Model/DeleteVectorDocumentsRequest.php create mode 100644 src/Model/DeleteVectorDocumentsRequestMetadata.php create mode 100644 src/Model/GetAgentOverlay200Response.php create mode 100644 src/Model/GetAgentOverlay200ResponseBase.php create mode 100644 src/Model/GetAgentOverlay200ResponseOverlay.php create mode 100644 src/Model/GetGovernanceConfig200Response.php create mode 100644 src/Model/GetGovernanceConfig200ResponseSpendLimits.php create mode 100644 src/Model/GetMyUsage200Response.php create mode 100644 src/Model/GetMyUsage200ResponseDaily.php create mode 100644 src/Model/GetMyUsage200ResponseMonthly.php create mode 100644 src/Model/GetSkill200Response.php create mode 100644 src/Model/GetSkill200ResponseSkill.php create mode 100644 src/Model/GetSlackBot200Response.php create mode 100644 src/Model/GetSlackBot200ResponseBot.php create mode 100644 src/Model/ImportSkill201Response.php create mode 100644 src/Model/ImportSkillCollection201Response.php create mode 100644 src/Model/ImportSkillCollectionRequest.php create mode 100644 src/Model/ImportSkillCollectionRequestSource.php create mode 100644 src/Model/ImportSkillRequest.php create mode 100644 src/Model/ImportSkillRequestSource.php create mode 100644 src/Model/KVLinkToProject200Response.php create mode 100644 src/Model/KVLinkToProjectRequest.php create mode 100644 src/Model/ListOrchestrationBatches200Response.php create mode 100644 src/Model/ListOrchestrationBatches200ResponseBatchesInner.php create mode 100644 src/Model/ListOrchestrations200Response.php create mode 100644 src/Model/ListSkillCollections200Response.php create mode 100644 src/Model/ListSkillCollections200ResponseCollectionsInner.php create mode 100644 src/Model/ListSkills200Response.php create mode 100644 src/Model/ListSkills200ResponseSkillsInner.php create mode 100644 src/Model/ListSlackBots200Response.php create mode 100644 src/Model/ListSlackBots200ResponseBotsInner.php create mode 100644 src/Model/SearchSlackWorkspaceChannels200Response.php create mode 100644 src/Model/SearchSlackWorkspaceChannels200ResponseResultsInner.php create mode 100644 src/Model/SearchSlackWorkspaceUsers200Response.php create mode 100644 src/Model/SearchSlackWorkspaceUsers200ResponseResultsInner.php create mode 100644 src/Model/SyncSkillCollection200Response.php create mode 100644 src/Model/TokensCreate201Response.php create mode 100644 src/Model/TokensCreateRequest.php create mode 100644 src/Model/TokensDelete200Response.php create mode 100644 src/Model/TokensList200ResponseInner.php create mode 100644 src/Model/UpdateFilterPolicyRequest.php create mode 100644 src/Model/UpdateGovernanceConfig200Response.php create mode 100644 src/Model/UpdateGovernanceConfigRequest.php create mode 100644 src/Model/UpdateSkill200Response.php create mode 100644 src/Model/UpdateSkillRequest.php create mode 100644 src/Model/UpdateSlackBotRequest.php create mode 100644 src/Model/UpsertAgentOverlay200Response.php create mode 100644 src/Model/UpsertAgentOverlayRequest.php create mode 100644 src/Model/V2MetricData.php create mode 100644 src/Model/V2MetricDataPoint.php create mode 100644 src/Model/V2MetricDataPointTimestamp.php create mode 100644 src/Model/V2MetricsMeta.php create mode 100644 src/Model/V2MetricsResponse.php diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index c2443d1..812f393 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -5,15 +5,22 @@ README.md docs/Api/AIAgentsApi.md docs/Api/AICustomToolsApi.md docs/Api/AIFileStorageApi.md +docs/Api/AIFilterPoliciesApi.md +docs/Api/AIGovernanceApi.md docs/Api/AIInferenceApi.md docs/Api/AIModelsApi.md docs/Api/AIMonitoringApi.md +docs/Api/AIOrchestrationsApi.md docs/Api/AISessionsApi.md +docs/Api/AISkillsApi.md +docs/Api/AISlackBotsApi.md docs/Api/AITaskManagementApi.md docs/Api/AIToolsApi.md +docs/Api/AIUsageApi.md docs/Api/AIVectorDatabaseApi.md docs/Api/ApplicationsApi.md docs/Api/BackupManagementApi.md +docs/Api/CDNMetricsApi.md docs/Api/CommandsApi.md docs/Api/ComposeApi.md docs/Api/ContainersApi.md @@ -24,13 +31,13 @@ docs/Api/DomainsApi.md docs/Api/EnvironmentsApi.md docs/Api/HeadersApi.md docs/Api/KVApi.md -docs/Api/OrchestrationApi.md docs/Api/OrganizationsApi.md docs/Api/ProjectsApi.md docs/Api/PurgeApi.md docs/Api/RulesApi.md docs/Api/SSHAccessApi.md docs/Api/ScalingPolicyApi.md +docs/Api/TokensApi.md docs/Api/VariablesApi.md docs/Api/VolumesApi.md docs/Model/Application.md @@ -50,6 +57,7 @@ docs/Model/ChatInference200ResponseResponseToolUseOneOfResult.md docs/Model/ChatInference200ResponseUsage.md docs/Model/ChatInference202Response.md docs/Model/ChatInferenceRequest.md +docs/Model/ChatInferenceRequestGuardrails.md docs/Model/ChatInferenceRequestMessagesInner.md docs/Model/ChatInferenceRequestMessagesInnerContent.md docs/Model/ChatInferenceRequestMessagesInnerContentOneOfInner.md @@ -107,6 +115,16 @@ docs/Model/CreateCustomToolRequest.md docs/Model/CreateEnvironment403Response.md docs/Model/CreateEnvironmentRequest.md docs/Model/CreateEnvironmentRequestEnvironmentInner.md +docs/Model/CreateFilterPolicyRequest.md +docs/Model/CreateFilterPolicyRequestRulesInner.md +docs/Model/CreateFilterPolicyRequestRulesInnerMatch.md +docs/Model/CreateOrchestrationRequest.md +docs/Model/CreateOrchestrationRequestInputSource.md +docs/Model/CreateOrchestrationRequestStopCondition.md +docs/Model/CreateSkill201Response.md +docs/Model/CreateSkillRequest.md +docs/Model/CreateSlackBot201Response.md +docs/Model/CreateSlackBotRequest.md docs/Model/CreateTask201Response.md docs/Model/CreateTaskRequest.md docs/Model/CreateVectorCollection201Response.md @@ -117,12 +135,18 @@ docs/Model/Cron.md docs/Model/CronRun.md docs/Model/DeleteAIAgent200Response.md docs/Model/DeleteAISession200Response.md +docs/Model/DeleteAgentOverlay200Response.md docs/Model/DeleteBackup200Response.md docs/Model/DeleteCustomTool200Response.md docs/Model/DeleteFile200Response.md +docs/Model/DeleteSkill200Response.md +docs/Model/DeleteSkillCollection200Response.md +docs/Model/DeleteSlackBot200Response.md docs/Model/DeleteTask200Response.md docs/Model/DeleteTask409Response.md -docs/Model/DeleteVectorCollection200Response.md +docs/Model/DeleteVectorDocuments200Response.md +docs/Model/DeleteVectorDocumentsRequest.md +docs/Model/DeleteVectorDocumentsRequestMetadata.md docs/Model/DownloadBackup200Response.md docs/Model/Embeddings200Response.md docs/Model/Embeddings200ResponseEmbeddings.md @@ -149,6 +173,9 @@ docs/Model/GetAIToolExecutionStatus200ResponseResult.md docs/Model/GetAIToolExecutionStatus404Response.md docs/Model/GetAIUsageStats200Response.md docs/Model/GetAIUsageStats200ResponseByModelValue.md +docs/Model/GetAgentOverlay200Response.md +docs/Model/GetAgentOverlay200ResponseBase.md +docs/Model/GetAgentOverlay200ResponseOverlay.md docs/Model/GetDependencyGraph200Response.md docs/Model/GetDurableExecutionStatus200Response.md docs/Model/GetDurableExecutionStatus200ResponseError.md @@ -160,6 +187,15 @@ docs/Model/GetEcrLoginCredentials200Response.md docs/Model/GetEnvironmentLogs200Response.md docs/Model/GetEnvironmentLogs200ResponseLogEventsInner.md docs/Model/GetFile200Response.md +docs/Model/GetGovernanceConfig200Response.md +docs/Model/GetGovernanceConfig200ResponseSpendLimits.md +docs/Model/GetMyUsage200Response.md +docs/Model/GetMyUsage200ResponseDaily.md +docs/Model/GetMyUsage200ResponseMonthly.md +docs/Model/GetSkill200Response.md +docs/Model/GetSkill200ResponseSkill.md +docs/Model/GetSlackBot200Response.md +docs/Model/GetSlackBot200ResponseBot.md docs/Model/GetSshAccessCredentials200Response.md docs/Model/GetSshAccessCredentials200ResponseCredentials.md docs/Model/GetTask200Response.md @@ -174,10 +210,18 @@ docs/Model/ImageGenerationRequestImageVariationParams.md docs/Model/ImageGenerationRequestInPaintingParams.md docs/Model/ImageGenerationRequestOutPaintingParams.md docs/Model/ImageGenerationRequestTextToImageParams.md +docs/Model/ImportSkill201Response.md +docs/Model/ImportSkillCollection201Response.md +docs/Model/ImportSkillCollectionRequest.md +docs/Model/ImportSkillCollectionRequestSource.md +docs/Model/ImportSkillRequest.md +docs/Model/ImportSkillRequestSource.md docs/Model/KVItemsCreate200Response.md docs/Model/KVItemsDelete200Response.md docs/Model/KVItemsShow200Response.md docs/Model/KVItemsShow200ResponseValue.md +docs/Model/KVLinkToProject200Response.md +docs/Model/KVLinkToProjectRequest.md docs/Model/ListAIAgents200Response.md docs/Model/ListAIAgents200ResponseAgentsInner.md docs/Model/ListAIModels200Response.md @@ -198,6 +242,15 @@ docs/Model/ListCustomTools200Response.md docs/Model/ListCustomTools200ResponseToolsInner.md docs/Model/ListFiles200Response.md docs/Model/ListFiles200ResponseFilesInner.md +docs/Model/ListOrchestrationBatches200Response.md +docs/Model/ListOrchestrationBatches200ResponseBatchesInner.md +docs/Model/ListOrchestrations200Response.md +docs/Model/ListSkillCollections200Response.md +docs/Model/ListSkillCollections200ResponseCollectionsInner.md +docs/Model/ListSkills200Response.md +docs/Model/ListSkills200ResponseSkillsInner.md +docs/Model/ListSlackBots200Response.md +docs/Model/ListSlackBots200ResponseBotsInner.md docs/Model/ListTasks200Response.md docs/Model/ListTasks200ResponseTasksInner.md docs/Model/ListVectorCollections200Response.md @@ -215,12 +268,21 @@ docs/Model/QueryVectorCollection200ResponseResultsInner.md docs/Model/QueryVectorCollectionRequest.md docs/Model/QueryVectorCollectionRequestFilter.md docs/Model/ScalingPolicy.md +docs/Model/SearchSlackWorkspaceChannels200Response.md +docs/Model/SearchSlackWorkspaceChannels200ResponseResultsInner.md +docs/Model/SearchSlackWorkspaceUsers200Response.md +docs/Model/SearchSlackWorkspaceUsers200ResponseResultsInner.md docs/Model/SpotConfiguration.md docs/Model/SubmitToolCallback200Response.md docs/Model/SubmitToolCallbackRequest.md docs/Model/SubmitToolCallbackRequestToolResultsInner.md docs/Model/SyncOperation.md +docs/Model/SyncSkillCollection200Response.md docs/Model/SyncToEnvironmentRequest.md +docs/Model/TokensCreate201Response.md +docs/Model/TokensCreateRequest.md +docs/Model/TokensDelete200Response.md +docs/Model/TokensList200ResponseInner.md docs/Model/UpdateAIAgent200Response.md docs/Model/UpdateAIAgentRequest.md docs/Model/UpdateAISession200Response.md @@ -230,6 +292,12 @@ docs/Model/UpdateCronJobRequest.md docs/Model/UpdateEnvironmentRequest.md docs/Model/UpdateEnvironmentStateRequest.md docs/Model/UpdateEnvironmentVariableRequest.md +docs/Model/UpdateFilterPolicyRequest.md +docs/Model/UpdateGovernanceConfig200Response.md +docs/Model/UpdateGovernanceConfigRequest.md +docs/Model/UpdateSkill200Response.md +docs/Model/UpdateSkillRequest.md +docs/Model/UpdateSlackBotRequest.md docs/Model/UpdateTask200Response.md docs/Model/UpdateTaskRequest.md docs/Model/UploadFile201Response.md @@ -238,6 +306,8 @@ docs/Model/UploadVectorDocuments200Response.md docs/Model/UploadVectorDocumentsRequest.md docs/Model/UploadVectorDocumentsRequestDocumentsInner.md docs/Model/UploadVectorDocumentsRequestDocumentsInnerMetadata.md +docs/Model/UpsertAgentOverlay200Response.md +docs/Model/UpsertAgentOverlayRequest.md docs/Model/V1ContentItem.md docs/Model/V1ContentListResponse.md docs/Model/V1ContentRequest.md @@ -293,6 +363,11 @@ docs/Model/V2DomainDnsGoLiveRecordsInner.md docs/Model/V2DomainDnsValidationRecordsInner.md docs/Model/V2DomainRequest.md docs/Model/V2Error.md +docs/Model/V2MetricData.md +docs/Model/V2MetricDataPoint.md +docs/Model/V2MetricDataPointTimestamp.md +docs/Model/V2MetricsMeta.md +docs/Model/V2MetricsResponse.md docs/Model/V2Organization.md docs/Model/V2OrganizationRequest.md docs/Model/V2Project.md @@ -350,15 +425,22 @@ phpunit.xml.dist src/Api/AIAgentsApi.php src/Api/AICustomToolsApi.php src/Api/AIFileStorageApi.php +src/Api/AIFilterPoliciesApi.php +src/Api/AIGovernanceApi.php src/Api/AIInferenceApi.php src/Api/AIModelsApi.php src/Api/AIMonitoringApi.php +src/Api/AIOrchestrationsApi.php src/Api/AISessionsApi.php +src/Api/AISkillsApi.php +src/Api/AISlackBotsApi.php src/Api/AITaskManagementApi.php src/Api/AIToolsApi.php +src/Api/AIUsageApi.php src/Api/AIVectorDatabaseApi.php src/Api/ApplicationsApi.php src/Api/BackupManagementApi.php +src/Api/CDNMetricsApi.php src/Api/CommandsApi.php src/Api/ComposeApi.php src/Api/ContainersApi.php @@ -369,13 +451,13 @@ src/Api/DomainsApi.php src/Api/EnvironmentsApi.php src/Api/HeadersApi.php src/Api/KVApi.php -src/Api/OrchestrationApi.php src/Api/OrganizationsApi.php src/Api/ProjectsApi.php src/Api/PurgeApi.php src/Api/RulesApi.php src/Api/SSHAccessApi.php src/Api/ScalingPolicyApi.php +src/Api/TokensApi.php src/Api/VariablesApi.php src/Api/VolumesApi.php src/ApiException.php @@ -399,6 +481,7 @@ src/Model/ChatInference200ResponseResponseToolUseOneOfResult.php src/Model/ChatInference200ResponseUsage.php src/Model/ChatInference202Response.php src/Model/ChatInferenceRequest.php +src/Model/ChatInferenceRequestGuardrails.php src/Model/ChatInferenceRequestMessagesInner.php src/Model/ChatInferenceRequestMessagesInnerContent.php src/Model/ChatInferenceRequestMessagesInnerContentOneOfInner.php @@ -456,6 +539,16 @@ src/Model/CreateCustomToolRequest.php src/Model/CreateEnvironment403Response.php src/Model/CreateEnvironmentRequest.php src/Model/CreateEnvironmentRequestEnvironmentInner.php +src/Model/CreateFilterPolicyRequest.php +src/Model/CreateFilterPolicyRequestRulesInner.php +src/Model/CreateFilterPolicyRequestRulesInnerMatch.php +src/Model/CreateOrchestrationRequest.php +src/Model/CreateOrchestrationRequestInputSource.php +src/Model/CreateOrchestrationRequestStopCondition.php +src/Model/CreateSkill201Response.php +src/Model/CreateSkillRequest.php +src/Model/CreateSlackBot201Response.php +src/Model/CreateSlackBotRequest.php src/Model/CreateTask201Response.php src/Model/CreateTaskRequest.php src/Model/CreateVectorCollection201Response.php @@ -466,12 +559,18 @@ src/Model/Cron.php src/Model/CronRun.php src/Model/DeleteAIAgent200Response.php src/Model/DeleteAISession200Response.php +src/Model/DeleteAgentOverlay200Response.php src/Model/DeleteBackup200Response.php src/Model/DeleteCustomTool200Response.php src/Model/DeleteFile200Response.php +src/Model/DeleteSkill200Response.php +src/Model/DeleteSkillCollection200Response.php +src/Model/DeleteSlackBot200Response.php src/Model/DeleteTask200Response.php src/Model/DeleteTask409Response.php -src/Model/DeleteVectorCollection200Response.php +src/Model/DeleteVectorDocuments200Response.php +src/Model/DeleteVectorDocumentsRequest.php +src/Model/DeleteVectorDocumentsRequestMetadata.php src/Model/DownloadBackup200Response.php src/Model/Embeddings200Response.php src/Model/Embeddings200ResponseEmbeddings.php @@ -498,6 +597,9 @@ src/Model/GetAIToolExecutionStatus200ResponseResult.php src/Model/GetAIToolExecutionStatus404Response.php src/Model/GetAIUsageStats200Response.php src/Model/GetAIUsageStats200ResponseByModelValue.php +src/Model/GetAgentOverlay200Response.php +src/Model/GetAgentOverlay200ResponseBase.php +src/Model/GetAgentOverlay200ResponseOverlay.php src/Model/GetDependencyGraph200Response.php src/Model/GetDurableExecutionStatus200Response.php src/Model/GetDurableExecutionStatus200ResponseError.php @@ -509,6 +611,15 @@ src/Model/GetEcrLoginCredentials200Response.php src/Model/GetEnvironmentLogs200Response.php src/Model/GetEnvironmentLogs200ResponseLogEventsInner.php src/Model/GetFile200Response.php +src/Model/GetGovernanceConfig200Response.php +src/Model/GetGovernanceConfig200ResponseSpendLimits.php +src/Model/GetMyUsage200Response.php +src/Model/GetMyUsage200ResponseDaily.php +src/Model/GetMyUsage200ResponseMonthly.php +src/Model/GetSkill200Response.php +src/Model/GetSkill200ResponseSkill.php +src/Model/GetSlackBot200Response.php +src/Model/GetSlackBot200ResponseBot.php src/Model/GetSshAccessCredentials200Response.php src/Model/GetSshAccessCredentials200ResponseCredentials.php src/Model/GetTask200Response.php @@ -523,10 +634,18 @@ src/Model/ImageGenerationRequestImageVariationParams.php src/Model/ImageGenerationRequestInPaintingParams.php src/Model/ImageGenerationRequestOutPaintingParams.php src/Model/ImageGenerationRequestTextToImageParams.php +src/Model/ImportSkill201Response.php +src/Model/ImportSkillCollection201Response.php +src/Model/ImportSkillCollectionRequest.php +src/Model/ImportSkillCollectionRequestSource.php +src/Model/ImportSkillRequest.php +src/Model/ImportSkillRequestSource.php src/Model/KVItemsCreate200Response.php src/Model/KVItemsDelete200Response.php src/Model/KVItemsShow200Response.php src/Model/KVItemsShow200ResponseValue.php +src/Model/KVLinkToProject200Response.php +src/Model/KVLinkToProjectRequest.php src/Model/ListAIAgents200Response.php src/Model/ListAIAgents200ResponseAgentsInner.php src/Model/ListAIModels200Response.php @@ -547,6 +666,15 @@ src/Model/ListCustomTools200Response.php src/Model/ListCustomTools200ResponseToolsInner.php src/Model/ListFiles200Response.php src/Model/ListFiles200ResponseFilesInner.php +src/Model/ListOrchestrationBatches200Response.php +src/Model/ListOrchestrationBatches200ResponseBatchesInner.php +src/Model/ListOrchestrations200Response.php +src/Model/ListSkillCollections200Response.php +src/Model/ListSkillCollections200ResponseCollectionsInner.php +src/Model/ListSkills200Response.php +src/Model/ListSkills200ResponseSkillsInner.php +src/Model/ListSlackBots200Response.php +src/Model/ListSlackBots200ResponseBotsInner.php src/Model/ListTasks200Response.php src/Model/ListTasks200ResponseTasksInner.php src/Model/ListVectorCollections200Response.php @@ -565,12 +693,21 @@ src/Model/QueryVectorCollection200ResponseResultsInner.php src/Model/QueryVectorCollectionRequest.php src/Model/QueryVectorCollectionRequestFilter.php src/Model/ScalingPolicy.php +src/Model/SearchSlackWorkspaceChannels200Response.php +src/Model/SearchSlackWorkspaceChannels200ResponseResultsInner.php +src/Model/SearchSlackWorkspaceUsers200Response.php +src/Model/SearchSlackWorkspaceUsers200ResponseResultsInner.php src/Model/SpotConfiguration.php src/Model/SubmitToolCallback200Response.php src/Model/SubmitToolCallbackRequest.php src/Model/SubmitToolCallbackRequestToolResultsInner.php src/Model/SyncOperation.php +src/Model/SyncSkillCollection200Response.php src/Model/SyncToEnvironmentRequest.php +src/Model/TokensCreate201Response.php +src/Model/TokensCreateRequest.php +src/Model/TokensDelete200Response.php +src/Model/TokensList200ResponseInner.php src/Model/UpdateAIAgent200Response.php src/Model/UpdateAIAgentRequest.php src/Model/UpdateAISession200Response.php @@ -580,6 +717,12 @@ src/Model/UpdateCronJobRequest.php src/Model/UpdateEnvironmentRequest.php src/Model/UpdateEnvironmentStateRequest.php src/Model/UpdateEnvironmentVariableRequest.php +src/Model/UpdateFilterPolicyRequest.php +src/Model/UpdateGovernanceConfig200Response.php +src/Model/UpdateGovernanceConfigRequest.php +src/Model/UpdateSkill200Response.php +src/Model/UpdateSkillRequest.php +src/Model/UpdateSlackBotRequest.php src/Model/UpdateTask200Response.php src/Model/UpdateTaskRequest.php src/Model/UploadFile201Response.php @@ -588,6 +731,8 @@ src/Model/UploadVectorDocuments200Response.php src/Model/UploadVectorDocumentsRequest.php src/Model/UploadVectorDocumentsRequestDocumentsInner.php src/Model/UploadVectorDocumentsRequestDocumentsInnerMetadata.php +src/Model/UpsertAgentOverlay200Response.php +src/Model/UpsertAgentOverlayRequest.php src/Model/V1ContentItem.php src/Model/V1ContentListResponse.php src/Model/V1ContentRequest.php @@ -643,6 +788,11 @@ src/Model/V2DomainDnsGoLiveRecordsInner.php src/Model/V2DomainDnsValidationRecordsInner.php src/Model/V2DomainRequest.php src/Model/V2Error.php +src/Model/V2MetricData.php +src/Model/V2MetricDataPoint.php +src/Model/V2MetricDataPointTimestamp.php +src/Model/V2MetricsMeta.php +src/Model/V2MetricsResponse.php src/Model/V2Organization.php src/Model/V2OrganizationRequest.php src/Model/V2Project.php diff --git a/README.md b/README.md index 6f5f058..685ba4b 100644 --- a/README.md +++ b/README.md @@ -80,9 +80,12 @@ Class | Method | HTTP request | Description *AIAgentsApi* | [**chatWithAIAgent**](docs/Api/AIAgentsApi.md#chatwithaiagent) | **POST** /api/v3/organizations/{organisation}/ai/agents/{agentId}/chat | Chat with AI Agent *AIAgentsApi* | [**createAIAgent**](docs/Api/AIAgentsApi.md#createaiagent) | **POST** /api/v3/organizations/{organisation}/ai/agents | Create AI Agent *AIAgentsApi* | [**deleteAIAgent**](docs/Api/AIAgentsApi.md#deleteaiagent) | **DELETE** /api/v3/organizations/{organisation}/ai/agents/{agentId} | Delete Agent +*AIAgentsApi* | [**deleteAgentOverlay**](docs/Api/AIAgentsApi.md#deleteagentoverlay) | **DELETE** /api/v3/organizations/{organisation}/ai/agents/{agentId}/overlay | Delete Agent Overlay *AIAgentsApi* | [**getAIAgent**](docs/Api/AIAgentsApi.md#getaiagent) | **GET** /api/v3/organizations/{organisation}/ai/agents/{agentId} | Get Agent Details +*AIAgentsApi* | [**getAgentOverlay**](docs/Api/AIAgentsApi.md#getagentoverlay) | **GET** /api/v3/organizations/{organisation}/ai/agents/{agentId}/overlay | Get Agent Overlay *AIAgentsApi* | [**listAIAgents**](docs/Api/AIAgentsApi.md#listaiagents) | **GET** /api/v3/organizations/{organisation}/ai/agents | List AI Agents *AIAgentsApi* | [**updateAIAgent**](docs/Api/AIAgentsApi.md#updateaiagent) | **PUT** /api/v3/organizations/{organisation}/ai/agents/{agentId} | Update Agent +*AIAgentsApi* | [**upsertAgentOverlay**](docs/Api/AIAgentsApi.md#upsertagentoverlay) | **PUT** /api/v3/organizations/{organisation}/ai/agents/{agentId}/overlay | Upsert Agent Overlay *AICustomToolsApi* | [**createCustomTool**](docs/Api/AICustomToolsApi.md#createcustomtool) | **POST** /api/v3/organizations/{organisation}/ai/custom-tools | Register Custom Edge Function Tool *AICustomToolsApi* | [**deleteCustomTool**](docs/Api/AICustomToolsApi.md#deletecustomtool) | **DELETE** /api/v3/organizations/{organisation}/ai/custom-tools/{toolName} | Delete Custom Tool *AICustomToolsApi* | [**listCustomTools**](docs/Api/AICustomToolsApi.md#listcustomtools) | **GET** /api/v3/organizations/{organisation}/ai/custom-tools | List Custom Tools @@ -90,6 +93,16 @@ Class | Method | HTTP request | Description *AIFileStorageApi* | [**getFile**](docs/Api/AIFileStorageApi.md#getfile) | **GET** /api/v3/organizations/{organisation}/ai/files/{fileId} | Get File *AIFileStorageApi* | [**listFiles**](docs/Api/AIFileStorageApi.md#listfiles) | **GET** /api/v3/organizations/{organisation}/ai/files | List Files *AIFileStorageApi* | [**uploadFile**](docs/Api/AIFileStorageApi.md#uploadfile) | **POST** /api/v3/organizations/{organisation}/ai/files | Upload File to S3 +*AIFilterPoliciesApi* | [**createFilterPolicy**](docs/Api/AIFilterPoliciesApi.md#createfilterpolicy) | **POST** /api/v3/organizations/{organisation}/ai/filter-policies | Create an AI filter policy for an organisation +*AIFilterPoliciesApi* | [**deleteFilterPolicy**](docs/Api/AIFilterPoliciesApi.md#deletefilterpolicy) | **DELETE** /api/v3/organizations/{organisation}/ai/filter-policies/{policyId} | Delete a specific AI filter policy +*AIFilterPoliciesApi* | [**disableFilterPolicy**](docs/Api/AIFilterPoliciesApi.md#disablefilterpolicy) | **PUT** /api/v3/organizations/{organisation}/ai/filter-policies/{policyId}/disable | Disable a specific AI filter policy +*AIFilterPoliciesApi* | [**enableFilterPolicy**](docs/Api/AIFilterPoliciesApi.md#enablefilterpolicy) | **PUT** /api/v3/organizations/{organisation}/ai/filter-policies/{policyId}/enable | Enable a specific AI filter policy +*AIFilterPoliciesApi* | [**getFilterPolicy**](docs/Api/AIFilterPoliciesApi.md#getfilterpolicy) | **GET** /api/v3/organizations/{organisation}/ai/filter-policies/{policyId} | Get a specific AI filter policy +*AIFilterPoliciesApi* | [**listFilterPolicies**](docs/Api/AIFilterPoliciesApi.md#listfilterpolicies) | **GET** /api/v3/organizations/{organisation}/ai/filter-policies | List AI filter policies for an organisation +*AIFilterPoliciesApi* | [**updateFilterPolicy**](docs/Api/AIFilterPoliciesApi.md#updatefilterpolicy) | **PUT** /api/v3/organizations/{organisation}/ai/filter-policies/{policyId} | Update a specific AI filter policy +*AIGovernanceApi* | [**getGovernanceConfig**](docs/Api/AIGovernanceApi.md#getgovernanceconfig) | **GET** /api/v3/organizations/{organisation}/ai/governance | Get AI governance configuration for an organisation +*AIGovernanceApi* | [**getGovernanceSpend**](docs/Api/AIGovernanceApi.md#getgovernancespend) | **GET** /api/v3/organizations/{organisation}/ai/governance/spend | Get AI spend summary for an organisation +*AIGovernanceApi* | [**updateGovernanceConfig**](docs/Api/AIGovernanceApi.md#updategovernanceconfig) | **PUT** /api/v3/organizations/{organisation}/ai/governance | Update AI governance configuration for an organisation *AIInferenceApi* | [**chatInference**](docs/Api/AIInferenceApi.md#chatinference) | **POST** /api/v3/organizations/{organisation}/ai/chat | Chat inference via API Gateway (buffered responses) with multimodal support *AIInferenceApi* | [**chatInferenceStream**](docs/Api/AIInferenceApi.md#chatinferencestream) | **POST** /api/v3/organizations/{organisation}/ai/chat/stream | Chat inference via streaming endpoint (true HTTP streaming) with multimodal support *AIInferenceApi* | [**embeddings**](docs/Api/AIInferenceApi.md#embeddings) | **POST** /api/v3/organizations/{organisation}/ai/embeddings | Generate text embeddings for semantic search and RAG applications @@ -99,27 +112,57 @@ Class | Method | HTTP request | Description *AIModelsApi* | [**getAIModel**](docs/Api/AIModelsApi.md#getaimodel) | **GET** /api/v3/organizations/{organisation}/ai/models/{modelId} | Get AI Model Details *AIModelsApi* | [**listAIModels**](docs/Api/AIModelsApi.md#listaimodels) | **GET** /api/v3/organizations/{organisation}/ai/models | List available AI models for an organization *AIMonitoringApi* | [**getAIUsageStats**](docs/Api/AIMonitoringApi.md#getaiusagestats) | **GET** /api/v3/organizations/{organisation}/ai/usage | Get AI usage statistics +*AIOrchestrationsApi* | [**cancelOrchestration**](docs/Api/AIOrchestrationsApi.md#cancelorchestration) | **POST** /api/v3/organizations/{organisation}/ai/orchestrations/{orchestrationId}/cancel | Cancel Durable Orchestration +*AIOrchestrationsApi* | [**createOrchestration**](docs/Api/AIOrchestrationsApi.md#createorchestration) | **POST** /api/v3/organizations/{organisation}/ai/orchestrations | Create Durable Orchestration +*AIOrchestrationsApi* | [**deleteOrchestration**](docs/Api/AIOrchestrationsApi.md#deleteorchestration) | **DELETE** /api/v3/organizations/{organisation}/ai/orchestrations/{orchestrationId} | Delete Durable Orchestration +*AIOrchestrationsApi* | [**getOrchestration**](docs/Api/AIOrchestrationsApi.md#getorchestration) | **GET** /api/v3/organizations/{organisation}/ai/orchestrations/{orchestrationId} | Get Durable Orchestration +*AIOrchestrationsApi* | [**listOrchestrationBatches**](docs/Api/AIOrchestrationsApi.md#listorchestrationbatches) | **GET** /api/v3/organizations/{organisation}/ai/orchestrations/{orchestrationId}/batches | List Orchestration Batches +*AIOrchestrationsApi* | [**listOrchestrations**](docs/Api/AIOrchestrationsApi.md#listorchestrations) | **GET** /api/v3/organizations/{organisation}/ai/orchestrations | List Durable Orchestrations +*AIOrchestrationsApi* | [**pauseOrchestration**](docs/Api/AIOrchestrationsApi.md#pauseorchestration) | **POST** /api/v3/organizations/{organisation}/ai/orchestrations/{orchestrationId}/pause | Pause Durable Orchestration +*AIOrchestrationsApi* | [**resumeOrchestration**](docs/Api/AIOrchestrationsApi.md#resumeorchestration) | **POST** /api/v3/organizations/{organisation}/ai/orchestrations/{orchestrationId}/resume | Resume Durable Orchestration +*AIOrchestrationsApi* | [**startOrchestration**](docs/Api/AIOrchestrationsApi.md#startorchestration) | **POST** /api/v3/organizations/{organisation}/ai/orchestrations/{orchestrationId}/start | Start Durable Orchestration *AISessionsApi* | [**createAISession**](docs/Api/AISessionsApi.md#createaisession) | **POST** /api/v3/organizations/{organisation}/ai/sessions | Create a new chat session with multi-tenant isolation *AISessionsApi* | [**deleteAISession**](docs/Api/AISessionsApi.md#deleteaisession) | **DELETE** /api/v3/organizations/{organisation}/ai/sessions/{sessionId} | Delete a chat session *AISessionsApi* | [**extendAISession**](docs/Api/AISessionsApi.md#extendaisession) | **PUT** /api/v3/organizations/{organisation}/ai/sessions/{sessionId}/extend | Extend Session Expiration *AISessionsApi* | [**getAISession**](docs/Api/AISessionsApi.md#getaisession) | **GET** /api/v3/organizations/{organisation}/ai/sessions/{sessionId} | Get a specific chat session *AISessionsApi* | [**listAISessions**](docs/Api/AISessionsApi.md#listaisessions) | **GET** /api/v3/organizations/{organisation}/ai/sessions | List chat sessions with multi-tenant filtering *AISessionsApi* | [**updateAISession**](docs/Api/AISessionsApi.md#updateaisession) | **PUT** /api/v3/organizations/{organisation}/ai/sessions/{sessionId} | Update Session +*AISkillsApi* | [**createSkill**](docs/Api/AISkillsApi.md#createskill) | **POST** /api/v3/organizations/{organisation}/ai/skills | Create Inline Skill +*AISkillsApi* | [**deleteSkill**](docs/Api/AISkillsApi.md#deleteskill) | **DELETE** /api/v3/organizations/{organisation}/ai/skills/{skillId} | Delete Skill +*AISkillsApi* | [**deleteSkillCollection**](docs/Api/AISkillsApi.md#deleteskillcollection) | **DELETE** /api/v3/organizations/{organisation}/ai/skills/collections/{namespace} | Delete Skill Collection +*AISkillsApi* | [**getSkill**](docs/Api/AISkillsApi.md#getskill) | **GET** /api/v3/organizations/{organisation}/ai/skills/{skillId} | Get Skill Details +*AISkillsApi* | [**importSkill**](docs/Api/AISkillsApi.md#importskill) | **POST** /api/v3/organizations/{organisation}/ai/skills/import | Import Skill from External Source +*AISkillsApi* | [**importSkillCollection**](docs/Api/AISkillsApi.md#importskillcollection) | **POST** /api/v3/organizations/{organisation}/ai/skills/import-collection | Import Skill Collection from GitHub +*AISkillsApi* | [**listSkillCollections**](docs/Api/AISkillsApi.md#listskillcollections) | **GET** /api/v3/organizations/{organisation}/ai/skills/collections | List Skill Collections +*AISkillsApi* | [**listSkills**](docs/Api/AISkillsApi.md#listskills) | **GET** /api/v3/organizations/{organisation}/ai/skills | List Organization's Skills +*AISkillsApi* | [**syncSkill**](docs/Api/AISkillsApi.md#syncskill) | **POST** /api/v3/organizations/{organisation}/ai/skills/{skillId}/sync | Sync Skill from Source +*AISkillsApi* | [**syncSkillCollection**](docs/Api/AISkillsApi.md#syncskillcollection) | **POST** /api/v3/organizations/{organisation}/ai/skills/collections/{namespace}/sync | Sync Skill Collection +*AISkillsApi* | [**updateSkill**](docs/Api/AISkillsApi.md#updateskill) | **PUT** /api/v3/organizations/{organisation}/ai/skills/{skillId} | Update Skill +*AISlackBotsApi* | [**createSlackBot**](docs/Api/AISlackBotsApi.md#createslackbot) | **POST** /api/v3/organizations/{organisation}/ai/slack-bots | Create Slack Bot +*AISlackBotsApi* | [**deleteSlackBot**](docs/Api/AISlackBotsApi.md#deleteslackbot) | **DELETE** /api/v3/organizations/{organisation}/ai/slack-bots/{botId} | Delete Slack Bot +*AISlackBotsApi* | [**getSlackBot**](docs/Api/AISlackBotsApi.md#getslackbot) | **GET** /api/v3/organizations/{organisation}/ai/slack-bots/{botId} | Get Slack Bot +*AISlackBotsApi* | [**listSlackBots**](docs/Api/AISlackBotsApi.md#listslackbots) | **GET** /api/v3/organizations/{organisation}/ai/slack-bots | List Slack Bots +*AISlackBotsApi* | [**searchSlackWorkspaceChannels**](docs/Api/AISlackBotsApi.md#searchslackworkspacechannels) | **GET** /api/v3/organizations/{organisation}/ai/slack-bots/{botId}/workspace/channels | Search Slack Workspace Channels +*AISlackBotsApi* | [**searchSlackWorkspaceUsers**](docs/Api/AISlackBotsApi.md#searchslackworkspaceusers) | **GET** /api/v3/organizations/{organisation}/ai/slack-bots/{botId}/workspace/users | Search Slack Workspace Users +*AISlackBotsApi* | [**updateSlackBot**](docs/Api/AISlackBotsApi.md#updateslackbot) | **PUT** /api/v3/organizations/{organisation}/ai/slack-bots/{botId} | Update Slack Bot *AITaskManagementApi* | [**createTask**](docs/Api/AITaskManagementApi.md#createtask) | **POST** /api/v3/organizations/{organisation}/ai/tasks | Create a new task *AITaskManagementApi* | [**deleteTask**](docs/Api/AITaskManagementApi.md#deletetask) | **DELETE** /api/v3/organizations/{organisation}/ai/tasks/{taskId} | Delete a task *AITaskManagementApi* | [**getDependencyGraph**](docs/Api/AITaskManagementApi.md#getdependencygraph) | **GET** /api/v3/organizations/{organisation}/ai/tasks/{taskListId}/dependency-graph | Get dependency graph for a task list *AITaskManagementApi* | [**getTask**](docs/Api/AITaskManagementApi.md#gettask) | **GET** /api/v3/organizations/{organisation}/ai/tasks/{taskId} | Get task details *AITaskManagementApi* | [**listTasks**](docs/Api/AITaskManagementApi.md#listtasks) | **GET** /api/v3/organizations/{organisation}/ai/tasks | List tasks with optional filtering *AITaskManagementApi* | [**updateTask**](docs/Api/AITaskManagementApi.md#updatetask) | **PUT** /api/v3/organizations/{organisation}/ai/tasks/{taskId} | Update a task -*AIToolsApi* | [**getAIOrchestrationStatus**](docs/Api/AIToolsApi.md#getaiorchestrationstatus) | **GET** /api/v3/organizations/{organisation}/ai/tools/orchestrations/{orchestrationId} | Get Orchestration Status +*AIToolsApi* | [**getAIOrchestrationStatus**](docs/Api/AIToolsApi.md#getaiorchestrationstatus) | **GET** /api/v3/organizations/{organisation}/ai/tools/orchestrations/{orchestrationId} | Get Tool Orchestration Status (Async Tool Polling) *AIToolsApi* | [**getAIToolExecutionStatus**](docs/Api/AIToolsApi.md#getaitoolexecutionstatus) | **GET** /api/v3/organizations/{organisation}/ai/tools/executions/{executionId} | Get async tool execution status and result *AIToolsApi* | [**listAIToolExecutions**](docs/Api/AIToolsApi.md#listaitoolexecutions) | **GET** /api/v3/organizations/{organisation}/ai/tools/executions | List tool executions for monitoring and debugging *AIToolsApi* | [**listAIToolNames**](docs/Api/AIToolsApi.md#listaitoolnames) | **GET** /api/v3/organizations/{organisation}/ai/tools/names | List tool names only (lightweight response) *AIToolsApi* | [**listAITools**](docs/Api/AIToolsApi.md#listaitools) | **GET** /api/v3/organizations/{organisation}/ai/tools | List available built-in tools for function calling +*AIUsageApi* | [**getMyUsage**](docs/Api/AIUsageApi.md#getmyusage) | **GET** /api/v3/organizations/{organisation}/ai/usage/me | Get AI usage summary for the authenticated user *AIVectorDatabaseApi* | [**createVectorCollection**](docs/Api/AIVectorDatabaseApi.md#createvectorcollection) | **POST** /api/v3/organizations/{organisation}/ai/vector-db/collections | Create Vector Database Collection *AIVectorDatabaseApi* | [**deleteVectorCollection**](docs/Api/AIVectorDatabaseApi.md#deletevectorcollection) | **DELETE** /api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId} | Delete Collection +*AIVectorDatabaseApi* | [**deleteVectorDocuments**](docs/Api/AIVectorDatabaseApi.md#deletevectordocuments) | **DELETE** /api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId}/documents | Delete Documents from Collection *AIVectorDatabaseApi* | [**getVectorCollection**](docs/Api/AIVectorDatabaseApi.md#getvectorcollection) | **GET** /api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId} | Get Collection Details *AIVectorDatabaseApi* | [**listVectorCollections**](docs/Api/AIVectorDatabaseApi.md#listvectorcollections) | **GET** /api/v3/organizations/{organisation}/ai/vector-db/collections | List Vector Database Collections +*AIVectorDatabaseApi* | [**listVectorDocuments**](docs/Api/AIVectorDatabaseApi.md#listvectordocuments) | **GET** /api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId}/documents | List Documents in Collection *AIVectorDatabaseApi* | [**queryVectorCollection**](docs/Api/AIVectorDatabaseApi.md#queryvectorcollection) | **POST** /api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId}/query | Semantic Search Query *AIVectorDatabaseApi* | [**uploadVectorDocuments**](docs/Api/AIVectorDatabaseApi.md#uploadvectordocuments) | **POST** /api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId}/documents | Upload Documents to Collection *ApplicationsApi* | [**createApplication**](docs/Api/ApplicationsApi.md#createapplication) | **POST** /api/v3/organizations/{organisation}/applications | Create a new application @@ -131,6 +174,9 @@ Class | Method | HTTP request | Description *BackupManagementApi* | [**deleteBackup**](docs/Api/BackupManagementApi.md#deletebackup) | **DELETE** /api/v3/organizations/{organisation}/applications/{application}/environments/{environment}/backups/{type}/{backupId} | Delete a backup *BackupManagementApi* | [**downloadBackup**](docs/Api/BackupManagementApi.md#downloadbackup) | **GET** /api/v3/organizations/{organisation}/applications/{application}/environments/{environment}/backups/{type}/{backupId}/download | Generate a download URL for a backup *BackupManagementApi* | [**listBackups**](docs/Api/BackupManagementApi.md#listbackups) | **GET** /api/v3/organizations/{organisation}/applications/{application}/environments/{environment}/backups/{type} | List backups for an environment +*CDNMetricsApi* | [**getDailyMetrics**](docs/Api/CDNMetricsApi.md#getdailymetrics) | **GET** /v2/organizations/{organization}/projects/{project}/metrics/daily | Get daily metrics +*CDNMetricsApi* | [**getHourlyMetrics**](docs/Api/CDNMetricsApi.md#gethourlymetrics) | **GET** /v2/organizations/{organization}/projects/{project}/metrics/hourly | Get hourly metrics +*CDNMetricsApi* | [**getMonthlyMetrics**](docs/Api/CDNMetricsApi.md#getmonthlymetrics) | **GET** /v2/organizations/{organization}/projects/{project}/metrics/monthly | Get monthly metrics *CommandsApi* | [**createCommand**](docs/Api/CommandsApi.md#createcommand) | **POST** /api/v3/organizations/{organisation}/environments/{environment}/commands | Create a command for an environment *CommandsApi* | [**getCommand**](docs/Api/CommandsApi.md#getcommand) | **GET** /api/v3/organizations/{organisation}/environments/{environment}/commands/{command} | Get a command *CommandsApi* | [**listCommands**](docs/Api/CommandsApi.md#listcommands) | **GET** /api/v3/organizations/{organisation}/environments/{environment}/commands | Get all commands for an environment @@ -184,9 +230,10 @@ Class | Method | HTTP request | Description *KVApi* | [**kVItemsList**](docs/Api/KVApi.md#kvitemslist) | **GET** /api/v2/organizations/{organization}/projects/{project}/kv/{store_id}/items | List items in a kv store *KVApi* | [**kVItemsShow**](docs/Api/KVApi.md#kvitemsshow) | **GET** /api/v2/organizations/{organization}/projects/{project}/kv/{store_id}/items/{key} | Get an item from a kv store *KVApi* | [**kVItemsUpdate**](docs/Api/KVApi.md#kvitemsupdate) | **PUT** /api/v2/organizations/{organization}/projects/{project}/kv/{store_id}/items/{key} | Update an item in a kv store +*KVApi* | [**kVLinkToProject**](docs/Api/KVApi.md#kvlinktoproject) | **POST** /api/v2/organizations/{organization}/projects/{project}/kv/{store_id}/link | Link a KV store to another project *KVApi* | [**kVList**](docs/Api/KVApi.md#kvlist) | **GET** /api/v2/organizations/{organization}/projects/{project}/kv | List key-value stores *KVApi* | [**kVShow**](docs/Api/KVApi.md#kvshow) | **GET** /api/v2/organizations/{organization}/projects/{project}/kv/{store_id} | Get a kv store -*OrchestrationApi* | [**getAIOrchestrationStatus**](docs/Api/OrchestrationApi.md#getaiorchestrationstatus) | **GET** /api/v3/organizations/{organisation}/ai/tools/orchestrations/{orchestrationId} | Get Orchestration Status +*KVApi* | [**kVUnlinkFromProject**](docs/Api/KVApi.md#kvunlinkfromproject) | **DELETE** /api/v2/organizations/{organization}/projects/{project}/kv/{store_id}/link | Unlink a KV store from this project *OrganizationsApi* | [**organizationsList**](docs/Api/OrganizationsApi.md#organizationslist) | **GET** /api/v2/organizations | Retrieve all organizations *OrganizationsApi* | [**organizationsRead**](docs/Api/OrganizationsApi.md#organizationsread) | **GET** /api/v2/organizations/{organization} | Get details of a single organization *ProjectsApi* | [**projectsCreate**](docs/Api/ProjectsApi.md#projectscreate) | **POST** /api/v2/organizations/{organization}/projects | Create a new project @@ -244,6 +291,9 @@ Class | Method | HTTP request | Description *ScalingPolicyApi* | [**deleteScalingPolicy**](docs/Api/ScalingPolicyApi.md#deletescalingpolicy) | **DELETE** /api/v3/organizations/{organisation}/applications/{application}/environments/{environment}/scaling-policies/{policyName} | Delete the scaling policy for an environment *ScalingPolicyApi* | [**getScalingPolicies**](docs/Api/ScalingPolicyApi.md#getscalingpolicies) | **GET** /api/v3/organizations/{organisation}/applications/{application}/environments/{environment}/scaling-policies | Get the scaling policies for an environment *ScalingPolicyApi* | [**updateScalingPolicy**](docs/Api/ScalingPolicyApi.md#updatescalingpolicy) | **PUT** /api/v3/organizations/{organisation}/applications/{application}/environments/{environment}/scaling-policies | Update the scaling policy for an environment +*TokensApi* | [**tokensCreate**](docs/Api/TokensApi.md#tokenscreate) | **POST** /api/v2/organizations/{organization}/tokens | Create a new API token scoped to this organization +*TokensApi* | [**tokensDelete**](docs/Api/TokensApi.md#tokensdelete) | **DELETE** /api/v2/organizations/{organization}/tokens/{token_id} | Revoke an API token +*TokensApi* | [**tokensList**](docs/Api/TokensApi.md#tokenslist) | **GET** /api/v2/organizations/{organization}/tokens | List API tokens scoped to this organization *VariablesApi* | [**bulkSetEnvironmentVariables**](docs/Api/VariablesApi.md#bulksetenvironmentvariables) | **PUT** /api/v3/organizations/{api_organisation}/applications/{api_application}/environments/{api_environment}/variables | Bulk set/replace environment variables *VariablesApi* | [**deleteEnvironmentVariable**](docs/Api/VariablesApi.md#deleteenvironmentvariable) | **DELETE** /api/v3/organizations/{api_organisation}/applications/{api_application}/environments/{api_environment}/variables/{api_variable} | Delete a variable *VariablesApi* | [**listEnvironmentVariables**](docs/Api/VariablesApi.md#listenvironmentvariables) | **GET** /api/v3/organizations/{api_organisation}/applications/{api_application}/environments/{api_environment}/variables | Get all variables for an environment @@ -272,6 +322,7 @@ Class | Method | HTTP request | Description - [ChatInference200ResponseUsage](docs/Model/ChatInference200ResponseUsage.md) - [ChatInference202Response](docs/Model/ChatInference202Response.md) - [ChatInferenceRequest](docs/Model/ChatInferenceRequest.md) +- [ChatInferenceRequestGuardrails](docs/Model/ChatInferenceRequestGuardrails.md) - [ChatInferenceRequestMessagesInner](docs/Model/ChatInferenceRequestMessagesInner.md) - [ChatInferenceRequestMessagesInnerContent](docs/Model/ChatInferenceRequestMessagesInnerContent.md) - [ChatInferenceRequestMessagesInnerContentOneOfInner](docs/Model/ChatInferenceRequestMessagesInnerContentOneOfInner.md) @@ -329,6 +380,16 @@ Class | Method | HTTP request | Description - [CreateEnvironment403Response](docs/Model/CreateEnvironment403Response.md) - [CreateEnvironmentRequest](docs/Model/CreateEnvironmentRequest.md) - [CreateEnvironmentRequestEnvironmentInner](docs/Model/CreateEnvironmentRequestEnvironmentInner.md) +- [CreateFilterPolicyRequest](docs/Model/CreateFilterPolicyRequest.md) +- [CreateFilterPolicyRequestRulesInner](docs/Model/CreateFilterPolicyRequestRulesInner.md) +- [CreateFilterPolicyRequestRulesInnerMatch](docs/Model/CreateFilterPolicyRequestRulesInnerMatch.md) +- [CreateOrchestrationRequest](docs/Model/CreateOrchestrationRequest.md) +- [CreateOrchestrationRequestInputSource](docs/Model/CreateOrchestrationRequestInputSource.md) +- [CreateOrchestrationRequestStopCondition](docs/Model/CreateOrchestrationRequestStopCondition.md) +- [CreateSkill201Response](docs/Model/CreateSkill201Response.md) +- [CreateSkillRequest](docs/Model/CreateSkillRequest.md) +- [CreateSlackBot201Response](docs/Model/CreateSlackBot201Response.md) +- [CreateSlackBotRequest](docs/Model/CreateSlackBotRequest.md) - [CreateTask201Response](docs/Model/CreateTask201Response.md) - [CreateTaskRequest](docs/Model/CreateTaskRequest.md) - [CreateVectorCollection201Response](docs/Model/CreateVectorCollection201Response.md) @@ -339,12 +400,18 @@ Class | Method | HTTP request | Description - [CronRun](docs/Model/CronRun.md) - [DeleteAIAgent200Response](docs/Model/DeleteAIAgent200Response.md) - [DeleteAISession200Response](docs/Model/DeleteAISession200Response.md) +- [DeleteAgentOverlay200Response](docs/Model/DeleteAgentOverlay200Response.md) - [DeleteBackup200Response](docs/Model/DeleteBackup200Response.md) - [DeleteCustomTool200Response](docs/Model/DeleteCustomTool200Response.md) - [DeleteFile200Response](docs/Model/DeleteFile200Response.md) +- [DeleteSkill200Response](docs/Model/DeleteSkill200Response.md) +- [DeleteSkillCollection200Response](docs/Model/DeleteSkillCollection200Response.md) +- [DeleteSlackBot200Response](docs/Model/DeleteSlackBot200Response.md) - [DeleteTask200Response](docs/Model/DeleteTask200Response.md) - [DeleteTask409Response](docs/Model/DeleteTask409Response.md) -- [DeleteVectorCollection200Response](docs/Model/DeleteVectorCollection200Response.md) +- [DeleteVectorDocuments200Response](docs/Model/DeleteVectorDocuments200Response.md) +- [DeleteVectorDocumentsRequest](docs/Model/DeleteVectorDocumentsRequest.md) +- [DeleteVectorDocumentsRequestMetadata](docs/Model/DeleteVectorDocumentsRequestMetadata.md) - [DownloadBackup200Response](docs/Model/DownloadBackup200Response.md) - [Embeddings200Response](docs/Model/Embeddings200Response.md) - [Embeddings200ResponseEmbeddings](docs/Model/Embeddings200ResponseEmbeddings.md) @@ -371,6 +438,9 @@ Class | Method | HTTP request | Description - [GetAIToolExecutionStatus404Response](docs/Model/GetAIToolExecutionStatus404Response.md) - [GetAIUsageStats200Response](docs/Model/GetAIUsageStats200Response.md) - [GetAIUsageStats200ResponseByModelValue](docs/Model/GetAIUsageStats200ResponseByModelValue.md) +- [GetAgentOverlay200Response](docs/Model/GetAgentOverlay200Response.md) +- [GetAgentOverlay200ResponseBase](docs/Model/GetAgentOverlay200ResponseBase.md) +- [GetAgentOverlay200ResponseOverlay](docs/Model/GetAgentOverlay200ResponseOverlay.md) - [GetDependencyGraph200Response](docs/Model/GetDependencyGraph200Response.md) - [GetDurableExecutionStatus200Response](docs/Model/GetDurableExecutionStatus200Response.md) - [GetDurableExecutionStatus200ResponseError](docs/Model/GetDurableExecutionStatus200ResponseError.md) @@ -382,6 +452,15 @@ Class | Method | HTTP request | Description - [GetEnvironmentLogs200Response](docs/Model/GetEnvironmentLogs200Response.md) - [GetEnvironmentLogs200ResponseLogEventsInner](docs/Model/GetEnvironmentLogs200ResponseLogEventsInner.md) - [GetFile200Response](docs/Model/GetFile200Response.md) +- [GetGovernanceConfig200Response](docs/Model/GetGovernanceConfig200Response.md) +- [GetGovernanceConfig200ResponseSpendLimits](docs/Model/GetGovernanceConfig200ResponseSpendLimits.md) +- [GetMyUsage200Response](docs/Model/GetMyUsage200Response.md) +- [GetMyUsage200ResponseDaily](docs/Model/GetMyUsage200ResponseDaily.md) +- [GetMyUsage200ResponseMonthly](docs/Model/GetMyUsage200ResponseMonthly.md) +- [GetSkill200Response](docs/Model/GetSkill200Response.md) +- [GetSkill200ResponseSkill](docs/Model/GetSkill200ResponseSkill.md) +- [GetSlackBot200Response](docs/Model/GetSlackBot200Response.md) +- [GetSlackBot200ResponseBot](docs/Model/GetSlackBot200ResponseBot.md) - [GetSshAccessCredentials200Response](docs/Model/GetSshAccessCredentials200Response.md) - [GetSshAccessCredentials200ResponseCredentials](docs/Model/GetSshAccessCredentials200ResponseCredentials.md) - [GetTask200Response](docs/Model/GetTask200Response.md) @@ -396,10 +475,18 @@ Class | Method | HTTP request | Description - [ImageGenerationRequestInPaintingParams](docs/Model/ImageGenerationRequestInPaintingParams.md) - [ImageGenerationRequestOutPaintingParams](docs/Model/ImageGenerationRequestOutPaintingParams.md) - [ImageGenerationRequestTextToImageParams](docs/Model/ImageGenerationRequestTextToImageParams.md) +- [ImportSkill201Response](docs/Model/ImportSkill201Response.md) +- [ImportSkillCollection201Response](docs/Model/ImportSkillCollection201Response.md) +- [ImportSkillCollectionRequest](docs/Model/ImportSkillCollectionRequest.md) +- [ImportSkillCollectionRequestSource](docs/Model/ImportSkillCollectionRequestSource.md) +- [ImportSkillRequest](docs/Model/ImportSkillRequest.md) +- [ImportSkillRequestSource](docs/Model/ImportSkillRequestSource.md) - [KVItemsCreate200Response](docs/Model/KVItemsCreate200Response.md) - [KVItemsDelete200Response](docs/Model/KVItemsDelete200Response.md) - [KVItemsShow200Response](docs/Model/KVItemsShow200Response.md) - [KVItemsShow200ResponseValue](docs/Model/KVItemsShow200ResponseValue.md) +- [KVLinkToProject200Response](docs/Model/KVLinkToProject200Response.md) +- [KVLinkToProjectRequest](docs/Model/KVLinkToProjectRequest.md) - [ListAIAgents200Response](docs/Model/ListAIAgents200Response.md) - [ListAIAgents200ResponseAgentsInner](docs/Model/ListAIAgents200ResponseAgentsInner.md) - [ListAIModels200Response](docs/Model/ListAIModels200Response.md) @@ -420,6 +507,15 @@ Class | Method | HTTP request | Description - [ListCustomTools200ResponseToolsInner](docs/Model/ListCustomTools200ResponseToolsInner.md) - [ListFiles200Response](docs/Model/ListFiles200Response.md) - [ListFiles200ResponseFilesInner](docs/Model/ListFiles200ResponseFilesInner.md) +- [ListOrchestrationBatches200Response](docs/Model/ListOrchestrationBatches200Response.md) +- [ListOrchestrationBatches200ResponseBatchesInner](docs/Model/ListOrchestrationBatches200ResponseBatchesInner.md) +- [ListOrchestrations200Response](docs/Model/ListOrchestrations200Response.md) +- [ListSkillCollections200Response](docs/Model/ListSkillCollections200Response.md) +- [ListSkillCollections200ResponseCollectionsInner](docs/Model/ListSkillCollections200ResponseCollectionsInner.md) +- [ListSkills200Response](docs/Model/ListSkills200Response.md) +- [ListSkills200ResponseSkillsInner](docs/Model/ListSkills200ResponseSkillsInner.md) +- [ListSlackBots200Response](docs/Model/ListSlackBots200Response.md) +- [ListSlackBots200ResponseBotsInner](docs/Model/ListSlackBots200ResponseBotsInner.md) - [ListTasks200Response](docs/Model/ListTasks200Response.md) - [ListTasks200ResponseTasksInner](docs/Model/ListTasks200ResponseTasksInner.md) - [ListVectorCollections200Response](docs/Model/ListVectorCollections200Response.md) @@ -437,12 +533,21 @@ Class | Method | HTTP request | Description - [QueryVectorCollectionRequest](docs/Model/QueryVectorCollectionRequest.md) - [QueryVectorCollectionRequestFilter](docs/Model/QueryVectorCollectionRequestFilter.md) - [ScalingPolicy](docs/Model/ScalingPolicy.md) +- [SearchSlackWorkspaceChannels200Response](docs/Model/SearchSlackWorkspaceChannels200Response.md) +- [SearchSlackWorkspaceChannels200ResponseResultsInner](docs/Model/SearchSlackWorkspaceChannels200ResponseResultsInner.md) +- [SearchSlackWorkspaceUsers200Response](docs/Model/SearchSlackWorkspaceUsers200Response.md) +- [SearchSlackWorkspaceUsers200ResponseResultsInner](docs/Model/SearchSlackWorkspaceUsers200ResponseResultsInner.md) - [SpotConfiguration](docs/Model/SpotConfiguration.md) - [SubmitToolCallback200Response](docs/Model/SubmitToolCallback200Response.md) - [SubmitToolCallbackRequest](docs/Model/SubmitToolCallbackRequest.md) - [SubmitToolCallbackRequestToolResultsInner](docs/Model/SubmitToolCallbackRequestToolResultsInner.md) - [SyncOperation](docs/Model/SyncOperation.md) +- [SyncSkillCollection200Response](docs/Model/SyncSkillCollection200Response.md) - [SyncToEnvironmentRequest](docs/Model/SyncToEnvironmentRequest.md) +- [TokensCreate201Response](docs/Model/TokensCreate201Response.md) +- [TokensCreateRequest](docs/Model/TokensCreateRequest.md) +- [TokensDelete200Response](docs/Model/TokensDelete200Response.md) +- [TokensList200ResponseInner](docs/Model/TokensList200ResponseInner.md) - [UpdateAIAgent200Response](docs/Model/UpdateAIAgent200Response.md) - [UpdateAIAgentRequest](docs/Model/UpdateAIAgentRequest.md) - [UpdateAISession200Response](docs/Model/UpdateAISession200Response.md) @@ -452,6 +557,12 @@ Class | Method | HTTP request | Description - [UpdateEnvironmentRequest](docs/Model/UpdateEnvironmentRequest.md) - [UpdateEnvironmentStateRequest](docs/Model/UpdateEnvironmentStateRequest.md) - [UpdateEnvironmentVariableRequest](docs/Model/UpdateEnvironmentVariableRequest.md) +- [UpdateFilterPolicyRequest](docs/Model/UpdateFilterPolicyRequest.md) +- [UpdateGovernanceConfig200Response](docs/Model/UpdateGovernanceConfig200Response.md) +- [UpdateGovernanceConfigRequest](docs/Model/UpdateGovernanceConfigRequest.md) +- [UpdateSkill200Response](docs/Model/UpdateSkill200Response.md) +- [UpdateSkillRequest](docs/Model/UpdateSkillRequest.md) +- [UpdateSlackBotRequest](docs/Model/UpdateSlackBotRequest.md) - [UpdateTask200Response](docs/Model/UpdateTask200Response.md) - [UpdateTaskRequest](docs/Model/UpdateTaskRequest.md) - [UploadFile201Response](docs/Model/UploadFile201Response.md) @@ -460,6 +571,8 @@ Class | Method | HTTP request | Description - [UploadVectorDocumentsRequest](docs/Model/UploadVectorDocumentsRequest.md) - [UploadVectorDocumentsRequestDocumentsInner](docs/Model/UploadVectorDocumentsRequestDocumentsInner.md) - [UploadVectorDocumentsRequestDocumentsInnerMetadata](docs/Model/UploadVectorDocumentsRequestDocumentsInnerMetadata.md) +- [UpsertAgentOverlay200Response](docs/Model/UpsertAgentOverlay200Response.md) +- [UpsertAgentOverlayRequest](docs/Model/UpsertAgentOverlayRequest.md) - [V1ContentItem](docs/Model/V1ContentItem.md) - [V1ContentListResponse](docs/Model/V1ContentListResponse.md) - [V1ContentRequest](docs/Model/V1ContentRequest.md) @@ -515,6 +628,11 @@ Class | Method | HTTP request | Description - [V2DomainDnsValidationRecordsInner](docs/Model/V2DomainDnsValidationRecordsInner.md) - [V2DomainRequest](docs/Model/V2DomainRequest.md) - [V2Error](docs/Model/V2Error.md) +- [V2MetricData](docs/Model/V2MetricData.md) +- [V2MetricDataPoint](docs/Model/V2MetricDataPoint.md) +- [V2MetricDataPointTimestamp](docs/Model/V2MetricDataPointTimestamp.md) +- [V2MetricsMeta](docs/Model/V2MetricsMeta.md) +- [V2MetricsResponse](docs/Model/V2MetricsResponse.md) - [V2Organization](docs/Model/V2Organization.md) - [V2OrganizationRequest](docs/Model/V2OrganizationRequest.md) - [V2Project](docs/Model/V2Project.md) @@ -592,7 +710,7 @@ vendor/bin/phpunit This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: `4.9.0` - - Package version: `4.9.0` +- API version: `4.15.3` + - Package version: `4.15.3` - Generator version: `7.13.0` - Build package: `org.openapitools.codegen.languages.PhpClientCodegen` diff --git a/composer.json b/composer.json index 986243d..5a5152f 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "quantcdn/quant-php-client", - "version": "4.9.0", + "version": "4.15.3", "description": "Unified API for QuantCDN Admin and QuantCloud Platform services", "keywords": [ "openapitools", diff --git a/composer.lock b/composer.lock index e229c57..8de5791 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "19a99b66d2ea6c5b2a893f8f295c1a24", + "content-hash": "2d947b333b13010ebdf91eeee236a4c2", "packages": [ { "name": "guzzlehttp/guzzle", @@ -217,16 +217,16 @@ }, { "name": "guzzlehttp/psr7", - "version": "2.8.0", + "version": "2.9.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "21dc724a0583619cd1652f673303492272778051" + "reference": "7d0ed42f28e42d61352a7a79de682e5e67fec884" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/21dc724a0583619cd1652f673303492272778051", - "reference": "21dc724a0583619cd1652f673303492272778051", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/7d0ed42f28e42d61352a7a79de682e5e67fec884", + "reference": "7d0ed42f28e42d61352a7a79de682e5e67fec884", "shasum": "" }, "require": { @@ -242,6 +242,7 @@ "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", "http-interop/http-factory-tests": "0.9.0", + "jshttp/mime-db": "1.54.0.1", "phpunit/phpunit": "^8.5.44 || ^9.6.25" }, "suggest": { @@ -313,7 +314,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.8.0" + "source": "https://github.com/guzzle/psr7/tree/2.9.0" }, "funding": [ { @@ -329,7 +330,7 @@ "type": "tidelift" } ], - "time": "2025-08-23T21:21:41+00:00" + "time": "2026-03-10T16:41:02+00:00" }, { "name": "psr/http-client", diff --git a/docs/Api/AIAgentsApi.md b/docs/Api/AIAgentsApi.md index 0108a8b..a5b0fd7 100644 --- a/docs/Api/AIAgentsApi.md +++ b/docs/Api/AIAgentsApi.md @@ -7,9 +7,12 @@ All URIs are relative to https://dashboard.quantcdn.io, except if the operation | [**chatWithAIAgent()**](AIAgentsApi.md#chatWithAIAgent) | **POST** /api/v3/organizations/{organisation}/ai/agents/{agentId}/chat | Chat with AI Agent | | [**createAIAgent()**](AIAgentsApi.md#createAIAgent) | **POST** /api/v3/organizations/{organisation}/ai/agents | Create AI Agent | | [**deleteAIAgent()**](AIAgentsApi.md#deleteAIAgent) | **DELETE** /api/v3/organizations/{organisation}/ai/agents/{agentId} | Delete Agent | +| [**deleteAgentOverlay()**](AIAgentsApi.md#deleteAgentOverlay) | **DELETE** /api/v3/organizations/{organisation}/ai/agents/{agentId}/overlay | Delete Agent Overlay | | [**getAIAgent()**](AIAgentsApi.md#getAIAgent) | **GET** /api/v3/organizations/{organisation}/ai/agents/{agentId} | Get Agent Details | +| [**getAgentOverlay()**](AIAgentsApi.md#getAgentOverlay) | **GET** /api/v3/organizations/{organisation}/ai/agents/{agentId}/overlay | Get Agent Overlay | | [**listAIAgents()**](AIAgentsApi.md#listAIAgents) | **GET** /api/v3/organizations/{organisation}/ai/agents | List AI Agents | | [**updateAIAgent()**](AIAgentsApi.md#updateAIAgent) | **PUT** /api/v3/organizations/{organisation}/ai/agents/{agentId} | Update Agent | +| [**upsertAgentOverlay()**](AIAgentsApi.md#upsertAgentOverlay) | **PUT** /api/v3/organizations/{organisation}/ai/agents/{agentId}/overlay | Upsert Agent Overlay | ## `chatWithAIAgent()` @@ -200,6 +203,68 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) +## `deleteAgentOverlay()` + +```php +deleteAgentOverlay($organisation, $agent_id): \QuantClient\Model\DeleteAgentOverlay200Response +``` + +Delete Agent Overlay + +Removes the per-organisation overlay for a global agent, reverting it to platform defaults. + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\AIAgentsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organisation = 'organisation_example'; // string | The organisation ID +$agent_id = 'agent_id_example'; // string | Global agent identifier + +try { + $result = $apiInstance->deleteAgentOverlay($organisation, $agent_id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AIAgentsApi->deleteAgentOverlay: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organisation** | **string**| The organisation ID | | +| **agent_id** | **string**| Global agent identifier | | + +### Return type + +[**\QuantClient\Model\DeleteAgentOverlay200Response**](../Model/DeleteAgentOverlay200Response.md) + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + ## `getAIAgent()` ```php @@ -262,6 +327,68 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) +## `getAgentOverlay()` + +```php +getAgentOverlay($organisation, $agent_id): \QuantClient\Model\GetAgentOverlay200Response +``` + +Get Agent Overlay + +Returns the per-organisation overlay for a global agent, plus base agent metadata for UI context. If no overlay exists the response contains `overlay: null`. Overlays can only be created for global agents. + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\AIAgentsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organisation = 'organisation_example'; // string | The organisation ID +$agent_id = 'agent_id_example'; // string | Global agent identifier (e.g., 'quantgov-code') + +try { + $result = $apiInstance->getAgentOverlay($organisation, $agent_id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AIAgentsApi->getAgentOverlay: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organisation** | **string**| The organisation ID | | +| **agent_id** | **string**| Global agent identifier (e.g., 'quantgov-code') | | + +### Return type + +[**\QuantClient\Model\GetAgentOverlay200Response**](../Model/GetAgentOverlay200Response.md) + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + ## `listAIAgents()` ```php @@ -387,3 +514,67 @@ try { [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) + +## `upsertAgentOverlay()` + +```php +upsertAgentOverlay($organisation, $agent_id, $upsert_agent_overlay_request): \QuantClient\Model\UpsertAgentOverlay200Response +``` + +Upsert Agent Overlay + +Creates or replaces the per-organisation overlay for a global agent. PUT is full replacement — omitted optional fields are removed. Include `version` from a prior GET to enable compare-and-swap (409 on conflict). Omit for last-writer-wins. + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\AIAgentsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organisation = 'organisation_example'; // string | The organisation ID +$agent_id = 'agent_id_example'; // string | Global agent identifier +$upsert_agent_overlay_request = new \QuantClient\Model\UpsertAgentOverlayRequest(); // \QuantClient\Model\UpsertAgentOverlayRequest + +try { + $result = $apiInstance->upsertAgentOverlay($organisation, $agent_id, $upsert_agent_overlay_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AIAgentsApi->upsertAgentOverlay: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organisation** | **string**| The organisation ID | | +| **agent_id** | **string**| Global agent identifier | | +| **upsert_agent_overlay_request** | [**\QuantClient\Model\UpsertAgentOverlayRequest**](../Model/UpsertAgentOverlayRequest.md)| | | + +### Return type + +[**\QuantClient\Model\UpsertAgentOverlay200Response**](../Model/UpsertAgentOverlay200Response.md) + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) diff --git a/docs/Api/AIFilterPoliciesApi.md b/docs/Api/AIFilterPoliciesApi.md new file mode 100644 index 0000000..0a55862 --- /dev/null +++ b/docs/Api/AIFilterPoliciesApi.md @@ -0,0 +1,434 @@ +# QuantClient\AIFilterPoliciesApi + +All URIs are relative to https://dashboard.quantcdn.io, except if the operation defines another base path. + +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**createFilterPolicy()**](AIFilterPoliciesApi.md#createFilterPolicy) | **POST** /api/v3/organizations/{organisation}/ai/filter-policies | Create an AI filter policy for an organisation | +| [**deleteFilterPolicy()**](AIFilterPoliciesApi.md#deleteFilterPolicy) | **DELETE** /api/v3/organizations/{organisation}/ai/filter-policies/{policyId} | Delete a specific AI filter policy | +| [**disableFilterPolicy()**](AIFilterPoliciesApi.md#disableFilterPolicy) | **PUT** /api/v3/organizations/{organisation}/ai/filter-policies/{policyId}/disable | Disable a specific AI filter policy | +| [**enableFilterPolicy()**](AIFilterPoliciesApi.md#enableFilterPolicy) | **PUT** /api/v3/organizations/{organisation}/ai/filter-policies/{policyId}/enable | Enable a specific AI filter policy | +| [**getFilterPolicy()**](AIFilterPoliciesApi.md#getFilterPolicy) | **GET** /api/v3/organizations/{organisation}/ai/filter-policies/{policyId} | Get a specific AI filter policy | +| [**listFilterPolicies()**](AIFilterPoliciesApi.md#listFilterPolicies) | **GET** /api/v3/organizations/{organisation}/ai/filter-policies | List AI filter policies for an organisation | +| [**updateFilterPolicy()**](AIFilterPoliciesApi.md#updateFilterPolicy) | **PUT** /api/v3/organizations/{organisation}/ai/filter-policies/{policyId} | Update a specific AI filter policy | + + +## `createFilterPolicy()` + +```php +createFilterPolicy($organisation, $create_filter_policy_request): object +``` + +Create an AI filter policy for an organisation + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\AIFilterPoliciesApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organisation = 'organisation_example'; // string | The organisation ID +$create_filter_policy_request = new \QuantClient\Model\CreateFilterPolicyRequest(); // \QuantClient\Model\CreateFilterPolicyRequest + +try { + $result = $apiInstance->createFilterPolicy($organisation, $create_filter_policy_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AIFilterPoliciesApi->createFilterPolicy: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organisation** | **string**| The organisation ID | | +| **create_filter_policy_request** | [**\QuantClient\Model\CreateFilterPolicyRequest**](../Model/CreateFilterPolicyRequest.md)| | | + +### Return type + +**object** + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `deleteFilterPolicy()` + +```php +deleteFilterPolicy($organisation, $policy_id): object +``` + +Delete a specific AI filter policy + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\AIFilterPoliciesApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organisation = 'organisation_example'; // string +$policy_id = 'policy_id_example'; // string + +try { + $result = $apiInstance->deleteFilterPolicy($organisation, $policy_id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AIFilterPoliciesApi->deleteFilterPolicy: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organisation** | **string**| | | +| **policy_id** | **string**| | | + +### Return type + +**object** + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `disableFilterPolicy()` + +```php +disableFilterPolicy($organisation, $policy_id): object +``` + +Disable a specific AI filter policy + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\AIFilterPoliciesApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organisation = 'organisation_example'; // string +$policy_id = 'policy_id_example'; // string + +try { + $result = $apiInstance->disableFilterPolicy($organisation, $policy_id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AIFilterPoliciesApi->disableFilterPolicy: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organisation** | **string**| | | +| **policy_id** | **string**| | | + +### Return type + +**object** + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `enableFilterPolicy()` + +```php +enableFilterPolicy($organisation, $policy_id): object +``` + +Enable a specific AI filter policy + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\AIFilterPoliciesApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organisation = 'organisation_example'; // string +$policy_id = 'policy_id_example'; // string + +try { + $result = $apiInstance->enableFilterPolicy($organisation, $policy_id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AIFilterPoliciesApi->enableFilterPolicy: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organisation** | **string**| | | +| **policy_id** | **string**| | | + +### Return type + +**object** + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getFilterPolicy()` + +```php +getFilterPolicy($organisation, $policy_id): object +``` + +Get a specific AI filter policy + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\AIFilterPoliciesApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organisation = 'organisation_example'; // string +$policy_id = 'policy_id_example'; // string + +try { + $result = $apiInstance->getFilterPolicy($organisation, $policy_id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AIFilterPoliciesApi->getFilterPolicy: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organisation** | **string**| | | +| **policy_id** | **string**| | | + +### Return type + +**object** + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `listFilterPolicies()` + +```php +listFilterPolicies($organisation): object +``` + +List AI filter policies for an organisation + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\AIFilterPoliciesApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organisation = 'organisation_example'; // string | The organisation ID + +try { + $result = $apiInstance->listFilterPolicies($organisation); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AIFilterPoliciesApi->listFilterPolicies: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organisation** | **string**| The organisation ID | | + +### Return type + +**object** + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `updateFilterPolicy()` + +```php +updateFilterPolicy($organisation, $policy_id, $update_filter_policy_request): object +``` + +Update a specific AI filter policy + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\AIFilterPoliciesApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organisation = 'organisation_example'; // string +$policy_id = 'policy_id_example'; // string +$update_filter_policy_request = new \QuantClient\Model\UpdateFilterPolicyRequest(); // \QuantClient\Model\UpdateFilterPolicyRequest + +try { + $result = $apiInstance->updateFilterPolicy($organisation, $policy_id, $update_filter_policy_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AIFilterPoliciesApi->updateFilterPolicy: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organisation** | **string**| | | +| **policy_id** | **string**| | | +| **update_filter_policy_request** | [**\QuantClient\Model\UpdateFilterPolicyRequest**](../Model/UpdateFilterPolicyRequest.md)| | | + +### Return type + +**object** + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) diff --git a/docs/Api/AIGovernanceApi.md b/docs/Api/AIGovernanceApi.md new file mode 100644 index 0000000..8dbd56d --- /dev/null +++ b/docs/Api/AIGovernanceApi.md @@ -0,0 +1,186 @@ +# QuantClient\AIGovernanceApi + +All URIs are relative to https://dashboard.quantcdn.io, except if the operation defines another base path. + +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**getGovernanceConfig()**](AIGovernanceApi.md#getGovernanceConfig) | **GET** /api/v3/organizations/{organisation}/ai/governance | Get AI governance configuration for an organisation | +| [**getGovernanceSpend()**](AIGovernanceApi.md#getGovernanceSpend) | **GET** /api/v3/organizations/{organisation}/ai/governance/spend | Get AI spend summary for an organisation | +| [**updateGovernanceConfig()**](AIGovernanceApi.md#updateGovernanceConfig) | **PUT** /api/v3/organizations/{organisation}/ai/governance | Update AI governance configuration for an organisation | + + +## `getGovernanceConfig()` + +```php +getGovernanceConfig($organisation): \QuantClient\Model\GetGovernanceConfig200Response +``` + +Get AI governance configuration for an organisation + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\AIGovernanceApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organisation = 'organisation_example'; // string | The organisation ID + +try { + $result = $apiInstance->getGovernanceConfig($organisation); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AIGovernanceApi->getGovernanceConfig: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organisation** | **string**| The organisation ID | | + +### Return type + +[**\QuantClient\Model\GetGovernanceConfig200Response**](../Model/GetGovernanceConfig200Response.md) + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getGovernanceSpend()` + +```php +getGovernanceSpend($organisation): object +``` + +Get AI spend summary for an organisation + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\AIGovernanceApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organisation = 'organisation_example'; // string | The organisation ID + +try { + $result = $apiInstance->getGovernanceSpend($organisation); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AIGovernanceApi->getGovernanceSpend: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organisation** | **string**| The organisation ID | | + +### Return type + +**object** + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `updateGovernanceConfig()` + +```php +updateGovernanceConfig($organisation, $update_governance_config_request): \QuantClient\Model\UpdateGovernanceConfig200Response +``` + +Update AI governance configuration for an organisation + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\AIGovernanceApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organisation = 'organisation_example'; // string | The organisation ID +$update_governance_config_request = new \QuantClient\Model\UpdateGovernanceConfigRequest(); // \QuantClient\Model\UpdateGovernanceConfigRequest + +try { + $result = $apiInstance->updateGovernanceConfig($organisation, $update_governance_config_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AIGovernanceApi->updateGovernanceConfig: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organisation** | **string**| The organisation ID | | +| **update_governance_config_request** | [**\QuantClient\Model\UpdateGovernanceConfigRequest**](../Model/UpdateGovernanceConfigRequest.md)| | | + +### Return type + +[**\QuantClient\Model\UpdateGovernanceConfig200Response**](../Model/UpdateGovernanceConfig200Response.md) + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) diff --git a/docs/Api/AIOrchestrationsApi.md b/docs/Api/AIOrchestrationsApi.md new file mode 100644 index 0000000..b11d67b --- /dev/null +++ b/docs/Api/AIOrchestrationsApi.md @@ -0,0 +1,581 @@ +# QuantClient\AIOrchestrationsApi + +All URIs are relative to https://dashboard.quantcdn.io, except if the operation defines another base path. + +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**cancelOrchestration()**](AIOrchestrationsApi.md#cancelOrchestration) | **POST** /api/v3/organizations/{organisation}/ai/orchestrations/{orchestrationId}/cancel | Cancel Durable Orchestration | +| [**createOrchestration()**](AIOrchestrationsApi.md#createOrchestration) | **POST** /api/v3/organizations/{organisation}/ai/orchestrations | Create Durable Orchestration | +| [**deleteOrchestration()**](AIOrchestrationsApi.md#deleteOrchestration) | **DELETE** /api/v3/organizations/{organisation}/ai/orchestrations/{orchestrationId} | Delete Durable Orchestration | +| [**getOrchestration()**](AIOrchestrationsApi.md#getOrchestration) | **GET** /api/v3/organizations/{organisation}/ai/orchestrations/{orchestrationId} | Get Durable Orchestration | +| [**listOrchestrationBatches()**](AIOrchestrationsApi.md#listOrchestrationBatches) | **GET** /api/v3/organizations/{organisation}/ai/orchestrations/{orchestrationId}/batches | List Orchestration Batches | +| [**listOrchestrations()**](AIOrchestrationsApi.md#listOrchestrations) | **GET** /api/v3/organizations/{organisation}/ai/orchestrations | List Durable Orchestrations | +| [**pauseOrchestration()**](AIOrchestrationsApi.md#pauseOrchestration) | **POST** /api/v3/organizations/{organisation}/ai/orchestrations/{orchestrationId}/pause | Pause Durable Orchestration | +| [**resumeOrchestration()**](AIOrchestrationsApi.md#resumeOrchestration) | **POST** /api/v3/organizations/{organisation}/ai/orchestrations/{orchestrationId}/resume | Resume Durable Orchestration | +| [**startOrchestration()**](AIOrchestrationsApi.md#startOrchestration) | **POST** /api/v3/organizations/{organisation}/ai/orchestrations/{orchestrationId}/start | Start Durable Orchestration | + + +## `cancelOrchestration()` + +```php +cancelOrchestration($organisation, $orchestration_id): object +``` + +Cancel Durable Orchestration + +Cancel an orchestration permanently. Cannot be resumed. Any in-progress items will complete, but no new processing starts. + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\AIOrchestrationsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organisation = 'organisation_example'; // string | The organisation machine name +$orchestration_id = 'orchestration_id_example'; // string | Orchestration identifier + +try { + $result = $apiInstance->cancelOrchestration($organisation, $orchestration_id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AIOrchestrationsApi->cancelOrchestration: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organisation** | **string**| The organisation machine name | | +| **orchestration_id** | **string**| Orchestration identifier | | + +### Return type + +**object** + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `createOrchestration()` + +```php +createOrchestration($organisation, $create_orchestration_request): object +``` + +Create Durable Orchestration + +Create a new durable orchestration for batch processing. * * **Input Sources:** * - `static`: Process a fixed list of items * - `task_query`: Process tasks matching a query * - `generator`: AI generates items from a prompt * * **Stop Conditions:** * - `all_complete`: Stop when all items processed * - `max_iterations`: Stop after N iterations * - `condition`: AI evaluates a prompt to decide * - `manual`: Run until manually stopped * * **Auto-start:** * By default, the orchestration starts immediately. Set `autoStart: false` to create in pending state. + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\AIOrchestrationsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organisation = 'organisation_example'; // string | The organisation machine name +$create_orchestration_request = new \QuantClient\Model\CreateOrchestrationRequest(); // \QuantClient\Model\CreateOrchestrationRequest + +try { + $result = $apiInstance->createOrchestration($organisation, $create_orchestration_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AIOrchestrationsApi->createOrchestration: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organisation** | **string**| The organisation machine name | | +| **create_orchestration_request** | [**\QuantClient\Model\CreateOrchestrationRequest**](../Model/CreateOrchestrationRequest.md)| | | + +### Return type + +**object** + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `deleteOrchestration()` + +```php +deleteOrchestration($organisation, $orchestration_id) +``` + +Delete Durable Orchestration + +Delete an orchestration. Can only delete orchestrations in completed, failed, or cancelled status. + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\AIOrchestrationsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organisation = 'organisation_example'; // string | The organisation machine name +$orchestration_id = 'orchestration_id_example'; // string | Orchestration identifier + +try { + $apiInstance->deleteOrchestration($organisation, $orchestration_id); +} catch (Exception $e) { + echo 'Exception when calling AIOrchestrationsApi->deleteOrchestration: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organisation** | **string**| The organisation machine name | | +| **orchestration_id** | **string**| Orchestration identifier | | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getOrchestration()` + +```php +getOrchestration($organisation, $orchestration_id): object +``` + +Get Durable Orchestration + +Get orchestration details including status and progress. * * **Progress Tracking:** * - `total`: Total items to process * - `completed`: Successfully processed * - `failed`: Failed processing * - `pending`: Awaiting processing + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\AIOrchestrationsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organisation = 'organisation_example'; // string | The organisation machine name +$orchestration_id = orch_1704067200_abc123xyz; // string | Orchestration identifier + +try { + $result = $apiInstance->getOrchestration($organisation, $orchestration_id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AIOrchestrationsApi->getOrchestration: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organisation** | **string**| The organisation machine name | | +| **orchestration_id** | **string**| Orchestration identifier | | + +### Return type + +**object** + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `listOrchestrationBatches()` + +```php +listOrchestrationBatches($organisation, $orchestration_id, $limit, $cursor): \QuantClient\Model\ListOrchestrationBatches200Response +``` + +List Orchestration Batches + +Get history of batches processed by this orchestration. Returns paginated batch records with status and item counts. + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\AIOrchestrationsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organisation = 'organisation_example'; // string | The organisation machine name +$orchestration_id = 'orchestration_id_example'; // string | Orchestration identifier +$limit = 20; // int | Maximum number of batches to return +$cursor = 'cursor_example'; // string | Pagination cursor from previous response + +try { + $result = $apiInstance->listOrchestrationBatches($organisation, $orchestration_id, $limit, $cursor); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AIOrchestrationsApi->listOrchestrationBatches: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organisation** | **string**| The organisation machine name | | +| **orchestration_id** | **string**| Orchestration identifier | | +| **limit** | **int**| Maximum number of batches to return | [optional] [default to 20] | +| **cursor** | **string**| Pagination cursor from previous response | [optional] | + +### Return type + +[**\QuantClient\Model\ListOrchestrationBatches200Response**](../Model/ListOrchestrationBatches200Response.md) + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `listOrchestrations()` + +```php +listOrchestrations($organisation, $status, $limit, $cursor): \QuantClient\Model\ListOrchestrations200Response +``` + +List Durable Orchestrations + +List durable orchestrations for an organization with optional filtering. * * **Note:** This is different from `/tools/orchestrations` which handles async tool execution * polling. These durable orchestrations are for long-running batch processing loops. * * **Filter Options:** * - `status`: Filter by orchestration status * - `limit`: Max results (default 20, max 100) * - `cursor`: Pagination cursor + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\AIOrchestrationsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organisation = 'organisation_example'; // string | The organisation machine name +$status = 'status_example'; // string | Filter by orchestration status +$limit = 20; // int | Maximum number of results +$cursor = 'cursor_example'; // string | Pagination cursor from previous response + +try { + $result = $apiInstance->listOrchestrations($organisation, $status, $limit, $cursor); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AIOrchestrationsApi->listOrchestrations: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organisation** | **string**| The organisation machine name | | +| **status** | **string**| Filter by orchestration status | [optional] | +| **limit** | **int**| Maximum number of results | [optional] [default to 20] | +| **cursor** | **string**| Pagination cursor from previous response | [optional] | + +### Return type + +[**\QuantClient\Model\ListOrchestrations200Response**](../Model/ListOrchestrations200Response.md) + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `pauseOrchestration()` + +```php +pauseOrchestration($organisation, $orchestration_id): object +``` + +Pause Durable Orchestration + +Pause a running orchestration. The current batch will complete, but no new batches will start. Can be resumed later. + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\AIOrchestrationsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organisation = 'organisation_example'; // string | The organisation machine name +$orchestration_id = 'orchestration_id_example'; // string | Orchestration identifier + +try { + $result = $apiInstance->pauseOrchestration($organisation, $orchestration_id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AIOrchestrationsApi->pauseOrchestration: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organisation** | **string**| The organisation machine name | | +| **orchestration_id** | **string**| Orchestration identifier | | + +### Return type + +**object** + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `resumeOrchestration()` + +```php +resumeOrchestration($organisation, $orchestration_id): object +``` + +Resume Durable Orchestration + +Resume a paused orchestration. Processing continues from where it left off. + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\AIOrchestrationsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organisation = 'organisation_example'; // string | The organisation machine name +$orchestration_id = 'orchestration_id_example'; // string | Orchestration identifier + +try { + $result = $apiInstance->resumeOrchestration($organisation, $orchestration_id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AIOrchestrationsApi->resumeOrchestration: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organisation** | **string**| The organisation machine name | | +| **orchestration_id** | **string**| Orchestration identifier | | + +### Return type + +**object** + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `startOrchestration()` + +```php +startOrchestration($organisation, $orchestration_id): object +``` + +Start Durable Orchestration + +Start a pending orchestration. Only works on orchestrations created with `autoStart: false`. + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\AIOrchestrationsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organisation = 'organisation_example'; // string | The organisation machine name +$orchestration_id = 'orchestration_id_example'; // string | Orchestration identifier + +try { + $result = $apiInstance->startOrchestration($organisation, $orchestration_id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AIOrchestrationsApi->startOrchestration: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organisation** | **string**| The organisation machine name | | +| **orchestration_id** | **string**| Orchestration identifier | | + +### Return type + +**object** + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) diff --git a/docs/Api/AISkillsApi.md b/docs/Api/AISkillsApi.md new file mode 100644 index 0000000..dc2e878 --- /dev/null +++ b/docs/Api/AISkillsApi.md @@ -0,0 +1,704 @@ +# QuantClient\AISkillsApi + +All URIs are relative to https://dashboard.quantcdn.io, except if the operation defines another base path. + +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**createSkill()**](AISkillsApi.md#createSkill) | **POST** /api/v3/organizations/{organisation}/ai/skills | Create Inline Skill | +| [**deleteSkill()**](AISkillsApi.md#deleteSkill) | **DELETE** /api/v3/organizations/{organisation}/ai/skills/{skillId} | Delete Skill | +| [**deleteSkillCollection()**](AISkillsApi.md#deleteSkillCollection) | **DELETE** /api/v3/organizations/{organisation}/ai/skills/collections/{namespace} | Delete Skill Collection | +| [**getSkill()**](AISkillsApi.md#getSkill) | **GET** /api/v3/organizations/{organisation}/ai/skills/{skillId} | Get Skill Details | +| [**importSkill()**](AISkillsApi.md#importSkill) | **POST** /api/v3/organizations/{organisation}/ai/skills/import | Import Skill from External Source | +| [**importSkillCollection()**](AISkillsApi.md#importSkillCollection) | **POST** /api/v3/organizations/{organisation}/ai/skills/import-collection | Import Skill Collection from GitHub | +| [**listSkillCollections()**](AISkillsApi.md#listSkillCollections) | **GET** /api/v3/organizations/{organisation}/ai/skills/collections | List Skill Collections | +| [**listSkills()**](AISkillsApi.md#listSkills) | **GET** /api/v3/organizations/{organisation}/ai/skills | List Organization's Skills | +| [**syncSkill()**](AISkillsApi.md#syncSkill) | **POST** /api/v3/organizations/{organisation}/ai/skills/{skillId}/sync | Sync Skill from Source | +| [**syncSkillCollection()**](AISkillsApi.md#syncSkillCollection) | **POST** /api/v3/organizations/{organisation}/ai/skills/collections/{namespace}/sync | Sync Skill Collection | +| [**updateSkill()**](AISkillsApi.md#updateSkill) | **PUT** /api/v3/organizations/{organisation}/ai/skills/{skillId} | Update Skill | + + +## `createSkill()` + +```php +createSkill($organisation, $create_skill_request): \QuantClient\Model\CreateSkill201Response +``` + +Create Inline Skill + +Creates a new skill with inline content. Use this for custom skills * that are defined directly in your organization. * * **Trigger Conditions:** * - Natural language description of when to use the skill * - Used by AI to determine when to suggest or apply the skill * - Example: 'When the user asks about code review or security analysis' + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\AISkillsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organisation = 'organisation_example'; // string | The organisation ID +$create_skill_request = new \QuantClient\Model\CreateSkillRequest(); // \QuantClient\Model\CreateSkillRequest + +try { + $result = $apiInstance->createSkill($organisation, $create_skill_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AISkillsApi->createSkill: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organisation** | **string**| The organisation ID | | +| **create_skill_request** | [**\QuantClient\Model\CreateSkillRequest**](../Model/CreateSkillRequest.md)| | | + +### Return type + +[**\QuantClient\Model\CreateSkill201Response**](../Model/CreateSkill201Response.md) + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `deleteSkill()` + +```php +deleteSkill($organisation, $skill_id): \QuantClient\Model\DeleteSkill200Response +``` + +Delete Skill + +Permanently deletes a skill. This will also remove it from any agents that have it assigned. + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\AISkillsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organisation = 'organisation_example'; // string | The organisation ID +$skill_id = 'skill_id_example'; // string | The skill ID + +try { + $result = $apiInstance->deleteSkill($organisation, $skill_id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AISkillsApi->deleteSkill: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organisation** | **string**| The organisation ID | | +| **skill_id** | **string**| The skill ID | | + +### Return type + +[**\QuantClient\Model\DeleteSkill200Response**](../Model/DeleteSkill200Response.md) + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `deleteSkillCollection()` + +```php +deleteSkillCollection($organisation, $namespace): \QuantClient\Model\DeleteSkillCollection200Response +``` + +Delete Skill Collection + +Permanently deletes all skills in the specified namespace. + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\AISkillsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organisation = 'organisation_example'; // string | The organisation ID +$namespace = 'namespace_example'; // string | Collection namespace + +try { + $result = $apiInstance->deleteSkillCollection($organisation, $namespace); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AISkillsApi->deleteSkillCollection: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organisation** | **string**| The organisation ID | | +| **namespace** | **string**| Collection namespace | | + +### Return type + +[**\QuantClient\Model\DeleteSkillCollection200Response**](../Model/DeleteSkillCollection200Response.md) + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getSkill()` + +```php +getSkill($organisation, $skill_id): \QuantClient\Model\GetSkill200Response +``` + +Get Skill Details + +Retrieves full details of a skill including its content, source information, and metadata. + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\AISkillsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organisation = 'organisation_example'; // string | The organisation ID +$skill_id = 'skill_id_example'; // string | The skill ID + +try { + $result = $apiInstance->getSkill($organisation, $skill_id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AISkillsApi->getSkill: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organisation** | **string**| The organisation ID | | +| **skill_id** | **string**| The skill ID | | + +### Return type + +[**\QuantClient\Model\GetSkill200Response**](../Model/GetSkill200Response.md) + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `importSkill()` + +```php +importSkill($organisation, $import_skill_request): \QuantClient\Model\ImportSkill201Response +``` + +Import Skill from External Source + +Imports a skill from an external source like skills.sh registry or GitHub repository. * * **Supported Sources:** * - `skills.sh`: Import from the skills.sh community registry * - `github`: Import from a GitHub repository (public or private) * * **Version Control:** * - Skills can be pinned to specific versions * - Use the sync endpoint to update to latest version + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\AISkillsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organisation = 'organisation_example'; // string | The organisation ID +$import_skill_request = new \QuantClient\Model\ImportSkillRequest(); // \QuantClient\Model\ImportSkillRequest + +try { + $result = $apiInstance->importSkill($organisation, $import_skill_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AISkillsApi->importSkill: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organisation** | **string**| The organisation ID | | +| **import_skill_request** | [**\QuantClient\Model\ImportSkillRequest**](../Model/ImportSkillRequest.md)| | | + +### Return type + +[**\QuantClient\Model\ImportSkill201Response**](../Model/ImportSkill201Response.md) + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `importSkillCollection()` + +```php +importSkillCollection($organisation, $import_skill_collection_request): \QuantClient\Model\ImportSkillCollection201Response +``` + +Import Skill Collection from GitHub + +Discovers all skill directories under a given path in a GitHub repository * and imports each as a skill within the specified namespace. Each subdirectory must contain a SKILL.md file. * * **Namespace:** Used for grouping and slash-command invocation (e.g., `/superpowers:brainstorming`). * * **Idempotent:** If a skill with the same namespace + name already exists, it is updated. + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\AISkillsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organisation = 'organisation_example'; // string | The organisation ID +$import_skill_collection_request = new \QuantClient\Model\ImportSkillCollectionRequest(); // \QuantClient\Model\ImportSkillCollectionRequest + +try { + $result = $apiInstance->importSkillCollection($organisation, $import_skill_collection_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AISkillsApi->importSkillCollection: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organisation** | **string**| The organisation ID | | +| **import_skill_collection_request** | [**\QuantClient\Model\ImportSkillCollectionRequest**](../Model/ImportSkillCollectionRequest.md)| | | + +### Return type + +[**\QuantClient\Model\ImportSkillCollection201Response**](../Model/ImportSkillCollection201Response.md) + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `listSkillCollections()` + +```php +listSkillCollections($organisation): \QuantClient\Model\ListSkillCollections200Response +``` + +List Skill Collections + +Lists distinct namespaces (collections) for the organization, with skill counts and skill names for each collection. + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\AISkillsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organisation = 'organisation_example'; // string | The organisation ID + +try { + $result = $apiInstance->listSkillCollections($organisation); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AISkillsApi->listSkillCollections: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organisation** | **string**| The organisation ID | | + +### Return type + +[**\QuantClient\Model\ListSkillCollections200Response**](../Model/ListSkillCollections200Response.md) + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `listSkills()` + +```php +listSkills($organisation, $tag, $namespace, $limit): \QuantClient\Model\ListSkills200Response +``` + +List Organization's Skills + +Lists all skills available to the organization. Skills are reusable prompts, * workflows, or instructions that can be assigned to agents or invoked directly. * * **Skill Sources:** * - `inline`: Created directly via the API * - `skills.sh`: Imported from skills.sh registry * - `github`: Imported from a GitHub repository * - `local`: Uploaded from local file + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\AISkillsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organisation = 'organisation_example'; // string | The organisation ID +$tag = 'tag_example'; // string | Filter skills by tag +$namespace = 'namespace_example'; // string | Filter skills by collection namespace (e.g. 'superpowers') +$limit = 50; // int | Maximum number of skills to return + +try { + $result = $apiInstance->listSkills($organisation, $tag, $namespace, $limit); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AISkillsApi->listSkills: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organisation** | **string**| The organisation ID | | +| **tag** | **string**| Filter skills by tag | [optional] | +| **namespace** | **string**| Filter skills by collection namespace (e.g. 'superpowers') | [optional] | +| **limit** | **int**| Maximum number of skills to return | [optional] [default to 50] | + +### Return type + +[**\QuantClient\Model\ListSkills200Response**](../Model/ListSkills200Response.md) + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `syncSkill()` + +```php +syncSkill($organisation, $skill_id): \QuantClient\Model\ImportSkill201Response +``` + +Sync Skill from Source + +Re-fetches skill content from its original source. * Only applicable to skills imported from external sources (skills.sh, github). * Inline skills cannot be synced. * * **Version Behavior:** * - If version is pinned, fetches that specific version * - If no version specified, fetches latest + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\AISkillsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organisation = 'organisation_example'; // string | The organisation ID +$skill_id = 'skill_id_example'; // string | The skill ID + +try { + $result = $apiInstance->syncSkill($organisation, $skill_id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AISkillsApi->syncSkill: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organisation** | **string**| The organisation ID | | +| **skill_id** | **string**| The skill ID | | + +### Return type + +[**\QuantClient\Model\ImportSkill201Response**](../Model/ImportSkill201Response.md) + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `syncSkillCollection()` + +```php +syncSkillCollection($organisation, $namespace): \QuantClient\Model\SyncSkillCollection200Response +``` + +Sync Skill Collection + +Re-syncs all skills in a namespace from their GitHub source. Detects new * skills added to the repository and flags skills removed from the source. Does NOT auto-delete removed skills. + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\AISkillsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organisation = 'organisation_example'; // string | The organisation ID +$namespace = 'namespace_example'; // string | Collection namespace + +try { + $result = $apiInstance->syncSkillCollection($organisation, $namespace); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AISkillsApi->syncSkillCollection: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organisation** | **string**| The organisation ID | | +| **namespace** | **string**| Collection namespace | | + +### Return type + +[**\QuantClient\Model\SyncSkillCollection200Response**](../Model/SyncSkillCollection200Response.md) + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `updateSkill()` + +```php +updateSkill($organisation, $skill_id, $update_skill_request): \QuantClient\Model\UpdateSkill200Response +``` + +Update Skill + +Updates an existing skill. For imported skills, this updates * local overrides (name, tags, triggerCondition) but not the source content. * Use the sync endpoint to update source content. + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\AISkillsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organisation = 'organisation_example'; // string | The organisation ID +$skill_id = 'skill_id_example'; // string | The skill ID +$update_skill_request = new \QuantClient\Model\UpdateSkillRequest(); // \QuantClient\Model\UpdateSkillRequest + +try { + $result = $apiInstance->updateSkill($organisation, $skill_id, $update_skill_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AISkillsApi->updateSkill: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organisation** | **string**| The organisation ID | | +| **skill_id** | **string**| The skill ID | | +| **update_skill_request** | [**\QuantClient\Model\UpdateSkillRequest**](../Model/UpdateSkillRequest.md)| | | + +### Return type + +[**\QuantClient\Model\UpdateSkill200Response**](../Model/UpdateSkill200Response.md) + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) diff --git a/docs/Api/AISlackBotsApi.md b/docs/Api/AISlackBotsApi.md new file mode 100644 index 0000000..3f6e2fd --- /dev/null +++ b/docs/Api/AISlackBotsApi.md @@ -0,0 +1,452 @@ +# QuantClient\AISlackBotsApi + +All URIs are relative to https://dashboard.quantcdn.io, except if the operation defines another base path. + +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**createSlackBot()**](AISlackBotsApi.md#createSlackBot) | **POST** /api/v3/organizations/{organisation}/ai/slack-bots | Create Slack Bot | +| [**deleteSlackBot()**](AISlackBotsApi.md#deleteSlackBot) | **DELETE** /api/v3/organizations/{organisation}/ai/slack-bots/{botId} | Delete Slack Bot | +| [**getSlackBot()**](AISlackBotsApi.md#getSlackBot) | **GET** /api/v3/organizations/{organisation}/ai/slack-bots/{botId} | Get Slack Bot | +| [**listSlackBots()**](AISlackBotsApi.md#listSlackBots) | **GET** /api/v3/organizations/{organisation}/ai/slack-bots | List Slack Bots | +| [**searchSlackWorkspaceChannels()**](AISlackBotsApi.md#searchSlackWorkspaceChannels) | **GET** /api/v3/organizations/{organisation}/ai/slack-bots/{botId}/workspace/channels | Search Slack Workspace Channels | +| [**searchSlackWorkspaceUsers()**](AISlackBotsApi.md#searchSlackWorkspaceUsers) | **GET** /api/v3/organizations/{organisation}/ai/slack-bots/{botId}/workspace/users | Search Slack Workspace Users | +| [**updateSlackBot()**](AISlackBotsApi.md#updateSlackBot) | **PUT** /api/v3/organizations/{organisation}/ai/slack-bots/{botId} | Update Slack Bot | + + +## `createSlackBot()` + +```php +createSlackBot($organisation, $create_slack_bot_request): \QuantClient\Model\CreateSlackBot201Response +``` + +Create Slack Bot + +Creates a new Slack bot backed by an AI agent. The bot must be connected to a Slack workspace via OAuth before it can receive events. * * **Setup Types:** * - `quant`: Quant-managed Slack app — uses shared OAuth credentials * - `byo`: Bring Your Own — customer provides their own Slack app credentials + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\AISlackBotsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organisation = 'organisation_example'; // string | The organisation ID +$create_slack_bot_request = new \QuantClient\Model\CreateSlackBotRequest(); // \QuantClient\Model\CreateSlackBotRequest + +try { + $result = $apiInstance->createSlackBot($organisation, $create_slack_bot_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AISlackBotsApi->createSlackBot: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organisation** | **string**| The organisation ID | | +| **create_slack_bot_request** | [**\QuantClient\Model\CreateSlackBotRequest**](../Model/CreateSlackBotRequest.md)| | | + +### Return type + +[**\QuantClient\Model\CreateSlackBot201Response**](../Model/CreateSlackBot201Response.md) + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `deleteSlackBot()` + +```php +deleteSlackBot($organisation, $bot_id): \QuantClient\Model\DeleteSlackBot200Response +``` + +Delete Slack Bot + +Permanently deletes a Slack bot and disconnects it from the workspace. + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\AISlackBotsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organisation = 'organisation_example'; // string | The organisation ID +$bot_id = 'bot_id_example'; // string | The Slack bot ID + +try { + $result = $apiInstance->deleteSlackBot($organisation, $bot_id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AISlackBotsApi->deleteSlackBot: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organisation** | **string**| The organisation ID | | +| **bot_id** | **string**| The Slack bot ID | | + +### Return type + +[**\QuantClient\Model\DeleteSlackBot200Response**](../Model/DeleteSlackBot200Response.md) + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getSlackBot()` + +```php +getSlackBot($organisation, $bot_id): \QuantClient\Model\GetSlackBot200Response +``` + +Get Slack Bot + +Retrieves details for a specific Slack bot including its configuration and connection status. + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\AISlackBotsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organisation = 'organisation_example'; // string | The organisation ID +$bot_id = 'bot_id_example'; // string | The Slack bot ID + +try { + $result = $apiInstance->getSlackBot($organisation, $bot_id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AISlackBotsApi->getSlackBot: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organisation** | **string**| The organisation ID | | +| **bot_id** | **string**| The Slack bot ID | | + +### Return type + +[**\QuantClient\Model\GetSlackBot200Response**](../Model/GetSlackBot200Response.md) + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `listSlackBots()` + +```php +listSlackBots($organisation): \QuantClient\Model\ListSlackBots200Response +``` + +List Slack Bots + +Lists all Slack bots configured for the organization. Each bot is backed by an AI agent and can be connected to a Slack workspace. + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\AISlackBotsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organisation = 'organisation_example'; // string | The organisation ID + +try { + $result = $apiInstance->listSlackBots($organisation); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AISlackBotsApi->listSlackBots: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organisation** | **string**| The organisation ID | | + +### Return type + +[**\QuantClient\Model\ListSlackBots200Response**](../Model/ListSlackBots200Response.md) + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `searchSlackWorkspaceChannels()` + +```php +searchSlackWorkspaceChannels($organisation, $bot_id, $q): \QuantClient\Model\SearchSlackWorkspaceChannels200Response +``` + +Search Slack Workspace Channels + +Searches channels in the Slack workspace connected to this bot. Requires the bot to be connected via OAuth. + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\AISlackBotsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organisation = 'organisation_example'; // string | The organisation ID +$bot_id = 'bot_id_example'; // string | The Slack bot ID +$q = 'q_example'; // string | Search query to filter channels by name + +try { + $result = $apiInstance->searchSlackWorkspaceChannels($organisation, $bot_id, $q); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AISlackBotsApi->searchSlackWorkspaceChannels: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organisation** | **string**| The organisation ID | | +| **bot_id** | **string**| The Slack bot ID | | +| **q** | **string**| Search query to filter channels by name | [optional] | + +### Return type + +[**\QuantClient\Model\SearchSlackWorkspaceChannels200Response**](../Model/SearchSlackWorkspaceChannels200Response.md) + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `searchSlackWorkspaceUsers()` + +```php +searchSlackWorkspaceUsers($organisation, $bot_id, $q): \QuantClient\Model\SearchSlackWorkspaceUsers200Response +``` + +Search Slack Workspace Users + +Searches users in the Slack workspace connected to this bot. Requires the bot to be connected via OAuth. + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\AISlackBotsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organisation = 'organisation_example'; // string | The organisation ID +$bot_id = 'bot_id_example'; // string | The Slack bot ID +$q = 'q_example'; // string | Search query to filter users by name + +try { + $result = $apiInstance->searchSlackWorkspaceUsers($organisation, $bot_id, $q); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AISlackBotsApi->searchSlackWorkspaceUsers: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organisation** | **string**| The organisation ID | | +| **bot_id** | **string**| The Slack bot ID | | +| **q** | **string**| Search query to filter users by name | [optional] | + +### Return type + +[**\QuantClient\Model\SearchSlackWorkspaceUsers200Response**](../Model/SearchSlackWorkspaceUsers200Response.md) + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `updateSlackBot()` + +```php +updateSlackBot($organisation, $bot_id, $update_slack_bot_request): \QuantClient\Model\CreateSlackBot201Response +``` + +Update Slack Bot + +Updates a Slack bot's configuration. Only provided fields are updated. + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\AISlackBotsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organisation = 'organisation_example'; // string | The organisation ID +$bot_id = 'bot_id_example'; // string | The Slack bot ID +$update_slack_bot_request = new \QuantClient\Model\UpdateSlackBotRequest(); // \QuantClient\Model\UpdateSlackBotRequest + +try { + $result = $apiInstance->updateSlackBot($organisation, $bot_id, $update_slack_bot_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AISlackBotsApi->updateSlackBot: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organisation** | **string**| The organisation ID | | +| **bot_id** | **string**| The Slack bot ID | | +| **update_slack_bot_request** | [**\QuantClient\Model\UpdateSlackBotRequest**](../Model/UpdateSlackBotRequest.md)| | | + +### Return type + +[**\QuantClient\Model\CreateSlackBot201Response**](../Model/CreateSlackBot201Response.md) + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) diff --git a/docs/Api/AIToolsApi.md b/docs/Api/AIToolsApi.md index a2bffdc..018d1e2 100644 --- a/docs/Api/AIToolsApi.md +++ b/docs/Api/AIToolsApi.md @@ -4,7 +4,7 @@ All URIs are relative to https://dashboard.quantcdn.io, except if the operation | Method | HTTP request | Description | | ------------- | ------------- | ------------- | -| [**getAIOrchestrationStatus()**](AIToolsApi.md#getAIOrchestrationStatus) | **GET** /api/v3/organizations/{organisation}/ai/tools/orchestrations/{orchestrationId} | Get Orchestration Status | +| [**getAIOrchestrationStatus()**](AIToolsApi.md#getAIOrchestrationStatus) | **GET** /api/v3/organizations/{organisation}/ai/tools/orchestrations/{orchestrationId} | Get Tool Orchestration Status (Async Tool Polling) | | [**getAIToolExecutionStatus()**](AIToolsApi.md#getAIToolExecutionStatus) | **GET** /api/v3/organizations/{organisation}/ai/tools/executions/{executionId} | Get async tool execution status and result | | [**listAIToolExecutions()**](AIToolsApi.md#listAIToolExecutions) | **GET** /api/v3/organizations/{organisation}/ai/tools/executions | List tool executions for monitoring and debugging | | [**listAIToolNames()**](AIToolsApi.md#listAIToolNames) | **GET** /api/v3/organizations/{organisation}/ai/tools/names | List tool names only (lightweight response) | @@ -17,9 +17,9 @@ All URIs are relative to https://dashboard.quantcdn.io, except if the operation getAIOrchestrationStatus($organisation, $orchestration_id): \QuantClient\Model\GetAIOrchestrationStatus200Response ``` -Get Orchestration Status +Get Tool Orchestration Status (Async Tool Polling) -Retrieves the status and synthesized result of a multi-tool orchestration. * * **Orchestration Pattern:** * When the AI requests multiple async tools simultaneously, an orchestration is created * to track all tool executions and synthesize their results into a single coherent response. * * **Flow:** * 1. AI requests multiple async tools (e.g., image generation + web search) * 2. Chat API creates orchestration and returns orchestrationId * 3. Tool Orchestrator Lambda polls all async tools * 4. When all tools complete, Orchestrator synthesizes results using AI * 5. Client polls this endpoint and receives final synthesized response * * **Status Values:** * - pending: Orchestration created, tools not yet started * - polling: Orchestrator is actively polling async tools * - synthesizing: All tools complete, AI is synthesizing response * - complete: Orchestration finished, synthesizedResponse available * - failed: Orchestration failed, error available * * **Polling Recommendations:** * - Poll every 2 seconds * - Maximum poll time: 10 minutes * - Orchestrator handles tool polling internally * * **Benefits over individual polling:** * - Single poll endpoint for multiple async tools * - AI synthesizes all results into coherent response * - Answers the original user question, not just tool summaries +Retrieves the status and synthesized result of a multi-tool async execution orchestration. * * **Note:** This endpoint is for async tool execution polling (`/tools/orchestrations`). * For durable batch processing orchestrations, see `GET /orchestrations` endpoints. * * **Orchestration Pattern:** * When the AI requests multiple async tools simultaneously, an orchestration is created * to track all tool executions and synthesize their results into a single coherent response. * * **Flow:** * 1. AI requests multiple async tools (e.g., image generation + web search) * 2. Chat API creates orchestration and returns orchestrationId * 3. Tool Orchestrator Lambda polls all async tools * 4. When all tools complete, Orchestrator synthesizes results using AI * 5. Client polls this endpoint and receives final synthesized response * * **Status Values:** * - pending: Orchestration created, tools not yet started * - polling: Orchestrator is actively polling async tools * - synthesizing: All tools complete, AI is synthesizing response * - complete: Orchestration finished, synthesizedResponse available * - failed: Orchestration failed, error available * * **Polling Recommendations:** * - Poll every 2 seconds * - Maximum poll time: 10 minutes * - Orchestrator handles tool polling internally * * **Benefits over individual polling:** * - Single poll endpoint for multiple async tools * - AI synthesizes all results into coherent response * - Answers the original user question, not just tool summaries ### Example diff --git a/docs/Api/AIUsageApi.md b/docs/Api/AIUsageApi.md new file mode 100644 index 0000000..ea58407 --- /dev/null +++ b/docs/Api/AIUsageApi.md @@ -0,0 +1,66 @@ +# QuantClient\AIUsageApi + +All URIs are relative to https://dashboard.quantcdn.io, except if the operation defines another base path. + +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**getMyUsage()**](AIUsageApi.md#getMyUsage) | **GET** /api/v3/organizations/{organisation}/ai/usage/me | Get AI usage summary for the authenticated user | + + +## `getMyUsage()` + +```php +getMyUsage($organisation): \QuantClient\Model\GetMyUsage200Response +``` + +Get AI usage summary for the authenticated user + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\AIUsageApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organisation = 'organisation_example'; // string | The organisation ID + +try { + $result = $apiInstance->getMyUsage($organisation); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AIUsageApi->getMyUsage: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organisation** | **string**| The organisation ID | | + +### Return type + +[**\QuantClient\Model\GetMyUsage200Response**](../Model/GetMyUsage200Response.md) + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) diff --git a/docs/Api/AIVectorDatabaseApi.md b/docs/Api/AIVectorDatabaseApi.md index 78a6581..88b68f0 100644 --- a/docs/Api/AIVectorDatabaseApi.md +++ b/docs/Api/AIVectorDatabaseApi.md @@ -6,8 +6,10 @@ All URIs are relative to https://dashboard.quantcdn.io, except if the operation | ------------- | ------------- | ------------- | | [**createVectorCollection()**](AIVectorDatabaseApi.md#createVectorCollection) | **POST** /api/v3/organizations/{organisation}/ai/vector-db/collections | Create Vector Database Collection | | [**deleteVectorCollection()**](AIVectorDatabaseApi.md#deleteVectorCollection) | **DELETE** /api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId} | Delete Collection | +| [**deleteVectorDocuments()**](AIVectorDatabaseApi.md#deleteVectorDocuments) | **DELETE** /api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId}/documents | Delete Documents from Collection | | [**getVectorCollection()**](AIVectorDatabaseApi.md#getVectorCollection) | **GET** /api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId} | Get Collection Details | | [**listVectorCollections()**](AIVectorDatabaseApi.md#listVectorCollections) | **GET** /api/v3/organizations/{organisation}/ai/vector-db/collections | List Vector Database Collections | +| [**listVectorDocuments()**](AIVectorDatabaseApi.md#listVectorDocuments) | **GET** /api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId}/documents | List Documents in Collection | | [**queryVectorCollection()**](AIVectorDatabaseApi.md#queryVectorCollection) | **POST** /api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId}/query | Semantic Search Query | | [**uploadVectorDocuments()**](AIVectorDatabaseApi.md#uploadVectorDocuments) | **POST** /api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId}/documents | Upload Documents to Collection | @@ -77,7 +79,7 @@ try { ## `deleteVectorCollection()` ```php -deleteVectorCollection($organisation, $collection_id): \QuantClient\Model\DeleteVectorCollection200Response +deleteVectorCollection($organisation, $collection_id): \QuantClient\Model\DeleteSkillCollection200Response ``` Delete Collection @@ -121,7 +123,7 @@ try { ### Return type -[**\QuantClient\Model\DeleteVectorCollection200Response**](../Model/DeleteVectorCollection200Response.md) +[**\QuantClient\Model\DeleteSkillCollection200Response**](../Model/DeleteSkillCollection200Response.md) ### Authorization @@ -136,6 +138,70 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) +## `deleteVectorDocuments()` + +```php +deleteVectorDocuments($organisation, $collection_id, $delete_vector_documents_request): \QuantClient\Model\DeleteVectorDocuments200Response +``` + +Delete Documents from Collection + +Delete documents from a collection. Supports three deletion modes: * * 1. **Purge All** - Set `purgeAll: true` to delete ALL documents in the collection * * 2. **By Document IDs** - Provide `documentIds` array with specific document UUIDs * * 3. **By Metadata** - Provide `metadata` object with `field` and `values` to delete documents where the metadata field matches any of the values * * **Drupal Integration:** * When using with Drupal AI Search, use metadata deletion with: * - `field: 'drupal_entity_id'` to delete all chunks for specific entities * - `field: 'drupal_long_id'` to delete specific chunks + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\AIVectorDatabaseApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organisation = 'organisation_example'; // string | Organisation machine name +$collection_id = 'collection_id_example'; // string | Collection UUID +$delete_vector_documents_request = new \QuantClient\Model\DeleteVectorDocumentsRequest(); // \QuantClient\Model\DeleteVectorDocumentsRequest + +try { + $result = $apiInstance->deleteVectorDocuments($organisation, $collection_id, $delete_vector_documents_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AIVectorDatabaseApi->deleteVectorDocuments: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organisation** | **string**| Organisation machine name | | +| **collection_id** | **string**| Collection UUID | | +| **delete_vector_documents_request** | [**\QuantClient\Model\DeleteVectorDocumentsRequest**](../Model/DeleteVectorDocumentsRequest.md)| | | + +### Return type + +[**\QuantClient\Model\DeleteVectorDocuments200Response**](../Model/DeleteVectorDocuments200Response.md) + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + ## `getVectorCollection()` ```php @@ -258,6 +324,73 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) +## `listVectorDocuments()` + +```php +listVectorDocuments($organisation, $collection_id, $key, $limit, $offset) +``` + +List Documents in Collection + +Lists documents in a collection with pagination. Supports filtering by document key. + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\AIVectorDatabaseApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organisation = 'organisation_example'; // string +$collection_id = 'collection_id_example'; // string +$key = 'key_example'; // string | Filter by document key +$limit = 50; // int +$offset = 0; // int + +try { + $apiInstance->listVectorDocuments($organisation, $collection_id, $key, $limit, $offset); +} catch (Exception $e) { + echo 'Exception when calling AIVectorDatabaseApi->listVectorDocuments: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organisation** | **string**| | | +| **collection_id** | **string**| | | +| **key** | **string**| Filter by document key | [optional] | +| **limit** | **int**| | [optional] [default to 50] | +| **offset** | **int**| | [optional] [default to 0] | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + ## `queryVectorCollection()` ```php diff --git a/docs/Api/CDNMetricsApi.md b/docs/Api/CDNMetricsApi.md new file mode 100644 index 0000000..59a0b0c --- /dev/null +++ b/docs/Api/CDNMetricsApi.md @@ -0,0 +1,214 @@ +# QuantClient\CDNMetricsApi + +All URIs are relative to https://dashboard.quantcdn.io, except if the operation defines another base path. + +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**getDailyMetrics()**](CDNMetricsApi.md#getDailyMetrics) | **GET** /v2/organizations/{organization}/projects/{project}/metrics/daily | Get daily metrics | +| [**getHourlyMetrics()**](CDNMetricsApi.md#getHourlyMetrics) | **GET** /v2/organizations/{organization}/projects/{project}/metrics/hourly | Get hourly metrics | +| [**getMonthlyMetrics()**](CDNMetricsApi.md#getMonthlyMetrics) | **GET** /v2/organizations/{organization}/projects/{project}/metrics/monthly | Get monthly metrics | + + +## `getDailyMetrics()` + +```php +getDailyMetrics($organization, $project, $domain, $metrics, $timestamp_format): \QuantClient\Model\V2MetricsResponse +``` + +Get daily metrics + +Returns the last 30 days of daily metrics data + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\CDNMetricsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organization = 'organization_example'; // string | Organization identifier +$project = 'project_example'; // string | Project identifier +$domain = 'domain_example'; // string | Filter by domain ID or domain name +$metrics = array('metrics_example'); // string[] | Metrics to return (default: hits, bytes). Use the /metrics/available endpoint to list all metrics by category. +$timestamp_format = 'iso8601'; // string | Timestamp format in response + +try { + $result = $apiInstance->getDailyMetrics($organization, $project, $domain, $metrics, $timestamp_format); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CDNMetricsApi->getDailyMetrics: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organization** | **string**| Organization identifier | | +| **project** | **string**| Project identifier | | +| **domain** | **string**| Filter by domain ID or domain name | [optional] | +| **metrics** | [**string[]**](../Model/string.md)| Metrics to return (default: hits, bytes). Use the /metrics/available endpoint to list all metrics by category. | [optional] | +| **timestamp_format** | **string**| Timestamp format in response | [optional] [default to 'iso8601'] | + +### Return type + +[**\QuantClient\Model\V2MetricsResponse**](../Model/V2MetricsResponse.md) + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getHourlyMetrics()` + +```php +getHourlyMetrics($organization, $project, $domain, $metrics, $timestamp_format): \QuantClient\Model\V2MetricsResponse +``` + +Get hourly metrics + +Returns the last hour of minute-by-minute metrics data + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\CDNMetricsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organization = 'organization_example'; // string | Organization identifier +$project = 'project_example'; // string | Project identifier +$domain = 'domain_example'; // string | Filter by domain ID or domain name +$metrics = array('metrics_example'); // string[] | Metrics to return (default: hits, bytes). Use the /metrics/available endpoint to list all metrics by category. +$timestamp_format = 'iso8601'; // string | Timestamp format in response + +try { + $result = $apiInstance->getHourlyMetrics($organization, $project, $domain, $metrics, $timestamp_format); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CDNMetricsApi->getHourlyMetrics: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organization** | **string**| Organization identifier | | +| **project** | **string**| Project identifier | | +| **domain** | **string**| Filter by domain ID or domain name | [optional] | +| **metrics** | [**string[]**](../Model/string.md)| Metrics to return (default: hits, bytes). Use the /metrics/available endpoint to list all metrics by category. | [optional] | +| **timestamp_format** | **string**| Timestamp format in response | [optional] [default to 'iso8601'] | + +### Return type + +[**\QuantClient\Model\V2MetricsResponse**](../Model/V2MetricsResponse.md) + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getMonthlyMetrics()` + +```php +getMonthlyMetrics($organization, $project, $domain, $metrics, $timestamp_format): \QuantClient\Model\V2MetricsResponse +``` + +Get monthly metrics + +Returns the last 12 months of monthly metrics data + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\CDNMetricsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organization = 'organization_example'; // string | Organization identifier +$project = 'project_example'; // string | Project identifier +$domain = 'domain_example'; // string | Filter by domain ID or domain name +$metrics = array('metrics_example'); // string[] | Metrics to return (default: hits, bytes). Use the /metrics/available endpoint to list all metrics by category. +$timestamp_format = 'iso8601'; // string | Timestamp format in response + +try { + $result = $apiInstance->getMonthlyMetrics($organization, $project, $domain, $metrics, $timestamp_format); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CDNMetricsApi->getMonthlyMetrics: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organization** | **string**| Organization identifier | | +| **project** | **string**| Project identifier | | +| **domain** | **string**| Filter by domain ID or domain name | [optional] | +| **metrics** | [**string[]**](../Model/string.md)| Metrics to return (default: hits, bytes). Use the /metrics/available endpoint to list all metrics by category. | [optional] | +| **timestamp_format** | **string**| Timestamp format in response | [optional] [default to 'iso8601'] | + +### Return type + +[**\QuantClient\Model\V2MetricsResponse**](../Model/V2MetricsResponse.md) + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) diff --git a/docs/Api/KVApi.md b/docs/Api/KVApi.md index 136f671..0f2e81d 100644 --- a/docs/Api/KVApi.md +++ b/docs/Api/KVApi.md @@ -11,8 +11,10 @@ All URIs are relative to https://dashboard.quantcdn.io, except if the operation | [**kVItemsList()**](KVApi.md#kVItemsList) | **GET** /api/v2/organizations/{organization}/projects/{project}/kv/{store_id}/items | List items in a kv store | | [**kVItemsShow()**](KVApi.md#kVItemsShow) | **GET** /api/v2/organizations/{organization}/projects/{project}/kv/{store_id}/items/{key} | Get an item from a kv store | | [**kVItemsUpdate()**](KVApi.md#kVItemsUpdate) | **PUT** /api/v2/organizations/{organization}/projects/{project}/kv/{store_id}/items/{key} | Update an item in a kv store | +| [**kVLinkToProject()**](KVApi.md#kVLinkToProject) | **POST** /api/v2/organizations/{organization}/projects/{project}/kv/{store_id}/link | Link a KV store to another project | | [**kVList()**](KVApi.md#kVList) | **GET** /api/v2/organizations/{organization}/projects/{project}/kv | List key-value stores | | [**kVShow()**](KVApi.md#kVShow) | **GET** /api/v2/organizations/{organization}/projects/{project}/kv/{store_id} | Get a kv store | +| [**kVUnlinkFromProject()**](KVApi.md#kVUnlinkFromProject) | **DELETE** /api/v2/organizations/{organization}/projects/{project}/kv/{store_id}/link | Unlink a KV store from this project | ## `kVCreate()` @@ -468,6 +470,72 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) +## `kVLinkToProject()` + +```php +kVLinkToProject($organization, $project, $store_id, $kv_link_to_project_request): \QuantClient\Model\KVLinkToProject200Response +``` + +Link a KV store to another project + +Share a KV store from the source project with a target project. The store will be accessible in the target project. + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\KVApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organization = test-org; // string | Organization identifier +$project = test-project; // string | Source project identifier +$store_id = store-123; // string | KV store identifier +$kv_link_to_project_request = new \QuantClient\Model\KVLinkToProjectRequest(); // \QuantClient\Model\KVLinkToProjectRequest + +try { + $result = $apiInstance->kVLinkToProject($organization, $project, $store_id, $kv_link_to_project_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling KVApi->kVLinkToProject: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organization** | **string**| Organization identifier | | +| **project** | **string**| Source project identifier | | +| **store_id** | **string**| KV store identifier | | +| **kv_link_to_project_request** | [**\QuantClient\Model\KVLinkToProjectRequest**](../Model/KVLinkToProjectRequest.md)| | | + +### Return type + +[**\QuantClient\Model\KVLinkToProject200Response**](../Model/KVLinkToProject200Response.md) + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + ## `kVList()` ```php @@ -589,3 +657,67 @@ try { [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) + +## `kVUnlinkFromProject()` + +```php +kVUnlinkFromProject($organization, $project, $store_id): \QuantClient\Model\KVLinkToProject200Response +``` + +Unlink a KV store from this project + +Remove access to a linked KV store from this project. The store must be linked (not owned by this project). + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\KVApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organization = test-org; // string | Organization identifier +$project = test-project; // string | Project identifier +$store_id = store-123; // string | KV store identifier + +try { + $result = $apiInstance->kVUnlinkFromProject($organization, $project, $store_id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling KVApi->kVUnlinkFromProject: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organization** | **string**| Organization identifier | | +| **project** | **string**| Project identifier | | +| **store_id** | **string**| KV store identifier | | + +### Return type + +[**\QuantClient\Model\KVLinkToProject200Response**](../Model/KVLinkToProject200Response.md) + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) diff --git a/docs/Api/OrchestrationApi.md b/docs/Api/OrchestrationApi.md deleted file mode 100644 index d0e36f4..0000000 --- a/docs/Api/OrchestrationApi.md +++ /dev/null @@ -1,70 +0,0 @@ -# QuantClient\OrchestrationApi - -All URIs are relative to https://dashboard.quantcdn.io, except if the operation defines another base path. - -| Method | HTTP request | Description | -| ------------- | ------------- | ------------- | -| [**getAIOrchestrationStatus()**](OrchestrationApi.md#getAIOrchestrationStatus) | **GET** /api/v3/organizations/{organisation}/ai/tools/orchestrations/{orchestrationId} | Get Orchestration Status | - - -## `getAIOrchestrationStatus()` - -```php -getAIOrchestrationStatus($organisation, $orchestration_id): \QuantClient\Model\GetAIOrchestrationStatus200Response -``` - -Get Orchestration Status - -Retrieves the status and synthesized result of a multi-tool orchestration. * * **Orchestration Pattern:** * When the AI requests multiple async tools simultaneously, an orchestration is created * to track all tool executions and synthesize their results into a single coherent response. * * **Flow:** * 1. AI requests multiple async tools (e.g., image generation + web search) * 2. Chat API creates orchestration and returns orchestrationId * 3. Tool Orchestrator Lambda polls all async tools * 4. When all tools complete, Orchestrator synthesizes results using AI * 5. Client polls this endpoint and receives final synthesized response * * **Status Values:** * - pending: Orchestration created, tools not yet started * - polling: Orchestrator is actively polling async tools * - synthesizing: All tools complete, AI is synthesizing response * - complete: Orchestration finished, synthesizedResponse available * - failed: Orchestration failed, error available * * **Polling Recommendations:** * - Poll every 2 seconds * - Maximum poll time: 10 minutes * - Orchestrator handles tool polling internally * * **Benefits over individual polling:** * - Single poll endpoint for multiple async tools * - AI synthesizes all results into coherent response * - Answers the original user question, not just tool summaries - -### Example - -```php -setAccessToken('YOUR_ACCESS_TOKEN'); - - -$apiInstance = new QuantClient\Api\OrchestrationApi( - // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. - // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client(), - $config -); -$organisation = 'organisation_example'; // string | The organisation ID -$orchestration_id = orch_abc123def456789012345678901234; // string | Orchestration identifier for aggregated async tool executions - -try { - $result = $apiInstance->getAIOrchestrationStatus($organisation, $orchestration_id); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling OrchestrationApi->getAIOrchestrationStatus: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------- | ------------- | ------------- | ------------- | -| **organisation** | **string**| The organisation ID | | -| **orchestration_id** | **string**| Orchestration identifier for aggregated async tool executions | | - -### Return type - -[**\QuantClient\Model\GetAIOrchestrationStatus200Response**](../Model/GetAIOrchestrationStatus200Response.md) - -### Authorization - -[BearerAuth](../../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) diff --git a/docs/Api/TokensApi.md b/docs/Api/TokensApi.md new file mode 100644 index 0000000..d55333b --- /dev/null +++ b/docs/Api/TokensApi.md @@ -0,0 +1,188 @@ +# QuantClient\TokensApi + +All URIs are relative to https://dashboard.quantcdn.io, except if the operation defines another base path. + +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**tokensCreate()**](TokensApi.md#tokensCreate) | **POST** /api/v2/organizations/{organization}/tokens | Create a new API token scoped to this organization | +| [**tokensDelete()**](TokensApi.md#tokensDelete) | **DELETE** /api/v2/organizations/{organization}/tokens/{token_id} | Revoke an API token | +| [**tokensList()**](TokensApi.md#tokensList) | **GET** /api/v2/organizations/{organization}/tokens | List API tokens scoped to this organization | + + +## `tokensCreate()` + +```php +tokensCreate($organization, $tokens_create_request): \QuantClient\Model\TokensCreate201Response +``` + +Create a new API token scoped to this organization + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\TokensApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organization = test-org; // string | Organization identifier +$tokens_create_request = new \QuantClient\Model\TokensCreateRequest(); // \QuantClient\Model\TokensCreateRequest + +try { + $result = $apiInstance->tokensCreate($organization, $tokens_create_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TokensApi->tokensCreate: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organization** | **string**| Organization identifier | | +| **tokens_create_request** | [**\QuantClient\Model\TokensCreateRequest**](../Model/TokensCreateRequest.md)| | | + +### Return type + +[**\QuantClient\Model\TokensCreate201Response**](../Model/TokensCreate201Response.md) + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `tokensDelete()` + +```php +tokensDelete($organization, $token_id): \QuantClient\Model\TokensDelete200Response +``` + +Revoke an API token + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\TokensApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organization = test-org; // string | Organization identifier +$token_id = 42; // int | Token ID to revoke + +try { + $result = $apiInstance->tokensDelete($organization, $token_id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TokensApi->tokensDelete: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organization** | **string**| Organization identifier | | +| **token_id** | **int**| Token ID to revoke | | + +### Return type + +[**\QuantClient\Model\TokensDelete200Response**](../Model/TokensDelete200Response.md) + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `tokensList()` + +```php +tokensList($organization): \QuantClient\Model\TokensList200ResponseInner[] +``` + +List API tokens scoped to this organization + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new QuantClient\Api\TokensApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$organization = test-org; // string | Organization identifier + +try { + $result = $apiInstance->tokensList($organization); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TokensApi->tokensList: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **organization** | **string**| Organization identifier | | + +### Return type + +[**\QuantClient\Model\TokensList200ResponseInner[]**](../Model/TokensList200ResponseInner.md) + +### Authorization + +[BearerAuth](../../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) diff --git a/docs/Model/ChatInferenceRequest.md b/docs/Model/ChatInferenceRequest.md index 73cbe07..3ac24f5 100644 --- a/docs/Model/ChatInferenceRequest.md +++ b/docs/Model/ChatInferenceRequest.md @@ -16,5 +16,8 @@ Name | Type | Description | Notes **tool_config** | [**\QuantClient\Model\ChatInferenceRequestToolConfig**](ChatInferenceRequestToolConfig.md) | | [optional] **session_id** | **string** | Optional session ID for conversation continuity. Omit to use stateless mode, include to continue an existing session. | [optional] **async** | **bool** | Enable async/durable execution mode. When true, returns 202 with pollUrl instead of waiting for completion. Use for long-running inference, client-executed tools, or operations >30 seconds. | [optional] [default to false] +**allowed_tools** | **string[]** | Top-level convenience alias for toolConfig.allowedTools. Whitelists which tools can be auto-executed. | [optional] +**guardrails** | [**\QuantClient\Model\ChatInferenceRequestGuardrails**](ChatInferenceRequestGuardrails.md) | | [optional] +**long_context** | **bool** | Enable 1M context window support regardless of token estimation. Use when sending large payloads (>200K tokens). | [optional] [default to false] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ChatInferenceRequestGuardrails.md b/docs/Model/ChatInferenceRequestGuardrails.md new file mode 100644 index 0000000..4d7d9d9 --- /dev/null +++ b/docs/Model/ChatInferenceRequestGuardrails.md @@ -0,0 +1,11 @@ +# # ChatInferenceRequestGuardrails + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**guardrail_identifier** | **string** | Guardrail identifier from AWS Bedrock | [optional] +**guardrail_version** | **string** | Guardrail version | [optional] +**trace** | **string** | Enable guardrail trace output | [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/ChatInferenceStreamRequest.md b/docs/Model/ChatInferenceStreamRequest.md index f0ea2ae..2224160 100644 --- a/docs/Model/ChatInferenceStreamRequest.md +++ b/docs/Model/ChatInferenceStreamRequest.md @@ -15,5 +15,8 @@ Name | Type | Description | Notes **tool_config** | [**\QuantClient\Model\ChatInferenceRequestToolConfig**](ChatInferenceRequestToolConfig.md) | | [optional] **session_id** | **string** | Optional session ID for conversation continuity. Omit to use stateless mode, include to continue an existing session. | [optional] **async** | **bool** | Enable async/durable execution mode. When true, returns 202 with pollUrl instead of streaming. Use for long-running inference, client-executed tools, or operations >30 seconds. | [optional] [default to false] +**allowed_tools** | **string[]** | Top-level convenience alias for toolConfig.allowedTools. Whitelists which tools can be auto-executed. | [optional] +**guardrails** | [**\QuantClient\Model\ChatInferenceRequestGuardrails**](ChatInferenceRequestGuardrails.md) | | [optional] +**long_context** | **bool** | Enable 1M context window support regardless of token estimation. Use when sending large payloads (>200K tokens). | [optional] [default to false] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ChatWithAIAgentRequest.md b/docs/Model/ChatWithAIAgentRequest.md index cee5cbd..7765310 100644 --- a/docs/Model/ChatWithAIAgentRequest.md +++ b/docs/Model/ChatWithAIAgentRequest.md @@ -10,5 +10,8 @@ Name | Type | Description | Notes **stream** | **bool** | Whether to stream the response (SSE) | [optional] [default to false] **async** | **bool** | Enable async/durable execution mode. When true, returns 202 with pollUrl. Use for long-running agent tasks. | [optional] [default to false] **system** | **string** | Optional additional system prompt (appended to agent's configured prompt) | [optional] +**long_context** | **bool** | Per-request override to force 1M context window routing | [optional] [default to false] +**max_tool_iterations** | **int** | Maximum tool auto-execution iterations for this request | [optional] +**allowed_collections** | **string[]** | Per-request override for vector DB collections the agent can query | [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/CreateAIAgentRequest.md b/docs/Model/CreateAIAgentRequest.md index 9875560..07054f0 100644 --- a/docs/Model/CreateAIAgentRequest.md +++ b/docs/Model/CreateAIAgentRequest.md @@ -13,6 +13,10 @@ Name | Type | Description | Notes **max_tokens** | **int** | | [optional] **allowed_tools** | **string[]** | | [optional] **allowed_collections** | **string[]** | | [optional] +**assigned_skills** | **string[]** | Skill IDs to assign to this agent | [optional] **created_by** | **string** | User identifier who created the agent | [optional] +**long_context** | **bool** | Enable 1M context window support | [optional] +**guardrail_preset** | **string** | Guardrail preset name | [optional] +**filter_policies** | **string[]** | Filter policy IDs to apply to this agent's inference requests | [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/CreateFilterPolicyRequest.md b/docs/Model/CreateFilterPolicyRequest.md new file mode 100644 index 0000000..142b9e7 --- /dev/null +++ b/docs/Model/CreateFilterPolicyRequest.md @@ -0,0 +1,12 @@ +# # CreateFilterPolicyRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | | +**description** | **string** | | [optional] +**enabled** | **bool** | | [optional] +**rules** | [**\QuantClient\Model\CreateFilterPolicyRequestRulesInner[]**](CreateFilterPolicyRequestRulesInner.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CreateFilterPolicyRequestRulesInner.md b/docs/Model/CreateFilterPolicyRequestRulesInner.md new file mode 100644 index 0000000..9cc530e --- /dev/null +++ b/docs/Model/CreateFilterPolicyRequestRulesInner.md @@ -0,0 +1,12 @@ +# # CreateFilterPolicyRequestRulesInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | | [optional] +**match** | [**\QuantClient\Model\CreateFilterPolicyRequestRulesInnerMatch**](CreateFilterPolicyRequestRulesInnerMatch.md) | | [optional] +**action** | **string** | | [optional] +**apply_to** | **string** | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CreateFilterPolicyRequestRulesInnerMatch.md b/docs/Model/CreateFilterPolicyRequestRulesInnerMatch.md new file mode 100644 index 0000000..e798331 --- /dev/null +++ b/docs/Model/CreateFilterPolicyRequestRulesInnerMatch.md @@ -0,0 +1,11 @@ +# # CreateFilterPolicyRequestRulesInnerMatch + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | | [optional] +**values** | **string[]** | Required when type=word | [optional] +**pattern** | **string** | Required when type=regex | [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/CreateOrchestrationRequest.md b/docs/Model/CreateOrchestrationRequest.md new file mode 100644 index 0000000..dab08d6 --- /dev/null +++ b/docs/Model/CreateOrchestrationRequest.md @@ -0,0 +1,20 @@ +# # CreateOrchestrationRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Orchestration name | +**description** | **string** | Optional description | [optional] +**agent_id** | **string** | Agent to process items | [optional] +**tool_id** | **string** | Tool to execute for items | [optional] +**workflow_id** | **string** | Workflow to run for items | [optional] +**input_source** | [**\QuantClient\Model\CreateOrchestrationRequestInputSource**](CreateOrchestrationRequestInputSource.md) | | +**batch_size** | **int** | Items per batch | [optional] [default to 10] +**concurrency** | **int** | Concurrent items within a batch | [optional] [default to 1] +**stop_condition** | [**\QuantClient\Model\CreateOrchestrationRequestStopCondition**](CreateOrchestrationRequestStopCondition.md) | | [optional] +**assigned_skills** | **string[]** | Skill IDs to assign | [optional] +**context** | **object** | Optional context merged into each item before processing (e.g. shared credentials or endpoints) | [optional] +**auto_start** | **bool** | Whether to start immediately | [optional] [default to true] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CreateOrchestrationRequestInputSource.md b/docs/Model/CreateOrchestrationRequestInputSource.md new file mode 100644 index 0000000..17a5c3a --- /dev/null +++ b/docs/Model/CreateOrchestrationRequestInputSource.md @@ -0,0 +1,12 @@ +# # CreateOrchestrationRequestInputSource + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | Input source type (api type not yet supported) | +**items** | **object[]** | Static items (for type=static) | [optional] +**task_query** | **object** | Task query filters (for type=task_query) | [optional] +**generator_prompt** | **string** | AI prompt (for type=generator) | [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/CreateOrchestrationRequestStopCondition.md b/docs/Model/CreateOrchestrationRequestStopCondition.md new file mode 100644 index 0000000..8f27ca6 --- /dev/null +++ b/docs/Model/CreateOrchestrationRequestStopCondition.md @@ -0,0 +1,11 @@ +# # CreateOrchestrationRequestStopCondition + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | | [optional] [default to 'all_complete'] +**max_iterations** | **int** | Max iterations (for type=max_iterations) | [optional] +**condition_prompt** | **string** | AI prompt to evaluate stop (for type=condition) | [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/CreateSkill201Response.md b/docs/Model/CreateSkill201Response.md new file mode 100644 index 0000000..c7c1185 --- /dev/null +++ b/docs/Model/CreateSkill201Response.md @@ -0,0 +1,11 @@ +# # CreateSkill201Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **bool** | | [optional] +**skill** | **object** | | [optional] +**message** | **string** | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CreateSkillRequest.md b/docs/Model/CreateSkillRequest.md new file mode 100644 index 0000000..49215b6 --- /dev/null +++ b/docs/Model/CreateSkillRequest.md @@ -0,0 +1,19 @@ +# # CreateSkillRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | | +**description** | **string** | | [optional] +**content** | **string** | | +**trigger_condition** | **string** | | +**tags** | **string[]** | | [optional] +**required_tools** | **string[]** | | [optional] +**namespace** | **string** | | [optional] +**files** | **object** | | [optional] +**disable_model_invocation** | **bool** | | [optional] +**allowed_tools** | **string[]** | | [optional] +**installed_by** | **string** | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CreateSlackBot201Response.md b/docs/Model/CreateSlackBot201Response.md new file mode 100644 index 0000000..f188f3d --- /dev/null +++ b/docs/Model/CreateSlackBot201Response.md @@ -0,0 +1,9 @@ +# # CreateSlackBot201Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bot** | **object** | | [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/CreateSlackBotRequest.md b/docs/Model/CreateSlackBotRequest.md new file mode 100644 index 0000000..590c13a --- /dev/null +++ b/docs/Model/CreateSlackBotRequest.md @@ -0,0 +1,15 @@ +# # CreateSlackBotRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**agent_id** | **string** | The AI agent that powers this bot | +**setup_type** | **string** | Whether to use Quant-managed or customer-provided Slack app | +**session_ttl_days** | **int** | Session TTL in days | [optional] +**allowed_channels** | **string[]** | Slack channel IDs the bot may respond in | [optional] +**keywords_enabled** | **bool** | Whether keyword triggers are enabled | [optional] +**keywords** | **string[]** | Keywords that trigger the bot | [optional] +**slash_commands** | **string[]** | Slash commands the bot responds to | [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/Cron.md b/docs/Model/Cron.md index fb353ad..851af50 100644 --- a/docs/Model/Cron.md +++ b/docs/Model/Cron.md @@ -5,7 +5,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | | [optional] -**schedule** | **string** | | [optional] -**command** | **string** | | [optional] +**description** | **string** | | [optional] +**schedule_expression** | **string** | | [optional] +**command** | **string[]** | | [optional] +**target_container_name** | **string** | | [optional] +**is_enabled** | **bool** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DeleteVectorCollection200Response.md b/docs/Model/DeleteAgentOverlay200Response.md similarity index 89% rename from docs/Model/DeleteVectorCollection200Response.md rename to docs/Model/DeleteAgentOverlay200Response.md index 189ed94..ba83f86 100644 --- a/docs/Model/DeleteVectorCollection200Response.md +++ b/docs/Model/DeleteAgentOverlay200Response.md @@ -1,4 +1,4 @@ -# # DeleteVectorCollection200Response +# # DeleteAgentOverlay200Response ## Properties diff --git a/docs/Model/DeleteSkill200Response.md b/docs/Model/DeleteSkill200Response.md new file mode 100644 index 0000000..8dd45c2 --- /dev/null +++ b/docs/Model/DeleteSkill200Response.md @@ -0,0 +1,10 @@ +# # DeleteSkill200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **bool** | | [optional] +**message** | **string** | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DeleteSkillCollection200Response.md b/docs/Model/DeleteSkillCollection200Response.md new file mode 100644 index 0000000..79d5b4a --- /dev/null +++ b/docs/Model/DeleteSkillCollection200Response.md @@ -0,0 +1,10 @@ +# # DeleteSkillCollection200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **bool** | | [optional] +**message** | **string** | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DeleteSlackBot200Response.md b/docs/Model/DeleteSlackBot200Response.md new file mode 100644 index 0000000..2ff8cc9 --- /dev/null +++ b/docs/Model/DeleteSlackBot200Response.md @@ -0,0 +1,10 @@ +# # DeleteSlackBot200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **bool** | | [optional] +**message** | **string** | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DeleteVectorDocuments200Response.md b/docs/Model/DeleteVectorDocuments200Response.md new file mode 100644 index 0000000..b6522bf --- /dev/null +++ b/docs/Model/DeleteVectorDocuments200Response.md @@ -0,0 +1,11 @@ +# # DeleteVectorDocuments200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **string** | | [optional] +**collection_id** | **string** | | [optional] +**deleted_count** | **int** | | [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/DeleteVectorDocumentsRequest.md b/docs/Model/DeleteVectorDocumentsRequest.md new file mode 100644 index 0000000..c38ea94 --- /dev/null +++ b/docs/Model/DeleteVectorDocumentsRequest.md @@ -0,0 +1,12 @@ +# # DeleteVectorDocumentsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**purge_all** | **bool** | Delete ALL documents in collection | [optional] +**document_ids** | **string[]** | Delete specific documents by UUID | [optional] +**keys** | **string[]** | Delete documents by key | [optional] +**metadata** | [**\QuantClient\Model\DeleteVectorDocumentsRequestMetadata**](DeleteVectorDocumentsRequestMetadata.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DeleteVectorDocumentsRequestMetadata.md b/docs/Model/DeleteVectorDocumentsRequestMetadata.md new file mode 100644 index 0000000..1d18252 --- /dev/null +++ b/docs/Model/DeleteVectorDocumentsRequestMetadata.md @@ -0,0 +1,10 @@ +# # DeleteVectorDocumentsRequestMetadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**field** | **string** | Metadata field name (e.g., 'drupal_entity_id') | [optional] +**values** | **string[]** | Values to match (OR logic) | [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/GetAIAgent200ResponseAgent.md b/docs/Model/GetAIAgent200ResponseAgent.md index 9d34d85..3de1a7f 100644 --- a/docs/Model/GetAIAgent200ResponseAgent.md +++ b/docs/Model/GetAIAgent200ResponseAgent.md @@ -14,6 +14,11 @@ Name | Type | Description | Notes **max_tokens** | **int** | | [optional] **allowed_tools** | **string[]** | | [optional] **allowed_collections** | **string[]** | | [optional] +**assigned_skills** | **string[]** | | [optional] +**long_context** | **bool** | Whether 1M context window is enabled | [optional] +**guardrail_preset** | **string** | Guardrail preset name | [optional] +**is_global** | **bool** | Whether this is a platform-managed global agent | [optional] +**has_overlay** | **bool** | Whether the requesting org has a per-org overlay for this global agent | [optional] **created_by** | **string** | | [optional] **created_at** | **\DateTime** | | [optional] **updated_at** | **\DateTime** | | [optional] diff --git a/docs/Model/GetAgentOverlay200Response.md b/docs/Model/GetAgentOverlay200Response.md new file mode 100644 index 0000000..70a582a --- /dev/null +++ b/docs/Model/GetAgentOverlay200Response.md @@ -0,0 +1,10 @@ +# # GetAgentOverlay200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**overlay** | [**\QuantClient\Model\GetAgentOverlay200ResponseOverlay**](GetAgentOverlay200ResponseOverlay.md) | | [optional] +**base** | [**\QuantClient\Model\GetAgentOverlay200ResponseBase**](GetAgentOverlay200ResponseBase.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/GetAgentOverlay200ResponseBase.md b/docs/Model/GetAgentOverlay200ResponseBase.md new file mode 100644 index 0000000..483b955 --- /dev/null +++ b/docs/Model/GetAgentOverlay200ResponseBase.md @@ -0,0 +1,13 @@ +# # GetAgentOverlay200ResponseBase + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**agent_id** | **string** | | [optional] +**name** | **string** | | [optional] +**model_id** | **string** | | [optional] +**allowed_tools** | **string[]** | | [optional] +**assigned_skill_ids** | **string[]** | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/GetAgentOverlay200ResponseOverlay.md b/docs/Model/GetAgentOverlay200ResponseOverlay.md new file mode 100644 index 0000000..3e30b83 --- /dev/null +++ b/docs/Model/GetAgentOverlay200ResponseOverlay.md @@ -0,0 +1,19 @@ +# # GetAgentOverlay200ResponseOverlay + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**model_id** | **string** | | [optional] +**temperature** | **float** | | [optional] +**max_tokens** | **int** | | [optional] +**disabled_skills** | **string[]** | | [optional] +**additional_skills** | **string[]** | | [optional] +**additional_tools** | **string[]** | | [optional] +**disabled_tools** | **string[]** | | [optional] +**system_prompt_append** | **string** | | [optional] +**allowed_collections** | **string[]** | | [optional] +**guardrail_preset** | **string** | | [optional] +**version** | **int** | | [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/GetGovernanceConfig200Response.md b/docs/Model/GetGovernanceConfig200Response.md new file mode 100644 index 0000000..101aa45 --- /dev/null +++ b/docs/Model/GetGovernanceConfig200Response.md @@ -0,0 +1,16 @@ +# # GetGovernanceConfig200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**org_id** | **string** | | [optional] +**ai_enabled** | **bool** | | [optional] +**model_policy** | **string** | | [optional] +**model_list** | **string[]** | | [optional] +**mandatory_guardrail_preset** | **string** | | [optional] +**mandatory_filter_policies** | **string[]** | | [optional] +**spend_limits** | [**\QuantClient\Model\GetGovernanceConfig200ResponseSpendLimits**](GetGovernanceConfig200ResponseSpendLimits.md) | | [optional] +**version** | **int** | | [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/GetGovernanceConfig200ResponseSpendLimits.md b/docs/Model/GetGovernanceConfig200ResponseSpendLimits.md new file mode 100644 index 0000000..40ef119 --- /dev/null +++ b/docs/Model/GetGovernanceConfig200ResponseSpendLimits.md @@ -0,0 +1,13 @@ +# # GetGovernanceConfig200ResponseSpendLimits + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**monthly_budget_cents** | **int** | | [optional] +**daily_budget_cents** | **int** | | [optional] +**per_user_monthly_budget_cents** | **int** | | [optional] +**per_user_daily_budget_cents** | **int** | | [optional] +**warning_threshold_percent** | **int** | | [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/GetMyUsage200Response.md b/docs/Model/GetMyUsage200Response.md new file mode 100644 index 0000000..371eab4 --- /dev/null +++ b/docs/Model/GetMyUsage200Response.md @@ -0,0 +1,13 @@ +# # GetMyUsage200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_id** | **string** | | [optional] +**current_month** | **string** | | [optional] +**monthly** | [**\QuantClient\Model\GetMyUsage200ResponseMonthly**](GetMyUsage200ResponseMonthly.md) | | [optional] +**daily** | [**\QuantClient\Model\GetMyUsage200ResponseDaily**](GetMyUsage200ResponseDaily.md) | | [optional] +**quota** | **object** | | [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/GetMyUsage200ResponseDaily.md b/docs/Model/GetMyUsage200ResponseDaily.md new file mode 100644 index 0000000..b26604f --- /dev/null +++ b/docs/Model/GetMyUsage200ResponseDaily.md @@ -0,0 +1,9 @@ +# # GetMyUsage200ResponseDaily + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**spend_cents** | **int** | | [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/GetMyUsage200ResponseMonthly.md b/docs/Model/GetMyUsage200ResponseMonthly.md new file mode 100644 index 0000000..e29705a --- /dev/null +++ b/docs/Model/GetMyUsage200ResponseMonthly.md @@ -0,0 +1,10 @@ +# # GetMyUsage200ResponseMonthly + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**spend_cents** | **int** | | [optional] +**request_count** | **int** | | [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/GetSkill200Response.md b/docs/Model/GetSkill200Response.md new file mode 100644 index 0000000..551c88b --- /dev/null +++ b/docs/Model/GetSkill200Response.md @@ -0,0 +1,9 @@ +# # GetSkill200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**skill** | [**\QuantClient\Model\GetSkill200ResponseSkill**](GetSkill200ResponseSkill.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/GetSkill200ResponseSkill.md b/docs/Model/GetSkill200ResponseSkill.md new file mode 100644 index 0000000..ab5f9f7 --- /dev/null +++ b/docs/Model/GetSkill200ResponseSkill.md @@ -0,0 +1,22 @@ +# # GetSkill200ResponseSkill + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**skill_id** | **string** | | [optional] +**name** | **string** | | [optional] +**description** | **string** | | [optional] +**content** | **string** | | [optional] +**trigger_condition** | **string** | | [optional] +**tags** | **string[]** | | [optional] +**source** | **object** | | [optional] +**required_tools** | **string[]** | | [optional] +**files** | **object** | | [optional] +**namespace** | **string** | | [optional] +**disable_model_invocation** | **bool** | | [optional] +**allowed_tools** | **string[]** | | [optional] +**installed_at** | **\DateTime** | | [optional] +**updated_at** | **\DateTime** | | [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/GetSlackBot200Response.md b/docs/Model/GetSlackBot200Response.md new file mode 100644 index 0000000..96600cd --- /dev/null +++ b/docs/Model/GetSlackBot200Response.md @@ -0,0 +1,9 @@ +# # GetSlackBot200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bot** | [**\QuantClient\Model\GetSlackBot200ResponseBot**](GetSlackBot200ResponseBot.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/GetSlackBot200ResponseBot.md b/docs/Model/GetSlackBot200ResponseBot.md new file mode 100644 index 0000000..c1e2a96 --- /dev/null +++ b/docs/Model/GetSlackBot200ResponseBot.md @@ -0,0 +1,20 @@ +# # GetSlackBot200ResponseBot + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bot_id** | **string** | | [optional] +**agent_id** | **string** | | [optional] +**setup_type** | **string** | | [optional] +**status** | **string** | | [optional] +**connected** | **bool** | | [optional] +**session_ttl_days** | **int** | | [optional] +**allowed_channels** | **string[]** | | [optional] +**keywords_enabled** | **bool** | | [optional] +**keywords** | **string[]** | | [optional] +**slash_commands** | **string[]** | | [optional] +**created_at** | **\DateTime** | | [optional] +**updated_at** | **\DateTime** | | [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/ImportSkill201Response.md b/docs/Model/ImportSkill201Response.md new file mode 100644 index 0000000..a1d0385 --- /dev/null +++ b/docs/Model/ImportSkill201Response.md @@ -0,0 +1,10 @@ +# # ImportSkill201Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**skill** | **object** | | [optional] +**message** | **string** | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ImportSkillCollection201Response.md b/docs/Model/ImportSkillCollection201Response.md new file mode 100644 index 0000000..63d8206 --- /dev/null +++ b/docs/Model/ImportSkillCollection201Response.md @@ -0,0 +1,13 @@ +# # ImportSkillCollection201Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**namespace** | **string** | | [optional] +**imported** | **int** | | [optional] +**failed** | **int** | | [optional] +**skills** | **object[]** | | [optional] +**errors** | **object[]** | | [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/ImportSkillCollectionRequest.md b/docs/Model/ImportSkillCollectionRequest.md new file mode 100644 index 0000000..f7dd6d4 --- /dev/null +++ b/docs/Model/ImportSkillCollectionRequest.md @@ -0,0 +1,12 @@ +# # ImportSkillCollectionRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**namespace** | **string** | | +**source** | [**\QuantClient\Model\ImportSkillCollectionRequestSource**](ImportSkillCollectionRequestSource.md) | | +**tags** | **string[]** | | [optional] +**installed_by** | **string** | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ImportSkillCollectionRequestSource.md b/docs/Model/ImportSkillCollectionRequestSource.md new file mode 100644 index 0000000..05b47b0 --- /dev/null +++ b/docs/Model/ImportSkillCollectionRequestSource.md @@ -0,0 +1,12 @@ +# # ImportSkillCollectionRequestSource + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | | +**repo** | **string** | | +**path** | **string** | | [optional] +**version** | **string** | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ImportSkillRequest.md b/docs/Model/ImportSkillRequest.md new file mode 100644 index 0000000..bbc6b6e --- /dev/null +++ b/docs/Model/ImportSkillRequest.md @@ -0,0 +1,17 @@ +# # ImportSkillRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**source** | [**\QuantClient\Model\ImportSkillRequestSource**](ImportSkillRequestSource.md) | | +**name** | **string** | | [optional] +**description** | **string** | | [optional] +**tags** | **string[]** | | [optional] +**trigger_condition** | **string** | | [optional] +**required_tools** | **string[]** | | [optional] +**disable_model_invocation** | **bool** | | [optional] +**allowed_tools** | **string[]** | | [optional] +**installed_by** | **string** | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ImportSkillRequestSource.md b/docs/Model/ImportSkillRequestSource.md new file mode 100644 index 0000000..bb9f0dc --- /dev/null +++ b/docs/Model/ImportSkillRequestSource.md @@ -0,0 +1,13 @@ +# # ImportSkillRequestSource + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | | +**url** | **string** | | [optional] +**repo** | **string** | | [optional] +**path** | **string** | | [optional] +**version** | **string** | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/KVLinkToProject200Response.md b/docs/Model/KVLinkToProject200Response.md new file mode 100644 index 0000000..b4effc5 --- /dev/null +++ b/docs/Model/KVLinkToProject200Response.md @@ -0,0 +1,10 @@ +# # KVLinkToProject200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **bool** | | [optional] +**message** | **string** | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/KVLinkToProjectRequest.md b/docs/Model/KVLinkToProjectRequest.md new file mode 100644 index 0000000..45b1ccc --- /dev/null +++ b/docs/Model/KVLinkToProjectRequest.md @@ -0,0 +1,9 @@ +# # KVLinkToProjectRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**project_id** | **int** | Target project ID to link to | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ListAIAgents200ResponseAgentsInner.md b/docs/Model/ListAIAgents200ResponseAgentsInner.md index ef259a4..299cbaa 100644 --- a/docs/Model/ListAIAgents200ResponseAgentsInner.md +++ b/docs/Model/ListAIAgents200ResponseAgentsInner.md @@ -12,6 +12,11 @@ Name | Type | Description | Notes **temperature** | **float** | | [optional] **max_tokens** | **int** | | [optional] **allowed_tools** | **string[]** | | [optional] +**assigned_skills** | **string[]** | | [optional] +**long_context** | **bool** | | [optional] +**guardrail_preset** | **string** | | [optional] +**is_global** | **bool** | | [optional] +**has_overlay** | **bool** | | [optional] **created_at** | **\DateTime** | | [optional] **updated_at** | **\DateTime** | | [optional] diff --git a/docs/Model/ListOrchestrationBatches200Response.md b/docs/Model/ListOrchestrationBatches200Response.md new file mode 100644 index 0000000..4cd8025 --- /dev/null +++ b/docs/Model/ListOrchestrationBatches200Response.md @@ -0,0 +1,10 @@ +# # ListOrchestrationBatches200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**batches** | [**\QuantClient\Model\ListOrchestrationBatches200ResponseBatchesInner[]**](ListOrchestrationBatches200ResponseBatchesInner.md) | | [optional] +**next_cursor** | **string** | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ListOrchestrationBatches200ResponseBatchesInner.md b/docs/Model/ListOrchestrationBatches200ResponseBatchesInner.md new file mode 100644 index 0000000..3fa8cc7 --- /dev/null +++ b/docs/Model/ListOrchestrationBatches200ResponseBatchesInner.md @@ -0,0 +1,18 @@ +# # ListOrchestrationBatches200ResponseBatchesInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**batch_id** | **string** | | [optional] +**orchestration_id** | **string** | | [optional] +**iteration** | **int** | | [optional] +**item_count** | **int** | | [optional] +**completed_count** | **int** | | [optional] +**failed_count** | **int** | | [optional] +**status** | **string** | | [optional] +**started_at** | **\DateTime** | | [optional] +**completed_at** | **\DateTime** | | [optional] +**error** | **string** | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ListOrchestrations200Response.md b/docs/Model/ListOrchestrations200Response.md new file mode 100644 index 0000000..496815d --- /dev/null +++ b/docs/Model/ListOrchestrations200Response.md @@ -0,0 +1,10 @@ +# # ListOrchestrations200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**orchestrations** | **object[]** | | [optional] +**next_cursor** | **string** | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ListSkillCollections200Response.md b/docs/Model/ListSkillCollections200Response.md new file mode 100644 index 0000000..f4586b6 --- /dev/null +++ b/docs/Model/ListSkillCollections200Response.md @@ -0,0 +1,9 @@ +# # ListSkillCollections200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**collections** | [**\QuantClient\Model\ListSkillCollections200ResponseCollectionsInner[]**](ListSkillCollections200ResponseCollectionsInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ListSkillCollections200ResponseCollectionsInner.md b/docs/Model/ListSkillCollections200ResponseCollectionsInner.md new file mode 100644 index 0000000..a9fe66f --- /dev/null +++ b/docs/Model/ListSkillCollections200ResponseCollectionsInner.md @@ -0,0 +1,11 @@ +# # ListSkillCollections200ResponseCollectionsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**namespace** | **string** | | [optional] +**count** | **int** | | [optional] +**skills** | **string[]** | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ListSkills200Response.md b/docs/Model/ListSkills200Response.md new file mode 100644 index 0000000..44cd28b --- /dev/null +++ b/docs/Model/ListSkills200Response.md @@ -0,0 +1,10 @@ +# # ListSkills200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**skills** | [**\QuantClient\Model\ListSkills200ResponseSkillsInner[]**](ListSkills200ResponseSkillsInner.md) | | [optional] +**count** | **int** | | [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/ListSkills200ResponseSkillsInner.md b/docs/Model/ListSkills200ResponseSkillsInner.md new file mode 100644 index 0000000..d273963 --- /dev/null +++ b/docs/Model/ListSkills200ResponseSkillsInner.md @@ -0,0 +1,17 @@ +# # ListSkills200ResponseSkillsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**skill_id** | **string** | | [optional] +**name** | **string** | | [optional] +**description** | **string** | | [optional] +**tags** | **string[]** | | [optional] +**source** | **object** | | [optional] +**trigger_condition** | **string** | | [optional] +**namespace** | **string** | | [optional] +**installed_at** | **\DateTime** | | [optional] +**updated_at** | **\DateTime** | | [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/ListSlackBots200Response.md b/docs/Model/ListSlackBots200Response.md new file mode 100644 index 0000000..4699ce2 --- /dev/null +++ b/docs/Model/ListSlackBots200Response.md @@ -0,0 +1,9 @@ +# # ListSlackBots200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bots** | [**\QuantClient\Model\ListSlackBots200ResponseBotsInner[]**](ListSlackBots200ResponseBotsInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ListSlackBots200ResponseBotsInner.md b/docs/Model/ListSlackBots200ResponseBotsInner.md new file mode 100644 index 0000000..4a1265c --- /dev/null +++ b/docs/Model/ListSlackBots200ResponseBotsInner.md @@ -0,0 +1,16 @@ +# # ListSlackBots200ResponseBotsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bot_id** | **string** | | [optional] +**agent_id** | **string** | | [optional] +**setup_type** | **string** | | [optional] +**status** | **string** | | [optional] +**connected** | **bool** | | [optional] +**session_ttl_days** | **int** | | [optional] +**keywords_enabled** | **bool** | | [optional] +**created_at** | **\DateTime** | | [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/SearchSlackWorkspaceChannels200Response.md b/docs/Model/SearchSlackWorkspaceChannels200Response.md new file mode 100644 index 0000000..e8a5ac7 --- /dev/null +++ b/docs/Model/SearchSlackWorkspaceChannels200Response.md @@ -0,0 +1,9 @@ +# # SearchSlackWorkspaceChannels200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**\QuantClient\Model\SearchSlackWorkspaceChannels200ResponseResultsInner[]**](SearchSlackWorkspaceChannels200ResponseResultsInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SearchSlackWorkspaceChannels200ResponseResultsInner.md b/docs/Model/SearchSlackWorkspaceChannels200ResponseResultsInner.md new file mode 100644 index 0000000..ae66d57 --- /dev/null +++ b/docs/Model/SearchSlackWorkspaceChannels200ResponseResultsInner.md @@ -0,0 +1,10 @@ +# # SearchSlackWorkspaceChannels200ResponseResultsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | | [optional] +**name** | **string** | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SearchSlackWorkspaceUsers200Response.md b/docs/Model/SearchSlackWorkspaceUsers200Response.md new file mode 100644 index 0000000..7f2504c --- /dev/null +++ b/docs/Model/SearchSlackWorkspaceUsers200Response.md @@ -0,0 +1,9 @@ +# # SearchSlackWorkspaceUsers200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**\QuantClient\Model\SearchSlackWorkspaceUsers200ResponseResultsInner[]**](SearchSlackWorkspaceUsers200ResponseResultsInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SearchSlackWorkspaceUsers200ResponseResultsInner.md b/docs/Model/SearchSlackWorkspaceUsers200ResponseResultsInner.md new file mode 100644 index 0000000..14f9122 --- /dev/null +++ b/docs/Model/SearchSlackWorkspaceUsers200ResponseResultsInner.md @@ -0,0 +1,11 @@ +# # SearchSlackWorkspaceUsers200ResponseResultsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | | [optional] +**name** | **string** | | [optional] +**real_name** | **string** | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SyncSkillCollection200Response.md b/docs/Model/SyncSkillCollection200Response.md new file mode 100644 index 0000000..4415204 --- /dev/null +++ b/docs/Model/SyncSkillCollection200Response.md @@ -0,0 +1,14 @@ +# # SyncSkillCollection200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**namespace** | **string** | | [optional] +**synced** | **int** | | [optional] +**created** | **int** | | [optional] +**failed** | **int** | | [optional] +**removed_from_source** | **string[]** | | [optional] +**skills** | **object[]** | | [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/TokensCreate201Response.md b/docs/Model/TokensCreate201Response.md new file mode 100644 index 0000000..00b877f --- /dev/null +++ b/docs/Model/TokensCreate201Response.md @@ -0,0 +1,16 @@ +# # TokensCreate201Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token** | **string** | The plain text token (shown once) | [optional] +**id** | **int** | Token ID | [optional] +**name** | **string** | | [optional] +**scopes** | **string[]** | | [optional] +**projects** | **int[]** | | [optional] +**preset** | **string** | | [optional] +**expires_at** | **\DateTime** | | [optional] +**created_at** | **\DateTime** | | [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/TokensCreateRequest.md b/docs/Model/TokensCreateRequest.md new file mode 100644 index 0000000..f40b7eb --- /dev/null +++ b/docs/Model/TokensCreateRequest.md @@ -0,0 +1,13 @@ +# # TokensCreateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Name for the token | +**preset** | **string** | Preset scope bundle | [optional] +**scopes** | **string[]** | Individual scopes (mutually exclusive with preset) | [optional] +**projects** | **int[]** | Project IDs to restrict this token to | [optional] +**expires_in** | **string** | Token expiration period | [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/TokensDelete200Response.md b/docs/Model/TokensDelete200Response.md new file mode 100644 index 0000000..0d2a4fb --- /dev/null +++ b/docs/Model/TokensDelete200Response.md @@ -0,0 +1,9 @@ +# # TokensDelete200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **string** | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TokensList200ResponseInner.md b/docs/Model/TokensList200ResponseInner.md new file mode 100644 index 0000000..965cfa1 --- /dev/null +++ b/docs/Model/TokensList200ResponseInner.md @@ -0,0 +1,12 @@ +# # TokensList200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**name** | **string** | | [optional] +**last_used** | **\DateTime** | | [optional] +**created_at** | **\DateTime** | | [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/UpdateAIAgentRequest.md b/docs/Model/UpdateAIAgentRequest.md index 3aac71c..61cfcdd 100644 --- a/docs/Model/UpdateAIAgentRequest.md +++ b/docs/Model/UpdateAIAgentRequest.md @@ -13,5 +13,9 @@ Name | Type | Description | Notes **max_tokens** | **int** | | [optional] **allowed_tools** | **string[]** | | [optional] **allowed_collections** | **string[]** | | [optional] +**assigned_skills** | **string[]** | Skill IDs to assign to this agent | [optional] +**long_context** | **bool** | Enable 1M context window support | [optional] +**guardrail_preset** | **string** | Guardrail preset name | [optional] +**filter_policies** | **string[]** | Filter policy IDs to apply to this agent's inference requests | [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/UpdateFilterPolicyRequest.md b/docs/Model/UpdateFilterPolicyRequest.md new file mode 100644 index 0000000..fd20ac5 --- /dev/null +++ b/docs/Model/UpdateFilterPolicyRequest.md @@ -0,0 +1,12 @@ +# # UpdateFilterPolicyRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | | [optional] +**description** | **string** | | [optional] +**enabled** | **bool** | | [optional] +**rules** | [**\QuantClient\Model\CreateFilterPolicyRequestRulesInner[]**](CreateFilterPolicyRequestRulesInner.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/UpdateGovernanceConfig200Response.md b/docs/Model/UpdateGovernanceConfig200Response.md new file mode 100644 index 0000000..7dfad08 --- /dev/null +++ b/docs/Model/UpdateGovernanceConfig200Response.md @@ -0,0 +1,10 @@ +# # UpdateGovernanceConfig200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **bool** | | [optional] +**config** | **object** | | [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/UpdateGovernanceConfigRequest.md b/docs/Model/UpdateGovernanceConfigRequest.md new file mode 100644 index 0000000..3194231 --- /dev/null +++ b/docs/Model/UpdateGovernanceConfigRequest.md @@ -0,0 +1,15 @@ +# # UpdateGovernanceConfigRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ai_enabled** | **bool** | | +**model_policy** | **string** | | +**model_list** | **string[]** | | [optional] +**mandatory_guardrail_preset** | **string** | | [optional] +**mandatory_filter_policies** | **string[]** | | [optional] +**spend_limits** | **object** | | [optional] +**version** | **int** | | [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/UpdateSkill200Response.md b/docs/Model/UpdateSkill200Response.md new file mode 100644 index 0000000..1f5b51f --- /dev/null +++ b/docs/Model/UpdateSkill200Response.md @@ -0,0 +1,11 @@ +# # UpdateSkill200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **bool** | | [optional] +**skill** | **object** | | [optional] +**message** | **string** | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/UpdateSkillRequest.md b/docs/Model/UpdateSkillRequest.md new file mode 100644 index 0000000..d9a5038 --- /dev/null +++ b/docs/Model/UpdateSkillRequest.md @@ -0,0 +1,19 @@ +# # UpdateSkillRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | | [optional] +**description** | **string** | | [optional] +**content** | **string** | | [optional] +**trigger_condition** | **string** | | [optional] +**tags** | **string[]** | | [optional] +**required_tools** | **string[]** | | [optional] +**source** | **object** | | [optional] +**files** | **object** | | [optional] +**disable_model_invocation** | **bool** | | [optional] +**allowed_tools** | **string[]** | | [optional] +**namespace** | **string** | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/UpdateSlackBotRequest.md b/docs/Model/UpdateSlackBotRequest.md new file mode 100644 index 0000000..d5ded52 --- /dev/null +++ b/docs/Model/UpdateSlackBotRequest.md @@ -0,0 +1,15 @@ +# # UpdateSlackBotRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**agent_id** | **string** | Change the backing AI agent | [optional] +**status** | **string** | Enable or disable the bot | [optional] +**session_ttl_days** | **int** | Session TTL in days | [optional] +**allowed_channels** | **string[]** | Slack channel IDs the bot may respond in | [optional] +**keywords_enabled** | **bool** | Whether keyword triggers are enabled | [optional] +**keywords** | **string[]** | Keywords that trigger the bot | [optional] +**slash_commands** | **string[]** | Slash commands the bot responds to | [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/UploadVectorDocumentsRequestDocumentsInner.md b/docs/Model/UploadVectorDocumentsRequestDocumentsInner.md index 4751af3..f5d5cff 100644 --- a/docs/Model/UploadVectorDocumentsRequestDocumentsInner.md +++ b/docs/Model/UploadVectorDocumentsRequestDocumentsInner.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **content** | **string** | Document text content | +**key** | **string** | Stable document key for upsert | [optional] **metadata** | [**\QuantClient\Model\UploadVectorDocumentsRequestDocumentsInnerMetadata**](UploadVectorDocumentsRequestDocumentsInnerMetadata.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/UpsertAgentOverlay200Response.md b/docs/Model/UpsertAgentOverlay200Response.md new file mode 100644 index 0000000..86129cd --- /dev/null +++ b/docs/Model/UpsertAgentOverlay200Response.md @@ -0,0 +1,9 @@ +# # UpsertAgentOverlay200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**overlay** | **object** | | [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/UpsertAgentOverlayRequest.md b/docs/Model/UpsertAgentOverlayRequest.md new file mode 100644 index 0000000..9411790 --- /dev/null +++ b/docs/Model/UpsertAgentOverlayRequest.md @@ -0,0 +1,19 @@ +# # UpsertAgentOverlayRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**model_id** | **string** | Override the base agent's model | [optional] +**temperature** | **float** | Override temperature | [optional] +**max_tokens** | **int** | Override max tokens | [optional] +**disabled_skills** | **string[]** | Global skill IDs to exclude | [optional] +**additional_skills** | **string[]** | Org-owned skill IDs to add | [optional] +**additional_tools** | **string[]** | Tool names to add | [optional] +**disabled_tools** | **string[]** | Tool names to remove | [optional] +**system_prompt_append** | **string** | Text appended to base system prompt | [optional] +**allowed_collections** | **string[]** | Vector DB collections | [optional] +**guardrail_preset** | **string** | Guardrail preset | [optional] +**version** | **int** | Current version for optimistic concurrency | [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/V2CrawlerSchedule.md b/docs/Model/V2CrawlerSchedule.md index 13bf041..4eb59fe 100644 --- a/docs/Model/V2CrawlerSchedule.md +++ b/docs/Model/V2CrawlerSchedule.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **crawler_uuid** | **string** | Crawler UUID | [optional] **project_id** | **int** | Project ID | **crawler_last_run_id** | **int** | Last run ID | -**schedule_cron_string** | **string** | Cron schedule string | +**schedule_cron_string** | **string** | Standard Unix cron expression with 5 space-separated fields: minute, hour, day-of-month, month, day-of-week. Example: 0 2 * * * runs daily at 2 AM. | **created_at** | **\DateTime** | Creation timestamp | [optional] **updated_at** | **\DateTime** | Last update timestamp | [optional] diff --git a/docs/Model/V2CrawlerScheduleRequest.md b/docs/Model/V2CrawlerScheduleRequest.md index 1edc1a5..2a8971a 100644 --- a/docs/Model/V2CrawlerScheduleRequest.md +++ b/docs/Model/V2CrawlerScheduleRequest.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **string** | Schedule name | -**schedule_cron_string** | **string** | Cron schedule string | +**name** | **string** | Schedule name. If not provided, defaults to 'Schedule {crawler_name}'. | [optional] +**schedule_cron_string** | **string** | Standard Unix cron expression with 5 space-separated fields: minute, hour, day-of-month, month, day-of-week. Example: 0 2 * * * for daily at 2 AM. | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/V2MetricData.md b/docs/Model/V2MetricData.md new file mode 100644 index 0000000..692332d --- /dev/null +++ b/docs/Model/V2MetricData.md @@ -0,0 +1,12 @@ +# # V2MetricData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**series** | [**\QuantClient\Model\V2MetricDataPoint[]**](V2MetricDataPoint.md) | Time series data points | +**period_total** | **float** | Total value for the period | +**all_time_total** | **float** | All-time total value | +**period_average** | **float** | Average value per time unit in the period | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/V2MetricDataPoint.md b/docs/Model/V2MetricDataPoint.md new file mode 100644 index 0000000..c2d70ad --- /dev/null +++ b/docs/Model/V2MetricDataPoint.md @@ -0,0 +1,10 @@ +# # V2MetricDataPoint + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**timestamp** | [**\QuantClient\Model\V2MetricDataPointTimestamp**](V2MetricDataPointTimestamp.md) | | +**value** | **float** | Metric value at this timestamp | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/V2MetricDataPointTimestamp.md b/docs/Model/V2MetricDataPointTimestamp.md new file mode 100644 index 0000000..8f0b225 --- /dev/null +++ b/docs/Model/V2MetricDataPointTimestamp.md @@ -0,0 +1,8 @@ +# # V2MetricDataPointTimestamp + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/V2MetricsMeta.md b/docs/Model/V2MetricsMeta.md new file mode 100644 index 0000000..57b8226 --- /dev/null +++ b/docs/Model/V2MetricsMeta.md @@ -0,0 +1,14 @@ +# # V2MetricsMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**period** | **string** | The period type for this data | +**granularity** | **string** | The granularity of data points | +**start_time** | **string** | Start time of the data range (ISO8601 or Unix timestamp based on timestamp_format parameter) | +**end_time** | **string** | End time of the data range (ISO8601 or Unix timestamp based on timestamp_format parameter) | +**metrics** | **string[]** | List of metrics included in the response | +**domain** | **string** | Domain filter applied (if any) | [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/V2MetricsResponse.md b/docs/Model/V2MetricsResponse.md new file mode 100644 index 0000000..744a99a --- /dev/null +++ b/docs/Model/V2MetricsResponse.md @@ -0,0 +1,10 @@ +# # V2MetricsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**meta** | [**\QuantClient\Model\V2MetricsMeta**](V2MetricsMeta.md) | | +**data** | [**array**](V2MetricData.md) | Metrics data keyed by metric name | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/V2Rule.md b/docs/Model/V2Rule.md index 821d6ca..d9615db 100644 --- a/docs/Model/V2Rule.md +++ b/docs/Model/V2Rule.md @@ -18,6 +18,9 @@ Name | Type | Description | Notes **ip** | **string** | IP address | [optional] **ip_is** | **string[]** | Allowed IP addresses | [optional] **ip_is_not** | **string[]** | Excluded IP addresses | [optional] +**asn** | **string** | ASN filter type (asn_is, asn_is_not, any) | [optional] +**asn_is** | **string[]** | Allowed AS numbers | [optional] +**asn_is_not** | **string[]** | Excluded AS numbers | [optional] **country** | **string** | Country code | [optional] **country_is** | **string[]** | Allowed countries | [optional] **country_is_not** | **string[]** | Excluded countries | [optional] diff --git a/docs/Model/V2RuleAuth.md b/docs/Model/V2RuleAuth.md index 48075e0..483d334 100644 --- a/docs/Model/V2RuleAuth.md +++ b/docs/Model/V2RuleAuth.md @@ -18,6 +18,9 @@ Name | Type | Description | Notes **ip** | **string** | IP address | [optional] **ip_is** | **string[]** | Allowed IP addresses | [optional] **ip_is_not** | **string[]** | Excluded IP addresses | [optional] +**asn** | **string** | ASN filter type (asn_is, asn_is_not, any) | [optional] +**asn_is** | **string[]** | Allowed AS numbers | [optional] +**asn_is_not** | **string[]** | Excluded AS numbers | [optional] **country** | **string** | Country code | [optional] **country_is** | **string[]** | Allowed countries | [optional] **country_is_not** | **string[]** | Excluded countries | [optional] diff --git a/docs/Model/V2RuleAuthRequest.md b/docs/Model/V2RuleAuthRequest.md index 929f973..3329894 100644 --- a/docs/Model/V2RuleAuthRequest.md +++ b/docs/Model/V2RuleAuthRequest.md @@ -19,6 +19,9 @@ Name | Type | Description | Notes **ip** | **string** | IP filter type (ip_is, ip_is_not, any) | [optional] **ip_is** | **string[]** | Allowed IP addresses | [optional] **ip_is_not** | **string[]** | Excluded IP addresses | [optional] +**asn** | **string** | ASN filter type (asn_is, asn_is_not, any) | [optional] +**asn_is** | **string[]** | Allowed AS numbers | [optional] +**asn_is_not** | **string[]** | Excluded AS numbers | [optional] **auth_user** | **string** | Authentication username | **auth_pass** | **string** | Authentication password | diff --git a/docs/Model/V2RuleBotChallenge.md b/docs/Model/V2RuleBotChallenge.md index 07d8ee7..4faf5b1 100644 --- a/docs/Model/V2RuleBotChallenge.md +++ b/docs/Model/V2RuleBotChallenge.md @@ -18,6 +18,9 @@ Name | Type | Description | Notes **ip** | **string** | IP address | [optional] **ip_is** | **string[]** | Allowed IP addresses | [optional] **ip_is_not** | **string[]** | Excluded IP addresses | [optional] +**asn** | **string** | ASN filter type (asn_is, asn_is_not, any) | [optional] +**asn_is** | **string[]** | Allowed AS numbers | [optional] +**asn_is_not** | **string[]** | Excluded AS numbers | [optional] **country** | **string** | Country code | [optional] **country_is** | **string[]** | Allowed countries | [optional] **country_is_not** | **string[]** | Excluded countries | [optional] diff --git a/docs/Model/V2RuleBotChallengeRequest.md b/docs/Model/V2RuleBotChallengeRequest.md index 41d6ee5..6f6365d 100644 --- a/docs/Model/V2RuleBotChallengeRequest.md +++ b/docs/Model/V2RuleBotChallengeRequest.md @@ -19,6 +19,9 @@ Name | Type | Description | Notes **ip** | **string** | IP filter type (ip_is, ip_is_not, any) | [optional] **ip_is** | **string[]** | Allowed IP addresses | [optional] **ip_is_not** | **string[]** | Excluded IP addresses | [optional] +**asn** | **string** | ASN filter type (asn_is, asn_is_not, any) | [optional] +**asn_is** | **string[]** | Allowed AS numbers | [optional] +**asn_is_not** | **string[]** | Excluded AS numbers | [optional] **robot_challenge_type** | **string** | Challenge type (invisible or checkbox) | **robot_challenge_verification_ttl** | **int** | Verification TTL in seconds | [optional] [default to 10800] **robot_challenge_challenge_ttl** | **int** | Challenge TTL in seconds | [optional] [default to 30] diff --git a/docs/Model/V2RuleContentFilter.md b/docs/Model/V2RuleContentFilter.md index 7bca2dd..49110b1 100644 --- a/docs/Model/V2RuleContentFilter.md +++ b/docs/Model/V2RuleContentFilter.md @@ -18,6 +18,9 @@ Name | Type | Description | Notes **ip** | **string** | IP address | [optional] **ip_is** | **string[]** | Allowed IP addresses | [optional] **ip_is_not** | **string[]** | Excluded IP addresses | [optional] +**asn** | **string** | ASN filter type (asn_is, asn_is_not, any) | [optional] +**asn_is** | **string[]** | Allowed AS numbers | [optional] +**asn_is_not** | **string[]** | Excluded AS numbers | [optional] **country** | **string** | Country code | [optional] **country_is** | **string[]** | Allowed countries | [optional] **country_is_not** | **string[]** | Excluded countries | [optional] diff --git a/docs/Model/V2RuleContentFilterRequest.md b/docs/Model/V2RuleContentFilterRequest.md index 5bd65d4..0b96d8c 100644 --- a/docs/Model/V2RuleContentFilterRequest.md +++ b/docs/Model/V2RuleContentFilterRequest.md @@ -19,6 +19,9 @@ Name | Type | Description | Notes **ip** | **string** | IP filter type (ip_is, ip_is_not, any) | [optional] **ip_is** | **string[]** | Allowed IP addresses | [optional] **ip_is_not** | **string[]** | Excluded IP addresses | [optional] +**asn** | **string** | ASN filter type (asn_is, asn_is_not, any) | [optional] +**asn_is** | **string[]** | Allowed AS numbers | [optional] +**asn_is_not** | **string[]** | Excluded AS numbers | [optional] **fn_uuid** | **string** | Function UUID | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/V2RuleCustomResponse.md b/docs/Model/V2RuleCustomResponse.md index ea82d8b..cde1c12 100644 --- a/docs/Model/V2RuleCustomResponse.md +++ b/docs/Model/V2RuleCustomResponse.md @@ -18,6 +18,9 @@ Name | Type | Description | Notes **ip** | **string** | IP address | [optional] **ip_is** | **string[]** | Allowed IP addresses | [optional] **ip_is_not** | **string[]** | Excluded IP addresses | [optional] +**asn** | **string** | ASN filter type (asn_is, asn_is_not, any) | [optional] +**asn_is** | **string[]** | Allowed AS numbers | [optional] +**asn_is_not** | **string[]** | Excluded AS numbers | [optional] **country** | **string** | Country code | [optional] **country_is** | **string[]** | Allowed countries | [optional] **country_is_not** | **string[]** | Excluded countries | [optional] diff --git a/docs/Model/V2RuleCustomResponseRequest.md b/docs/Model/V2RuleCustomResponseRequest.md index 902bc6d..b8931eb 100644 --- a/docs/Model/V2RuleCustomResponseRequest.md +++ b/docs/Model/V2RuleCustomResponseRequest.md @@ -19,6 +19,9 @@ Name | Type | Description | Notes **ip** | **string** | IP filter type (ip_is, ip_is_not, any) | [optional] **ip_is** | **string[]** | Allowed IP addresses | [optional] **ip_is_not** | **string[]** | Excluded IP addresses | [optional] +**asn** | **string** | ASN filter type (asn_is, asn_is_not, any) | [optional] +**asn_is** | **string[]** | Allowed AS numbers | [optional] +**asn_is_not** | **string[]** | Excluded AS numbers | [optional] **custom_response_body** | **string** | Custom response body content | **custom_response_status_code** | **int** | HTTP status code for custom response | [optional] [default to 200] **status_code** | **int** | Legacy field for status code (deprecated) | [optional] diff --git a/docs/Model/V2RuleFunction.md b/docs/Model/V2RuleFunction.md index e697926..4f21957 100644 --- a/docs/Model/V2RuleFunction.md +++ b/docs/Model/V2RuleFunction.md @@ -18,6 +18,9 @@ Name | Type | Description | Notes **ip** | **string** | IP address | [optional] **ip_is** | **string[]** | Allowed IP addresses | [optional] **ip_is_not** | **string[]** | Excluded IP addresses | [optional] +**asn** | **string** | ASN filter type (asn_is, asn_is_not, any) | [optional] +**asn_is** | **string[]** | Allowed AS numbers | [optional] +**asn_is_not** | **string[]** | Excluded AS numbers | [optional] **country** | **string** | Country code | [optional] **country_is** | **string[]** | Allowed countries | [optional] **country_is_not** | **string[]** | Excluded countries | [optional] diff --git a/docs/Model/V2RuleFunctionRequest.md b/docs/Model/V2RuleFunctionRequest.md index 15e1f29..d6adcf7 100644 --- a/docs/Model/V2RuleFunctionRequest.md +++ b/docs/Model/V2RuleFunctionRequest.md @@ -19,6 +19,9 @@ Name | Type | Description | Notes **ip** | **string** | IP filter type (ip_is, ip_is_not, any) | [optional] **ip_is** | **string[]** | Allowed IP addresses | [optional] **ip_is_not** | **string[]** | Excluded IP addresses | [optional] +**asn** | **string** | ASN filter type (asn_is, asn_is_not, any) | [optional] +**asn_is** | **string[]** | Allowed AS numbers | [optional] +**asn_is_not** | **string[]** | Excluded AS numbers | [optional] **fn_uuid** | **string** | Function UUID | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/V2RuleHeader.md b/docs/Model/V2RuleHeader.md index 8e5a7f9..f0839fd 100644 --- a/docs/Model/V2RuleHeader.md +++ b/docs/Model/V2RuleHeader.md @@ -18,6 +18,9 @@ Name | Type | Description | Notes **ip** | **string** | IP address | [optional] **ip_is** | **string[]** | Allowed IP addresses | [optional] **ip_is_not** | **string[]** | Excluded IP addresses | [optional] +**asn** | **string** | ASN filter type (asn_is, asn_is_not, any) | [optional] +**asn_is** | **string[]** | Allowed AS numbers | [optional] +**asn_is_not** | **string[]** | Excluded AS numbers | [optional] **country** | **string** | Country code | [optional] **country_is** | **string[]** | Allowed countries | [optional] **country_is_not** | **string[]** | Excluded countries | [optional] diff --git a/docs/Model/V2RuleHeaderRequest.md b/docs/Model/V2RuleHeaderRequest.md index 78c130e..eda1a2c 100644 --- a/docs/Model/V2RuleHeaderRequest.md +++ b/docs/Model/V2RuleHeaderRequest.md @@ -19,6 +19,9 @@ Name | Type | Description | Notes **ip** | **string** | IP filter type (ip_is, ip_is_not, any) | [optional] **ip_is** | **string[]** | Allowed IP addresses | [optional] **ip_is_not** | **string[]** | Excluded IP addresses | [optional] +**asn** | **string** | ASN filter type (asn_is, asn_is_not, any) | [optional] +**asn_is** | **string[]** | Allowed AS numbers | [optional] +**asn_is_not** | **string[]** | Excluded AS numbers | [optional] **headers** | **array** | Headers to set | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/V2RuleProxy.md b/docs/Model/V2RuleProxy.md index 806d21a..01e38e4 100644 --- a/docs/Model/V2RuleProxy.md +++ b/docs/Model/V2RuleProxy.md @@ -18,6 +18,9 @@ Name | Type | Description | Notes **ip** | **string** | IP address | [optional] **ip_is** | **string[]** | Allowed IP addresses | [optional] **ip_is_not** | **string[]** | Excluded IP addresses | [optional] +**asn** | **string** | ASN filter type (asn_is, asn_is_not, any) | [optional] +**asn_is** | **string[]** | Allowed AS numbers | [optional] +**asn_is_not** | **string[]** | Excluded AS numbers | [optional] **country** | **string** | Country code | [optional] **country_is** | **string[]** | Allowed countries | [optional] **country_is_not** | **string[]** | Excluded countries | [optional] diff --git a/docs/Model/V2RuleProxyRequest.md b/docs/Model/V2RuleProxyRequest.md index 59d567f..9807934 100644 --- a/docs/Model/V2RuleProxyRequest.md +++ b/docs/Model/V2RuleProxyRequest.md @@ -19,6 +19,9 @@ Name | Type | Description | Notes **ip** | **string** | IP filter type (ip_is, ip_is_not, any) | [optional] **ip_is** | **string[]** | Allowed IP addresses | [optional] **ip_is_not** | **string[]** | Excluded IP addresses | [optional] +**asn** | **string** | ASN filter type (asn_is, asn_is_not, any) | [optional] +**asn_is** | **string[]** | Allowed AS numbers | [optional] +**asn_is_not** | **string[]** | Excluded AS numbers | [optional] **to** | **string** | Target URL to proxy to | **host** | **string** | Host header override | [optional] **auth_user** | **string** | Basic auth username | [optional] [default to ''] diff --git a/docs/Model/V2RuleRedirect.md b/docs/Model/V2RuleRedirect.md index be36031..cd68f8d 100644 --- a/docs/Model/V2RuleRedirect.md +++ b/docs/Model/V2RuleRedirect.md @@ -18,6 +18,9 @@ Name | Type | Description | Notes **ip** | **string** | IP address | [optional] **ip_is** | **string[]** | Allowed IP addresses | [optional] **ip_is_not** | **string[]** | Excluded IP addresses | [optional] +**asn** | **string** | ASN filter type (asn_is, asn_is_not, any) | [optional] +**asn_is** | **string[]** | Allowed AS numbers | [optional] +**asn_is_not** | **string[]** | Excluded AS numbers | [optional] **country** | **string** | Country code | [optional] **country_is** | **string[]** | Allowed countries | [optional] **country_is_not** | **string[]** | Excluded countries | [optional] diff --git a/docs/Model/V2RuleRedirectRequest.md b/docs/Model/V2RuleRedirectRequest.md index 97210cb..746b41f 100644 --- a/docs/Model/V2RuleRedirectRequest.md +++ b/docs/Model/V2RuleRedirectRequest.md @@ -19,6 +19,9 @@ Name | Type | Description | Notes **ip** | **string** | IP filter type (ip_is, ip_is_not, any) | [optional] **ip_is** | **string[]** | Allowed IP addresses | [optional] **ip_is_not** | **string[]** | Excluded IP addresses | [optional] +**asn** | **string** | ASN filter type (asn_is, asn_is_not, any) | [optional] +**asn_is** | **string[]** | Allowed AS numbers | [optional] +**asn_is_not** | **string[]** | Excluded AS numbers | [optional] **redirect_to** | **string** | Redirect destination URL | **redirect_code** | **string** | HTTP status code for redirect | [optional] [default to '301'] diff --git a/docs/Model/V2RuleRequest.md b/docs/Model/V2RuleRequest.md index 8d3cc05..4cedcc5 100644 --- a/docs/Model/V2RuleRequest.md +++ b/docs/Model/V2RuleRequest.md @@ -19,5 +19,8 @@ Name | Type | Description | Notes **ip** | **string** | IP filter type (ip_is, ip_is_not, any) | [optional] **ip_is** | **string[]** | Allowed IP addresses | [optional] **ip_is_not** | **string[]** | Excluded IP addresses | [optional] +**asn** | **string** | ASN filter type (asn_is, asn_is_not, any) | [optional] +**asn_is** | **string[]** | Allowed AS numbers | [optional] +**asn_is_not** | **string[]** | Excluded AS numbers | [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/V2RuleServeStatic.md b/docs/Model/V2RuleServeStatic.md index 6aff7c8..ad82110 100644 --- a/docs/Model/V2RuleServeStatic.md +++ b/docs/Model/V2RuleServeStatic.md @@ -18,6 +18,9 @@ Name | Type | Description | Notes **ip** | **string** | IP address | [optional] **ip_is** | **string[]** | Allowed IP addresses | [optional] **ip_is_not** | **string[]** | Excluded IP addresses | [optional] +**asn** | **string** | ASN filter type (asn_is, asn_is_not, any) | [optional] +**asn_is** | **string[]** | Allowed AS numbers | [optional] +**asn_is_not** | **string[]** | Excluded AS numbers | [optional] **country** | **string** | Country code | [optional] **country_is** | **string[]** | Allowed countries | [optional] **country_is_not** | **string[]** | Excluded countries | [optional] diff --git a/docs/Model/V2RuleServeStaticRequest.md b/docs/Model/V2RuleServeStaticRequest.md index 170267f..f15fe68 100644 --- a/docs/Model/V2RuleServeStaticRequest.md +++ b/docs/Model/V2RuleServeStaticRequest.md @@ -19,6 +19,9 @@ Name | Type | Description | Notes **ip** | **string** | IP filter type (ip_is, ip_is_not, any) | [optional] **ip_is** | **string[]** | Allowed IP addresses | [optional] **ip_is_not** | **string[]** | Excluded IP addresses | [optional] +**asn** | **string** | ASN filter type (asn_is, asn_is_not, any) | [optional] +**asn_is** | **string[]** | Allowed AS numbers | [optional] +**asn_is_not** | **string[]** | Excluded AS numbers | [optional] **static_file_path** | **string** | Path to the static file to serve | [[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 c2dde72..bbe5b50 100644 --- a/src/Api/AIAgentsApi.php +++ b/src/Api/AIAgentsApi.php @@ -14,7 +14,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ @@ -83,15 +83,24 @@ class AIAgentsApi 'deleteAIAgent' => [ 'application/json', ], + 'deleteAgentOverlay' => [ + 'application/json', + ], 'getAIAgent' => [ 'application/json', ], + 'getAgentOverlay' => [ + 'application/json', + ], 'listAIAgents' => [ 'application/json', ], 'updateAIAgent' => [ 'application/json', ], + 'upsertAgentOverlay' => [ + 'application/json', + ], ]; /** @@ -1049,40 +1058,40 @@ public function deleteAIAgentRequest($organisation, $agent_id, string $contentTy } /** - * Operation getAIAgent + * Operation deleteAgentOverlay * - * Get Agent Details + * Delete Agent Overlay * * @param string $organisation The organisation ID (required) - * @param string $agent_id The agent ID (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAIAgent'] to see the possible values for this operation + * @param string $agent_id Global agent identifier (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteAgentOverlay'] 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\GetAIAgent200Response + * @return \QuantClient\Model\DeleteAgentOverlay200Response */ - public function getAIAgent($organisation, $agent_id, string $contentType = self::contentTypes['getAIAgent'][0]) + public function deleteAgentOverlay($organisation, $agent_id, string $contentType = self::contentTypes['deleteAgentOverlay'][0]) { - list($response) = $this->getAIAgentWithHttpInfo($organisation, $agent_id, $contentType); + list($response) = $this->deleteAgentOverlayWithHttpInfo($organisation, $agent_id, $contentType); return $response; } /** - * Operation getAIAgentWithHttpInfo + * Operation deleteAgentOverlayWithHttpInfo * - * Get Agent Details + * Delete Agent Overlay * * @param string $organisation The organisation ID (required) - * @param string $agent_id The agent ID (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAIAgent'] to see the possible values for this operation + * @param string $agent_id Global agent identifier (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteAgentOverlay'] 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\GetAIAgent200Response, HTTP status code, HTTP response headers (array of strings) + * @return array of \QuantClient\Model\DeleteAgentOverlay200Response, HTTP status code, HTTP response headers (array of strings) */ - public function getAIAgentWithHttpInfo($organisation, $agent_id, string $contentType = self::contentTypes['getAIAgent'][0]) + public function deleteAgentOverlayWithHttpInfo($organisation, $agent_id, string $contentType = self::contentTypes['deleteAgentOverlay'][0]) { - $request = $this->getAIAgentRequest($organisation, $agent_id, $contentType); + $request = $this->deleteAgentOverlayRequest($organisation, $agent_id, $contentType); try { $options = $this->createHttpClientOption(); @@ -1110,7 +1119,7 @@ public function getAIAgentWithHttpInfo($organisation, $agent_id, string $content switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\QuantClient\Model\GetAIAgent200Response', + '\QuantClient\Model\DeleteAgentOverlay200Response', $request, $response, ); @@ -1132,7 +1141,7 @@ public function getAIAgentWithHttpInfo($organisation, $agent_id, string $content } return $this->handleResponseWithDataType( - '\QuantClient\Model\GetAIAgent200Response', + '\QuantClient\Model\DeleteAgentOverlay200Response', $request, $response, ); @@ -1141,7 +1150,7 @@ public function getAIAgentWithHttpInfo($organisation, $agent_id, string $content case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\QuantClient\Model\GetAIAgent200Response', + '\QuantClient\Model\DeleteAgentOverlay200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1154,20 +1163,20 @@ public function getAIAgentWithHttpInfo($organisation, $agent_id, string $content } /** - * Operation getAIAgentAsync + * Operation deleteAgentOverlayAsync * - * Get Agent Details + * Delete Agent Overlay * * @param string $organisation The organisation ID (required) - * @param string $agent_id The agent ID (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAIAgent'] to see the possible values for this operation + * @param string $agent_id Global agent identifier (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteAgentOverlay'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAIAgentAsync($organisation, $agent_id, string $contentType = self::contentTypes['getAIAgent'][0]) + public function deleteAgentOverlayAsync($organisation, $agent_id, string $contentType = self::contentTypes['deleteAgentOverlay'][0]) { - return $this->getAIAgentAsyncWithHttpInfo($organisation, $agent_id, $contentType) + return $this->deleteAgentOverlayAsyncWithHttpInfo($organisation, $agent_id, $contentType) ->then( function ($response) { return $response[0]; @@ -1176,21 +1185,21 @@ function ($response) { } /** - * Operation getAIAgentAsyncWithHttpInfo + * Operation deleteAgentOverlayAsyncWithHttpInfo * - * Get Agent Details + * Delete Agent Overlay * * @param string $organisation The organisation ID (required) - * @param string $agent_id The agent ID (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAIAgent'] to see the possible values for this operation + * @param string $agent_id Global agent identifier (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteAgentOverlay'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAIAgentAsyncWithHttpInfo($organisation, $agent_id, string $contentType = self::contentTypes['getAIAgent'][0]) + public function deleteAgentOverlayAsyncWithHttpInfo($organisation, $agent_id, string $contentType = self::contentTypes['deleteAgentOverlay'][0]) { - $returnType = '\QuantClient\Model\GetAIAgent200Response'; - $request = $this->getAIAgentRequest($organisation, $agent_id, $contentType); + $returnType = '\QuantClient\Model\DeleteAgentOverlay200Response'; + $request = $this->deleteAgentOverlayRequest($organisation, $agent_id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1229,34 +1238,34 @@ function ($exception) { } /** - * Create request for operation 'getAIAgent' + * Create request for operation 'deleteAgentOverlay' * * @param string $organisation The organisation ID (required) - * @param string $agent_id The agent ID (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAIAgent'] to see the possible values for this operation + * @param string $agent_id Global agent identifier (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteAgentOverlay'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getAIAgentRequest($organisation, $agent_id, string $contentType = self::contentTypes['getAIAgent'][0]) + public function deleteAgentOverlayRequest($organisation, $agent_id, string $contentType = self::contentTypes['deleteAgentOverlay'][0]) { // verify the required parameter 'organisation' is set if ($organisation === null || (is_array($organisation) && count($organisation) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $organisation when calling getAIAgent' + 'Missing the required parameter $organisation when calling deleteAgentOverlay' ); } // verify the required parameter 'agent_id' is set if ($agent_id === null || (is_array($agent_id) && count($agent_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $agent_id when calling getAIAgent' + 'Missing the required parameter $agent_id when calling deleteAgentOverlay' ); } - $resourcePath = '/api/v3/organizations/{organisation}/ai/agents/{agentId}'; + $resourcePath = '/api/v3/organizations/{organisation}/ai/agents/{agentId}/overlay'; $formParams = []; $queryParams = []; $headerParams = []; @@ -1333,7 +1342,7 @@ public function getAIAgentRequest($organisation, $agent_id, string $contentType $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'DELETE', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -1341,40 +1350,40 @@ public function getAIAgentRequest($organisation, $agent_id, string $contentType } /** - * Operation listAIAgents + * Operation getAIAgent * - * List AI Agents + * Get Agent Details * * @param string $organisation The organisation ID (required) - * @param string|null $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 + * @param string $agent_id The agent ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAIAgent'] 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\ListAIAgents200Response + * @return \QuantClient\Model\GetAIAgent200Response */ - public function listAIAgents($organisation, $group = null, string $contentType = self::contentTypes['listAIAgents'][0]) + public function getAIAgent($organisation, $agent_id, string $contentType = self::contentTypes['getAIAgent'][0]) { - list($response) = $this->listAIAgentsWithHttpInfo($organisation, $group, $contentType); + list($response) = $this->getAIAgentWithHttpInfo($organisation, $agent_id, $contentType); return $response; } /** - * Operation listAIAgentsWithHttpInfo + * Operation getAIAgentWithHttpInfo * - * List AI Agents + * Get Agent Details * * @param string $organisation The organisation ID (required) - * @param string|null $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 + * @param string $agent_id The agent ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAIAgent'] 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\ListAIAgents200Response, HTTP status code, HTTP response headers (array of strings) + * @return array of \QuantClient\Model\GetAIAgent200Response, HTTP status code, HTTP response headers (array of strings) */ - public function listAIAgentsWithHttpInfo($organisation, $group = null, string $contentType = self::contentTypes['listAIAgents'][0]) + public function getAIAgentWithHttpInfo($organisation, $agent_id, string $contentType = self::contentTypes['getAIAgent'][0]) { - $request = $this->listAIAgentsRequest($organisation, $group, $contentType); + $request = $this->getAIAgentRequest($organisation, $agent_id, $contentType); try { $options = $this->createHttpClientOption(); @@ -1402,7 +1411,7 @@ public function listAIAgentsWithHttpInfo($organisation, $group = null, string $c switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\QuantClient\Model\ListAIAgents200Response', + '\QuantClient\Model\GetAIAgent200Response', $request, $response, ); @@ -1424,7 +1433,7 @@ public function listAIAgentsWithHttpInfo($organisation, $group = null, string $c } return $this->handleResponseWithDataType( - '\QuantClient\Model\ListAIAgents200Response', + '\QuantClient\Model\GetAIAgent200Response', $request, $response, ); @@ -1433,7 +1442,7 @@ public function listAIAgentsWithHttpInfo($organisation, $group = null, string $c case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\QuantClient\Model\ListAIAgents200Response', + '\QuantClient\Model\GetAIAgent200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1446,20 +1455,20 @@ public function listAIAgentsWithHttpInfo($organisation, $group = null, string $c } /** - * Operation listAIAgentsAsync + * Operation getAIAgentAsync * - * List AI Agents + * Get Agent Details * * @param string $organisation The organisation ID (required) - * @param string|null $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 + * @param string $agent_id The agent ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAIAgent'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function listAIAgentsAsync($organisation, $group = null, string $contentType = self::contentTypes['listAIAgents'][0]) + public function getAIAgentAsync($organisation, $agent_id, string $contentType = self::contentTypes['getAIAgent'][0]) { - return $this->listAIAgentsAsyncWithHttpInfo($organisation, $group, $contentType) + return $this->getAIAgentAsyncWithHttpInfo($organisation, $agent_id, $contentType) ->then( function ($response) { return $response[0]; @@ -1468,21 +1477,21 @@ function ($response) { } /** - * Operation listAIAgentsAsyncWithHttpInfo + * Operation getAIAgentAsyncWithHttpInfo * - * List AI Agents + * Get Agent Details * * @param string $organisation The organisation ID (required) - * @param string|null $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 + * @param string $agent_id The agent ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAIAgent'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function listAIAgentsAsyncWithHttpInfo($organisation, $group = null, string $contentType = self::contentTypes['listAIAgents'][0]) + public function getAIAgentAsyncWithHttpInfo($organisation, $agent_id, string $contentType = self::contentTypes['getAIAgent'][0]) { - $returnType = '\QuantClient\Model\ListAIAgents200Response'; - $request = $this->listAIAgentsRequest($organisation, $group, $contentType); + $returnType = '\QuantClient\Model\GetAIAgent200Response'; + $request = $this->getAIAgentRequest($organisation, $agent_id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1521,43 +1530,40 @@ function ($exception) { } /** - * Create request for operation 'listAIAgents' + * Create request for operation 'getAIAgent' * * @param string $organisation The organisation ID (required) - * @param string|null $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 + * @param string $agent_id The agent ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAIAgent'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function listAIAgentsRequest($organisation, $group = null, string $contentType = self::contentTypes['listAIAgents'][0]) + public function getAIAgentRequest($organisation, $agent_id, string $contentType = self::contentTypes['getAIAgent'][0]) { // verify the required parameter 'organisation' is set if ($organisation === null || (is_array($organisation) && count($organisation) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $organisation when calling listAIAgents' + 'Missing the required parameter $organisation when calling getAIAgent' ); } + // verify the required parameter 'agent_id' is set + if ($agent_id === null || (is_array($agent_id) && count($agent_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $agent_id when calling getAIAgent' + ); + } - $resourcePath = '/api/v3/organizations/{organisation}/ai/agents'; + $resourcePath = '/api/v3/organizations/{organisation}/ai/agents/{agentId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $group, - 'group', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); // path params @@ -1568,6 +1574,14 @@ public function listAIAgentsRequest($organisation, $group = null, string $conten $resourcePath ); } + // path params + if ($agent_id !== null) { + $resourcePath = str_replace( + '{' . 'agentId' . '}', + ObjectSerializer::toPathValue($agent_id), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( @@ -1628,42 +1642,40 @@ public function listAIAgentsRequest($organisation, $group = null, string $conten } /** - * Operation updateAIAgent + * Operation getAgentOverlay * - * Update Agent + * Get Agent Overlay * * @param string $organisation The organisation ID (required) - * @param string $agent_id The agent ID (required) - * @param \QuantClient\Model\UpdateAIAgentRequest $update_ai_agent_request update_ai_agent_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateAIAgent'] to see the possible values for this operation + * @param string $agent_id Global agent identifier (e.g., 'quantgov-code') (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAgentOverlay'] 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\UpdateAIAgent200Response + * @return \QuantClient\Model\GetAgentOverlay200Response */ - public function updateAIAgent($organisation, $agent_id, $update_ai_agent_request, string $contentType = self::contentTypes['updateAIAgent'][0]) + public function getAgentOverlay($organisation, $agent_id, string $contentType = self::contentTypes['getAgentOverlay'][0]) { - list($response) = $this->updateAIAgentWithHttpInfo($organisation, $agent_id, $update_ai_agent_request, $contentType); + list($response) = $this->getAgentOverlayWithHttpInfo($organisation, $agent_id, $contentType); return $response; } /** - * Operation updateAIAgentWithHttpInfo + * Operation getAgentOverlayWithHttpInfo * - * Update Agent + * Get Agent Overlay * * @param string $organisation The organisation ID (required) - * @param string $agent_id The agent ID (required) - * @param \QuantClient\Model\UpdateAIAgentRequest $update_ai_agent_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateAIAgent'] to see the possible values for this operation + * @param string $agent_id Global agent identifier (e.g., 'quantgov-code') (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAgentOverlay'] 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\UpdateAIAgent200Response, HTTP status code, HTTP response headers (array of strings) + * @return array of \QuantClient\Model\GetAgentOverlay200Response, HTTP status code, HTTP response headers (array of strings) */ - public function updateAIAgentWithHttpInfo($organisation, $agent_id, $update_ai_agent_request, string $contentType = self::contentTypes['updateAIAgent'][0]) + public function getAgentOverlayWithHttpInfo($organisation, $agent_id, string $contentType = self::contentTypes['getAgentOverlay'][0]) { - $request = $this->updateAIAgentRequest($organisation, $agent_id, $update_ai_agent_request, $contentType); + $request = $this->getAgentOverlayRequest($organisation, $agent_id, $contentType); try { $options = $this->createHttpClientOption(); @@ -1691,7 +1703,7 @@ public function updateAIAgentWithHttpInfo($organisation, $agent_id, $update_ai_a switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\QuantClient\Model\UpdateAIAgent200Response', + '\QuantClient\Model\GetAgentOverlay200Response', $request, $response, ); @@ -1713,7 +1725,7 @@ public function updateAIAgentWithHttpInfo($organisation, $agent_id, $update_ai_a } return $this->handleResponseWithDataType( - '\QuantClient\Model\UpdateAIAgent200Response', + '\QuantClient\Model\GetAgentOverlay200Response', $request, $response, ); @@ -1722,7 +1734,7 @@ public function updateAIAgentWithHttpInfo($organisation, $agent_id, $update_ai_a case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\QuantClient\Model\UpdateAIAgent200Response', + '\QuantClient\Model\GetAgentOverlay200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1735,21 +1747,20 @@ public function updateAIAgentWithHttpInfo($organisation, $agent_id, $update_ai_a } /** - * Operation updateAIAgentAsync + * Operation getAgentOverlayAsync * - * Update Agent + * Get Agent Overlay * * @param string $organisation The organisation ID (required) - * @param string $agent_id The agent ID (required) - * @param \QuantClient\Model\UpdateAIAgentRequest $update_ai_agent_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateAIAgent'] to see the possible values for this operation + * @param string $agent_id Global agent identifier (e.g., 'quantgov-code') (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAgentOverlay'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateAIAgentAsync($organisation, $agent_id, $update_ai_agent_request, string $contentType = self::contentTypes['updateAIAgent'][0]) + public function getAgentOverlayAsync($organisation, $agent_id, string $contentType = self::contentTypes['getAgentOverlay'][0]) { - return $this->updateAIAgentAsyncWithHttpInfo($organisation, $agent_id, $update_ai_agent_request, $contentType) + return $this->getAgentOverlayAsyncWithHttpInfo($organisation, $agent_id, $contentType) ->then( function ($response) { return $response[0]; @@ -1758,22 +1769,21 @@ function ($response) { } /** - * Operation updateAIAgentAsyncWithHttpInfo + * Operation getAgentOverlayAsyncWithHttpInfo * - * Update Agent + * Get Agent Overlay * * @param string $organisation The organisation ID (required) - * @param string $agent_id The agent ID (required) - * @param \QuantClient\Model\UpdateAIAgentRequest $update_ai_agent_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateAIAgent'] to see the possible values for this operation + * @param string $agent_id Global agent identifier (e.g., 'quantgov-code') (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAgentOverlay'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateAIAgentAsyncWithHttpInfo($organisation, $agent_id, $update_ai_agent_request, string $contentType = self::contentTypes['updateAIAgent'][0]) + public function getAgentOverlayAsyncWithHttpInfo($organisation, $agent_id, string $contentType = self::contentTypes['getAgentOverlay'][0]) { - $returnType = '\QuantClient\Model\UpdateAIAgent200Response'; - $request = $this->updateAIAgentRequest($organisation, $agent_id, $update_ai_agent_request, $contentType); + $returnType = '\QuantClient\Model\GetAgentOverlay200Response'; + $request = $this->getAgentOverlayRequest($organisation, $agent_id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1812,42 +1822,34 @@ function ($exception) { } /** - * Create request for operation 'updateAIAgent' + * Create request for operation 'getAgentOverlay' * * @param string $organisation The organisation ID (required) - * @param string $agent_id The agent ID (required) - * @param \QuantClient\Model\UpdateAIAgentRequest $update_ai_agent_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateAIAgent'] to see the possible values for this operation + * @param string $agent_id Global agent identifier (e.g., 'quantgov-code') (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAgentOverlay'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function updateAIAgentRequest($organisation, $agent_id, $update_ai_agent_request, string $contentType = self::contentTypes['updateAIAgent'][0]) + public function getAgentOverlayRequest($organisation, $agent_id, string $contentType = self::contentTypes['getAgentOverlay'][0]) { // verify the required parameter 'organisation' is set if ($organisation === null || (is_array($organisation) && count($organisation) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $organisation when calling updateAIAgent' + 'Missing the required parameter $organisation when calling getAgentOverlay' ); } // verify the required parameter 'agent_id' is set if ($agent_id === null || (is_array($agent_id) && count($agent_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $agent_id when calling updateAIAgent' - ); - } - - // verify the required parameter 'update_ai_agent_request' is set - if ($update_ai_agent_request === null || (is_array($update_ai_agent_request) && count($update_ai_agent_request) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $update_ai_agent_request when calling updateAIAgent' + 'Missing the required parameter $agent_id when calling getAgentOverlay' ); } - $resourcePath = '/api/v3/organizations/{organisation}/ai/agents/{agentId}'; + $resourcePath = '/api/v3/organizations/{organisation}/ai/agents/{agentId}/overlay'; $formParams = []; $queryParams = []; $headerParams = []; @@ -1881,12 +1883,914 @@ public function updateAIAgentRequest($organisation, $agent_id, $update_ai_agent_ ); // for model (json/xml) - if (isset($update_ai_agent_request)) { - if (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($update_ai_agent_request)); + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { - $httpBody = $update_ai_agent_request; + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation listAIAgents + * + * List AI Agents + * + * @param string $organisation The organisation ID (required) + * @param string|null $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 + * @throws \InvalidArgumentException + * @return \QuantClient\Model\ListAIAgents200Response + */ + public function listAIAgents($organisation, $group = null, string $contentType = self::contentTypes['listAIAgents'][0]) + { + list($response) = $this->listAIAgentsWithHttpInfo($organisation, $group, $contentType); + return $response; + } + + /** + * Operation listAIAgentsWithHttpInfo + * + * List AI Agents + * + * @param string $organisation The organisation ID (required) + * @param string|null $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 + * @throws \InvalidArgumentException + * @return array of \QuantClient\Model\ListAIAgents200Response, HTTP status code, HTTP response headers (array of strings) + */ + public function listAIAgentsWithHttpInfo($organisation, $group = null, string $contentType = self::contentTypes['listAIAgents'][0]) + { + $request = $this->listAIAgentsRequest($organisation, $group, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\QuantClient\Model\ListAIAgents200Response', + $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 $this->handleResponseWithDataType( + '\QuantClient\Model\ListAIAgents200Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\QuantClient\Model\ListAIAgents200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation listAIAgentsAsync + * + * List AI Agents + * + * @param string $organisation The organisation ID (required) + * @param string|null $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 + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listAIAgentsAsync($organisation, $group = null, string $contentType = self::contentTypes['listAIAgents'][0]) + { + return $this->listAIAgentsAsyncWithHttpInfo($organisation, $group, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listAIAgentsAsyncWithHttpInfo + * + * List AI Agents + * + * @param string $organisation The organisation ID (required) + * @param string|null $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 + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listAIAgentsAsyncWithHttpInfo($organisation, $group = null, string $contentType = self::contentTypes['listAIAgents'][0]) + { + $returnType = '\QuantClient\Model\ListAIAgents200Response'; + $request = $this->listAIAgentsRequest($organisation, $group, $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() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * 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 $contentType The value for the Content-Type header. Check self::contentTypes['listAIAgents'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listAIAgentsRequest($organisation, $group = null, string $contentType = self::contentTypes['listAIAgents'][0]) + { + + // verify the required parameter 'organisation' is set + if ($organisation === null || (is_array($organisation) && count($organisation) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organisation when calling listAIAgents' + ); + } + + + + $resourcePath = '/api/v3/organizations/{organisation}/ai/agents'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $group, + 'group', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + // path params + if ($organisation !== null) { + $resourcePath = str_replace( + '{' . 'organisation' . '}', + ObjectSerializer::toPathValue($organisation), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation updateAIAgent + * + * Update Agent + * + * @param string $organisation The organisation ID (required) + * @param string $agent_id The agent ID (required) + * @param \QuantClient\Model\UpdateAIAgentRequest $update_ai_agent_request update_ai_agent_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateAIAgent'] 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\UpdateAIAgent200Response + */ + public function updateAIAgent($organisation, $agent_id, $update_ai_agent_request, string $contentType = self::contentTypes['updateAIAgent'][0]) + { + list($response) = $this->updateAIAgentWithHttpInfo($organisation, $agent_id, $update_ai_agent_request, $contentType); + return $response; + } + + /** + * Operation updateAIAgentWithHttpInfo + * + * Update Agent + * + * @param string $organisation The organisation ID (required) + * @param string $agent_id The agent ID (required) + * @param \QuantClient\Model\UpdateAIAgentRequest $update_ai_agent_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateAIAgent'] 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\UpdateAIAgent200Response, HTTP status code, HTTP response headers (array of strings) + */ + public function updateAIAgentWithHttpInfo($organisation, $agent_id, $update_ai_agent_request, string $contentType = self::contentTypes['updateAIAgent'][0]) + { + $request = $this->updateAIAgentRequest($organisation, $agent_id, $update_ai_agent_request, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\QuantClient\Model\UpdateAIAgent200Response', + $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 $this->handleResponseWithDataType( + '\QuantClient\Model\UpdateAIAgent200Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\QuantClient\Model\UpdateAIAgent200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation updateAIAgentAsync + * + * Update Agent + * + * @param string $organisation The organisation ID (required) + * @param string $agent_id The agent ID (required) + * @param \QuantClient\Model\UpdateAIAgentRequest $update_ai_agent_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateAIAgent'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateAIAgentAsync($organisation, $agent_id, $update_ai_agent_request, string $contentType = self::contentTypes['updateAIAgent'][0]) + { + return $this->updateAIAgentAsyncWithHttpInfo($organisation, $agent_id, $update_ai_agent_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation updateAIAgentAsyncWithHttpInfo + * + * Update Agent + * + * @param string $organisation The organisation ID (required) + * @param string $agent_id The agent ID (required) + * @param \QuantClient\Model\UpdateAIAgentRequest $update_ai_agent_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateAIAgent'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateAIAgentAsyncWithHttpInfo($organisation, $agent_id, $update_ai_agent_request, string $contentType = self::contentTypes['updateAIAgent'][0]) + { + $returnType = '\QuantClient\Model\UpdateAIAgent200Response'; + $request = $this->updateAIAgentRequest($organisation, $agent_id, $update_ai_agent_request, $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() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'updateAIAgent' + * + * @param string $organisation The organisation ID (required) + * @param string $agent_id The agent ID (required) + * @param \QuantClient\Model\UpdateAIAgentRequest $update_ai_agent_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateAIAgent'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function updateAIAgentRequest($organisation, $agent_id, $update_ai_agent_request, string $contentType = self::contentTypes['updateAIAgent'][0]) + { + + // verify the required parameter 'organisation' is set + if ($organisation === null || (is_array($organisation) && count($organisation) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organisation when calling updateAIAgent' + ); + } + + // verify the required parameter 'agent_id' is set + if ($agent_id === null || (is_array($agent_id) && count($agent_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $agent_id when calling updateAIAgent' + ); + } + + // verify the required parameter 'update_ai_agent_request' is set + if ($update_ai_agent_request === null || (is_array($update_ai_agent_request) && count($update_ai_agent_request) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $update_ai_agent_request when calling updateAIAgent' + ); + } + + + $resourcePath = '/api/v3/organizations/{organisation}/ai/agents/{agentId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($organisation !== null) { + $resourcePath = str_replace( + '{' . 'organisation' . '}', + ObjectSerializer::toPathValue($organisation), + $resourcePath + ); + } + // path params + if ($agent_id !== null) { + $resourcePath = str_replace( + '{' . 'agentId' . '}', + ObjectSerializer::toPathValue($agent_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($update_ai_agent_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($update_ai_agent_request)); + } else { + $httpBody = $update_ai_agent_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation upsertAgentOverlay + * + * Upsert Agent Overlay + * + * @param string $organisation The organisation ID (required) + * @param string $agent_id Global agent identifier (required) + * @param \QuantClient\Model\UpsertAgentOverlayRequest $upsert_agent_overlay_request upsert_agent_overlay_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['upsertAgentOverlay'] 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\UpsertAgentOverlay200Response + */ + public function upsertAgentOverlay($organisation, $agent_id, $upsert_agent_overlay_request, string $contentType = self::contentTypes['upsertAgentOverlay'][0]) + { + list($response) = $this->upsertAgentOverlayWithHttpInfo($organisation, $agent_id, $upsert_agent_overlay_request, $contentType); + return $response; + } + + /** + * Operation upsertAgentOverlayWithHttpInfo + * + * Upsert Agent Overlay + * + * @param string $organisation The organisation ID (required) + * @param string $agent_id Global agent identifier (required) + * @param \QuantClient\Model\UpsertAgentOverlayRequest $upsert_agent_overlay_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['upsertAgentOverlay'] 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\UpsertAgentOverlay200Response, HTTP status code, HTTP response headers (array of strings) + */ + public function upsertAgentOverlayWithHttpInfo($organisation, $agent_id, $upsert_agent_overlay_request, string $contentType = self::contentTypes['upsertAgentOverlay'][0]) + { + $request = $this->upsertAgentOverlayRequest($organisation, $agent_id, $upsert_agent_overlay_request, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\QuantClient\Model\UpsertAgentOverlay200Response', + $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 $this->handleResponseWithDataType( + '\QuantClient\Model\UpsertAgentOverlay200Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\QuantClient\Model\UpsertAgentOverlay200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation upsertAgentOverlayAsync + * + * Upsert Agent Overlay + * + * @param string $organisation The organisation ID (required) + * @param string $agent_id Global agent identifier (required) + * @param \QuantClient\Model\UpsertAgentOverlayRequest $upsert_agent_overlay_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['upsertAgentOverlay'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function upsertAgentOverlayAsync($organisation, $agent_id, $upsert_agent_overlay_request, string $contentType = self::contentTypes['upsertAgentOverlay'][0]) + { + return $this->upsertAgentOverlayAsyncWithHttpInfo($organisation, $agent_id, $upsert_agent_overlay_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation upsertAgentOverlayAsyncWithHttpInfo + * + * Upsert Agent Overlay + * + * @param string $organisation The organisation ID (required) + * @param string $agent_id Global agent identifier (required) + * @param \QuantClient\Model\UpsertAgentOverlayRequest $upsert_agent_overlay_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['upsertAgentOverlay'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function upsertAgentOverlayAsyncWithHttpInfo($organisation, $agent_id, $upsert_agent_overlay_request, string $contentType = self::contentTypes['upsertAgentOverlay'][0]) + { + $returnType = '\QuantClient\Model\UpsertAgentOverlay200Response'; + $request = $this->upsertAgentOverlayRequest($organisation, $agent_id, $upsert_agent_overlay_request, $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() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'upsertAgentOverlay' + * + * @param string $organisation The organisation ID (required) + * @param string $agent_id Global agent identifier (required) + * @param \QuantClient\Model\UpsertAgentOverlayRequest $upsert_agent_overlay_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['upsertAgentOverlay'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function upsertAgentOverlayRequest($organisation, $agent_id, $upsert_agent_overlay_request, string $contentType = self::contentTypes['upsertAgentOverlay'][0]) + { + + // verify the required parameter 'organisation' is set + if ($organisation === null || (is_array($organisation) && count($organisation) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organisation when calling upsertAgentOverlay' + ); + } + + // verify the required parameter 'agent_id' is set + if ($agent_id === null || (is_array($agent_id) && count($agent_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $agent_id when calling upsertAgentOverlay' + ); + } + + // verify the required parameter 'upsert_agent_overlay_request' is set + if ($upsert_agent_overlay_request === null || (is_array($upsert_agent_overlay_request) && count($upsert_agent_overlay_request) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $upsert_agent_overlay_request when calling upsertAgentOverlay' + ); + } + + + $resourcePath = '/api/v3/organizations/{organisation}/ai/agents/{agentId}/overlay'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($organisation !== null) { + $resourcePath = str_replace( + '{' . 'organisation' . '}', + ObjectSerializer::toPathValue($organisation), + $resourcePath + ); + } + // path params + if ($agent_id !== null) { + $resourcePath = str_replace( + '{' . 'agentId' . '}', + ObjectSerializer::toPathValue($agent_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($upsert_agent_overlay_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($upsert_agent_overlay_request)); + } else { + $httpBody = $upsert_agent_overlay_request; } } elseif (count($formParams) > 0) { if ($multipart) { diff --git a/src/Api/AICustomToolsApi.php b/src/Api/AICustomToolsApi.php index e3d48d7..b51b541 100644 --- a/src/Api/AICustomToolsApi.php +++ b/src/Api/AICustomToolsApi.php @@ -14,7 +14,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Api/AIFileStorageApi.php b/src/Api/AIFileStorageApi.php index 0413404..bf5b433 100644 --- a/src/Api/AIFileStorageApi.php +++ b/src/Api/AIFileStorageApi.php @@ -14,7 +14,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Api/AIFilterPoliciesApi.php b/src/Api/AIFilterPoliciesApi.php new file mode 100644 index 0000000..a58a944 --- /dev/null +++ b/src/Api/AIFilterPoliciesApi.php @@ -0,0 +1,2249 @@ + [ + 'application/json', + ], + 'deleteFilterPolicy' => [ + 'application/json', + ], + 'disableFilterPolicy' => [ + 'application/json', + ], + 'enableFilterPolicy' => [ + 'application/json', + ], + 'getFilterPolicy' => [ + 'application/json', + ], + 'listFilterPolicies' => [ + 'application/json', + ], + 'updateFilterPolicy' => [ + 'application/json', + ], + ]; + + /** + * @param ClientInterface $client + * @param Configuration $config + * @param HeaderSelector $selector + * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec + */ + public function __construct( + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0 + ) { + $this->client = $client ?: new Client(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation createFilterPolicy + * + * Create an AI filter policy for an organisation + * + * @param string $organisation The organisation ID (required) + * @param \QuantClient\Model\CreateFilterPolicyRequest $create_filter_policy_request create_filter_policy_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createFilterPolicy'] 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 object + */ + public function createFilterPolicy($organisation, $create_filter_policy_request, string $contentType = self::contentTypes['createFilterPolicy'][0]) + { + list($response) = $this->createFilterPolicyWithHttpInfo($organisation, $create_filter_policy_request, $contentType); + return $response; + } + + /** + * Operation createFilterPolicyWithHttpInfo + * + * Create an AI filter policy for an organisation + * + * @param string $organisation The organisation ID (required) + * @param \QuantClient\Model\CreateFilterPolicyRequest $create_filter_policy_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createFilterPolicy'] 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 object, HTTP status code, HTTP response headers (array of strings) + */ + public function createFilterPolicyWithHttpInfo($organisation, $create_filter_policy_request, string $contentType = self::contentTypes['createFilterPolicy'][0]) + { + $request = $this->createFilterPolicyRequest($organisation, $create_filter_policy_request, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 201: + return $this->handleResponseWithDataType( + 'object', + $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 $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'object', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation createFilterPolicyAsync + * + * Create an AI filter policy for an organisation + * + * @param string $organisation The organisation ID (required) + * @param \QuantClient\Model\CreateFilterPolicyRequest $create_filter_policy_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createFilterPolicy'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createFilterPolicyAsync($organisation, $create_filter_policy_request, string $contentType = self::contentTypes['createFilterPolicy'][0]) + { + return $this->createFilterPolicyAsyncWithHttpInfo($organisation, $create_filter_policy_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createFilterPolicyAsyncWithHttpInfo + * + * Create an AI filter policy for an organisation + * + * @param string $organisation The organisation ID (required) + * @param \QuantClient\Model\CreateFilterPolicyRequest $create_filter_policy_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createFilterPolicy'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createFilterPolicyAsyncWithHttpInfo($organisation, $create_filter_policy_request, string $contentType = self::contentTypes['createFilterPolicy'][0]) + { + $returnType = 'object'; + $request = $this->createFilterPolicyRequest($organisation, $create_filter_policy_request, $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() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createFilterPolicy' + * + * @param string $organisation The organisation ID (required) + * @param \QuantClient\Model\CreateFilterPolicyRequest $create_filter_policy_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createFilterPolicy'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function createFilterPolicyRequest($organisation, $create_filter_policy_request, string $contentType = self::contentTypes['createFilterPolicy'][0]) + { + + // verify the required parameter 'organisation' is set + if ($organisation === null || (is_array($organisation) && count($organisation) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organisation when calling createFilterPolicy' + ); + } + + // verify the required parameter 'create_filter_policy_request' is set + if ($create_filter_policy_request === null || (is_array($create_filter_policy_request) && count($create_filter_policy_request) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $create_filter_policy_request when calling createFilterPolicy' + ); + } + + + $resourcePath = '/api/v3/organizations/{organisation}/ai/filter-policies'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($organisation !== null) { + $resourcePath = str_replace( + '{' . 'organisation' . '}', + ObjectSerializer::toPathValue($organisation), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($create_filter_policy_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($create_filter_policy_request)); + } else { + $httpBody = $create_filter_policy_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation deleteFilterPolicy + * + * Delete a specific AI filter policy + * + * @param string $organisation organisation (required) + * @param string $policy_id policy_id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteFilterPolicy'] 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 object + */ + public function deleteFilterPolicy($organisation, $policy_id, string $contentType = self::contentTypes['deleteFilterPolicy'][0]) + { + list($response) = $this->deleteFilterPolicyWithHttpInfo($organisation, $policy_id, $contentType); + return $response; + } + + /** + * Operation deleteFilterPolicyWithHttpInfo + * + * Delete a specific AI filter policy + * + * @param string $organisation (required) + * @param string $policy_id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteFilterPolicy'] 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 object, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteFilterPolicyWithHttpInfo($organisation, $policy_id, string $contentType = self::contentTypes['deleteFilterPolicy'][0]) + { + $request = $this->deleteFilterPolicyRequest($organisation, $policy_id, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + 'object', + $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 $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'object', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation deleteFilterPolicyAsync + * + * Delete a specific AI filter policy + * + * @param string $organisation (required) + * @param string $policy_id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteFilterPolicy'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteFilterPolicyAsync($organisation, $policy_id, string $contentType = self::contentTypes['deleteFilterPolicy'][0]) + { + return $this->deleteFilterPolicyAsyncWithHttpInfo($organisation, $policy_id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteFilterPolicyAsyncWithHttpInfo + * + * Delete a specific AI filter policy + * + * @param string $organisation (required) + * @param string $policy_id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteFilterPolicy'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteFilterPolicyAsyncWithHttpInfo($organisation, $policy_id, string $contentType = self::contentTypes['deleteFilterPolicy'][0]) + { + $returnType = 'object'; + $request = $this->deleteFilterPolicyRequest($organisation, $policy_id, $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() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'deleteFilterPolicy' + * + * @param string $organisation (required) + * @param string $policy_id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteFilterPolicy'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function deleteFilterPolicyRequest($organisation, $policy_id, string $contentType = self::contentTypes['deleteFilterPolicy'][0]) + { + + // verify the required parameter 'organisation' is set + if ($organisation === null || (is_array($organisation) && count($organisation) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organisation when calling deleteFilterPolicy' + ); + } + + // verify the required parameter 'policy_id' is set + if ($policy_id === null || (is_array($policy_id) && count($policy_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $policy_id when calling deleteFilterPolicy' + ); + } + + + $resourcePath = '/api/v3/organizations/{organisation}/ai/filter-policies/{policyId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($organisation !== null) { + $resourcePath = str_replace( + '{' . 'organisation' . '}', + ObjectSerializer::toPathValue($organisation), + $resourcePath + ); + } + // path params + if ($policy_id !== null) { + $resourcePath = str_replace( + '{' . 'policyId' . '}', + ObjectSerializer::toPathValue($policy_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation disableFilterPolicy + * + * Disable a specific AI filter policy + * + * @param string $organisation organisation (required) + * @param string $policy_id policy_id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['disableFilterPolicy'] 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 object + */ + public function disableFilterPolicy($organisation, $policy_id, string $contentType = self::contentTypes['disableFilterPolicy'][0]) + { + list($response) = $this->disableFilterPolicyWithHttpInfo($organisation, $policy_id, $contentType); + return $response; + } + + /** + * Operation disableFilterPolicyWithHttpInfo + * + * Disable a specific AI filter policy + * + * @param string $organisation (required) + * @param string $policy_id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['disableFilterPolicy'] 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 object, HTTP status code, HTTP response headers (array of strings) + */ + public function disableFilterPolicyWithHttpInfo($organisation, $policy_id, string $contentType = self::contentTypes['disableFilterPolicy'][0]) + { + $request = $this->disableFilterPolicyRequest($organisation, $policy_id, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + 'object', + $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 $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'object', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation disableFilterPolicyAsync + * + * Disable a specific AI filter policy + * + * @param string $organisation (required) + * @param string $policy_id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['disableFilterPolicy'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function disableFilterPolicyAsync($organisation, $policy_id, string $contentType = self::contentTypes['disableFilterPolicy'][0]) + { + return $this->disableFilterPolicyAsyncWithHttpInfo($organisation, $policy_id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation disableFilterPolicyAsyncWithHttpInfo + * + * Disable a specific AI filter policy + * + * @param string $organisation (required) + * @param string $policy_id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['disableFilterPolicy'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function disableFilterPolicyAsyncWithHttpInfo($organisation, $policy_id, string $contentType = self::contentTypes['disableFilterPolicy'][0]) + { + $returnType = 'object'; + $request = $this->disableFilterPolicyRequest($organisation, $policy_id, $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() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'disableFilterPolicy' + * + * @param string $organisation (required) + * @param string $policy_id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['disableFilterPolicy'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function disableFilterPolicyRequest($organisation, $policy_id, string $contentType = self::contentTypes['disableFilterPolicy'][0]) + { + + // verify the required parameter 'organisation' is set + if ($organisation === null || (is_array($organisation) && count($organisation) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organisation when calling disableFilterPolicy' + ); + } + + // verify the required parameter 'policy_id' is set + if ($policy_id === null || (is_array($policy_id) && count($policy_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $policy_id when calling disableFilterPolicy' + ); + } + + + $resourcePath = '/api/v3/organizations/{organisation}/ai/filter-policies/{policyId}/disable'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($organisation !== null) { + $resourcePath = str_replace( + '{' . 'organisation' . '}', + ObjectSerializer::toPathValue($organisation), + $resourcePath + ); + } + // path params + if ($policy_id !== null) { + $resourcePath = str_replace( + '{' . 'policyId' . '}', + ObjectSerializer::toPathValue($policy_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation enableFilterPolicy + * + * Enable a specific AI filter policy + * + * @param string $organisation organisation (required) + * @param string $policy_id policy_id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['enableFilterPolicy'] 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 object + */ + public function enableFilterPolicy($organisation, $policy_id, string $contentType = self::contentTypes['enableFilterPolicy'][0]) + { + list($response) = $this->enableFilterPolicyWithHttpInfo($organisation, $policy_id, $contentType); + return $response; + } + + /** + * Operation enableFilterPolicyWithHttpInfo + * + * Enable a specific AI filter policy + * + * @param string $organisation (required) + * @param string $policy_id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['enableFilterPolicy'] 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 object, HTTP status code, HTTP response headers (array of strings) + */ + public function enableFilterPolicyWithHttpInfo($organisation, $policy_id, string $contentType = self::contentTypes['enableFilterPolicy'][0]) + { + $request = $this->enableFilterPolicyRequest($organisation, $policy_id, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + 'object', + $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 $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'object', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation enableFilterPolicyAsync + * + * Enable a specific AI filter policy + * + * @param string $organisation (required) + * @param string $policy_id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['enableFilterPolicy'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function enableFilterPolicyAsync($organisation, $policy_id, string $contentType = self::contentTypes['enableFilterPolicy'][0]) + { + return $this->enableFilterPolicyAsyncWithHttpInfo($organisation, $policy_id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation enableFilterPolicyAsyncWithHttpInfo + * + * Enable a specific AI filter policy + * + * @param string $organisation (required) + * @param string $policy_id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['enableFilterPolicy'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function enableFilterPolicyAsyncWithHttpInfo($organisation, $policy_id, string $contentType = self::contentTypes['enableFilterPolicy'][0]) + { + $returnType = 'object'; + $request = $this->enableFilterPolicyRequest($organisation, $policy_id, $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() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'enableFilterPolicy' + * + * @param string $organisation (required) + * @param string $policy_id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['enableFilterPolicy'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function enableFilterPolicyRequest($organisation, $policy_id, string $contentType = self::contentTypes['enableFilterPolicy'][0]) + { + + // verify the required parameter 'organisation' is set + if ($organisation === null || (is_array($organisation) && count($organisation) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organisation when calling enableFilterPolicy' + ); + } + + // verify the required parameter 'policy_id' is set + if ($policy_id === null || (is_array($policy_id) && count($policy_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $policy_id when calling enableFilterPolicy' + ); + } + + + $resourcePath = '/api/v3/organizations/{organisation}/ai/filter-policies/{policyId}/enable'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($organisation !== null) { + $resourcePath = str_replace( + '{' . 'organisation' . '}', + ObjectSerializer::toPathValue($organisation), + $resourcePath + ); + } + // path params + if ($policy_id !== null) { + $resourcePath = str_replace( + '{' . 'policyId' . '}', + ObjectSerializer::toPathValue($policy_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getFilterPolicy + * + * Get a specific AI filter policy + * + * @param string $organisation organisation (required) + * @param string $policy_id policy_id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getFilterPolicy'] 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 object + */ + public function getFilterPolicy($organisation, $policy_id, string $contentType = self::contentTypes['getFilterPolicy'][0]) + { + list($response) = $this->getFilterPolicyWithHttpInfo($organisation, $policy_id, $contentType); + return $response; + } + + /** + * Operation getFilterPolicyWithHttpInfo + * + * Get a specific AI filter policy + * + * @param string $organisation (required) + * @param string $policy_id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getFilterPolicy'] 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 object, HTTP status code, HTTP response headers (array of strings) + */ + public function getFilterPolicyWithHttpInfo($organisation, $policy_id, string $contentType = self::contentTypes['getFilterPolicy'][0]) + { + $request = $this->getFilterPolicyRequest($organisation, $policy_id, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + 'object', + $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 $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'object', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation getFilterPolicyAsync + * + * Get a specific AI filter policy + * + * @param string $organisation (required) + * @param string $policy_id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getFilterPolicy'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getFilterPolicyAsync($organisation, $policy_id, string $contentType = self::contentTypes['getFilterPolicy'][0]) + { + return $this->getFilterPolicyAsyncWithHttpInfo($organisation, $policy_id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getFilterPolicyAsyncWithHttpInfo + * + * Get a specific AI filter policy + * + * @param string $organisation (required) + * @param string $policy_id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getFilterPolicy'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getFilterPolicyAsyncWithHttpInfo($organisation, $policy_id, string $contentType = self::contentTypes['getFilterPolicy'][0]) + { + $returnType = 'object'; + $request = $this->getFilterPolicyRequest($organisation, $policy_id, $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() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getFilterPolicy' + * + * @param string $organisation (required) + * @param string $policy_id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getFilterPolicy'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getFilterPolicyRequest($organisation, $policy_id, string $contentType = self::contentTypes['getFilterPolicy'][0]) + { + + // verify the required parameter 'organisation' is set + if ($organisation === null || (is_array($organisation) && count($organisation) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organisation when calling getFilterPolicy' + ); + } + + // verify the required parameter 'policy_id' is set + if ($policy_id === null || (is_array($policy_id) && count($policy_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $policy_id when calling getFilterPolicy' + ); + } + + + $resourcePath = '/api/v3/organizations/{organisation}/ai/filter-policies/{policyId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($organisation !== null) { + $resourcePath = str_replace( + '{' . 'organisation' . '}', + ObjectSerializer::toPathValue($organisation), + $resourcePath + ); + } + // path params + if ($policy_id !== null) { + $resourcePath = str_replace( + '{' . 'policyId' . '}', + ObjectSerializer::toPathValue($policy_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation listFilterPolicies + * + * List AI filter policies for an organisation + * + * @param string $organisation The organisation ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listFilterPolicies'] 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 object + */ + public function listFilterPolicies($organisation, string $contentType = self::contentTypes['listFilterPolicies'][0]) + { + list($response) = $this->listFilterPoliciesWithHttpInfo($organisation, $contentType); + return $response; + } + + /** + * Operation listFilterPoliciesWithHttpInfo + * + * List AI filter policies for an organisation + * + * @param string $organisation The organisation ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listFilterPolicies'] 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 object, HTTP status code, HTTP response headers (array of strings) + */ + public function listFilterPoliciesWithHttpInfo($organisation, string $contentType = self::contentTypes['listFilterPolicies'][0]) + { + $request = $this->listFilterPoliciesRequest($organisation, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + 'object', + $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 $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'object', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation listFilterPoliciesAsync + * + * List AI filter policies for an organisation + * + * @param string $organisation The organisation ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listFilterPolicies'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listFilterPoliciesAsync($organisation, string $contentType = self::contentTypes['listFilterPolicies'][0]) + { + return $this->listFilterPoliciesAsyncWithHttpInfo($organisation, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listFilterPoliciesAsyncWithHttpInfo + * + * List AI filter policies for an organisation + * + * @param string $organisation The organisation ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listFilterPolicies'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listFilterPoliciesAsyncWithHttpInfo($organisation, string $contentType = self::contentTypes['listFilterPolicies'][0]) + { + $returnType = 'object'; + $request = $this->listFilterPoliciesRequest($organisation, $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() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'listFilterPolicies' + * + * @param string $organisation The organisation ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listFilterPolicies'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listFilterPoliciesRequest($organisation, string $contentType = self::contentTypes['listFilterPolicies'][0]) + { + + // verify the required parameter 'organisation' is set + if ($organisation === null || (is_array($organisation) && count($organisation) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organisation when calling listFilterPolicies' + ); + } + + + $resourcePath = '/api/v3/organizations/{organisation}/ai/filter-policies'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($organisation !== null) { + $resourcePath = str_replace( + '{' . 'organisation' . '}', + ObjectSerializer::toPathValue($organisation), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation updateFilterPolicy + * + * Update a specific AI filter policy + * + * @param string $organisation organisation (required) + * @param string $policy_id policy_id (required) + * @param \QuantClient\Model\UpdateFilterPolicyRequest $update_filter_policy_request update_filter_policy_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateFilterPolicy'] 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 object + */ + public function updateFilterPolicy($organisation, $policy_id, $update_filter_policy_request, string $contentType = self::contentTypes['updateFilterPolicy'][0]) + { + list($response) = $this->updateFilterPolicyWithHttpInfo($organisation, $policy_id, $update_filter_policy_request, $contentType); + return $response; + } + + /** + * Operation updateFilterPolicyWithHttpInfo + * + * Update a specific AI filter policy + * + * @param string $organisation (required) + * @param string $policy_id (required) + * @param \QuantClient\Model\UpdateFilterPolicyRequest $update_filter_policy_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateFilterPolicy'] 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 object, HTTP status code, HTTP response headers (array of strings) + */ + public function updateFilterPolicyWithHttpInfo($organisation, $policy_id, $update_filter_policy_request, string $contentType = self::contentTypes['updateFilterPolicy'][0]) + { + $request = $this->updateFilterPolicyRequest($organisation, $policy_id, $update_filter_policy_request, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + 'object', + $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 $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'object', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation updateFilterPolicyAsync + * + * Update a specific AI filter policy + * + * @param string $organisation (required) + * @param string $policy_id (required) + * @param \QuantClient\Model\UpdateFilterPolicyRequest $update_filter_policy_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateFilterPolicy'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateFilterPolicyAsync($organisation, $policy_id, $update_filter_policy_request, string $contentType = self::contentTypes['updateFilterPolicy'][0]) + { + return $this->updateFilterPolicyAsyncWithHttpInfo($organisation, $policy_id, $update_filter_policy_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation updateFilterPolicyAsyncWithHttpInfo + * + * Update a specific AI filter policy + * + * @param string $organisation (required) + * @param string $policy_id (required) + * @param \QuantClient\Model\UpdateFilterPolicyRequest $update_filter_policy_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateFilterPolicy'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateFilterPolicyAsyncWithHttpInfo($organisation, $policy_id, $update_filter_policy_request, string $contentType = self::contentTypes['updateFilterPolicy'][0]) + { + $returnType = 'object'; + $request = $this->updateFilterPolicyRequest($organisation, $policy_id, $update_filter_policy_request, $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() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'updateFilterPolicy' + * + * @param string $organisation (required) + * @param string $policy_id (required) + * @param \QuantClient\Model\UpdateFilterPolicyRequest $update_filter_policy_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateFilterPolicy'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function updateFilterPolicyRequest($organisation, $policy_id, $update_filter_policy_request, string $contentType = self::contentTypes['updateFilterPolicy'][0]) + { + + // verify the required parameter 'organisation' is set + if ($organisation === null || (is_array($organisation) && count($organisation) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organisation when calling updateFilterPolicy' + ); + } + + // verify the required parameter 'policy_id' is set + if ($policy_id === null || (is_array($policy_id) && count($policy_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $policy_id when calling updateFilterPolicy' + ); + } + + // verify the required parameter 'update_filter_policy_request' is set + if ($update_filter_policy_request === null || (is_array($update_filter_policy_request) && count($update_filter_policy_request) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $update_filter_policy_request when calling updateFilterPolicy' + ); + } + + + $resourcePath = '/api/v3/organizations/{organisation}/ai/filter-policies/{policyId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($organisation !== null) { + $resourcePath = str_replace( + '{' . 'organisation' . '}', + ObjectSerializer::toPathValue($organisation), + $resourcePath + ); + } + // path params + if ($policy_id !== null) { + $resourcePath = str_replace( + '{' . 'policyId' . '}', + ObjectSerializer::toPathValue($policy_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($update_filter_policy_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($update_filter_policy_request)); + } else { + $httpBody = $update_filter_policy_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + 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/AIGovernanceApi.php b/src/Api/AIGovernanceApi.php new file mode 100644 index 0000000..89ed87d --- /dev/null +++ b/src/Api/AIGovernanceApi.php @@ -0,0 +1,1030 @@ + [ + 'application/json', + ], + 'getGovernanceSpend' => [ + 'application/json', + ], + 'updateGovernanceConfig' => [ + 'application/json', + ], + ]; + + /** + * @param ClientInterface $client + * @param Configuration $config + * @param HeaderSelector $selector + * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec + */ + public function __construct( + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0 + ) { + $this->client = $client ?: new Client(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation getGovernanceConfig + * + * Get AI governance configuration for an organisation + * + * @param string $organisation The organisation ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getGovernanceConfig'] 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\GetGovernanceConfig200Response + */ + public function getGovernanceConfig($organisation, string $contentType = self::contentTypes['getGovernanceConfig'][0]) + { + list($response) = $this->getGovernanceConfigWithHttpInfo($organisation, $contentType); + return $response; + } + + /** + * Operation getGovernanceConfigWithHttpInfo + * + * Get AI governance configuration for an organisation + * + * @param string $organisation The organisation ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getGovernanceConfig'] 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\GetGovernanceConfig200Response, HTTP status code, HTTP response headers (array of strings) + */ + public function getGovernanceConfigWithHttpInfo($organisation, string $contentType = self::contentTypes['getGovernanceConfig'][0]) + { + $request = $this->getGovernanceConfigRequest($organisation, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\QuantClient\Model\GetGovernanceConfig200Response', + $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 $this->handleResponseWithDataType( + '\QuantClient\Model\GetGovernanceConfig200Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\QuantClient\Model\GetGovernanceConfig200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation getGovernanceConfigAsync + * + * Get AI governance configuration for an organisation + * + * @param string $organisation The organisation ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getGovernanceConfig'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getGovernanceConfigAsync($organisation, string $contentType = self::contentTypes['getGovernanceConfig'][0]) + { + return $this->getGovernanceConfigAsyncWithHttpInfo($organisation, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getGovernanceConfigAsyncWithHttpInfo + * + * Get AI governance configuration for an organisation + * + * @param string $organisation The organisation ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getGovernanceConfig'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getGovernanceConfigAsyncWithHttpInfo($organisation, string $contentType = self::contentTypes['getGovernanceConfig'][0]) + { + $returnType = '\QuantClient\Model\GetGovernanceConfig200Response'; + $request = $this->getGovernanceConfigRequest($organisation, $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() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getGovernanceConfig' + * + * @param string $organisation The organisation ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getGovernanceConfig'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getGovernanceConfigRequest($organisation, string $contentType = self::contentTypes['getGovernanceConfig'][0]) + { + + // verify the required parameter 'organisation' is set + if ($organisation === null || (is_array($organisation) && count($organisation) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organisation when calling getGovernanceConfig' + ); + } + + + $resourcePath = '/api/v3/organizations/{organisation}/ai/governance'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($organisation !== null) { + $resourcePath = str_replace( + '{' . 'organisation' . '}', + ObjectSerializer::toPathValue($organisation), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getGovernanceSpend + * + * Get AI spend summary for an organisation + * + * @param string $organisation The organisation ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getGovernanceSpend'] 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 object + */ + public function getGovernanceSpend($organisation, string $contentType = self::contentTypes['getGovernanceSpend'][0]) + { + list($response) = $this->getGovernanceSpendWithHttpInfo($organisation, $contentType); + return $response; + } + + /** + * Operation getGovernanceSpendWithHttpInfo + * + * Get AI spend summary for an organisation + * + * @param string $organisation The organisation ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getGovernanceSpend'] 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 object, HTTP status code, HTTP response headers (array of strings) + */ + public function getGovernanceSpendWithHttpInfo($organisation, string $contentType = self::contentTypes['getGovernanceSpend'][0]) + { + $request = $this->getGovernanceSpendRequest($organisation, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + 'object', + $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 $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'object', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation getGovernanceSpendAsync + * + * Get AI spend summary for an organisation + * + * @param string $organisation The organisation ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getGovernanceSpend'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getGovernanceSpendAsync($organisation, string $contentType = self::contentTypes['getGovernanceSpend'][0]) + { + return $this->getGovernanceSpendAsyncWithHttpInfo($organisation, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getGovernanceSpendAsyncWithHttpInfo + * + * Get AI spend summary for an organisation + * + * @param string $organisation The organisation ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getGovernanceSpend'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getGovernanceSpendAsyncWithHttpInfo($organisation, string $contentType = self::contentTypes['getGovernanceSpend'][0]) + { + $returnType = 'object'; + $request = $this->getGovernanceSpendRequest($organisation, $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() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getGovernanceSpend' + * + * @param string $organisation The organisation ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getGovernanceSpend'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getGovernanceSpendRequest($organisation, string $contentType = self::contentTypes['getGovernanceSpend'][0]) + { + + // verify the required parameter 'organisation' is set + if ($organisation === null || (is_array($organisation) && count($organisation) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organisation when calling getGovernanceSpend' + ); + } + + + $resourcePath = '/api/v3/organizations/{organisation}/ai/governance/spend'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($organisation !== null) { + $resourcePath = str_replace( + '{' . 'organisation' . '}', + ObjectSerializer::toPathValue($organisation), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation updateGovernanceConfig + * + * Update AI governance configuration for an organisation + * + * @param string $organisation The organisation ID (required) + * @param \QuantClient\Model\UpdateGovernanceConfigRequest $update_governance_config_request update_governance_config_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateGovernanceConfig'] 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\UpdateGovernanceConfig200Response + */ + public function updateGovernanceConfig($organisation, $update_governance_config_request, string $contentType = self::contentTypes['updateGovernanceConfig'][0]) + { + list($response) = $this->updateGovernanceConfigWithHttpInfo($organisation, $update_governance_config_request, $contentType); + return $response; + } + + /** + * Operation updateGovernanceConfigWithHttpInfo + * + * Update AI governance configuration for an organisation + * + * @param string $organisation The organisation ID (required) + * @param \QuantClient\Model\UpdateGovernanceConfigRequest $update_governance_config_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateGovernanceConfig'] 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\UpdateGovernanceConfig200Response, HTTP status code, HTTP response headers (array of strings) + */ + public function updateGovernanceConfigWithHttpInfo($organisation, $update_governance_config_request, string $contentType = self::contentTypes['updateGovernanceConfig'][0]) + { + $request = $this->updateGovernanceConfigRequest($organisation, $update_governance_config_request, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\QuantClient\Model\UpdateGovernanceConfig200Response', + $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 $this->handleResponseWithDataType( + '\QuantClient\Model\UpdateGovernanceConfig200Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\QuantClient\Model\UpdateGovernanceConfig200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation updateGovernanceConfigAsync + * + * Update AI governance configuration for an organisation + * + * @param string $organisation The organisation ID (required) + * @param \QuantClient\Model\UpdateGovernanceConfigRequest $update_governance_config_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateGovernanceConfig'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateGovernanceConfigAsync($organisation, $update_governance_config_request, string $contentType = self::contentTypes['updateGovernanceConfig'][0]) + { + return $this->updateGovernanceConfigAsyncWithHttpInfo($organisation, $update_governance_config_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation updateGovernanceConfigAsyncWithHttpInfo + * + * Update AI governance configuration for an organisation + * + * @param string $organisation The organisation ID (required) + * @param \QuantClient\Model\UpdateGovernanceConfigRequest $update_governance_config_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateGovernanceConfig'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateGovernanceConfigAsyncWithHttpInfo($organisation, $update_governance_config_request, string $contentType = self::contentTypes['updateGovernanceConfig'][0]) + { + $returnType = '\QuantClient\Model\UpdateGovernanceConfig200Response'; + $request = $this->updateGovernanceConfigRequest($organisation, $update_governance_config_request, $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() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'updateGovernanceConfig' + * + * @param string $organisation The organisation ID (required) + * @param \QuantClient\Model\UpdateGovernanceConfigRequest $update_governance_config_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateGovernanceConfig'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function updateGovernanceConfigRequest($organisation, $update_governance_config_request, string $contentType = self::contentTypes['updateGovernanceConfig'][0]) + { + + // verify the required parameter 'organisation' is set + if ($organisation === null || (is_array($organisation) && count($organisation) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organisation when calling updateGovernanceConfig' + ); + } + + // verify the required parameter 'update_governance_config_request' is set + if ($update_governance_config_request === null || (is_array($update_governance_config_request) && count($update_governance_config_request) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $update_governance_config_request when calling updateGovernanceConfig' + ); + } + + + $resourcePath = '/api/v3/organizations/{organisation}/ai/governance'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($organisation !== null) { + $resourcePath = str_replace( + '{' . 'organisation' . '}', + ObjectSerializer::toPathValue($organisation), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($update_governance_config_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($update_governance_config_request)); + } else { + $httpBody = $update_governance_config_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + 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 f121629..354e0e8 100644 --- a/src/Api/AIInferenceApi.php +++ b/src/Api/AIInferenceApi.php @@ -14,7 +14,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Api/AIModelsApi.php b/src/Api/AIModelsApi.php index f6d3f45..82a42fa 100644 --- a/src/Api/AIModelsApi.php +++ b/src/Api/AIModelsApi.php @@ -14,7 +14,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Api/AIMonitoringApi.php b/src/Api/AIMonitoringApi.php index 7a9137d..3edf54e 100644 --- a/src/Api/AIMonitoringApi.php +++ b/src/Api/AIMonitoringApi.php @@ -14,7 +14,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Api/AIOrchestrationsApi.php b/src/Api/AIOrchestrationsApi.php new file mode 100644 index 0000000..25c0b7c --- /dev/null +++ b/src/Api/AIOrchestrationsApi.php @@ -0,0 +1,2857 @@ + [ + 'application/json', + ], + 'createOrchestration' => [ + 'application/json', + ], + 'deleteOrchestration' => [ + 'application/json', + ], + 'getOrchestration' => [ + 'application/json', + ], + 'listOrchestrationBatches' => [ + 'application/json', + ], + 'listOrchestrations' => [ + 'application/json', + ], + 'pauseOrchestration' => [ + 'application/json', + ], + 'resumeOrchestration' => [ + 'application/json', + ], + 'startOrchestration' => [ + 'application/json', + ], + ]; + + /** + * @param ClientInterface $client + * @param Configuration $config + * @param HeaderSelector $selector + * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec + */ + public function __construct( + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0 + ) { + $this->client = $client ?: new Client(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation cancelOrchestration + * + * Cancel Durable Orchestration + * + * @param string $organisation The organisation machine name (required) + * @param string $orchestration_id Orchestration identifier (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cancelOrchestration'] 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 object + */ + public function cancelOrchestration($organisation, $orchestration_id, string $contentType = self::contentTypes['cancelOrchestration'][0]) + { + list($response) = $this->cancelOrchestrationWithHttpInfo($organisation, $orchestration_id, $contentType); + return $response; + } + + /** + * Operation cancelOrchestrationWithHttpInfo + * + * Cancel Durable Orchestration + * + * @param string $organisation The organisation machine name (required) + * @param string $orchestration_id Orchestration identifier (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cancelOrchestration'] 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 object, HTTP status code, HTTP response headers (array of strings) + */ + public function cancelOrchestrationWithHttpInfo($organisation, $orchestration_id, string $contentType = self::contentTypes['cancelOrchestration'][0]) + { + $request = $this->cancelOrchestrationRequest($organisation, $orchestration_id, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + 'object', + $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 $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'object', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation cancelOrchestrationAsync + * + * Cancel Durable Orchestration + * + * @param string $organisation The organisation machine name (required) + * @param string $orchestration_id Orchestration identifier (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cancelOrchestration'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function cancelOrchestrationAsync($organisation, $orchestration_id, string $contentType = self::contentTypes['cancelOrchestration'][0]) + { + return $this->cancelOrchestrationAsyncWithHttpInfo($organisation, $orchestration_id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation cancelOrchestrationAsyncWithHttpInfo + * + * Cancel Durable Orchestration + * + * @param string $organisation The organisation machine name (required) + * @param string $orchestration_id Orchestration identifier (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cancelOrchestration'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function cancelOrchestrationAsyncWithHttpInfo($organisation, $orchestration_id, string $contentType = self::contentTypes['cancelOrchestration'][0]) + { + $returnType = 'object'; + $request = $this->cancelOrchestrationRequest($organisation, $orchestration_id, $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() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'cancelOrchestration' + * + * @param string $organisation The organisation machine name (required) + * @param string $orchestration_id Orchestration identifier (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cancelOrchestration'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function cancelOrchestrationRequest($organisation, $orchestration_id, string $contentType = self::contentTypes['cancelOrchestration'][0]) + { + + // verify the required parameter 'organisation' is set + if ($organisation === null || (is_array($organisation) && count($organisation) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organisation when calling cancelOrchestration' + ); + } + + // verify the required parameter 'orchestration_id' is set + if ($orchestration_id === null || (is_array($orchestration_id) && count($orchestration_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $orchestration_id when calling cancelOrchestration' + ); + } + + + $resourcePath = '/api/v3/organizations/{organisation}/ai/orchestrations/{orchestrationId}/cancel'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($organisation !== null) { + $resourcePath = str_replace( + '{' . 'organisation' . '}', + ObjectSerializer::toPathValue($organisation), + $resourcePath + ); + } + // path params + if ($orchestration_id !== null) { + $resourcePath = str_replace( + '{' . 'orchestrationId' . '}', + ObjectSerializer::toPathValue($orchestration_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation createOrchestration + * + * Create Durable Orchestration + * + * @param string $organisation The organisation machine name (required) + * @param \QuantClient\Model\CreateOrchestrationRequest $create_orchestration_request create_orchestration_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createOrchestration'] 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 object + */ + public function createOrchestration($organisation, $create_orchestration_request, string $contentType = self::contentTypes['createOrchestration'][0]) + { + list($response) = $this->createOrchestrationWithHttpInfo($organisation, $create_orchestration_request, $contentType); + return $response; + } + + /** + * Operation createOrchestrationWithHttpInfo + * + * Create Durable Orchestration + * + * @param string $organisation The organisation machine name (required) + * @param \QuantClient\Model\CreateOrchestrationRequest $create_orchestration_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createOrchestration'] 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 object, HTTP status code, HTTP response headers (array of strings) + */ + public function createOrchestrationWithHttpInfo($organisation, $create_orchestration_request, string $contentType = self::contentTypes['createOrchestration'][0]) + { + $request = $this->createOrchestrationRequest($organisation, $create_orchestration_request, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 201: + return $this->handleResponseWithDataType( + 'object', + $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 $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'object', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation createOrchestrationAsync + * + * Create Durable Orchestration + * + * @param string $organisation The organisation machine name (required) + * @param \QuantClient\Model\CreateOrchestrationRequest $create_orchestration_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createOrchestration'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createOrchestrationAsync($organisation, $create_orchestration_request, string $contentType = self::contentTypes['createOrchestration'][0]) + { + return $this->createOrchestrationAsyncWithHttpInfo($organisation, $create_orchestration_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createOrchestrationAsyncWithHttpInfo + * + * Create Durable Orchestration + * + * @param string $organisation The organisation machine name (required) + * @param \QuantClient\Model\CreateOrchestrationRequest $create_orchestration_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createOrchestration'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createOrchestrationAsyncWithHttpInfo($organisation, $create_orchestration_request, string $contentType = self::contentTypes['createOrchestration'][0]) + { + $returnType = 'object'; + $request = $this->createOrchestrationRequest($organisation, $create_orchestration_request, $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() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createOrchestration' + * + * @param string $organisation The organisation machine name (required) + * @param \QuantClient\Model\CreateOrchestrationRequest $create_orchestration_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createOrchestration'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function createOrchestrationRequest($organisation, $create_orchestration_request, string $contentType = self::contentTypes['createOrchestration'][0]) + { + + // verify the required parameter 'organisation' is set + if ($organisation === null || (is_array($organisation) && count($organisation) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organisation when calling createOrchestration' + ); + } + + // verify the required parameter 'create_orchestration_request' is set + if ($create_orchestration_request === null || (is_array($create_orchestration_request) && count($create_orchestration_request) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $create_orchestration_request when calling createOrchestration' + ); + } + + + $resourcePath = '/api/v3/organizations/{organisation}/ai/orchestrations'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($organisation !== null) { + $resourcePath = str_replace( + '{' . 'organisation' . '}', + ObjectSerializer::toPathValue($organisation), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($create_orchestration_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($create_orchestration_request)); + } else { + $httpBody = $create_orchestration_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation deleteOrchestration + * + * Delete Durable Orchestration + * + * @param string $organisation The organisation machine name (required) + * @param string $orchestration_id Orchestration identifier (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteOrchestration'] 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 void + */ + public function deleteOrchestration($organisation, $orchestration_id, string $contentType = self::contentTypes['deleteOrchestration'][0]) + { + $this->deleteOrchestrationWithHttpInfo($organisation, $orchestration_id, $contentType); + } + + /** + * Operation deleteOrchestrationWithHttpInfo + * + * Delete Durable Orchestration + * + * @param string $organisation The organisation machine name (required) + * @param string $orchestration_id Orchestration identifier (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteOrchestration'] 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 null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteOrchestrationWithHttpInfo($organisation, $orchestration_id, string $contentType = self::contentTypes['deleteOrchestration'][0]) + { + $request = $this->deleteOrchestrationRequest($organisation, $orchestration_id, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { + switch ($e->getCode()) { + } + + + throw $e; + } + } + + /** + * Operation deleteOrchestrationAsync + * + * Delete Durable Orchestration + * + * @param string $organisation The organisation machine name (required) + * @param string $orchestration_id Orchestration identifier (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteOrchestration'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteOrchestrationAsync($organisation, $orchestration_id, string $contentType = self::contentTypes['deleteOrchestration'][0]) + { + return $this->deleteOrchestrationAsyncWithHttpInfo($organisation, $orchestration_id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteOrchestrationAsyncWithHttpInfo + * + * Delete Durable Orchestration + * + * @param string $organisation The organisation machine name (required) + * @param string $orchestration_id Orchestration identifier (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteOrchestration'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteOrchestrationAsyncWithHttpInfo($organisation, $orchestration_id, string $contentType = self::contentTypes['deleteOrchestration'][0]) + { + $returnType = ''; + $request = $this->deleteOrchestrationRequest($organisation, $orchestration_id, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'deleteOrchestration' + * + * @param string $organisation The organisation machine name (required) + * @param string $orchestration_id Orchestration identifier (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteOrchestration'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function deleteOrchestrationRequest($organisation, $orchestration_id, string $contentType = self::contentTypes['deleteOrchestration'][0]) + { + + // verify the required parameter 'organisation' is set + if ($organisation === null || (is_array($organisation) && count($organisation) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organisation when calling deleteOrchestration' + ); + } + + // verify the required parameter 'orchestration_id' is set + if ($orchestration_id === null || (is_array($orchestration_id) && count($orchestration_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $orchestration_id when calling deleteOrchestration' + ); + } + + + $resourcePath = '/api/v3/organizations/{organisation}/ai/orchestrations/{orchestrationId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($organisation !== null) { + $resourcePath = str_replace( + '{' . 'organisation' . '}', + ObjectSerializer::toPathValue($organisation), + $resourcePath + ); + } + // path params + if ($orchestration_id !== null) { + $resourcePath = str_replace( + '{' . 'orchestrationId' . '}', + ObjectSerializer::toPathValue($orchestration_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + [], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getOrchestration + * + * Get Durable Orchestration + * + * @param string $organisation The organisation machine name (required) + * @param string $orchestration_id Orchestration identifier (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOrchestration'] 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 object + */ + public function getOrchestration($organisation, $orchestration_id, string $contentType = self::contentTypes['getOrchestration'][0]) + { + list($response) = $this->getOrchestrationWithHttpInfo($organisation, $orchestration_id, $contentType); + return $response; + } + + /** + * Operation getOrchestrationWithHttpInfo + * + * Get Durable Orchestration + * + * @param string $organisation The organisation machine name (required) + * @param string $orchestration_id Orchestration identifier (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOrchestration'] 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 object, HTTP status code, HTTP response headers (array of strings) + */ + public function getOrchestrationWithHttpInfo($organisation, $orchestration_id, string $contentType = self::contentTypes['getOrchestration'][0]) + { + $request = $this->getOrchestrationRequest($organisation, $orchestration_id, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + 'object', + $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 $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'object', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation getOrchestrationAsync + * + * Get Durable Orchestration + * + * @param string $organisation The organisation machine name (required) + * @param string $orchestration_id Orchestration identifier (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOrchestration'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getOrchestrationAsync($organisation, $orchestration_id, string $contentType = self::contentTypes['getOrchestration'][0]) + { + return $this->getOrchestrationAsyncWithHttpInfo($organisation, $orchestration_id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getOrchestrationAsyncWithHttpInfo + * + * Get Durable Orchestration + * + * @param string $organisation The organisation machine name (required) + * @param string $orchestration_id Orchestration identifier (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOrchestration'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getOrchestrationAsyncWithHttpInfo($organisation, $orchestration_id, string $contentType = self::contentTypes['getOrchestration'][0]) + { + $returnType = 'object'; + $request = $this->getOrchestrationRequest($organisation, $orchestration_id, $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() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getOrchestration' + * + * @param string $organisation The organisation machine name (required) + * @param string $orchestration_id Orchestration identifier (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOrchestration'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getOrchestrationRequest($organisation, $orchestration_id, string $contentType = self::contentTypes['getOrchestration'][0]) + { + + // verify the required parameter 'organisation' is set + if ($organisation === null || (is_array($organisation) && count($organisation) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organisation when calling getOrchestration' + ); + } + + // verify the required parameter 'orchestration_id' is set + if ($orchestration_id === null || (is_array($orchestration_id) && count($orchestration_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $orchestration_id when calling getOrchestration' + ); + } + + + $resourcePath = '/api/v3/organizations/{organisation}/ai/orchestrations/{orchestrationId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($organisation !== null) { + $resourcePath = str_replace( + '{' . 'organisation' . '}', + ObjectSerializer::toPathValue($organisation), + $resourcePath + ); + } + // path params + if ($orchestration_id !== null) { + $resourcePath = str_replace( + '{' . 'orchestrationId' . '}', + ObjectSerializer::toPathValue($orchestration_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation listOrchestrationBatches + * + * List Orchestration Batches + * + * @param string $organisation The organisation machine name (required) + * @param string $orchestration_id Orchestration identifier (required) + * @param int|null $limit Maximum number of batches to return (optional, default to 20) + * @param string|null $cursor Pagination cursor from previous response (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listOrchestrationBatches'] 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\ListOrchestrationBatches200Response + */ + public function listOrchestrationBatches($organisation, $orchestration_id, $limit = 20, $cursor = null, string $contentType = self::contentTypes['listOrchestrationBatches'][0]) + { + list($response) = $this->listOrchestrationBatchesWithHttpInfo($organisation, $orchestration_id, $limit, $cursor, $contentType); + return $response; + } + + /** + * Operation listOrchestrationBatchesWithHttpInfo + * + * List Orchestration Batches + * + * @param string $organisation The organisation machine name (required) + * @param string $orchestration_id Orchestration identifier (required) + * @param int|null $limit Maximum number of batches to return (optional, default to 20) + * @param string|null $cursor Pagination cursor from previous response (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listOrchestrationBatches'] 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\ListOrchestrationBatches200Response, HTTP status code, HTTP response headers (array of strings) + */ + public function listOrchestrationBatchesWithHttpInfo($organisation, $orchestration_id, $limit = 20, $cursor = null, string $contentType = self::contentTypes['listOrchestrationBatches'][0]) + { + $request = $this->listOrchestrationBatchesRequest($organisation, $orchestration_id, $limit, $cursor, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\QuantClient\Model\ListOrchestrationBatches200Response', + $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 $this->handleResponseWithDataType( + '\QuantClient\Model\ListOrchestrationBatches200Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\QuantClient\Model\ListOrchestrationBatches200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation listOrchestrationBatchesAsync + * + * List Orchestration Batches + * + * @param string $organisation The organisation machine name (required) + * @param string $orchestration_id Orchestration identifier (required) + * @param int|null $limit Maximum number of batches to return (optional, default to 20) + * @param string|null $cursor Pagination cursor from previous response (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listOrchestrationBatches'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listOrchestrationBatchesAsync($organisation, $orchestration_id, $limit = 20, $cursor = null, string $contentType = self::contentTypes['listOrchestrationBatches'][0]) + { + return $this->listOrchestrationBatchesAsyncWithHttpInfo($organisation, $orchestration_id, $limit, $cursor, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listOrchestrationBatchesAsyncWithHttpInfo + * + * List Orchestration Batches + * + * @param string $organisation The organisation machine name (required) + * @param string $orchestration_id Orchestration identifier (required) + * @param int|null $limit Maximum number of batches to return (optional, default to 20) + * @param string|null $cursor Pagination cursor from previous response (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listOrchestrationBatches'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listOrchestrationBatchesAsyncWithHttpInfo($organisation, $orchestration_id, $limit = 20, $cursor = null, string $contentType = self::contentTypes['listOrchestrationBatches'][0]) + { + $returnType = '\QuantClient\Model\ListOrchestrationBatches200Response'; + $request = $this->listOrchestrationBatchesRequest($organisation, $orchestration_id, $limit, $cursor, $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() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'listOrchestrationBatches' + * + * @param string $organisation The organisation machine name (required) + * @param string $orchestration_id Orchestration identifier (required) + * @param int|null $limit Maximum number of batches to return (optional, default to 20) + * @param string|null $cursor Pagination cursor from previous response (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listOrchestrationBatches'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listOrchestrationBatchesRequest($organisation, $orchestration_id, $limit = 20, $cursor = null, string $contentType = self::contentTypes['listOrchestrationBatches'][0]) + { + + // verify the required parameter 'organisation' is set + if ($organisation === null || (is_array($organisation) && count($organisation) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organisation when calling listOrchestrationBatches' + ); + } + + // verify the required parameter 'orchestration_id' is set + if ($orchestration_id === null || (is_array($orchestration_id) && count($orchestration_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $orchestration_id when calling listOrchestrationBatches' + ); + } + + if ($limit !== null && $limit > 100) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling AIOrchestrationsApi.listOrchestrationBatches, must be smaller than or equal to 100.'); + } + if ($limit !== null && $limit < 1) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling AIOrchestrationsApi.listOrchestrationBatches, must be bigger than or equal to 1.'); + } + + + + $resourcePath = '/api/v3/organizations/{organisation}/ai/orchestrations/{orchestrationId}/batches'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $limit, + 'limit', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $cursor, + 'cursor', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + // path params + if ($organisation !== null) { + $resourcePath = str_replace( + '{' . 'organisation' . '}', + ObjectSerializer::toPathValue($organisation), + $resourcePath + ); + } + // path params + if ($orchestration_id !== null) { + $resourcePath = str_replace( + '{' . 'orchestrationId' . '}', + ObjectSerializer::toPathValue($orchestration_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation listOrchestrations + * + * List Durable Orchestrations + * + * @param string $organisation The organisation machine name (required) + * @param string|null $status Filter by orchestration status (optional) + * @param int|null $limit Maximum number of results (optional, default to 20) + * @param string|null $cursor Pagination cursor from previous response (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listOrchestrations'] 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\ListOrchestrations200Response + */ + public function listOrchestrations($organisation, $status = null, $limit = 20, $cursor = null, string $contentType = self::contentTypes['listOrchestrations'][0]) + { + list($response) = $this->listOrchestrationsWithHttpInfo($organisation, $status, $limit, $cursor, $contentType); + return $response; + } + + /** + * Operation listOrchestrationsWithHttpInfo + * + * List Durable Orchestrations + * + * @param string $organisation The organisation machine name (required) + * @param string|null $status Filter by orchestration status (optional) + * @param int|null $limit Maximum number of results (optional, default to 20) + * @param string|null $cursor Pagination cursor from previous response (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listOrchestrations'] 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\ListOrchestrations200Response, HTTP status code, HTTP response headers (array of strings) + */ + public function listOrchestrationsWithHttpInfo($organisation, $status = null, $limit = 20, $cursor = null, string $contentType = self::contentTypes['listOrchestrations'][0]) + { + $request = $this->listOrchestrationsRequest($organisation, $status, $limit, $cursor, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\QuantClient\Model\ListOrchestrations200Response', + $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 $this->handleResponseWithDataType( + '\QuantClient\Model\ListOrchestrations200Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\QuantClient\Model\ListOrchestrations200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation listOrchestrationsAsync + * + * List Durable Orchestrations + * + * @param string $organisation The organisation machine name (required) + * @param string|null $status Filter by orchestration status (optional) + * @param int|null $limit Maximum number of results (optional, default to 20) + * @param string|null $cursor Pagination cursor from previous response (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listOrchestrations'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listOrchestrationsAsync($organisation, $status = null, $limit = 20, $cursor = null, string $contentType = self::contentTypes['listOrchestrations'][0]) + { + return $this->listOrchestrationsAsyncWithHttpInfo($organisation, $status, $limit, $cursor, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listOrchestrationsAsyncWithHttpInfo + * + * List Durable Orchestrations + * + * @param string $organisation The organisation machine name (required) + * @param string|null $status Filter by orchestration status (optional) + * @param int|null $limit Maximum number of results (optional, default to 20) + * @param string|null $cursor Pagination cursor from previous response (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listOrchestrations'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listOrchestrationsAsyncWithHttpInfo($organisation, $status = null, $limit = 20, $cursor = null, string $contentType = self::contentTypes['listOrchestrations'][0]) + { + $returnType = '\QuantClient\Model\ListOrchestrations200Response'; + $request = $this->listOrchestrationsRequest($organisation, $status, $limit, $cursor, $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() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'listOrchestrations' + * + * @param string $organisation The organisation machine name (required) + * @param string|null $status Filter by orchestration status (optional) + * @param int|null $limit Maximum number of results (optional, default to 20) + * @param string|null $cursor Pagination cursor from previous response (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listOrchestrations'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listOrchestrationsRequest($organisation, $status = null, $limit = 20, $cursor = null, string $contentType = self::contentTypes['listOrchestrations'][0]) + { + + // verify the required parameter 'organisation' is set + if ($organisation === null || (is_array($organisation) && count($organisation) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organisation when calling listOrchestrations' + ); + } + + + if ($limit !== null && $limit > 100) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling AIOrchestrationsApi.listOrchestrations, must be smaller than or equal to 100.'); + } + if ($limit !== null && $limit < 1) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling AIOrchestrationsApi.listOrchestrations, must be bigger than or equal to 1.'); + } + + + + $resourcePath = '/api/v3/organizations/{organisation}/ai/orchestrations'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $status, + 'status', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $limit, + 'limit', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $cursor, + 'cursor', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + // path params + if ($organisation !== null) { + $resourcePath = str_replace( + '{' . 'organisation' . '}', + ObjectSerializer::toPathValue($organisation), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation pauseOrchestration + * + * Pause Durable Orchestration + * + * @param string $organisation The organisation machine name (required) + * @param string $orchestration_id Orchestration identifier (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['pauseOrchestration'] 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 object + */ + public function pauseOrchestration($organisation, $orchestration_id, string $contentType = self::contentTypes['pauseOrchestration'][0]) + { + list($response) = $this->pauseOrchestrationWithHttpInfo($organisation, $orchestration_id, $contentType); + return $response; + } + + /** + * Operation pauseOrchestrationWithHttpInfo + * + * Pause Durable Orchestration + * + * @param string $organisation The organisation machine name (required) + * @param string $orchestration_id Orchestration identifier (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['pauseOrchestration'] 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 object, HTTP status code, HTTP response headers (array of strings) + */ + public function pauseOrchestrationWithHttpInfo($organisation, $orchestration_id, string $contentType = self::contentTypes['pauseOrchestration'][0]) + { + $request = $this->pauseOrchestrationRequest($organisation, $orchestration_id, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + 'object', + $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 $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'object', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation pauseOrchestrationAsync + * + * Pause Durable Orchestration + * + * @param string $organisation The organisation machine name (required) + * @param string $orchestration_id Orchestration identifier (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['pauseOrchestration'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function pauseOrchestrationAsync($organisation, $orchestration_id, string $contentType = self::contentTypes['pauseOrchestration'][0]) + { + return $this->pauseOrchestrationAsyncWithHttpInfo($organisation, $orchestration_id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation pauseOrchestrationAsyncWithHttpInfo + * + * Pause Durable Orchestration + * + * @param string $organisation The organisation machine name (required) + * @param string $orchestration_id Orchestration identifier (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['pauseOrchestration'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function pauseOrchestrationAsyncWithHttpInfo($organisation, $orchestration_id, string $contentType = self::contentTypes['pauseOrchestration'][0]) + { + $returnType = 'object'; + $request = $this->pauseOrchestrationRequest($organisation, $orchestration_id, $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() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'pauseOrchestration' + * + * @param string $organisation The organisation machine name (required) + * @param string $orchestration_id Orchestration identifier (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['pauseOrchestration'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function pauseOrchestrationRequest($organisation, $orchestration_id, string $contentType = self::contentTypes['pauseOrchestration'][0]) + { + + // verify the required parameter 'organisation' is set + if ($organisation === null || (is_array($organisation) && count($organisation) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organisation when calling pauseOrchestration' + ); + } + + // verify the required parameter 'orchestration_id' is set + if ($orchestration_id === null || (is_array($orchestration_id) && count($orchestration_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $orchestration_id when calling pauseOrchestration' + ); + } + + + $resourcePath = '/api/v3/organizations/{organisation}/ai/orchestrations/{orchestrationId}/pause'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($organisation !== null) { + $resourcePath = str_replace( + '{' . 'organisation' . '}', + ObjectSerializer::toPathValue($organisation), + $resourcePath + ); + } + // path params + if ($orchestration_id !== null) { + $resourcePath = str_replace( + '{' . 'orchestrationId' . '}', + ObjectSerializer::toPathValue($orchestration_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation resumeOrchestration + * + * Resume Durable Orchestration + * + * @param string $organisation The organisation machine name (required) + * @param string $orchestration_id Orchestration identifier (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['resumeOrchestration'] 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 object + */ + public function resumeOrchestration($organisation, $orchestration_id, string $contentType = self::contentTypes['resumeOrchestration'][0]) + { + list($response) = $this->resumeOrchestrationWithHttpInfo($organisation, $orchestration_id, $contentType); + return $response; + } + + /** + * Operation resumeOrchestrationWithHttpInfo + * + * Resume Durable Orchestration + * + * @param string $organisation The organisation machine name (required) + * @param string $orchestration_id Orchestration identifier (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['resumeOrchestration'] 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 object, HTTP status code, HTTP response headers (array of strings) + */ + public function resumeOrchestrationWithHttpInfo($organisation, $orchestration_id, string $contentType = self::contentTypes['resumeOrchestration'][0]) + { + $request = $this->resumeOrchestrationRequest($organisation, $orchestration_id, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + 'object', + $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 $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'object', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation resumeOrchestrationAsync + * + * Resume Durable Orchestration + * + * @param string $organisation The organisation machine name (required) + * @param string $orchestration_id Orchestration identifier (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['resumeOrchestration'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function resumeOrchestrationAsync($organisation, $orchestration_id, string $contentType = self::contentTypes['resumeOrchestration'][0]) + { + return $this->resumeOrchestrationAsyncWithHttpInfo($organisation, $orchestration_id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation resumeOrchestrationAsyncWithHttpInfo + * + * Resume Durable Orchestration + * + * @param string $organisation The organisation machine name (required) + * @param string $orchestration_id Orchestration identifier (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['resumeOrchestration'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function resumeOrchestrationAsyncWithHttpInfo($organisation, $orchestration_id, string $contentType = self::contentTypes['resumeOrchestration'][0]) + { + $returnType = 'object'; + $request = $this->resumeOrchestrationRequest($organisation, $orchestration_id, $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() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'resumeOrchestration' + * + * @param string $organisation The organisation machine name (required) + * @param string $orchestration_id Orchestration identifier (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['resumeOrchestration'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function resumeOrchestrationRequest($organisation, $orchestration_id, string $contentType = self::contentTypes['resumeOrchestration'][0]) + { + + // verify the required parameter 'organisation' is set + if ($organisation === null || (is_array($organisation) && count($organisation) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organisation when calling resumeOrchestration' + ); + } + + // verify the required parameter 'orchestration_id' is set + if ($orchestration_id === null || (is_array($orchestration_id) && count($orchestration_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $orchestration_id when calling resumeOrchestration' + ); + } + + + $resourcePath = '/api/v3/organizations/{organisation}/ai/orchestrations/{orchestrationId}/resume'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($organisation !== null) { + $resourcePath = str_replace( + '{' . 'organisation' . '}', + ObjectSerializer::toPathValue($organisation), + $resourcePath + ); + } + // path params + if ($orchestration_id !== null) { + $resourcePath = str_replace( + '{' . 'orchestrationId' . '}', + ObjectSerializer::toPathValue($orchestration_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation startOrchestration + * + * Start Durable Orchestration + * + * @param string $organisation The organisation machine name (required) + * @param string $orchestration_id Orchestration identifier (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['startOrchestration'] 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 object + */ + public function startOrchestration($organisation, $orchestration_id, string $contentType = self::contentTypes['startOrchestration'][0]) + { + list($response) = $this->startOrchestrationWithHttpInfo($organisation, $orchestration_id, $contentType); + return $response; + } + + /** + * Operation startOrchestrationWithHttpInfo + * + * Start Durable Orchestration + * + * @param string $organisation The organisation machine name (required) + * @param string $orchestration_id Orchestration identifier (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['startOrchestration'] 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 object, HTTP status code, HTTP response headers (array of strings) + */ + public function startOrchestrationWithHttpInfo($organisation, $orchestration_id, string $contentType = self::contentTypes['startOrchestration'][0]) + { + $request = $this->startOrchestrationRequest($organisation, $orchestration_id, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + 'object', + $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 $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'object', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation startOrchestrationAsync + * + * Start Durable Orchestration + * + * @param string $organisation The organisation machine name (required) + * @param string $orchestration_id Orchestration identifier (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['startOrchestration'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function startOrchestrationAsync($organisation, $orchestration_id, string $contentType = self::contentTypes['startOrchestration'][0]) + { + return $this->startOrchestrationAsyncWithHttpInfo($organisation, $orchestration_id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation startOrchestrationAsyncWithHttpInfo + * + * Start Durable Orchestration + * + * @param string $organisation The organisation machine name (required) + * @param string $orchestration_id Orchestration identifier (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['startOrchestration'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function startOrchestrationAsyncWithHttpInfo($organisation, $orchestration_id, string $contentType = self::contentTypes['startOrchestration'][0]) + { + $returnType = 'object'; + $request = $this->startOrchestrationRequest($organisation, $orchestration_id, $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() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'startOrchestration' + * + * @param string $organisation The organisation machine name (required) + * @param string $orchestration_id Orchestration identifier (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['startOrchestration'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function startOrchestrationRequest($organisation, $orchestration_id, string $contentType = self::contentTypes['startOrchestration'][0]) + { + + // verify the required parameter 'organisation' is set + if ($organisation === null || (is_array($organisation) && count($organisation) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organisation when calling startOrchestration' + ); + } + + // verify the required parameter 'orchestration_id' is set + if ($orchestration_id === null || (is_array($orchestration_id) && count($orchestration_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $orchestration_id when calling startOrchestration' + ); + } + + + $resourcePath = '/api/v3/organizations/{organisation}/ai/orchestrations/{orchestrationId}/start'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($organisation !== null) { + $resourcePath = str_replace( + '{' . 'organisation' . '}', + ObjectSerializer::toPathValue($organisation), + $resourcePath + ); + } + // path params + if ($orchestration_id !== null) { + $resourcePath = str_replace( + '{' . 'orchestrationId' . '}', + ObjectSerializer::toPathValue($orchestration_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + 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 b852b4b..c1a4d98 100644 --- a/src/Api/AISessionsApi.php +++ b/src/Api/AISessionsApi.php @@ -14,7 +14,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Api/AISkillsApi.php b/src/Api/AISkillsApi.php new file mode 100644 index 0000000..38806ad --- /dev/null +++ b/src/Api/AISkillsApi.php @@ -0,0 +1,3458 @@ + [ + 'application/json', + ], + 'deleteSkill' => [ + 'application/json', + ], + 'deleteSkillCollection' => [ + 'application/json', + ], + 'getSkill' => [ + 'application/json', + ], + 'importSkill' => [ + 'application/json', + ], + 'importSkillCollection' => [ + 'application/json', + ], + 'listSkillCollections' => [ + 'application/json', + ], + 'listSkills' => [ + 'application/json', + ], + 'syncSkill' => [ + 'application/json', + ], + 'syncSkillCollection' => [ + 'application/json', + ], + 'updateSkill' => [ + 'application/json', + ], + ]; + + /** + * @param ClientInterface $client + * @param Configuration $config + * @param HeaderSelector $selector + * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec + */ + public function __construct( + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0 + ) { + $this->client = $client ?: new Client(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation createSkill + * + * Create Inline Skill + * + * @param string $organisation The organisation ID (required) + * @param \QuantClient\Model\CreateSkillRequest $create_skill_request create_skill_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createSkill'] 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\CreateSkill201Response + */ + public function createSkill($organisation, $create_skill_request, string $contentType = self::contentTypes['createSkill'][0]) + { + list($response) = $this->createSkillWithHttpInfo($organisation, $create_skill_request, $contentType); + return $response; + } + + /** + * Operation createSkillWithHttpInfo + * + * Create Inline Skill + * + * @param string $organisation The organisation ID (required) + * @param \QuantClient\Model\CreateSkillRequest $create_skill_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createSkill'] 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\CreateSkill201Response, HTTP status code, HTTP response headers (array of strings) + */ + public function createSkillWithHttpInfo($organisation, $create_skill_request, string $contentType = self::contentTypes['createSkill'][0]) + { + $request = $this->createSkillRequest($organisation, $create_skill_request, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 201: + return $this->handleResponseWithDataType( + '\QuantClient\Model\CreateSkill201Response', + $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 $this->handleResponseWithDataType( + '\QuantClient\Model\CreateSkill201Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\QuantClient\Model\CreateSkill201Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation createSkillAsync + * + * Create Inline Skill + * + * @param string $organisation The organisation ID (required) + * @param \QuantClient\Model\CreateSkillRequest $create_skill_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createSkill'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createSkillAsync($organisation, $create_skill_request, string $contentType = self::contentTypes['createSkill'][0]) + { + return $this->createSkillAsyncWithHttpInfo($organisation, $create_skill_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createSkillAsyncWithHttpInfo + * + * Create Inline Skill + * + * @param string $organisation The organisation ID (required) + * @param \QuantClient\Model\CreateSkillRequest $create_skill_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createSkill'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createSkillAsyncWithHttpInfo($organisation, $create_skill_request, string $contentType = self::contentTypes['createSkill'][0]) + { + $returnType = '\QuantClient\Model\CreateSkill201Response'; + $request = $this->createSkillRequest($organisation, $create_skill_request, $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() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createSkill' + * + * @param string $organisation The organisation ID (required) + * @param \QuantClient\Model\CreateSkillRequest $create_skill_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createSkill'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function createSkillRequest($organisation, $create_skill_request, string $contentType = self::contentTypes['createSkill'][0]) + { + + // verify the required parameter 'organisation' is set + if ($organisation === null || (is_array($organisation) && count($organisation) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organisation when calling createSkill' + ); + } + + // verify the required parameter 'create_skill_request' is set + if ($create_skill_request === null || (is_array($create_skill_request) && count($create_skill_request) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $create_skill_request when calling createSkill' + ); + } + + + $resourcePath = '/api/v3/organizations/{organisation}/ai/skills'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($organisation !== null) { + $resourcePath = str_replace( + '{' . 'organisation' . '}', + ObjectSerializer::toPathValue($organisation), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($create_skill_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($create_skill_request)); + } else { + $httpBody = $create_skill_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation deleteSkill + * + * Delete Skill + * + * @param string $organisation The organisation ID (required) + * @param string $skill_id The skill ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteSkill'] 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\DeleteSkill200Response + */ + public function deleteSkill($organisation, $skill_id, string $contentType = self::contentTypes['deleteSkill'][0]) + { + list($response) = $this->deleteSkillWithHttpInfo($organisation, $skill_id, $contentType); + return $response; + } + + /** + * Operation deleteSkillWithHttpInfo + * + * Delete Skill + * + * @param string $organisation The organisation ID (required) + * @param string $skill_id The skill ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteSkill'] 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\DeleteSkill200Response, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteSkillWithHttpInfo($organisation, $skill_id, string $contentType = self::contentTypes['deleteSkill'][0]) + { + $request = $this->deleteSkillRequest($organisation, $skill_id, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\QuantClient\Model\DeleteSkill200Response', + $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 $this->handleResponseWithDataType( + '\QuantClient\Model\DeleteSkill200Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\QuantClient\Model\DeleteSkill200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation deleteSkillAsync + * + * Delete Skill + * + * @param string $organisation The organisation ID (required) + * @param string $skill_id The skill ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteSkill'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteSkillAsync($organisation, $skill_id, string $contentType = self::contentTypes['deleteSkill'][0]) + { + return $this->deleteSkillAsyncWithHttpInfo($organisation, $skill_id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteSkillAsyncWithHttpInfo + * + * Delete Skill + * + * @param string $organisation The organisation ID (required) + * @param string $skill_id The skill ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteSkill'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteSkillAsyncWithHttpInfo($organisation, $skill_id, string $contentType = self::contentTypes['deleteSkill'][0]) + { + $returnType = '\QuantClient\Model\DeleteSkill200Response'; + $request = $this->deleteSkillRequest($organisation, $skill_id, $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() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'deleteSkill' + * + * @param string $organisation The organisation ID (required) + * @param string $skill_id The skill ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteSkill'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function deleteSkillRequest($organisation, $skill_id, string $contentType = self::contentTypes['deleteSkill'][0]) + { + + // verify the required parameter 'organisation' is set + if ($organisation === null || (is_array($organisation) && count($organisation) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organisation when calling deleteSkill' + ); + } + + // verify the required parameter 'skill_id' is set + if ($skill_id === null || (is_array($skill_id) && count($skill_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $skill_id when calling deleteSkill' + ); + } + + + $resourcePath = '/api/v3/organizations/{organisation}/ai/skills/{skillId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($organisation !== null) { + $resourcePath = str_replace( + '{' . 'organisation' . '}', + ObjectSerializer::toPathValue($organisation), + $resourcePath + ); + } + // path params + if ($skill_id !== null) { + $resourcePath = str_replace( + '{' . 'skillId' . '}', + ObjectSerializer::toPathValue($skill_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation deleteSkillCollection + * + * Delete Skill Collection + * + * @param string $organisation The organisation ID (required) + * @param string $namespace Collection namespace (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteSkillCollection'] 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\DeleteSkillCollection200Response + */ + public function deleteSkillCollection($organisation, $namespace, string $contentType = self::contentTypes['deleteSkillCollection'][0]) + { + list($response) = $this->deleteSkillCollectionWithHttpInfo($organisation, $namespace, $contentType); + return $response; + } + + /** + * Operation deleteSkillCollectionWithHttpInfo + * + * Delete Skill Collection + * + * @param string $organisation The organisation ID (required) + * @param string $namespace Collection namespace (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteSkillCollection'] 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\DeleteSkillCollection200Response, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteSkillCollectionWithHttpInfo($organisation, $namespace, string $contentType = self::contentTypes['deleteSkillCollection'][0]) + { + $request = $this->deleteSkillCollectionRequest($organisation, $namespace, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\QuantClient\Model\DeleteSkillCollection200Response', + $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 $this->handleResponseWithDataType( + '\QuantClient\Model\DeleteSkillCollection200Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\QuantClient\Model\DeleteSkillCollection200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation deleteSkillCollectionAsync + * + * Delete Skill Collection + * + * @param string $organisation The organisation ID (required) + * @param string $namespace Collection namespace (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteSkillCollection'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteSkillCollectionAsync($organisation, $namespace, string $contentType = self::contentTypes['deleteSkillCollection'][0]) + { + return $this->deleteSkillCollectionAsyncWithHttpInfo($organisation, $namespace, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteSkillCollectionAsyncWithHttpInfo + * + * Delete Skill Collection + * + * @param string $organisation The organisation ID (required) + * @param string $namespace Collection namespace (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteSkillCollection'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteSkillCollectionAsyncWithHttpInfo($organisation, $namespace, string $contentType = self::contentTypes['deleteSkillCollection'][0]) + { + $returnType = '\QuantClient\Model\DeleteSkillCollection200Response'; + $request = $this->deleteSkillCollectionRequest($organisation, $namespace, $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() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'deleteSkillCollection' + * + * @param string $organisation The organisation ID (required) + * @param string $namespace Collection namespace (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteSkillCollection'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function deleteSkillCollectionRequest($organisation, $namespace, string $contentType = self::contentTypes['deleteSkillCollection'][0]) + { + + // verify the required parameter 'organisation' is set + if ($organisation === null || (is_array($organisation) && count($organisation) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organisation when calling deleteSkillCollection' + ); + } + + // verify the required parameter 'namespace' is set + if ($namespace === null || (is_array($namespace) && count($namespace) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $namespace when calling deleteSkillCollection' + ); + } + + + $resourcePath = '/api/v3/organizations/{organisation}/ai/skills/collections/{namespace}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($organisation !== null) { + $resourcePath = str_replace( + '{' . 'organisation' . '}', + ObjectSerializer::toPathValue($organisation), + $resourcePath + ); + } + // path params + if ($namespace !== null) { + $resourcePath = str_replace( + '{' . 'namespace' . '}', + ObjectSerializer::toPathValue($namespace), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getSkill + * + * Get Skill Details + * + * @param string $organisation The organisation ID (required) + * @param string $skill_id The skill ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSkill'] 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\GetSkill200Response + */ + public function getSkill($organisation, $skill_id, string $contentType = self::contentTypes['getSkill'][0]) + { + list($response) = $this->getSkillWithHttpInfo($organisation, $skill_id, $contentType); + return $response; + } + + /** + * Operation getSkillWithHttpInfo + * + * Get Skill Details + * + * @param string $organisation The organisation ID (required) + * @param string $skill_id The skill ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSkill'] 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\GetSkill200Response, HTTP status code, HTTP response headers (array of strings) + */ + public function getSkillWithHttpInfo($organisation, $skill_id, string $contentType = self::contentTypes['getSkill'][0]) + { + $request = $this->getSkillRequest($organisation, $skill_id, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\QuantClient\Model\GetSkill200Response', + $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 $this->handleResponseWithDataType( + '\QuantClient\Model\GetSkill200Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\QuantClient\Model\GetSkill200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation getSkillAsync + * + * Get Skill Details + * + * @param string $organisation The organisation ID (required) + * @param string $skill_id The skill ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSkill'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getSkillAsync($organisation, $skill_id, string $contentType = self::contentTypes['getSkill'][0]) + { + return $this->getSkillAsyncWithHttpInfo($organisation, $skill_id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getSkillAsyncWithHttpInfo + * + * Get Skill Details + * + * @param string $organisation The organisation ID (required) + * @param string $skill_id The skill ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSkill'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getSkillAsyncWithHttpInfo($organisation, $skill_id, string $contentType = self::contentTypes['getSkill'][0]) + { + $returnType = '\QuantClient\Model\GetSkill200Response'; + $request = $this->getSkillRequest($organisation, $skill_id, $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() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getSkill' + * + * @param string $organisation The organisation ID (required) + * @param string $skill_id The skill ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSkill'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getSkillRequest($organisation, $skill_id, string $contentType = self::contentTypes['getSkill'][0]) + { + + // verify the required parameter 'organisation' is set + if ($organisation === null || (is_array($organisation) && count($organisation) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organisation when calling getSkill' + ); + } + + // verify the required parameter 'skill_id' is set + if ($skill_id === null || (is_array($skill_id) && count($skill_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $skill_id when calling getSkill' + ); + } + + + $resourcePath = '/api/v3/organizations/{organisation}/ai/skills/{skillId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($organisation !== null) { + $resourcePath = str_replace( + '{' . 'organisation' . '}', + ObjectSerializer::toPathValue($organisation), + $resourcePath + ); + } + // path params + if ($skill_id !== null) { + $resourcePath = str_replace( + '{' . 'skillId' . '}', + ObjectSerializer::toPathValue($skill_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation importSkill + * + * Import Skill from External Source + * + * @param string $organisation The organisation ID (required) + * @param \QuantClient\Model\ImportSkillRequest $import_skill_request import_skill_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importSkill'] 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\ImportSkill201Response + */ + public function importSkill($organisation, $import_skill_request, string $contentType = self::contentTypes['importSkill'][0]) + { + list($response) = $this->importSkillWithHttpInfo($organisation, $import_skill_request, $contentType); + return $response; + } + + /** + * Operation importSkillWithHttpInfo + * + * Import Skill from External Source + * + * @param string $organisation The organisation ID (required) + * @param \QuantClient\Model\ImportSkillRequest $import_skill_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importSkill'] 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\ImportSkill201Response, HTTP status code, HTTP response headers (array of strings) + */ + public function importSkillWithHttpInfo($organisation, $import_skill_request, string $contentType = self::contentTypes['importSkill'][0]) + { + $request = $this->importSkillRequest($organisation, $import_skill_request, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 201: + return $this->handleResponseWithDataType( + '\QuantClient\Model\ImportSkill201Response', + $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 $this->handleResponseWithDataType( + '\QuantClient\Model\ImportSkill201Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\QuantClient\Model\ImportSkill201Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation importSkillAsync + * + * Import Skill from External Source + * + * @param string $organisation The organisation ID (required) + * @param \QuantClient\Model\ImportSkillRequest $import_skill_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importSkill'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function importSkillAsync($organisation, $import_skill_request, string $contentType = self::contentTypes['importSkill'][0]) + { + return $this->importSkillAsyncWithHttpInfo($organisation, $import_skill_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation importSkillAsyncWithHttpInfo + * + * Import Skill from External Source + * + * @param string $organisation The organisation ID (required) + * @param \QuantClient\Model\ImportSkillRequest $import_skill_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importSkill'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function importSkillAsyncWithHttpInfo($organisation, $import_skill_request, string $contentType = self::contentTypes['importSkill'][0]) + { + $returnType = '\QuantClient\Model\ImportSkill201Response'; + $request = $this->importSkillRequest($organisation, $import_skill_request, $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() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'importSkill' + * + * @param string $organisation The organisation ID (required) + * @param \QuantClient\Model\ImportSkillRequest $import_skill_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importSkill'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function importSkillRequest($organisation, $import_skill_request, string $contentType = self::contentTypes['importSkill'][0]) + { + + // verify the required parameter 'organisation' is set + if ($organisation === null || (is_array($organisation) && count($organisation) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organisation when calling importSkill' + ); + } + + // verify the required parameter 'import_skill_request' is set + if ($import_skill_request === null || (is_array($import_skill_request) && count($import_skill_request) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $import_skill_request when calling importSkill' + ); + } + + + $resourcePath = '/api/v3/organizations/{organisation}/ai/skills/import'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($organisation !== null) { + $resourcePath = str_replace( + '{' . 'organisation' . '}', + ObjectSerializer::toPathValue($organisation), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($import_skill_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($import_skill_request)); + } else { + $httpBody = $import_skill_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation importSkillCollection + * + * Import Skill Collection from GitHub + * + * @param string $organisation The organisation ID (required) + * @param \QuantClient\Model\ImportSkillCollectionRequest $import_skill_collection_request import_skill_collection_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importSkillCollection'] 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\ImportSkillCollection201Response + */ + public function importSkillCollection($organisation, $import_skill_collection_request, string $contentType = self::contentTypes['importSkillCollection'][0]) + { + list($response) = $this->importSkillCollectionWithHttpInfo($organisation, $import_skill_collection_request, $contentType); + return $response; + } + + /** + * Operation importSkillCollectionWithHttpInfo + * + * Import Skill Collection from GitHub + * + * @param string $organisation The organisation ID (required) + * @param \QuantClient\Model\ImportSkillCollectionRequest $import_skill_collection_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importSkillCollection'] 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\ImportSkillCollection201Response, HTTP status code, HTTP response headers (array of strings) + */ + public function importSkillCollectionWithHttpInfo($organisation, $import_skill_collection_request, string $contentType = self::contentTypes['importSkillCollection'][0]) + { + $request = $this->importSkillCollectionRequest($organisation, $import_skill_collection_request, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 201: + return $this->handleResponseWithDataType( + '\QuantClient\Model\ImportSkillCollection201Response', + $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 $this->handleResponseWithDataType( + '\QuantClient\Model\ImportSkillCollection201Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\QuantClient\Model\ImportSkillCollection201Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation importSkillCollectionAsync + * + * Import Skill Collection from GitHub + * + * @param string $organisation The organisation ID (required) + * @param \QuantClient\Model\ImportSkillCollectionRequest $import_skill_collection_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importSkillCollection'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function importSkillCollectionAsync($organisation, $import_skill_collection_request, string $contentType = self::contentTypes['importSkillCollection'][0]) + { + return $this->importSkillCollectionAsyncWithHttpInfo($organisation, $import_skill_collection_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation importSkillCollectionAsyncWithHttpInfo + * + * Import Skill Collection from GitHub + * + * @param string $organisation The organisation ID (required) + * @param \QuantClient\Model\ImportSkillCollectionRequest $import_skill_collection_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importSkillCollection'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function importSkillCollectionAsyncWithHttpInfo($organisation, $import_skill_collection_request, string $contentType = self::contentTypes['importSkillCollection'][0]) + { + $returnType = '\QuantClient\Model\ImportSkillCollection201Response'; + $request = $this->importSkillCollectionRequest($organisation, $import_skill_collection_request, $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() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'importSkillCollection' + * + * @param string $organisation The organisation ID (required) + * @param \QuantClient\Model\ImportSkillCollectionRequest $import_skill_collection_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importSkillCollection'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function importSkillCollectionRequest($organisation, $import_skill_collection_request, string $contentType = self::contentTypes['importSkillCollection'][0]) + { + + // verify the required parameter 'organisation' is set + if ($organisation === null || (is_array($organisation) && count($organisation) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organisation when calling importSkillCollection' + ); + } + + // verify the required parameter 'import_skill_collection_request' is set + if ($import_skill_collection_request === null || (is_array($import_skill_collection_request) && count($import_skill_collection_request) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $import_skill_collection_request when calling importSkillCollection' + ); + } + + + $resourcePath = '/api/v3/organizations/{organisation}/ai/skills/import-collection'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($organisation !== null) { + $resourcePath = str_replace( + '{' . 'organisation' . '}', + ObjectSerializer::toPathValue($organisation), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($import_skill_collection_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($import_skill_collection_request)); + } else { + $httpBody = $import_skill_collection_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation listSkillCollections + * + * List Skill Collections + * + * @param string $organisation The organisation ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listSkillCollections'] 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\ListSkillCollections200Response + */ + public function listSkillCollections($organisation, string $contentType = self::contentTypes['listSkillCollections'][0]) + { + list($response) = $this->listSkillCollectionsWithHttpInfo($organisation, $contentType); + return $response; + } + + /** + * Operation listSkillCollectionsWithHttpInfo + * + * List Skill Collections + * + * @param string $organisation The organisation ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listSkillCollections'] 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\ListSkillCollections200Response, HTTP status code, HTTP response headers (array of strings) + */ + public function listSkillCollectionsWithHttpInfo($organisation, string $contentType = self::contentTypes['listSkillCollections'][0]) + { + $request = $this->listSkillCollectionsRequest($organisation, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\QuantClient\Model\ListSkillCollections200Response', + $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 $this->handleResponseWithDataType( + '\QuantClient\Model\ListSkillCollections200Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\QuantClient\Model\ListSkillCollections200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation listSkillCollectionsAsync + * + * List Skill Collections + * + * @param string $organisation The organisation ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listSkillCollections'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listSkillCollectionsAsync($organisation, string $contentType = self::contentTypes['listSkillCollections'][0]) + { + return $this->listSkillCollectionsAsyncWithHttpInfo($organisation, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listSkillCollectionsAsyncWithHttpInfo + * + * List Skill Collections + * + * @param string $organisation The organisation ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listSkillCollections'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listSkillCollectionsAsyncWithHttpInfo($organisation, string $contentType = self::contentTypes['listSkillCollections'][0]) + { + $returnType = '\QuantClient\Model\ListSkillCollections200Response'; + $request = $this->listSkillCollectionsRequest($organisation, $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() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'listSkillCollections' + * + * @param string $organisation The organisation ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listSkillCollections'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listSkillCollectionsRequest($organisation, string $contentType = self::contentTypes['listSkillCollections'][0]) + { + + // verify the required parameter 'organisation' is set + if ($organisation === null || (is_array($organisation) && count($organisation) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organisation when calling listSkillCollections' + ); + } + + + $resourcePath = '/api/v3/organizations/{organisation}/ai/skills/collections'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($organisation !== null) { + $resourcePath = str_replace( + '{' . 'organisation' . '}', + ObjectSerializer::toPathValue($organisation), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation listSkills + * + * List Organization's Skills + * + * @param string $organisation The organisation ID (required) + * @param string|null $tag Filter skills by tag (optional) + * @param string|null $namespace Filter skills by collection namespace (e.g. 'superpowers') (optional) + * @param int|null $limit Maximum number of skills to return (optional, default to 50) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listSkills'] 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\ListSkills200Response + */ + public function listSkills($organisation, $tag = null, $namespace = null, $limit = 50, string $contentType = self::contentTypes['listSkills'][0]) + { + list($response) = $this->listSkillsWithHttpInfo($organisation, $tag, $namespace, $limit, $contentType); + return $response; + } + + /** + * Operation listSkillsWithHttpInfo + * + * List Organization's Skills + * + * @param string $organisation The organisation ID (required) + * @param string|null $tag Filter skills by tag (optional) + * @param string|null $namespace Filter skills by collection namespace (e.g. 'superpowers') (optional) + * @param int|null $limit Maximum number of skills to return (optional, default to 50) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listSkills'] 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\ListSkills200Response, HTTP status code, HTTP response headers (array of strings) + */ + public function listSkillsWithHttpInfo($organisation, $tag = null, $namespace = null, $limit = 50, string $contentType = self::contentTypes['listSkills'][0]) + { + $request = $this->listSkillsRequest($organisation, $tag, $namespace, $limit, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\QuantClient\Model\ListSkills200Response', + $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 $this->handleResponseWithDataType( + '\QuantClient\Model\ListSkills200Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\QuantClient\Model\ListSkills200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation listSkillsAsync + * + * List Organization's Skills + * + * @param string $organisation The organisation ID (required) + * @param string|null $tag Filter skills by tag (optional) + * @param string|null $namespace Filter skills by collection namespace (e.g. 'superpowers') (optional) + * @param int|null $limit Maximum number of skills to return (optional, default to 50) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listSkills'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listSkillsAsync($organisation, $tag = null, $namespace = null, $limit = 50, string $contentType = self::contentTypes['listSkills'][0]) + { + return $this->listSkillsAsyncWithHttpInfo($organisation, $tag, $namespace, $limit, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listSkillsAsyncWithHttpInfo + * + * List Organization's Skills + * + * @param string $organisation The organisation ID (required) + * @param string|null $tag Filter skills by tag (optional) + * @param string|null $namespace Filter skills by collection namespace (e.g. 'superpowers') (optional) + * @param int|null $limit Maximum number of skills to return (optional, default to 50) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listSkills'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listSkillsAsyncWithHttpInfo($organisation, $tag = null, $namespace = null, $limit = 50, string $contentType = self::contentTypes['listSkills'][0]) + { + $returnType = '\QuantClient\Model\ListSkills200Response'; + $request = $this->listSkillsRequest($organisation, $tag, $namespace, $limit, $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() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'listSkills' + * + * @param string $organisation The organisation ID (required) + * @param string|null $tag Filter skills by tag (optional) + * @param string|null $namespace Filter skills by collection namespace (e.g. 'superpowers') (optional) + * @param int|null $limit Maximum number of skills to return (optional, default to 50) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listSkills'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listSkillsRequest($organisation, $tag = null, $namespace = null, $limit = 50, string $contentType = self::contentTypes['listSkills'][0]) + { + + // verify the required parameter 'organisation' is set + if ($organisation === null || (is_array($organisation) && count($organisation) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organisation when calling listSkills' + ); + } + + + + if ($limit !== null && $limit > 100) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling AISkillsApi.listSkills, must be smaller than or equal to 100.'); + } + if ($limit !== null && $limit < 1) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling AISkillsApi.listSkills, must be bigger than or equal to 1.'); + } + + + $resourcePath = '/api/v3/organizations/{organisation}/ai/skills'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $tag, + 'tag', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $namespace, + 'namespace', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $limit, + 'limit', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + // path params + if ($organisation !== null) { + $resourcePath = str_replace( + '{' . 'organisation' . '}', + ObjectSerializer::toPathValue($organisation), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation syncSkill + * + * Sync Skill from Source + * + * @param string $organisation The organisation ID (required) + * @param string $skill_id The skill ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['syncSkill'] 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\ImportSkill201Response + */ + public function syncSkill($organisation, $skill_id, string $contentType = self::contentTypes['syncSkill'][0]) + { + list($response) = $this->syncSkillWithHttpInfo($organisation, $skill_id, $contentType); + return $response; + } + + /** + * Operation syncSkillWithHttpInfo + * + * Sync Skill from Source + * + * @param string $organisation The organisation ID (required) + * @param string $skill_id The skill ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['syncSkill'] 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\ImportSkill201Response, HTTP status code, HTTP response headers (array of strings) + */ + public function syncSkillWithHttpInfo($organisation, $skill_id, string $contentType = self::contentTypes['syncSkill'][0]) + { + $request = $this->syncSkillRequest($organisation, $skill_id, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\QuantClient\Model\ImportSkill201Response', + $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 $this->handleResponseWithDataType( + '\QuantClient\Model\ImportSkill201Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\QuantClient\Model\ImportSkill201Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation syncSkillAsync + * + * Sync Skill from Source + * + * @param string $organisation The organisation ID (required) + * @param string $skill_id The skill ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['syncSkill'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function syncSkillAsync($organisation, $skill_id, string $contentType = self::contentTypes['syncSkill'][0]) + { + return $this->syncSkillAsyncWithHttpInfo($organisation, $skill_id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation syncSkillAsyncWithHttpInfo + * + * Sync Skill from Source + * + * @param string $organisation The organisation ID (required) + * @param string $skill_id The skill ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['syncSkill'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function syncSkillAsyncWithHttpInfo($organisation, $skill_id, string $contentType = self::contentTypes['syncSkill'][0]) + { + $returnType = '\QuantClient\Model\ImportSkill201Response'; + $request = $this->syncSkillRequest($organisation, $skill_id, $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() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'syncSkill' + * + * @param string $organisation The organisation ID (required) + * @param string $skill_id The skill ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['syncSkill'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function syncSkillRequest($organisation, $skill_id, string $contentType = self::contentTypes['syncSkill'][0]) + { + + // verify the required parameter 'organisation' is set + if ($organisation === null || (is_array($organisation) && count($organisation) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organisation when calling syncSkill' + ); + } + + // verify the required parameter 'skill_id' is set + if ($skill_id === null || (is_array($skill_id) && count($skill_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $skill_id when calling syncSkill' + ); + } + + + $resourcePath = '/api/v3/organizations/{organisation}/ai/skills/{skillId}/sync'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($organisation !== null) { + $resourcePath = str_replace( + '{' . 'organisation' . '}', + ObjectSerializer::toPathValue($organisation), + $resourcePath + ); + } + // path params + if ($skill_id !== null) { + $resourcePath = str_replace( + '{' . 'skillId' . '}', + ObjectSerializer::toPathValue($skill_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation syncSkillCollection + * + * Sync Skill Collection + * + * @param string $organisation The organisation ID (required) + * @param string $namespace Collection namespace (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['syncSkillCollection'] 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\SyncSkillCollection200Response + */ + public function syncSkillCollection($organisation, $namespace, string $contentType = self::contentTypes['syncSkillCollection'][0]) + { + list($response) = $this->syncSkillCollectionWithHttpInfo($organisation, $namespace, $contentType); + return $response; + } + + /** + * Operation syncSkillCollectionWithHttpInfo + * + * Sync Skill Collection + * + * @param string $organisation The organisation ID (required) + * @param string $namespace Collection namespace (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['syncSkillCollection'] 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\SyncSkillCollection200Response, HTTP status code, HTTP response headers (array of strings) + */ + public function syncSkillCollectionWithHttpInfo($organisation, $namespace, string $contentType = self::contentTypes['syncSkillCollection'][0]) + { + $request = $this->syncSkillCollectionRequest($organisation, $namespace, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\QuantClient\Model\SyncSkillCollection200Response', + $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 $this->handleResponseWithDataType( + '\QuantClient\Model\SyncSkillCollection200Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\QuantClient\Model\SyncSkillCollection200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation syncSkillCollectionAsync + * + * Sync Skill Collection + * + * @param string $organisation The organisation ID (required) + * @param string $namespace Collection namespace (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['syncSkillCollection'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function syncSkillCollectionAsync($organisation, $namespace, string $contentType = self::contentTypes['syncSkillCollection'][0]) + { + return $this->syncSkillCollectionAsyncWithHttpInfo($organisation, $namespace, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation syncSkillCollectionAsyncWithHttpInfo + * + * Sync Skill Collection + * + * @param string $organisation The organisation ID (required) + * @param string $namespace Collection namespace (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['syncSkillCollection'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function syncSkillCollectionAsyncWithHttpInfo($organisation, $namespace, string $contentType = self::contentTypes['syncSkillCollection'][0]) + { + $returnType = '\QuantClient\Model\SyncSkillCollection200Response'; + $request = $this->syncSkillCollectionRequest($organisation, $namespace, $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() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'syncSkillCollection' + * + * @param string $organisation The organisation ID (required) + * @param string $namespace Collection namespace (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['syncSkillCollection'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function syncSkillCollectionRequest($organisation, $namespace, string $contentType = self::contentTypes['syncSkillCollection'][0]) + { + + // verify the required parameter 'organisation' is set + if ($organisation === null || (is_array($organisation) && count($organisation) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organisation when calling syncSkillCollection' + ); + } + + // verify the required parameter 'namespace' is set + if ($namespace === null || (is_array($namespace) && count($namespace) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $namespace when calling syncSkillCollection' + ); + } + + + $resourcePath = '/api/v3/organizations/{organisation}/ai/skills/collections/{namespace}/sync'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($organisation !== null) { + $resourcePath = str_replace( + '{' . 'organisation' . '}', + ObjectSerializer::toPathValue($organisation), + $resourcePath + ); + } + // path params + if ($namespace !== null) { + $resourcePath = str_replace( + '{' . 'namespace' . '}', + ObjectSerializer::toPathValue($namespace), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation updateSkill + * + * Update Skill + * + * @param string $organisation The organisation ID (required) + * @param string $skill_id The skill ID (required) + * @param \QuantClient\Model\UpdateSkillRequest $update_skill_request update_skill_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateSkill'] 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\UpdateSkill200Response + */ + public function updateSkill($organisation, $skill_id, $update_skill_request, string $contentType = self::contentTypes['updateSkill'][0]) + { + list($response) = $this->updateSkillWithHttpInfo($organisation, $skill_id, $update_skill_request, $contentType); + return $response; + } + + /** + * Operation updateSkillWithHttpInfo + * + * Update Skill + * + * @param string $organisation The organisation ID (required) + * @param string $skill_id The skill ID (required) + * @param \QuantClient\Model\UpdateSkillRequest $update_skill_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateSkill'] 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\UpdateSkill200Response, HTTP status code, HTTP response headers (array of strings) + */ + public function updateSkillWithHttpInfo($organisation, $skill_id, $update_skill_request, string $contentType = self::contentTypes['updateSkill'][0]) + { + $request = $this->updateSkillRequest($organisation, $skill_id, $update_skill_request, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\QuantClient\Model\UpdateSkill200Response', + $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 $this->handleResponseWithDataType( + '\QuantClient\Model\UpdateSkill200Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\QuantClient\Model\UpdateSkill200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation updateSkillAsync + * + * Update Skill + * + * @param string $organisation The organisation ID (required) + * @param string $skill_id The skill ID (required) + * @param \QuantClient\Model\UpdateSkillRequest $update_skill_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateSkill'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateSkillAsync($organisation, $skill_id, $update_skill_request, string $contentType = self::contentTypes['updateSkill'][0]) + { + return $this->updateSkillAsyncWithHttpInfo($organisation, $skill_id, $update_skill_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation updateSkillAsyncWithHttpInfo + * + * Update Skill + * + * @param string $organisation The organisation ID (required) + * @param string $skill_id The skill ID (required) + * @param \QuantClient\Model\UpdateSkillRequest $update_skill_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateSkill'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateSkillAsyncWithHttpInfo($organisation, $skill_id, $update_skill_request, string $contentType = self::contentTypes['updateSkill'][0]) + { + $returnType = '\QuantClient\Model\UpdateSkill200Response'; + $request = $this->updateSkillRequest($organisation, $skill_id, $update_skill_request, $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() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'updateSkill' + * + * @param string $organisation The organisation ID (required) + * @param string $skill_id The skill ID (required) + * @param \QuantClient\Model\UpdateSkillRequest $update_skill_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateSkill'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function updateSkillRequest($organisation, $skill_id, $update_skill_request, string $contentType = self::contentTypes['updateSkill'][0]) + { + + // verify the required parameter 'organisation' is set + if ($organisation === null || (is_array($organisation) && count($organisation) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organisation when calling updateSkill' + ); + } + + // verify the required parameter 'skill_id' is set + if ($skill_id === null || (is_array($skill_id) && count($skill_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $skill_id when calling updateSkill' + ); + } + + // verify the required parameter 'update_skill_request' is set + if ($update_skill_request === null || (is_array($update_skill_request) && count($update_skill_request) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $update_skill_request when calling updateSkill' + ); + } + + + $resourcePath = '/api/v3/organizations/{organisation}/ai/skills/{skillId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($organisation !== null) { + $resourcePath = str_replace( + '{' . 'organisation' . '}', + ObjectSerializer::toPathValue($organisation), + $resourcePath + ); + } + // path params + if ($skill_id !== null) { + $resourcePath = str_replace( + '{' . 'skillId' . '}', + ObjectSerializer::toPathValue($skill_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($update_skill_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($update_skill_request)); + } else { + $httpBody = $update_skill_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + 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/AISlackBotsApi.php b/src/Api/AISlackBotsApi.php new file mode 100644 index 0000000..b2da124 --- /dev/null +++ b/src/Api/AISlackBotsApi.php @@ -0,0 +1,2279 @@ + [ + 'application/json', + ], + 'deleteSlackBot' => [ + 'application/json', + ], + 'getSlackBot' => [ + 'application/json', + ], + 'listSlackBots' => [ + 'application/json', + ], + 'searchSlackWorkspaceChannels' => [ + 'application/json', + ], + 'searchSlackWorkspaceUsers' => [ + 'application/json', + ], + 'updateSlackBot' => [ + 'application/json', + ], + ]; + + /** + * @param ClientInterface $client + * @param Configuration $config + * @param HeaderSelector $selector + * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec + */ + public function __construct( + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0 + ) { + $this->client = $client ?: new Client(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation createSlackBot + * + * Create Slack Bot + * + * @param string $organisation The organisation ID (required) + * @param \QuantClient\Model\CreateSlackBotRequest $create_slack_bot_request create_slack_bot_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createSlackBot'] 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\CreateSlackBot201Response + */ + public function createSlackBot($organisation, $create_slack_bot_request, string $contentType = self::contentTypes['createSlackBot'][0]) + { + list($response) = $this->createSlackBotWithHttpInfo($organisation, $create_slack_bot_request, $contentType); + return $response; + } + + /** + * Operation createSlackBotWithHttpInfo + * + * Create Slack Bot + * + * @param string $organisation The organisation ID (required) + * @param \QuantClient\Model\CreateSlackBotRequest $create_slack_bot_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createSlackBot'] 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\CreateSlackBot201Response, HTTP status code, HTTP response headers (array of strings) + */ + public function createSlackBotWithHttpInfo($organisation, $create_slack_bot_request, string $contentType = self::contentTypes['createSlackBot'][0]) + { + $request = $this->createSlackBotRequest($organisation, $create_slack_bot_request, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 201: + return $this->handleResponseWithDataType( + '\QuantClient\Model\CreateSlackBot201Response', + $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 $this->handleResponseWithDataType( + '\QuantClient\Model\CreateSlackBot201Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\QuantClient\Model\CreateSlackBot201Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation createSlackBotAsync + * + * Create Slack Bot + * + * @param string $organisation The organisation ID (required) + * @param \QuantClient\Model\CreateSlackBotRequest $create_slack_bot_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createSlackBot'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createSlackBotAsync($organisation, $create_slack_bot_request, string $contentType = self::contentTypes['createSlackBot'][0]) + { + return $this->createSlackBotAsyncWithHttpInfo($organisation, $create_slack_bot_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createSlackBotAsyncWithHttpInfo + * + * Create Slack Bot + * + * @param string $organisation The organisation ID (required) + * @param \QuantClient\Model\CreateSlackBotRequest $create_slack_bot_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createSlackBot'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createSlackBotAsyncWithHttpInfo($organisation, $create_slack_bot_request, string $contentType = self::contentTypes['createSlackBot'][0]) + { + $returnType = '\QuantClient\Model\CreateSlackBot201Response'; + $request = $this->createSlackBotRequest($organisation, $create_slack_bot_request, $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() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createSlackBot' + * + * @param string $organisation The organisation ID (required) + * @param \QuantClient\Model\CreateSlackBotRequest $create_slack_bot_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createSlackBot'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function createSlackBotRequest($organisation, $create_slack_bot_request, string $contentType = self::contentTypes['createSlackBot'][0]) + { + + // verify the required parameter 'organisation' is set + if ($organisation === null || (is_array($organisation) && count($organisation) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organisation when calling createSlackBot' + ); + } + + // verify the required parameter 'create_slack_bot_request' is set + if ($create_slack_bot_request === null || (is_array($create_slack_bot_request) && count($create_slack_bot_request) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $create_slack_bot_request when calling createSlackBot' + ); + } + + + $resourcePath = '/api/v3/organizations/{organisation}/ai/slack-bots'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($organisation !== null) { + $resourcePath = str_replace( + '{' . 'organisation' . '}', + ObjectSerializer::toPathValue($organisation), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($create_slack_bot_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($create_slack_bot_request)); + } else { + $httpBody = $create_slack_bot_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation deleteSlackBot + * + * Delete Slack Bot + * + * @param string $organisation The organisation ID (required) + * @param string $bot_id The Slack bot ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteSlackBot'] 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\DeleteSlackBot200Response + */ + public function deleteSlackBot($organisation, $bot_id, string $contentType = self::contentTypes['deleteSlackBot'][0]) + { + list($response) = $this->deleteSlackBotWithHttpInfo($organisation, $bot_id, $contentType); + return $response; + } + + /** + * Operation deleteSlackBotWithHttpInfo + * + * Delete Slack Bot + * + * @param string $organisation The organisation ID (required) + * @param string $bot_id The Slack bot ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteSlackBot'] 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\DeleteSlackBot200Response, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteSlackBotWithHttpInfo($organisation, $bot_id, string $contentType = self::contentTypes['deleteSlackBot'][0]) + { + $request = $this->deleteSlackBotRequest($organisation, $bot_id, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\QuantClient\Model\DeleteSlackBot200Response', + $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 $this->handleResponseWithDataType( + '\QuantClient\Model\DeleteSlackBot200Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\QuantClient\Model\DeleteSlackBot200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation deleteSlackBotAsync + * + * Delete Slack Bot + * + * @param string $organisation The organisation ID (required) + * @param string $bot_id The Slack bot ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteSlackBot'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteSlackBotAsync($organisation, $bot_id, string $contentType = self::contentTypes['deleteSlackBot'][0]) + { + return $this->deleteSlackBotAsyncWithHttpInfo($organisation, $bot_id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteSlackBotAsyncWithHttpInfo + * + * Delete Slack Bot + * + * @param string $organisation The organisation ID (required) + * @param string $bot_id The Slack bot ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteSlackBot'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteSlackBotAsyncWithHttpInfo($organisation, $bot_id, string $contentType = self::contentTypes['deleteSlackBot'][0]) + { + $returnType = '\QuantClient\Model\DeleteSlackBot200Response'; + $request = $this->deleteSlackBotRequest($organisation, $bot_id, $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() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'deleteSlackBot' + * + * @param string $organisation The organisation ID (required) + * @param string $bot_id The Slack bot ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteSlackBot'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function deleteSlackBotRequest($organisation, $bot_id, string $contentType = self::contentTypes['deleteSlackBot'][0]) + { + + // verify the required parameter 'organisation' is set + if ($organisation === null || (is_array($organisation) && count($organisation) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organisation when calling deleteSlackBot' + ); + } + + // verify the required parameter 'bot_id' is set + if ($bot_id === null || (is_array($bot_id) && count($bot_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $bot_id when calling deleteSlackBot' + ); + } + + + $resourcePath = '/api/v3/organizations/{organisation}/ai/slack-bots/{botId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($organisation !== null) { + $resourcePath = str_replace( + '{' . 'organisation' . '}', + ObjectSerializer::toPathValue($organisation), + $resourcePath + ); + } + // path params + if ($bot_id !== null) { + $resourcePath = str_replace( + '{' . 'botId' . '}', + ObjectSerializer::toPathValue($bot_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getSlackBot + * + * Get Slack Bot + * + * @param string $organisation The organisation ID (required) + * @param string $bot_id The Slack bot ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSlackBot'] 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\GetSlackBot200Response + */ + public function getSlackBot($organisation, $bot_id, string $contentType = self::contentTypes['getSlackBot'][0]) + { + list($response) = $this->getSlackBotWithHttpInfo($organisation, $bot_id, $contentType); + return $response; + } + + /** + * Operation getSlackBotWithHttpInfo + * + * Get Slack Bot + * + * @param string $organisation The organisation ID (required) + * @param string $bot_id The Slack bot ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSlackBot'] 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\GetSlackBot200Response, HTTP status code, HTTP response headers (array of strings) + */ + public function getSlackBotWithHttpInfo($organisation, $bot_id, string $contentType = self::contentTypes['getSlackBot'][0]) + { + $request = $this->getSlackBotRequest($organisation, $bot_id, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\QuantClient\Model\GetSlackBot200Response', + $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 $this->handleResponseWithDataType( + '\QuantClient\Model\GetSlackBot200Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\QuantClient\Model\GetSlackBot200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation getSlackBotAsync + * + * Get Slack Bot + * + * @param string $organisation The organisation ID (required) + * @param string $bot_id The Slack bot ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSlackBot'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getSlackBotAsync($organisation, $bot_id, string $contentType = self::contentTypes['getSlackBot'][0]) + { + return $this->getSlackBotAsyncWithHttpInfo($organisation, $bot_id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getSlackBotAsyncWithHttpInfo + * + * Get Slack Bot + * + * @param string $organisation The organisation ID (required) + * @param string $bot_id The Slack bot ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSlackBot'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getSlackBotAsyncWithHttpInfo($organisation, $bot_id, string $contentType = self::contentTypes['getSlackBot'][0]) + { + $returnType = '\QuantClient\Model\GetSlackBot200Response'; + $request = $this->getSlackBotRequest($organisation, $bot_id, $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() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getSlackBot' + * + * @param string $organisation The organisation ID (required) + * @param string $bot_id The Slack bot ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSlackBot'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getSlackBotRequest($organisation, $bot_id, string $contentType = self::contentTypes['getSlackBot'][0]) + { + + // verify the required parameter 'organisation' is set + if ($organisation === null || (is_array($organisation) && count($organisation) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organisation when calling getSlackBot' + ); + } + + // verify the required parameter 'bot_id' is set + if ($bot_id === null || (is_array($bot_id) && count($bot_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $bot_id when calling getSlackBot' + ); + } + + + $resourcePath = '/api/v3/organizations/{organisation}/ai/slack-bots/{botId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($organisation !== null) { + $resourcePath = str_replace( + '{' . 'organisation' . '}', + ObjectSerializer::toPathValue($organisation), + $resourcePath + ); + } + // path params + if ($bot_id !== null) { + $resourcePath = str_replace( + '{' . 'botId' . '}', + ObjectSerializer::toPathValue($bot_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation listSlackBots + * + * List Slack Bots + * + * @param string $organisation The organisation ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listSlackBots'] 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\ListSlackBots200Response + */ + public function listSlackBots($organisation, string $contentType = self::contentTypes['listSlackBots'][0]) + { + list($response) = $this->listSlackBotsWithHttpInfo($organisation, $contentType); + return $response; + } + + /** + * Operation listSlackBotsWithHttpInfo + * + * List Slack Bots + * + * @param string $organisation The organisation ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listSlackBots'] 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\ListSlackBots200Response, HTTP status code, HTTP response headers (array of strings) + */ + public function listSlackBotsWithHttpInfo($organisation, string $contentType = self::contentTypes['listSlackBots'][0]) + { + $request = $this->listSlackBotsRequest($organisation, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\QuantClient\Model\ListSlackBots200Response', + $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 $this->handleResponseWithDataType( + '\QuantClient\Model\ListSlackBots200Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\QuantClient\Model\ListSlackBots200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation listSlackBotsAsync + * + * List Slack Bots + * + * @param string $organisation The organisation ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listSlackBots'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listSlackBotsAsync($organisation, string $contentType = self::contentTypes['listSlackBots'][0]) + { + return $this->listSlackBotsAsyncWithHttpInfo($organisation, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listSlackBotsAsyncWithHttpInfo + * + * List Slack Bots + * + * @param string $organisation The organisation ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listSlackBots'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listSlackBotsAsyncWithHttpInfo($organisation, string $contentType = self::contentTypes['listSlackBots'][0]) + { + $returnType = '\QuantClient\Model\ListSlackBots200Response'; + $request = $this->listSlackBotsRequest($organisation, $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() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'listSlackBots' + * + * @param string $organisation The organisation ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listSlackBots'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listSlackBotsRequest($organisation, string $contentType = self::contentTypes['listSlackBots'][0]) + { + + // verify the required parameter 'organisation' is set + if ($organisation === null || (is_array($organisation) && count($organisation) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organisation when calling listSlackBots' + ); + } + + + $resourcePath = '/api/v3/organizations/{organisation}/ai/slack-bots'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($organisation !== null) { + $resourcePath = str_replace( + '{' . 'organisation' . '}', + ObjectSerializer::toPathValue($organisation), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation searchSlackWorkspaceChannels + * + * Search Slack Workspace Channels + * + * @param string $organisation The organisation ID (required) + * @param string $bot_id The Slack bot ID (required) + * @param string|null $q Search query to filter channels by name (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchSlackWorkspaceChannels'] 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\SearchSlackWorkspaceChannels200Response + */ + public function searchSlackWorkspaceChannels($organisation, $bot_id, $q = null, string $contentType = self::contentTypes['searchSlackWorkspaceChannels'][0]) + { + list($response) = $this->searchSlackWorkspaceChannelsWithHttpInfo($organisation, $bot_id, $q, $contentType); + return $response; + } + + /** + * Operation searchSlackWorkspaceChannelsWithHttpInfo + * + * Search Slack Workspace Channels + * + * @param string $organisation The organisation ID (required) + * @param string $bot_id The Slack bot ID (required) + * @param string|null $q Search query to filter channels by name (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchSlackWorkspaceChannels'] 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\SearchSlackWorkspaceChannels200Response, HTTP status code, HTTP response headers (array of strings) + */ + public function searchSlackWorkspaceChannelsWithHttpInfo($organisation, $bot_id, $q = null, string $contentType = self::contentTypes['searchSlackWorkspaceChannels'][0]) + { + $request = $this->searchSlackWorkspaceChannelsRequest($organisation, $bot_id, $q, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\QuantClient\Model\SearchSlackWorkspaceChannels200Response', + $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 $this->handleResponseWithDataType( + '\QuantClient\Model\SearchSlackWorkspaceChannels200Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\QuantClient\Model\SearchSlackWorkspaceChannels200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation searchSlackWorkspaceChannelsAsync + * + * Search Slack Workspace Channels + * + * @param string $organisation The organisation ID (required) + * @param string $bot_id The Slack bot ID (required) + * @param string|null $q Search query to filter channels by name (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchSlackWorkspaceChannels'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function searchSlackWorkspaceChannelsAsync($organisation, $bot_id, $q = null, string $contentType = self::contentTypes['searchSlackWorkspaceChannels'][0]) + { + return $this->searchSlackWorkspaceChannelsAsyncWithHttpInfo($organisation, $bot_id, $q, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation searchSlackWorkspaceChannelsAsyncWithHttpInfo + * + * Search Slack Workspace Channels + * + * @param string $organisation The organisation ID (required) + * @param string $bot_id The Slack bot ID (required) + * @param string|null $q Search query to filter channels by name (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchSlackWorkspaceChannels'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function searchSlackWorkspaceChannelsAsyncWithHttpInfo($organisation, $bot_id, $q = null, string $contentType = self::contentTypes['searchSlackWorkspaceChannels'][0]) + { + $returnType = '\QuantClient\Model\SearchSlackWorkspaceChannels200Response'; + $request = $this->searchSlackWorkspaceChannelsRequest($organisation, $bot_id, $q, $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() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'searchSlackWorkspaceChannels' + * + * @param string $organisation The organisation ID (required) + * @param string $bot_id The Slack bot ID (required) + * @param string|null $q Search query to filter channels by name (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchSlackWorkspaceChannels'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function searchSlackWorkspaceChannelsRequest($organisation, $bot_id, $q = null, string $contentType = self::contentTypes['searchSlackWorkspaceChannels'][0]) + { + + // verify the required parameter 'organisation' is set + if ($organisation === null || (is_array($organisation) && count($organisation) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organisation when calling searchSlackWorkspaceChannels' + ); + } + + // verify the required parameter 'bot_id' is set + if ($bot_id === null || (is_array($bot_id) && count($bot_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $bot_id when calling searchSlackWorkspaceChannels' + ); + } + + + + $resourcePath = '/api/v3/organizations/{organisation}/ai/slack-bots/{botId}/workspace/channels'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $q, + 'q', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + // path params + if ($organisation !== null) { + $resourcePath = str_replace( + '{' . 'organisation' . '}', + ObjectSerializer::toPathValue($organisation), + $resourcePath + ); + } + // path params + if ($bot_id !== null) { + $resourcePath = str_replace( + '{' . 'botId' . '}', + ObjectSerializer::toPathValue($bot_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation searchSlackWorkspaceUsers + * + * Search Slack Workspace Users + * + * @param string $organisation The organisation ID (required) + * @param string $bot_id The Slack bot ID (required) + * @param string|null $q Search query to filter users by name (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchSlackWorkspaceUsers'] 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\SearchSlackWorkspaceUsers200Response + */ + public function searchSlackWorkspaceUsers($organisation, $bot_id, $q = null, string $contentType = self::contentTypes['searchSlackWorkspaceUsers'][0]) + { + list($response) = $this->searchSlackWorkspaceUsersWithHttpInfo($organisation, $bot_id, $q, $contentType); + return $response; + } + + /** + * Operation searchSlackWorkspaceUsersWithHttpInfo + * + * Search Slack Workspace Users + * + * @param string $organisation The organisation ID (required) + * @param string $bot_id The Slack bot ID (required) + * @param string|null $q Search query to filter users by name (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchSlackWorkspaceUsers'] 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\SearchSlackWorkspaceUsers200Response, HTTP status code, HTTP response headers (array of strings) + */ + public function searchSlackWorkspaceUsersWithHttpInfo($organisation, $bot_id, $q = null, string $contentType = self::contentTypes['searchSlackWorkspaceUsers'][0]) + { + $request = $this->searchSlackWorkspaceUsersRequest($organisation, $bot_id, $q, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\QuantClient\Model\SearchSlackWorkspaceUsers200Response', + $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 $this->handleResponseWithDataType( + '\QuantClient\Model\SearchSlackWorkspaceUsers200Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\QuantClient\Model\SearchSlackWorkspaceUsers200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation searchSlackWorkspaceUsersAsync + * + * Search Slack Workspace Users + * + * @param string $organisation The organisation ID (required) + * @param string $bot_id The Slack bot ID (required) + * @param string|null $q Search query to filter users by name (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchSlackWorkspaceUsers'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function searchSlackWorkspaceUsersAsync($organisation, $bot_id, $q = null, string $contentType = self::contentTypes['searchSlackWorkspaceUsers'][0]) + { + return $this->searchSlackWorkspaceUsersAsyncWithHttpInfo($organisation, $bot_id, $q, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation searchSlackWorkspaceUsersAsyncWithHttpInfo + * + * Search Slack Workspace Users + * + * @param string $organisation The organisation ID (required) + * @param string $bot_id The Slack bot ID (required) + * @param string|null $q Search query to filter users by name (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchSlackWorkspaceUsers'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function searchSlackWorkspaceUsersAsyncWithHttpInfo($organisation, $bot_id, $q = null, string $contentType = self::contentTypes['searchSlackWorkspaceUsers'][0]) + { + $returnType = '\QuantClient\Model\SearchSlackWorkspaceUsers200Response'; + $request = $this->searchSlackWorkspaceUsersRequest($organisation, $bot_id, $q, $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() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'searchSlackWorkspaceUsers' + * + * @param string $organisation The organisation ID (required) + * @param string $bot_id The Slack bot ID (required) + * @param string|null $q Search query to filter users by name (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchSlackWorkspaceUsers'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function searchSlackWorkspaceUsersRequest($organisation, $bot_id, $q = null, string $contentType = self::contentTypes['searchSlackWorkspaceUsers'][0]) + { + + // verify the required parameter 'organisation' is set + if ($organisation === null || (is_array($organisation) && count($organisation) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organisation when calling searchSlackWorkspaceUsers' + ); + } + + // verify the required parameter 'bot_id' is set + if ($bot_id === null || (is_array($bot_id) && count($bot_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $bot_id when calling searchSlackWorkspaceUsers' + ); + } + + + + $resourcePath = '/api/v3/organizations/{organisation}/ai/slack-bots/{botId}/workspace/users'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $q, + 'q', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + // path params + if ($organisation !== null) { + $resourcePath = str_replace( + '{' . 'organisation' . '}', + ObjectSerializer::toPathValue($organisation), + $resourcePath + ); + } + // path params + if ($bot_id !== null) { + $resourcePath = str_replace( + '{' . 'botId' . '}', + ObjectSerializer::toPathValue($bot_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation updateSlackBot + * + * Update Slack Bot + * + * @param string $organisation The organisation ID (required) + * @param string $bot_id The Slack bot ID (required) + * @param \QuantClient\Model\UpdateSlackBotRequest $update_slack_bot_request update_slack_bot_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateSlackBot'] 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\CreateSlackBot201Response + */ + public function updateSlackBot($organisation, $bot_id, $update_slack_bot_request, string $contentType = self::contentTypes['updateSlackBot'][0]) + { + list($response) = $this->updateSlackBotWithHttpInfo($organisation, $bot_id, $update_slack_bot_request, $contentType); + return $response; + } + + /** + * Operation updateSlackBotWithHttpInfo + * + * Update Slack Bot + * + * @param string $organisation The organisation ID (required) + * @param string $bot_id The Slack bot ID (required) + * @param \QuantClient\Model\UpdateSlackBotRequest $update_slack_bot_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateSlackBot'] 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\CreateSlackBot201Response, HTTP status code, HTTP response headers (array of strings) + */ + public function updateSlackBotWithHttpInfo($organisation, $bot_id, $update_slack_bot_request, string $contentType = self::contentTypes['updateSlackBot'][0]) + { + $request = $this->updateSlackBotRequest($organisation, $bot_id, $update_slack_bot_request, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\QuantClient\Model\CreateSlackBot201Response', + $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 $this->handleResponseWithDataType( + '\QuantClient\Model\CreateSlackBot201Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\QuantClient\Model\CreateSlackBot201Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation updateSlackBotAsync + * + * Update Slack Bot + * + * @param string $organisation The organisation ID (required) + * @param string $bot_id The Slack bot ID (required) + * @param \QuantClient\Model\UpdateSlackBotRequest $update_slack_bot_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateSlackBot'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateSlackBotAsync($organisation, $bot_id, $update_slack_bot_request, string $contentType = self::contentTypes['updateSlackBot'][0]) + { + return $this->updateSlackBotAsyncWithHttpInfo($organisation, $bot_id, $update_slack_bot_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation updateSlackBotAsyncWithHttpInfo + * + * Update Slack Bot + * + * @param string $organisation The organisation ID (required) + * @param string $bot_id The Slack bot ID (required) + * @param \QuantClient\Model\UpdateSlackBotRequest $update_slack_bot_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateSlackBot'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateSlackBotAsyncWithHttpInfo($organisation, $bot_id, $update_slack_bot_request, string $contentType = self::contentTypes['updateSlackBot'][0]) + { + $returnType = '\QuantClient\Model\CreateSlackBot201Response'; + $request = $this->updateSlackBotRequest($organisation, $bot_id, $update_slack_bot_request, $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() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'updateSlackBot' + * + * @param string $organisation The organisation ID (required) + * @param string $bot_id The Slack bot ID (required) + * @param \QuantClient\Model\UpdateSlackBotRequest $update_slack_bot_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateSlackBot'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function updateSlackBotRequest($organisation, $bot_id, $update_slack_bot_request, string $contentType = self::contentTypes['updateSlackBot'][0]) + { + + // verify the required parameter 'organisation' is set + if ($organisation === null || (is_array($organisation) && count($organisation) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organisation when calling updateSlackBot' + ); + } + + // verify the required parameter 'bot_id' is set + if ($bot_id === null || (is_array($bot_id) && count($bot_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $bot_id when calling updateSlackBot' + ); + } + + // verify the required parameter 'update_slack_bot_request' is set + if ($update_slack_bot_request === null || (is_array($update_slack_bot_request) && count($update_slack_bot_request) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $update_slack_bot_request when calling updateSlackBot' + ); + } + + + $resourcePath = '/api/v3/organizations/{organisation}/ai/slack-bots/{botId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($organisation !== null) { + $resourcePath = str_replace( + '{' . 'organisation' . '}', + ObjectSerializer::toPathValue($organisation), + $resourcePath + ); + } + // path params + if ($bot_id !== null) { + $resourcePath = str_replace( + '{' . 'botId' . '}', + ObjectSerializer::toPathValue($bot_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($update_slack_bot_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($update_slack_bot_request)); + } else { + $httpBody = $update_slack_bot_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + 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/AITaskManagementApi.php b/src/Api/AITaskManagementApi.php index 708b5b9..bc13daa 100644 --- a/src/Api/AITaskManagementApi.php +++ b/src/Api/AITaskManagementApi.php @@ -14,7 +14,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Api/AIToolsApi.php b/src/Api/AIToolsApi.php index 4e19460..f5a83fe 100644 --- a/src/Api/AIToolsApi.php +++ b/src/Api/AIToolsApi.php @@ -14,7 +14,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ @@ -140,7 +140,7 @@ public function getConfig() /** * Operation getAIOrchestrationStatus * - * Get Orchestration Status + * Get Tool Orchestration Status (Async Tool Polling) * * @param string $organisation The organisation ID (required) * @param string $orchestration_id Orchestration identifier for aggregated async tool executions (required) @@ -159,7 +159,7 @@ public function getAIOrchestrationStatus($organisation, $orchestration_id, strin /** * Operation getAIOrchestrationStatusWithHttpInfo * - * Get Orchestration Status + * Get Tool Orchestration Status (Async Tool Polling) * * @param string $organisation The organisation ID (required) * @param string $orchestration_id Orchestration identifier for aggregated async tool executions (required) @@ -259,7 +259,7 @@ public function getAIOrchestrationStatusWithHttpInfo($organisation, $orchestrati /** * Operation getAIOrchestrationStatusAsync * - * Get Orchestration Status + * Get Tool Orchestration Status (Async Tool Polling) * * @param string $organisation The organisation ID (required) * @param string $orchestration_id Orchestration identifier for aggregated async tool executions (required) @@ -281,7 +281,7 @@ function ($response) { /** * Operation getAIOrchestrationStatusAsyncWithHttpInfo * - * Get Orchestration Status + * Get Tool Orchestration Status (Async Tool Polling) * * @param string $organisation The organisation ID (required) * @param string $orchestration_id Orchestration identifier for aggregated async tool executions (required) diff --git a/src/Api/OrchestrationApi.php b/src/Api/AIUsageApi.php similarity index 71% rename from src/Api/OrchestrationApi.php rename to src/Api/AIUsageApi.php index c6803d6..d14891b 100644 --- a/src/Api/OrchestrationApi.php +++ b/src/Api/AIUsageApi.php @@ -1,6 +1,6 @@ [ + 'getMyUsage' => [ 'application/json', ], ]; @@ -126,40 +126,38 @@ public function getConfig() } /** - * Operation getAIOrchestrationStatus + * Operation getMyUsage * - * Get Orchestration Status + * Get AI usage summary for the authenticated user * * @param string $organisation The organisation ID (required) - * @param string $orchestration_id Orchestration identifier for aggregated async tool executions (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAIOrchestrationStatus'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getMyUsage'] 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\GetAIOrchestrationStatus200Response|\QuantClient\Model\GetAIOrchestrationStatus404Response + * @return \QuantClient\Model\GetMyUsage200Response */ - public function getAIOrchestrationStatus($organisation, $orchestration_id, string $contentType = self::contentTypes['getAIOrchestrationStatus'][0]) + public function getMyUsage($organisation, string $contentType = self::contentTypes['getMyUsage'][0]) { - list($response) = $this->getAIOrchestrationStatusWithHttpInfo($organisation, $orchestration_id, $contentType); + list($response) = $this->getMyUsageWithHttpInfo($organisation, $contentType); return $response; } /** - * Operation getAIOrchestrationStatusWithHttpInfo + * Operation getMyUsageWithHttpInfo * - * Get Orchestration Status + * Get AI usage summary for the authenticated user * * @param string $organisation The organisation ID (required) - * @param string $orchestration_id Orchestration identifier for aggregated async tool executions (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAIOrchestrationStatus'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getMyUsage'] 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\GetAIOrchestrationStatus200Response|\QuantClient\Model\GetAIOrchestrationStatus404Response, HTTP status code, HTTP response headers (array of strings) + * @return array of \QuantClient\Model\GetMyUsage200Response, HTTP status code, HTTP response headers (array of strings) */ - public function getAIOrchestrationStatusWithHttpInfo($organisation, $orchestration_id, string $contentType = self::contentTypes['getAIOrchestrationStatus'][0]) + public function getMyUsageWithHttpInfo($organisation, string $contentType = self::contentTypes['getMyUsage'][0]) { - $request = $this->getAIOrchestrationStatusRequest($organisation, $orchestration_id, $contentType); + $request = $this->getMyUsageRequest($organisation, $contentType); try { $options = $this->createHttpClientOption(); @@ -187,13 +185,7 @@ public function getAIOrchestrationStatusWithHttpInfo($organisation, $orchestrati switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\QuantClient\Model\GetAIOrchestrationStatus200Response', - $request, - $response, - ); - case 404: - return $this->handleResponseWithDataType( - '\QuantClient\Model\GetAIOrchestrationStatus404Response', + '\QuantClient\Model\GetMyUsage200Response', $request, $response, ); @@ -215,7 +207,7 @@ public function getAIOrchestrationStatusWithHttpInfo($organisation, $orchestrati } return $this->handleResponseWithDataType( - '\QuantClient\Model\GetAIOrchestrationStatus200Response', + '\QuantClient\Model\GetMyUsage200Response', $request, $response, ); @@ -224,15 +216,7 @@ public function getAIOrchestrationStatusWithHttpInfo($organisation, $orchestrati case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\QuantClient\Model\GetAIOrchestrationStatus200Response', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - throw $e; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\QuantClient\Model\GetAIOrchestrationStatus404Response', + '\QuantClient\Model\GetMyUsage200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -245,20 +229,19 @@ public function getAIOrchestrationStatusWithHttpInfo($organisation, $orchestrati } /** - * Operation getAIOrchestrationStatusAsync + * Operation getMyUsageAsync * - * Get Orchestration Status + * Get AI usage summary for the authenticated user * * @param string $organisation The organisation ID (required) - * @param string $orchestration_id Orchestration identifier for aggregated async tool executions (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAIOrchestrationStatus'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getMyUsage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAIOrchestrationStatusAsync($organisation, $orchestration_id, string $contentType = self::contentTypes['getAIOrchestrationStatus'][0]) + public function getMyUsageAsync($organisation, string $contentType = self::contentTypes['getMyUsage'][0]) { - return $this->getAIOrchestrationStatusAsyncWithHttpInfo($organisation, $orchestration_id, $contentType) + return $this->getMyUsageAsyncWithHttpInfo($organisation, $contentType) ->then( function ($response) { return $response[0]; @@ -267,21 +250,20 @@ function ($response) { } /** - * Operation getAIOrchestrationStatusAsyncWithHttpInfo + * Operation getMyUsageAsyncWithHttpInfo * - * Get Orchestration Status + * Get AI usage summary for the authenticated user * * @param string $organisation The organisation ID (required) - * @param string $orchestration_id Orchestration identifier for aggregated async tool executions (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAIOrchestrationStatus'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getMyUsage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAIOrchestrationStatusAsyncWithHttpInfo($organisation, $orchestration_id, string $contentType = self::contentTypes['getAIOrchestrationStatus'][0]) + public function getMyUsageAsyncWithHttpInfo($organisation, string $contentType = self::contentTypes['getMyUsage'][0]) { - $returnType = '\QuantClient\Model\GetAIOrchestrationStatus200Response'; - $request = $this->getAIOrchestrationStatusRequest($organisation, $orchestration_id, $contentType); + $returnType = '\QuantClient\Model\GetMyUsage200Response'; + $request = $this->getMyUsageRequest($organisation, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -320,37 +302,26 @@ function ($exception) { } /** - * Create request for operation 'getAIOrchestrationStatus' + * Create request for operation 'getMyUsage' * * @param string $organisation The organisation ID (required) - * @param string $orchestration_id Orchestration identifier for aggregated async tool executions (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAIOrchestrationStatus'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getMyUsage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getAIOrchestrationStatusRequest($organisation, $orchestration_id, string $contentType = self::contentTypes['getAIOrchestrationStatus'][0]) + public function getMyUsageRequest($organisation, string $contentType = self::contentTypes['getMyUsage'][0]) { // verify the required parameter 'organisation' is set if ($organisation === null || (is_array($organisation) && count($organisation) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $organisation when calling getAIOrchestrationStatus' + 'Missing the required parameter $organisation when calling getMyUsage' ); } - // verify the required parameter 'orchestration_id' is set - if ($orchestration_id === null || (is_array($orchestration_id) && count($orchestration_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $orchestration_id when calling getAIOrchestrationStatus' - ); - } - if (!preg_match("/^orch_[a-f0-9]{32}$/", $orchestration_id)) { - throw new \InvalidArgumentException("invalid value for \"orchestration_id\" when calling OrchestrationApi.getAIOrchestrationStatus, must conform to the pattern /^orch_[a-f0-9]{32}$/."); - } - - $resourcePath = '/api/v3/organizations/{organisation}/ai/tools/orchestrations/{orchestrationId}'; + $resourcePath = '/api/v3/organizations/{organisation}/ai/usage/me'; $formParams = []; $queryParams = []; $headerParams = []; @@ -367,14 +338,6 @@ public function getAIOrchestrationStatusRequest($organisation, $orchestration_id $resourcePath ); } - // path params - if ($orchestration_id !== null) { - $resourcePath = str_replace( - '{' . 'orchestrationId' . '}', - ObjectSerializer::toPathValue($orchestration_id), - $resourcePath - ); - } $headers = $this->headerSelector->selectHeaders( diff --git a/src/Api/AIVectorDatabaseApi.php b/src/Api/AIVectorDatabaseApi.php index c80bd13..38e017e 100644 --- a/src/Api/AIVectorDatabaseApi.php +++ b/src/Api/AIVectorDatabaseApi.php @@ -14,7 +14,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ @@ -80,12 +80,18 @@ class AIVectorDatabaseApi 'deleteVectorCollection' => [ 'application/json', ], + 'deleteVectorDocuments' => [ + 'application/json', + ], 'getVectorCollection' => [ 'application/json', ], 'listVectorCollections' => [ 'application/json', ], + 'listVectorDocuments' => [ + 'application/json', + ], 'queryVectorCollection' => [ 'application/json', ], @@ -442,7 +448,7 @@ public function createVectorCollectionRequest($organisation, $create_vector_coll * * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \QuantClient\Model\DeleteVectorCollection200Response + * @return \QuantClient\Model\DeleteSkillCollection200Response */ public function deleteVectorCollection($organisation, $collection_id, string $contentType = self::contentTypes['deleteVectorCollection'][0]) { @@ -461,7 +467,7 @@ public function deleteVectorCollection($organisation, $collection_id, string $co * * @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\DeleteVectorCollection200Response, HTTP status code, HTTP response headers (array of strings) + * @return array of \QuantClient\Model\DeleteSkillCollection200Response, HTTP status code, HTTP response headers (array of strings) */ public function deleteVectorCollectionWithHttpInfo($organisation, $collection_id, string $contentType = self::contentTypes['deleteVectorCollection'][0]) { @@ -493,7 +499,7 @@ public function deleteVectorCollectionWithHttpInfo($organisation, $collection_id switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\QuantClient\Model\DeleteVectorCollection200Response', + '\QuantClient\Model\DeleteSkillCollection200Response', $request, $response, ); @@ -515,7 +521,7 @@ public function deleteVectorCollectionWithHttpInfo($organisation, $collection_id } return $this->handleResponseWithDataType( - '\QuantClient\Model\DeleteVectorCollection200Response', + '\QuantClient\Model\DeleteSkillCollection200Response', $request, $response, ); @@ -524,7 +530,7 @@ public function deleteVectorCollectionWithHttpInfo($organisation, $collection_id case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\QuantClient\Model\DeleteVectorCollection200Response', + '\QuantClient\Model\DeleteSkillCollection200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -572,7 +578,7 @@ function ($response) { */ public function deleteVectorCollectionAsyncWithHttpInfo($organisation, $collection_id, string $contentType = self::contentTypes['deleteVectorCollection'][0]) { - $returnType = '\QuantClient\Model\DeleteVectorCollection200Response'; + $returnType = '\QuantClient\Model\DeleteSkillCollection200Response'; $request = $this->deleteVectorCollectionRequest($organisation, $collection_id, $contentType); return $this->client @@ -723,6 +729,317 @@ public function deleteVectorCollectionRequest($organisation, $collection_id, str ); } + /** + * Operation deleteVectorDocuments + * + * Delete Documents from Collection + * + * @param string $organisation Organisation machine name (required) + * @param string $collection_id Collection UUID (required) + * @param \QuantClient\Model\DeleteVectorDocumentsRequest $delete_vector_documents_request delete_vector_documents_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteVectorDocuments'] 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\DeleteVectorDocuments200Response + */ + public function deleteVectorDocuments($organisation, $collection_id, $delete_vector_documents_request, string $contentType = self::contentTypes['deleteVectorDocuments'][0]) + { + list($response) = $this->deleteVectorDocumentsWithHttpInfo($organisation, $collection_id, $delete_vector_documents_request, $contentType); + return $response; + } + + /** + * Operation deleteVectorDocumentsWithHttpInfo + * + * Delete Documents from Collection + * + * @param string $organisation Organisation machine name (required) + * @param string $collection_id Collection UUID (required) + * @param \QuantClient\Model\DeleteVectorDocumentsRequest $delete_vector_documents_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteVectorDocuments'] 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\DeleteVectorDocuments200Response, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteVectorDocumentsWithHttpInfo($organisation, $collection_id, $delete_vector_documents_request, string $contentType = self::contentTypes['deleteVectorDocuments'][0]) + { + $request = $this->deleteVectorDocumentsRequest($organisation, $collection_id, $delete_vector_documents_request, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\QuantClient\Model\DeleteVectorDocuments200Response', + $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 $this->handleResponseWithDataType( + '\QuantClient\Model\DeleteVectorDocuments200Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\QuantClient\Model\DeleteVectorDocuments200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation deleteVectorDocumentsAsync + * + * Delete Documents from Collection + * + * @param string $organisation Organisation machine name (required) + * @param string $collection_id Collection UUID (required) + * @param \QuantClient\Model\DeleteVectorDocumentsRequest $delete_vector_documents_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteVectorDocuments'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteVectorDocumentsAsync($organisation, $collection_id, $delete_vector_documents_request, string $contentType = self::contentTypes['deleteVectorDocuments'][0]) + { + return $this->deleteVectorDocumentsAsyncWithHttpInfo($organisation, $collection_id, $delete_vector_documents_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteVectorDocumentsAsyncWithHttpInfo + * + * Delete Documents from Collection + * + * @param string $organisation Organisation machine name (required) + * @param string $collection_id Collection UUID (required) + * @param \QuantClient\Model\DeleteVectorDocumentsRequest $delete_vector_documents_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteVectorDocuments'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteVectorDocumentsAsyncWithHttpInfo($organisation, $collection_id, $delete_vector_documents_request, string $contentType = self::contentTypes['deleteVectorDocuments'][0]) + { + $returnType = '\QuantClient\Model\DeleteVectorDocuments200Response'; + $request = $this->deleteVectorDocumentsRequest($organisation, $collection_id, $delete_vector_documents_request, $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() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'deleteVectorDocuments' + * + * @param string $organisation Organisation machine name (required) + * @param string $collection_id Collection UUID (required) + * @param \QuantClient\Model\DeleteVectorDocumentsRequest $delete_vector_documents_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteVectorDocuments'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function deleteVectorDocumentsRequest($organisation, $collection_id, $delete_vector_documents_request, string $contentType = self::contentTypes['deleteVectorDocuments'][0]) + { + + // verify the required parameter 'organisation' is set + if ($organisation === null || (is_array($organisation) && count($organisation) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organisation when calling deleteVectorDocuments' + ); + } + + // verify the required parameter 'collection_id' is set + if ($collection_id === null || (is_array($collection_id) && count($collection_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $collection_id when calling deleteVectorDocuments' + ); + } + + // verify the required parameter 'delete_vector_documents_request' is set + if ($delete_vector_documents_request === null || (is_array($delete_vector_documents_request) && count($delete_vector_documents_request) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $delete_vector_documents_request when calling deleteVectorDocuments' + ); + } + + + $resourcePath = '/api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId}/documents'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($organisation !== null) { + $resourcePath = str_replace( + '{' . 'organisation' . '}', + ObjectSerializer::toPathValue($organisation), + $resourcePath + ); + } + // path params + if ($collection_id !== null) { + $resourcePath = str_replace( + '{' . 'collectionId' . '}', + ObjectSerializer::toPathValue($collection_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($delete_vector_documents_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($delete_vector_documents_request)); + } else { + $httpBody = $delete_vector_documents_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Operation getVectorCollection * @@ -1287,6 +1604,296 @@ public function listVectorCollectionsRequest($organisation, string $contentType ); } + /** + * Operation listVectorDocuments + * + * List Documents in Collection + * + * @param string $organisation organisation (required) + * @param string $collection_id collection_id (required) + * @param string|null $key Filter by document key (optional) + * @param int|null $limit limit (optional, default to 50) + * @param int|null $offset offset (optional, default to 0) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listVectorDocuments'] 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 void + */ + public function listVectorDocuments($organisation, $collection_id, $key = null, $limit = 50, $offset = 0, string $contentType = self::contentTypes['listVectorDocuments'][0]) + { + $this->listVectorDocumentsWithHttpInfo($organisation, $collection_id, $key, $limit, $offset, $contentType); + } + + /** + * Operation listVectorDocumentsWithHttpInfo + * + * List Documents in Collection + * + * @param string $organisation (required) + * @param string $collection_id (required) + * @param string|null $key Filter by document key (optional) + * @param int|null $limit (optional, default to 50) + * @param int|null $offset (optional, default to 0) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listVectorDocuments'] 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 null, HTTP status code, HTTP response headers (array of strings) + */ + public function listVectorDocumentsWithHttpInfo($organisation, $collection_id, $key = null, $limit = 50, $offset = 0, string $contentType = self::contentTypes['listVectorDocuments'][0]) + { + $request = $this->listVectorDocumentsRequest($organisation, $collection_id, $key, $limit, $offset, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { + switch ($e->getCode()) { + } + + + throw $e; + } + } + + /** + * Operation listVectorDocumentsAsync + * + * List Documents in Collection + * + * @param string $organisation (required) + * @param string $collection_id (required) + * @param string|null $key Filter by document key (optional) + * @param int|null $limit (optional, default to 50) + * @param int|null $offset (optional, default to 0) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listVectorDocuments'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listVectorDocumentsAsync($organisation, $collection_id, $key = null, $limit = 50, $offset = 0, string $contentType = self::contentTypes['listVectorDocuments'][0]) + { + return $this->listVectorDocumentsAsyncWithHttpInfo($organisation, $collection_id, $key, $limit, $offset, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listVectorDocumentsAsyncWithHttpInfo + * + * List Documents in Collection + * + * @param string $organisation (required) + * @param string $collection_id (required) + * @param string|null $key Filter by document key (optional) + * @param int|null $limit (optional, default to 50) + * @param int|null $offset (optional, default to 0) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listVectorDocuments'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listVectorDocumentsAsyncWithHttpInfo($organisation, $collection_id, $key = null, $limit = 50, $offset = 0, string $contentType = self::contentTypes['listVectorDocuments'][0]) + { + $returnType = ''; + $request = $this->listVectorDocumentsRequest($organisation, $collection_id, $key, $limit, $offset, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'listVectorDocuments' + * + * @param string $organisation (required) + * @param string $collection_id (required) + * @param string|null $key Filter by document key (optional) + * @param int|null $limit (optional, default to 50) + * @param int|null $offset (optional, default to 0) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listVectorDocuments'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listVectorDocumentsRequest($organisation, $collection_id, $key = null, $limit = 50, $offset = 0, string $contentType = self::contentTypes['listVectorDocuments'][0]) + { + + // verify the required parameter 'organisation' is set + if ($organisation === null || (is_array($organisation) && count($organisation) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organisation when calling listVectorDocuments' + ); + } + + // verify the required parameter 'collection_id' is set + if ($collection_id === null || (is_array($collection_id) && count($collection_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $collection_id when calling listVectorDocuments' + ); + } + + + if ($limit !== null && $limit > 100) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling AIVectorDatabaseApi.listVectorDocuments, must be smaller than or equal to 100.'); + } + + + + $resourcePath = '/api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId}/documents'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $key, + 'key', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $limit, + 'limit', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $offset, + 'offset', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + // path params + if ($organisation !== null) { + $resourcePath = str_replace( + '{' . 'organisation' . '}', + ObjectSerializer::toPathValue($organisation), + $resourcePath + ); + } + // path params + if ($collection_id !== null) { + $resourcePath = str_replace( + '{' . 'collectionId' . '}', + ObjectSerializer::toPathValue($collection_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + [], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Operation queryVectorCollection * diff --git a/src/Api/ApplicationsApi.php b/src/Api/ApplicationsApi.php index eaf6b39..1047aef 100644 --- a/src/Api/ApplicationsApi.php +++ b/src/Api/ApplicationsApi.php @@ -14,7 +14,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Api/BackupManagementApi.php b/src/Api/BackupManagementApi.php index a6e02e1..c090f6c 100644 --- a/src/Api/BackupManagementApi.php +++ b/src/Api/BackupManagementApi.php @@ -14,7 +14,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Api/CDNMetricsApi.php b/src/Api/CDNMetricsApi.php new file mode 100644 index 0000000..17d8325 --- /dev/null +++ b/src/Api/CDNMetricsApi.php @@ -0,0 +1,1206 @@ + [ + 'application/json', + ], + 'getHourlyMetrics' => [ + 'application/json', + ], + 'getMonthlyMetrics' => [ + 'application/json', + ], + ]; + + /** + * @param ClientInterface $client + * @param Configuration $config + * @param HeaderSelector $selector + * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec + */ + public function __construct( + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0 + ) { + $this->client = $client ?: new Client(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation getDailyMetrics + * + * Get daily metrics + * + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) + * @param string|null $domain Filter by domain ID or domain name (optional) + * @param string[]|null $metrics Metrics to return (default: hits, bytes). Use the /metrics/available endpoint to list all metrics by category. (optional) + * @param string|null $timestamp_format Timestamp format in response (optional, default to 'iso8601') + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getDailyMetrics'] 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\V2MetricsResponse + */ + public function getDailyMetrics($organization, $project, $domain = null, $metrics = null, $timestamp_format = 'iso8601', string $contentType = self::contentTypes['getDailyMetrics'][0]) + { + list($response) = $this->getDailyMetricsWithHttpInfo($organization, $project, $domain, $metrics, $timestamp_format, $contentType); + return $response; + } + + /** + * Operation getDailyMetricsWithHttpInfo + * + * Get daily metrics + * + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) + * @param string|null $domain Filter by domain ID or domain name (optional) + * @param string[]|null $metrics Metrics to return (default: hits, bytes). Use the /metrics/available endpoint to list all metrics by category. (optional) + * @param string|null $timestamp_format Timestamp format in response (optional, default to 'iso8601') + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getDailyMetrics'] 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\V2MetricsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function getDailyMetricsWithHttpInfo($organization, $project, $domain = null, $metrics = null, $timestamp_format = 'iso8601', string $contentType = self::contentTypes['getDailyMetrics'][0]) + { + $request = $this->getDailyMetricsRequest($organization, $project, $domain, $metrics, $timestamp_format, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\QuantClient\Model\V2MetricsResponse', + $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 $this->handleResponseWithDataType( + '\QuantClient\Model\V2MetricsResponse', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\QuantClient\Model\V2MetricsResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation getDailyMetricsAsync + * + * Get daily metrics + * + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) + * @param string|null $domain Filter by domain ID or domain name (optional) + * @param string[]|null $metrics Metrics to return (default: hits, bytes). Use the /metrics/available endpoint to list all metrics by category. (optional) + * @param string|null $timestamp_format Timestamp format in response (optional, default to 'iso8601') + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getDailyMetrics'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getDailyMetricsAsync($organization, $project, $domain = null, $metrics = null, $timestamp_format = 'iso8601', string $contentType = self::contentTypes['getDailyMetrics'][0]) + { + return $this->getDailyMetricsAsyncWithHttpInfo($organization, $project, $domain, $metrics, $timestamp_format, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getDailyMetricsAsyncWithHttpInfo + * + * Get daily metrics + * + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) + * @param string|null $domain Filter by domain ID or domain name (optional) + * @param string[]|null $metrics Metrics to return (default: hits, bytes). Use the /metrics/available endpoint to list all metrics by category. (optional) + * @param string|null $timestamp_format Timestamp format in response (optional, default to 'iso8601') + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getDailyMetrics'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getDailyMetricsAsyncWithHttpInfo($organization, $project, $domain = null, $metrics = null, $timestamp_format = 'iso8601', string $contentType = self::contentTypes['getDailyMetrics'][0]) + { + $returnType = '\QuantClient\Model\V2MetricsResponse'; + $request = $this->getDailyMetricsRequest($organization, $project, $domain, $metrics, $timestamp_format, $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() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getDailyMetrics' + * + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) + * @param string|null $domain Filter by domain ID or domain name (optional) + * @param string[]|null $metrics Metrics to return (default: hits, bytes). Use the /metrics/available endpoint to list all metrics by category. (optional) + * @param string|null $timestamp_format Timestamp format in response (optional, default to 'iso8601') + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getDailyMetrics'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getDailyMetricsRequest($organization, $project, $domain = null, $metrics = null, $timestamp_format = 'iso8601', string $contentType = self::contentTypes['getDailyMetrics'][0]) + { + + // verify the required parameter 'organization' is set + if ($organization === null || (is_array($organization) && count($organization) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organization when calling getDailyMetrics' + ); + } + + // verify the required parameter 'project' is set + if ($project === null || (is_array($project) && count($project) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $project when calling getDailyMetrics' + ); + } + + + + + + $resourcePath = '/v2/organizations/{organization}/projects/{project}/metrics/daily'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $domain, + 'domain', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $metrics, + 'metrics[]', // param base name + 'array', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $timestamp_format, + 'timestamp_format', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + // path params + if ($organization !== null) { + $resourcePath = str_replace( + '{' . 'organization' . '}', + ObjectSerializer::toPathValue($organization), + $resourcePath + ); + } + // path params + if ($project !== null) { + $resourcePath = str_replace( + '{' . 'project' . '}', + ObjectSerializer::toPathValue($project), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getHourlyMetrics + * + * Get hourly metrics + * + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) + * @param string|null $domain Filter by domain ID or domain name (optional) + * @param string[]|null $metrics Metrics to return (default: hits, bytes). Use the /metrics/available endpoint to list all metrics by category. (optional) + * @param string|null $timestamp_format Timestamp format in response (optional, default to 'iso8601') + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getHourlyMetrics'] 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\V2MetricsResponse + */ + public function getHourlyMetrics($organization, $project, $domain = null, $metrics = null, $timestamp_format = 'iso8601', string $contentType = self::contentTypes['getHourlyMetrics'][0]) + { + list($response) = $this->getHourlyMetricsWithHttpInfo($organization, $project, $domain, $metrics, $timestamp_format, $contentType); + return $response; + } + + /** + * Operation getHourlyMetricsWithHttpInfo + * + * Get hourly metrics + * + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) + * @param string|null $domain Filter by domain ID or domain name (optional) + * @param string[]|null $metrics Metrics to return (default: hits, bytes). Use the /metrics/available endpoint to list all metrics by category. (optional) + * @param string|null $timestamp_format Timestamp format in response (optional, default to 'iso8601') + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getHourlyMetrics'] 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\V2MetricsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function getHourlyMetricsWithHttpInfo($organization, $project, $domain = null, $metrics = null, $timestamp_format = 'iso8601', string $contentType = self::contentTypes['getHourlyMetrics'][0]) + { + $request = $this->getHourlyMetricsRequest($organization, $project, $domain, $metrics, $timestamp_format, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\QuantClient\Model\V2MetricsResponse', + $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 $this->handleResponseWithDataType( + '\QuantClient\Model\V2MetricsResponse', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\QuantClient\Model\V2MetricsResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation getHourlyMetricsAsync + * + * Get hourly metrics + * + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) + * @param string|null $domain Filter by domain ID or domain name (optional) + * @param string[]|null $metrics Metrics to return (default: hits, bytes). Use the /metrics/available endpoint to list all metrics by category. (optional) + * @param string|null $timestamp_format Timestamp format in response (optional, default to 'iso8601') + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getHourlyMetrics'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getHourlyMetricsAsync($organization, $project, $domain = null, $metrics = null, $timestamp_format = 'iso8601', string $contentType = self::contentTypes['getHourlyMetrics'][0]) + { + return $this->getHourlyMetricsAsyncWithHttpInfo($organization, $project, $domain, $metrics, $timestamp_format, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getHourlyMetricsAsyncWithHttpInfo + * + * Get hourly metrics + * + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) + * @param string|null $domain Filter by domain ID or domain name (optional) + * @param string[]|null $metrics Metrics to return (default: hits, bytes). Use the /metrics/available endpoint to list all metrics by category. (optional) + * @param string|null $timestamp_format Timestamp format in response (optional, default to 'iso8601') + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getHourlyMetrics'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getHourlyMetricsAsyncWithHttpInfo($organization, $project, $domain = null, $metrics = null, $timestamp_format = 'iso8601', string $contentType = self::contentTypes['getHourlyMetrics'][0]) + { + $returnType = '\QuantClient\Model\V2MetricsResponse'; + $request = $this->getHourlyMetricsRequest($organization, $project, $domain, $metrics, $timestamp_format, $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() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getHourlyMetrics' + * + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) + * @param string|null $domain Filter by domain ID or domain name (optional) + * @param string[]|null $metrics Metrics to return (default: hits, bytes). Use the /metrics/available endpoint to list all metrics by category. (optional) + * @param string|null $timestamp_format Timestamp format in response (optional, default to 'iso8601') + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getHourlyMetrics'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getHourlyMetricsRequest($organization, $project, $domain = null, $metrics = null, $timestamp_format = 'iso8601', string $contentType = self::contentTypes['getHourlyMetrics'][0]) + { + + // verify the required parameter 'organization' is set + if ($organization === null || (is_array($organization) && count($organization) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organization when calling getHourlyMetrics' + ); + } + + // verify the required parameter 'project' is set + if ($project === null || (is_array($project) && count($project) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $project when calling getHourlyMetrics' + ); + } + + + + + + $resourcePath = '/v2/organizations/{organization}/projects/{project}/metrics/hourly'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $domain, + 'domain', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $metrics, + 'metrics[]', // param base name + 'array', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $timestamp_format, + 'timestamp_format', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + // path params + if ($organization !== null) { + $resourcePath = str_replace( + '{' . 'organization' . '}', + ObjectSerializer::toPathValue($organization), + $resourcePath + ); + } + // path params + if ($project !== null) { + $resourcePath = str_replace( + '{' . 'project' . '}', + ObjectSerializer::toPathValue($project), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getMonthlyMetrics + * + * Get monthly metrics + * + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) + * @param string|null $domain Filter by domain ID or domain name (optional) + * @param string[]|null $metrics Metrics to return (default: hits, bytes). Use the /metrics/available endpoint to list all metrics by category. (optional) + * @param string|null $timestamp_format Timestamp format in response (optional, default to 'iso8601') + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getMonthlyMetrics'] 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\V2MetricsResponse + */ + public function getMonthlyMetrics($organization, $project, $domain = null, $metrics = null, $timestamp_format = 'iso8601', string $contentType = self::contentTypes['getMonthlyMetrics'][0]) + { + list($response) = $this->getMonthlyMetricsWithHttpInfo($organization, $project, $domain, $metrics, $timestamp_format, $contentType); + return $response; + } + + /** + * Operation getMonthlyMetricsWithHttpInfo + * + * Get monthly metrics + * + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) + * @param string|null $domain Filter by domain ID or domain name (optional) + * @param string[]|null $metrics Metrics to return (default: hits, bytes). Use the /metrics/available endpoint to list all metrics by category. (optional) + * @param string|null $timestamp_format Timestamp format in response (optional, default to 'iso8601') + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getMonthlyMetrics'] 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\V2MetricsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function getMonthlyMetricsWithHttpInfo($organization, $project, $domain = null, $metrics = null, $timestamp_format = 'iso8601', string $contentType = self::contentTypes['getMonthlyMetrics'][0]) + { + $request = $this->getMonthlyMetricsRequest($organization, $project, $domain, $metrics, $timestamp_format, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\QuantClient\Model\V2MetricsResponse', + $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 $this->handleResponseWithDataType( + '\QuantClient\Model\V2MetricsResponse', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\QuantClient\Model\V2MetricsResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation getMonthlyMetricsAsync + * + * Get monthly metrics + * + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) + * @param string|null $domain Filter by domain ID or domain name (optional) + * @param string[]|null $metrics Metrics to return (default: hits, bytes). Use the /metrics/available endpoint to list all metrics by category. (optional) + * @param string|null $timestamp_format Timestamp format in response (optional, default to 'iso8601') + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getMonthlyMetrics'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getMonthlyMetricsAsync($organization, $project, $domain = null, $metrics = null, $timestamp_format = 'iso8601', string $contentType = self::contentTypes['getMonthlyMetrics'][0]) + { + return $this->getMonthlyMetricsAsyncWithHttpInfo($organization, $project, $domain, $metrics, $timestamp_format, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getMonthlyMetricsAsyncWithHttpInfo + * + * Get monthly metrics + * + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) + * @param string|null $domain Filter by domain ID or domain name (optional) + * @param string[]|null $metrics Metrics to return (default: hits, bytes). Use the /metrics/available endpoint to list all metrics by category. (optional) + * @param string|null $timestamp_format Timestamp format in response (optional, default to 'iso8601') + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getMonthlyMetrics'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getMonthlyMetricsAsyncWithHttpInfo($organization, $project, $domain = null, $metrics = null, $timestamp_format = 'iso8601', string $contentType = self::contentTypes['getMonthlyMetrics'][0]) + { + $returnType = '\QuantClient\Model\V2MetricsResponse'; + $request = $this->getMonthlyMetricsRequest($organization, $project, $domain, $metrics, $timestamp_format, $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() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getMonthlyMetrics' + * + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) + * @param string|null $domain Filter by domain ID or domain name (optional) + * @param string[]|null $metrics Metrics to return (default: hits, bytes). Use the /metrics/available endpoint to list all metrics by category. (optional) + * @param string|null $timestamp_format Timestamp format in response (optional, default to 'iso8601') + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getMonthlyMetrics'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getMonthlyMetricsRequest($organization, $project, $domain = null, $metrics = null, $timestamp_format = 'iso8601', string $contentType = self::contentTypes['getMonthlyMetrics'][0]) + { + + // verify the required parameter 'organization' is set + if ($organization === null || (is_array($organization) && count($organization) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organization when calling getMonthlyMetrics' + ); + } + + // verify the required parameter 'project' is set + if ($project === null || (is_array($project) && count($project) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $project when calling getMonthlyMetrics' + ); + } + + + + + + $resourcePath = '/v2/organizations/{organization}/projects/{project}/metrics/monthly'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $domain, + 'domain', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $metrics, + 'metrics[]', // param base name + 'array', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $timestamp_format, + 'timestamp_format', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + // path params + if ($organization !== null) { + $resourcePath = str_replace( + '{' . 'organization' . '}', + ObjectSerializer::toPathValue($organization), + $resourcePath + ); + } + // path params + if ($project !== null) { + $resourcePath = str_replace( + '{' . 'project' . '}', + ObjectSerializer::toPathValue($project), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + 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 3b1ec6d..c57744d 100644 --- a/src/Api/CommandsApi.php +++ b/src/Api/CommandsApi.php @@ -14,7 +14,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Api/ComposeApi.php b/src/Api/ComposeApi.php index 6675142..b62fe34 100644 --- a/src/Api/ComposeApi.php +++ b/src/Api/ComposeApi.php @@ -14,7 +14,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Api/ContainersApi.php b/src/Api/ContainersApi.php index fc6c4a6..7381b98 100644 --- a/src/Api/ContainersApi.php +++ b/src/Api/ContainersApi.php @@ -14,7 +14,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Api/CrawlerSchedulesApi.php b/src/Api/CrawlerSchedulesApi.php index 115c4bc..f09eb0f 100644 --- a/src/Api/CrawlerSchedulesApi.php +++ b/src/Api/CrawlerSchedulesApi.php @@ -14,7 +14,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Api/CrawlersApi.php b/src/Api/CrawlersApi.php index f60f891..105997c 100644 --- a/src/Api/CrawlersApi.php +++ b/src/Api/CrawlersApi.php @@ -14,7 +14,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Api/CronApi.php b/src/Api/CronApi.php index d9e722e..948a8eb 100644 --- a/src/Api/CronApi.php +++ b/src/Api/CronApi.php @@ -14,7 +14,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Api/DomainsApi.php b/src/Api/DomainsApi.php index c2775d8..1f4be66 100644 --- a/src/Api/DomainsApi.php +++ b/src/Api/DomainsApi.php @@ -14,7 +14,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Api/EnvironmentsApi.php b/src/Api/EnvironmentsApi.php index 889de3b..f3500d3 100644 --- a/src/Api/EnvironmentsApi.php +++ b/src/Api/EnvironmentsApi.php @@ -14,7 +14,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Api/HeadersApi.php b/src/Api/HeadersApi.php index 2848346..50d82f2 100644 --- a/src/Api/HeadersApi.php +++ b/src/Api/HeadersApi.php @@ -14,7 +14,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Api/KVApi.php b/src/Api/KVApi.php index e434463..f9431cf 100644 --- a/src/Api/KVApi.php +++ b/src/Api/KVApi.php @@ -14,7 +14,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ @@ -95,12 +95,18 @@ class KVApi 'kVItemsUpdate' => [ 'application/json', ], + 'kVLinkToProject' => [ + 'application/json', + ], 'kVList' => [ 'application/json', ], 'kVShow' => [ 'application/json', ], + 'kVUnlinkFromProject' => [ + 'application/json', + ], ]; /** @@ -2653,40 +2659,44 @@ public function kVItemsUpdateRequest($organization, $project, $store_id, $key, $ } /** - * Operation kVList + * Operation kVLinkToProject * - * List key-value stores + * Link a KV store to another project * * @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 + * @param string $project Source project identifier (required) + * @param string $store_id KV store identifier (required) + * @param \QuantClient\Model\KVLinkToProjectRequest $kv_link_to_project_request kv_link_to_project_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVLinkToProject'] 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\V2Store[]|\QuantClient\Model\V2Error|\QuantClient\Model\V2Error + * @return \QuantClient\Model\KVLinkToProject200Response|\QuantClient\Model\V2Error|\QuantClient\Model\V2Error|\QuantClient\Model\V2Error */ - public function kVList($organization, $project, string $contentType = self::contentTypes['kVList'][0]) + public function kVLinkToProject($organization, $project, $store_id, $kv_link_to_project_request, string $contentType = self::contentTypes['kVLinkToProject'][0]) { - list($response) = $this->kVListWithHttpInfo($organization, $project, $contentType); + list($response) = $this->kVLinkToProjectWithHttpInfo($organization, $project, $store_id, $kv_link_to_project_request, $contentType); return $response; } /** - * Operation kVListWithHttpInfo + * Operation kVLinkToProjectWithHttpInfo * - * List key-value stores + * Link a KV store to another project * * @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 + * @param string $project Source project identifier (required) + * @param string $store_id KV store identifier (required) + * @param \QuantClient\Model\KVLinkToProjectRequest $kv_link_to_project_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVLinkToProject'] 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\V2Store[]|\QuantClient\Model\V2Error|\QuantClient\Model\V2Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \QuantClient\Model\KVLinkToProject200Response|\QuantClient\Model\V2Error|\QuantClient\Model\V2Error|\QuantClient\Model\V2Error, HTTP status code, HTTP response headers (array of strings) */ - public function kVListWithHttpInfo($organization, $project, string $contentType = self::contentTypes['kVList'][0]) + public function kVLinkToProjectWithHttpInfo($organization, $project, $store_id, $kv_link_to_project_request, string $contentType = self::contentTypes['kVLinkToProject'][0]) { - $request = $this->kVListRequest($organization, $project, $contentType); + $request = $this->kVLinkToProjectRequest($organization, $project, $store_id, $kv_link_to_project_request, $contentType); try { $options = $this->createHttpClientOption(); @@ -2714,7 +2724,7 @@ public function kVListWithHttpInfo($organization, $project, string $contentType switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Store[]', + '\QuantClient\Model\KVLinkToProject200Response', $request, $response, ); @@ -2724,6 +2734,12 @@ public function kVListWithHttpInfo($organization, $project, string $contentType $request, $response, ); + case 404: + return $this->handleResponseWithDataType( + '\QuantClient\Model\V2Error', + $request, + $response, + ); case 403: return $this->handleResponseWithDataType( '\QuantClient\Model\V2Error', @@ -2748,7 +2764,7 @@ public function kVListWithHttpInfo($organization, $project, string $contentType } return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Store[]', + '\QuantClient\Model\KVLinkToProject200Response', $request, $response, ); @@ -2757,7 +2773,7 @@ public function kVListWithHttpInfo($organization, $project, string $contentType case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\QuantClient\Model\V2Store[]', + '\QuantClient\Model\KVLinkToProject200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2770,6 +2786,14 @@ public function kVListWithHttpInfo($organization, $project, string $contentType ); $e->setResponseObject($data); throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\QuantClient\Model\V2Error', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -2786,20 +2810,22 @@ public function kVListWithHttpInfo($organization, $project, string $contentType } /** - * Operation kVListAsync + * Operation kVLinkToProjectAsync * - * List key-value stores + * Link a KV store to another project * * @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 + * @param string $project Source project identifier (required) + * @param string $store_id KV store identifier (required) + * @param \QuantClient\Model\KVLinkToProjectRequest $kv_link_to_project_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVLinkToProject'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function kVListAsync($organization, $project, string $contentType = self::contentTypes['kVList'][0]) + public function kVLinkToProjectAsync($organization, $project, $store_id, $kv_link_to_project_request, string $contentType = self::contentTypes['kVLinkToProject'][0]) { - return $this->kVListAsyncWithHttpInfo($organization, $project, $contentType) + return $this->kVLinkToProjectAsyncWithHttpInfo($organization, $project, $store_id, $kv_link_to_project_request, $contentType) ->then( function ($response) { return $response[0]; @@ -2808,21 +2834,23 @@ function ($response) { } /** - * Operation kVListAsyncWithHttpInfo + * Operation kVLinkToProjectAsyncWithHttpInfo * - * List key-value stores + * Link a KV store to another project * * @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 + * @param string $project Source project identifier (required) + * @param string $store_id KV store identifier (required) + * @param \QuantClient\Model\KVLinkToProjectRequest $kv_link_to_project_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVLinkToProject'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function kVListAsyncWithHttpInfo($organization, $project, string $contentType = self::contentTypes['kVList'][0]) + public function kVLinkToProjectAsyncWithHttpInfo($organization, $project, $store_id, $kv_link_to_project_request, string $contentType = self::contentTypes['kVLinkToProject'][0]) { - $returnType = '\QuantClient\Model\V2Store[]'; - $request = $this->kVListRequest($organization, $project, $contentType); + $returnType = '\QuantClient\Model\KVLinkToProject200Response'; + $request = $this->kVLinkToProjectRequest($organization, $project, $store_id, $kv_link_to_project_request, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2861,34 +2889,50 @@ function ($exception) { } /** - * Create request for operation 'kVList' + * Create request for operation 'kVLinkToProject' * * @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 + * @param string $project Source project identifier (required) + * @param string $store_id KV store identifier (required) + * @param \QuantClient\Model\KVLinkToProjectRequest $kv_link_to_project_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVLinkToProject'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function kVListRequest($organization, $project, string $contentType = self::contentTypes['kVList'][0]) + public function kVLinkToProjectRequest($organization, $project, $store_id, $kv_link_to_project_request, string $contentType = self::contentTypes['kVLinkToProject'][0]) { // verify the required parameter 'organization' is set if ($organization === null || (is_array($organization) && count($organization) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $organization when calling kVList' + 'Missing the required parameter $organization when calling kVLinkToProject' ); } // verify the required parameter 'project' is set if ($project === null || (is_array($project) && count($project) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $project when calling kVList' + 'Missing the required parameter $project when calling kVLinkToProject' + ); + } + + // verify the required parameter 'store_id' is set + if ($store_id === null || (is_array($store_id) && count($store_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $store_id when calling kVLinkToProject' ); } + // verify the required parameter 'kv_link_to_project_request' is set + if ($kv_link_to_project_request === null || (is_array($kv_link_to_project_request) && count($kv_link_to_project_request) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $kv_link_to_project_request when calling kVLinkToProject' + ); + } - $resourcePath = '/api/v2/organizations/{organization}/projects/{project}/kv'; + + $resourcePath = '/api/v2/organizations/{organization}/projects/{project}/kv/{store_id}/link'; $formParams = []; $queryParams = []; $headerParams = []; @@ -2913,6 +2957,14 @@ public function kVListRequest($organization, $project, string $contentType = sel $resourcePath ); } + // path params + if ($store_id !== null) { + $resourcePath = str_replace( + '{' . 'store_id' . '}', + ObjectSerializer::toPathValue($store_id), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( @@ -2922,7 +2974,14 @@ public function kVListRequest($organization, $project, string $contentType = sel ); // for model (json/xml) - if (count($formParams) > 0) { + if (isset($kv_link_to_project_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($kv_link_to_project_request)); + } else { + $httpBody = $kv_link_to_project_request; + } + } elseif (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -2965,7 +3024,7 @@ public function kVListRequest($organization, $project, string $contentType = sel $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'POST', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -2973,42 +3032,40 @@ public function kVListRequest($organization, $project, string $contentType = sel } /** - * Operation kVShow + * Operation kVList * - * Get a kv store + * List key-value stores * * @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 + * @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 * @throws \InvalidArgumentException - * @return \QuantClient\Model\V2Store|\QuantClient\Model\V2Error|\QuantClient\Model\V2Error + * @return \QuantClient\Model\V2Store[]|\QuantClient\Model\V2Error|\QuantClient\Model\V2Error */ - public function kVShow($organization, $project, $store_id, string $contentType = self::contentTypes['kVShow'][0]) + public function kVList($organization, $project, string $contentType = self::contentTypes['kVList'][0]) { - list($response) = $this->kVShowWithHttpInfo($organization, $project, $store_id, $contentType); + list($response) = $this->kVListWithHttpInfo($organization, $project, $contentType); return $response; } /** - * Operation kVShowWithHttpInfo + * Operation kVListWithHttpInfo * - * Get a kv store + * List key-value stores * * @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 + * @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 * @throws \InvalidArgumentException - * @return array of \QuantClient\Model\V2Store|\QuantClient\Model\V2Error|\QuantClient\Model\V2Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \QuantClient\Model\V2Store[]|\QuantClient\Model\V2Error|\QuantClient\Model\V2Error, HTTP status code, HTTP response headers (array of strings) */ - public function kVShowWithHttpInfo($organization, $project, $store_id, string $contentType = self::contentTypes['kVShow'][0]) + public function kVListWithHttpInfo($organization, $project, string $contentType = self::contentTypes['kVList'][0]) { - $request = $this->kVShowRequest($organization, $project, $store_id, $contentType); + $request = $this->kVListRequest($organization, $project, $contentType); try { $options = $this->createHttpClientOption(); @@ -3036,11 +3093,11 @@ public function kVShowWithHttpInfo($organization, $project, $store_id, string $c switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Store', + '\QuantClient\Model\V2Store[]', $request, $response, ); - case 404: + case 400: return $this->handleResponseWithDataType( '\QuantClient\Model\V2Error', $request, @@ -3070,7 +3127,7 @@ public function kVShowWithHttpInfo($organization, $project, $store_id, string $c } return $this->handleResponseWithDataType( - '\QuantClient\Model\V2Store', + '\QuantClient\Model\V2Store[]', $request, $response, ); @@ -3079,12 +3136,12 @@ public function kVShowWithHttpInfo($organization, $project, $store_id, string $c case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\QuantClient\Model\V2Store', + '\QuantClient\Model\V2Store[]', $e->getResponseHeaders() ); $e->setResponseObject($data); throw $e; - case 404: + case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\QuantClient\Model\V2Error', @@ -3108,21 +3165,20 @@ public function kVShowWithHttpInfo($organization, $project, $store_id, string $c } /** - * Operation kVShowAsync + * Operation kVListAsync * - * Get a kv store + * List key-value stores * * @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 + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVList'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function kVShowAsync($organization, $project, $store_id, string $contentType = self::contentTypes['kVShow'][0]) + public function kVListAsync($organization, $project, string $contentType = self::contentTypes['kVList'][0]) { - return $this->kVShowAsyncWithHttpInfo($organization, $project, $store_id, $contentType) + return $this->kVListAsyncWithHttpInfo($organization, $project, $contentType) ->then( function ($response) { return $response[0]; @@ -3131,22 +3187,21 @@ function ($response) { } /** - * Operation kVShowAsyncWithHttpInfo + * Operation kVListAsyncWithHttpInfo * - * Get a kv store + * List key-value stores * * @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 + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVList'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function kVShowAsyncWithHttpInfo($organization, $project, $store_id, string $contentType = self::contentTypes['kVShow'][0]) + public function kVListAsyncWithHttpInfo($organization, $project, string $contentType = self::contentTypes['kVList'][0]) { - $returnType = '\QuantClient\Model\V2Store'; - $request = $this->kVShowRequest($organization, $project, $store_id, $contentType); + $returnType = '\QuantClient\Model\V2Store[]'; + $request = $this->kVListRequest($organization, $project, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3185,42 +3240,34 @@ function ($exception) { } /** - * Create request for operation 'kVShow' + * Create request for operation 'kVList' * * @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 + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVList'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function kVShowRequest($organization, $project, $store_id, string $contentType = self::contentTypes['kVShow'][0]) + public function kVListRequest($organization, $project, string $contentType = self::contentTypes['kVList'][0]) { // verify the required parameter 'organization' is set if ($organization === null || (is_array($organization) && count($organization) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $organization when calling kVShow' + 'Missing the required parameter $organization when calling kVList' ); } // verify the required parameter 'project' is set if ($project === null || (is_array($project) && count($project) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $project when calling kVShow' - ); - } - - // verify the required parameter 'store_id' is set - if ($store_id === null || (is_array($store_id) && count($store_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $store_id when calling kVShow' + 'Missing the required parameter $project when calling kVList' ); } - $resourcePath = '/api/v2/organizations/{organization}/projects/{project}/kv/{store_id}'; + $resourcePath = '/api/v2/organizations/{organization}/projects/{project}/kv'; $formParams = []; $queryParams = []; $headerParams = []; @@ -3245,14 +3292,6 @@ public function kVShowRequest($organization, $project, $store_id, string $conten $resourcePath ); } - // path params - if ($store_id !== null) { - $resourcePath = str_replace( - '{' . 'store_id' . '}', - ObjectSerializer::toPathValue($store_id), - $resourcePath - ); - } $headers = $this->headerSelector->selectHeaders( @@ -3312,6 +3351,686 @@ public function kVShowRequest($organization, $project, $store_id, string $conten ); } + /** + * Operation kVShow + * + * Get a kv store + * + * @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 + * + * @throws \QuantClient\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \QuantClient\Model\V2Store|\QuantClient\Model\V2Error|\QuantClient\Model\V2Error + */ + public function kVShow($organization, $project, $store_id, string $contentType = self::contentTypes['kVShow'][0]) + { + list($response) = $this->kVShowWithHttpInfo($organization, $project, $store_id, $contentType); + return $response; + } + + /** + * Operation kVShowWithHttpInfo + * + * Get a kv store + * + * @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 + * + * @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\V2Store|\QuantClient\Model\V2Error|\QuantClient\Model\V2Error, HTTP status code, HTTP response headers (array of strings) + */ + public function kVShowWithHttpInfo($organization, $project, $store_id, string $contentType = self::contentTypes['kVShow'][0]) + { + $request = $this->kVShowRequest($organization, $project, $store_id, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\QuantClient\Model\V2Store', + $request, + $response, + ); + case 404: + 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 $this->handleResponseWithDataType( + '\QuantClient\Model\V2Store', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\QuantClient\Model\V2Store', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\QuantClient\Model\V2Error', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\QuantClient\Model\V2Error', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation kVShowAsync + * + * Get a kv store + * + * @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 + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function kVShowAsync($organization, $project, $store_id, string $contentType = self::contentTypes['kVShow'][0]) + { + return $this->kVShowAsyncWithHttpInfo($organization, $project, $store_id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation kVShowAsyncWithHttpInfo + * + * Get a kv store + * + * @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 + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function kVShowAsyncWithHttpInfo($organization, $project, $store_id, string $contentType = self::contentTypes['kVShow'][0]) + { + $returnType = '\QuantClient\Model\V2Store'; + $request = $this->kVShowRequest($organization, $project, $store_id, $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() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'kVShow' + * + * @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 + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function kVShowRequest($organization, $project, $store_id, string $contentType = self::contentTypes['kVShow'][0]) + { + + // verify the required parameter 'organization' is set + if ($organization === null || (is_array($organization) && count($organization) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organization when calling kVShow' + ); + } + + // verify the required parameter 'project' is set + if ($project === null || (is_array($project) && count($project) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $project when calling kVShow' + ); + } + + // verify the required parameter 'store_id' is set + if ($store_id === null || (is_array($store_id) && count($store_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $store_id when calling kVShow' + ); + } + + + $resourcePath = '/api/v2/organizations/{organization}/projects/{project}/kv/{store_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($organization !== null) { + $resourcePath = str_replace( + '{' . 'organization' . '}', + ObjectSerializer::toPathValue($organization), + $resourcePath + ); + } + // path params + if ($project !== null) { + $resourcePath = str_replace( + '{' . 'project' . '}', + ObjectSerializer::toPathValue($project), + $resourcePath + ); + } + // path params + if ($store_id !== null) { + $resourcePath = str_replace( + '{' . 'store_id' . '}', + ObjectSerializer::toPathValue($store_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation kVUnlinkFromProject + * + * Unlink a KV store from this project + * + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) + * @param string $store_id KV store identifier (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVUnlinkFromProject'] 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\KVLinkToProject200Response|\QuantClient\Model\V2Error|\QuantClient\Model\V2Error + */ + public function kVUnlinkFromProject($organization, $project, $store_id, string $contentType = self::contentTypes['kVUnlinkFromProject'][0]) + { + list($response) = $this->kVUnlinkFromProjectWithHttpInfo($organization, $project, $store_id, $contentType); + return $response; + } + + /** + * Operation kVUnlinkFromProjectWithHttpInfo + * + * Unlink a KV store from this project + * + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) + * @param string $store_id KV store identifier (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVUnlinkFromProject'] 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\KVLinkToProject200Response|\QuantClient\Model\V2Error|\QuantClient\Model\V2Error, HTTP status code, HTTP response headers (array of strings) + */ + public function kVUnlinkFromProjectWithHttpInfo($organization, $project, $store_id, string $contentType = self::contentTypes['kVUnlinkFromProject'][0]) + { + $request = $this->kVUnlinkFromProjectRequest($organization, $project, $store_id, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\QuantClient\Model\KVLinkToProject200Response', + $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 $this->handleResponseWithDataType( + '\QuantClient\Model\KVLinkToProject200Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\QuantClient\Model\KVLinkToProject200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\QuantClient\Model\V2Error', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\QuantClient\Model\V2Error', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation kVUnlinkFromProjectAsync + * + * Unlink a KV store from this project + * + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) + * @param string $store_id KV store identifier (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVUnlinkFromProject'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function kVUnlinkFromProjectAsync($organization, $project, $store_id, string $contentType = self::contentTypes['kVUnlinkFromProject'][0]) + { + return $this->kVUnlinkFromProjectAsyncWithHttpInfo($organization, $project, $store_id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation kVUnlinkFromProjectAsyncWithHttpInfo + * + * Unlink a KV store from this project + * + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) + * @param string $store_id KV store identifier (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVUnlinkFromProject'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function kVUnlinkFromProjectAsyncWithHttpInfo($organization, $project, $store_id, string $contentType = self::contentTypes['kVUnlinkFromProject'][0]) + { + $returnType = '\QuantClient\Model\KVLinkToProject200Response'; + $request = $this->kVUnlinkFromProjectRequest($organization, $project, $store_id, $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() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'kVUnlinkFromProject' + * + * @param string $organization Organization identifier (required) + * @param string $project Project identifier (required) + * @param string $store_id KV store identifier (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['kVUnlinkFromProject'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function kVUnlinkFromProjectRequest($organization, $project, $store_id, string $contentType = self::contentTypes['kVUnlinkFromProject'][0]) + { + + // verify the required parameter 'organization' is set + if ($organization === null || (is_array($organization) && count($organization) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organization when calling kVUnlinkFromProject' + ); + } + + // verify the required parameter 'project' is set + if ($project === null || (is_array($project) && count($project) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $project when calling kVUnlinkFromProject' + ); + } + + // verify the required parameter 'store_id' is set + if ($store_id === null || (is_array($store_id) && count($store_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $store_id when calling kVUnlinkFromProject' + ); + } + + + $resourcePath = '/api/v2/organizations/{organization}/projects/{project}/kv/{store_id}/link'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($organization !== null) { + $resourcePath = str_replace( + '{' . 'organization' . '}', + ObjectSerializer::toPathValue($organization), + $resourcePath + ); + } + // path params + if ($project !== null) { + $resourcePath = str_replace( + '{' . 'project' . '}', + ObjectSerializer::toPathValue($project), + $resourcePath + ); + } + // path params + if ($store_id !== null) { + $resourcePath = str_replace( + '{' . 'store_id' . '}', + ObjectSerializer::toPathValue($store_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Create http client option * diff --git a/src/Api/OrganizationsApi.php b/src/Api/OrganizationsApi.php index 9a4b4dd..d21710f 100644 --- a/src/Api/OrganizationsApi.php +++ b/src/Api/OrganizationsApi.php @@ -14,7 +14,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Api/ProjectsApi.php b/src/Api/ProjectsApi.php index a15eeb3..86deb36 100644 --- a/src/Api/ProjectsApi.php +++ b/src/Api/ProjectsApi.php @@ -14,7 +14,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Api/PurgeApi.php b/src/Api/PurgeApi.php index 52fdfad..99655ed 100644 --- a/src/Api/PurgeApi.php +++ b/src/Api/PurgeApi.php @@ -14,7 +14,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Api/RulesApi.php b/src/Api/RulesApi.php index f9bcda6..5334dc7 100644 --- a/src/Api/RulesApi.php +++ b/src/Api/RulesApi.php @@ -14,7 +14,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Api/SSHAccessApi.php b/src/Api/SSHAccessApi.php index 8d72b4f..b2ed4b3 100644 --- a/src/Api/SSHAccessApi.php +++ b/src/Api/SSHAccessApi.php @@ -14,7 +14,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Api/ScalingPolicyApi.php b/src/Api/ScalingPolicyApi.php index da67e4e..5158f72 100644 --- a/src/Api/ScalingPolicyApi.php +++ b/src/Api/ScalingPolicyApi.php @@ -14,7 +14,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Api/TokensApi.php b/src/Api/TokensApi.php new file mode 100644 index 0000000..42cc9c8 --- /dev/null +++ b/src/Api/TokensApi.php @@ -0,0 +1,1134 @@ + [ + 'application/json', + ], + 'tokensDelete' => [ + 'application/json', + ], + 'tokensList' => [ + 'application/json', + ], + ]; + + /** + * @param ClientInterface $client + * @param Configuration $config + * @param HeaderSelector $selector + * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec + */ + public function __construct( + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0 + ) { + $this->client = $client ?: new Client(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation tokensCreate + * + * Create a new API token scoped to this organization + * + * @param string $organization Organization identifier (required) + * @param \QuantClient\Model\TokensCreateRequest $tokens_create_request tokens_create_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['tokensCreate'] 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\TokensCreate201Response|\QuantClient\Model\V2Error|\QuantClient\Model\V2Error|\QuantClient\Model\V2Error + */ + public function tokensCreate($organization, $tokens_create_request, string $contentType = self::contentTypes['tokensCreate'][0]) + { + list($response) = $this->tokensCreateWithHttpInfo($organization, $tokens_create_request, $contentType); + return $response; + } + + /** + * Operation tokensCreateWithHttpInfo + * + * Create a new API token scoped to this organization + * + * @param string $organization Organization identifier (required) + * @param \QuantClient\Model\TokensCreateRequest $tokens_create_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['tokensCreate'] 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\TokensCreate201Response|\QuantClient\Model\V2Error|\QuantClient\Model\V2Error|\QuantClient\Model\V2Error, HTTP status code, HTTP response headers (array of strings) + */ + public function tokensCreateWithHttpInfo($organization, $tokens_create_request, string $contentType = self::contentTypes['tokensCreate'][0]) + { + $request = $this->tokensCreateRequest($organization, $tokens_create_request, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 201: + return $this->handleResponseWithDataType( + '\QuantClient\Model\TokensCreate201Response', + $request, + $response, + ); + case 400: + return $this->handleResponseWithDataType( + '\QuantClient\Model\V2Error', + $request, + $response, + ); + case 403: + return $this->handleResponseWithDataType( + '\QuantClient\Model\V2Error', + $request, + $response, + ); + case 422: + 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 $this->handleResponseWithDataType( + '\QuantClient\Model\TokensCreate201Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\QuantClient\Model\TokensCreate201Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\QuantClient\Model\V2Error', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\QuantClient\Model\V2Error', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 422: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\QuantClient\Model\V2Error', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation tokensCreateAsync + * + * Create a new API token scoped to this organization + * + * @param string $organization Organization identifier (required) + * @param \QuantClient\Model\TokensCreateRequest $tokens_create_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['tokensCreate'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function tokensCreateAsync($organization, $tokens_create_request, string $contentType = self::contentTypes['tokensCreate'][0]) + { + return $this->tokensCreateAsyncWithHttpInfo($organization, $tokens_create_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation tokensCreateAsyncWithHttpInfo + * + * Create a new API token scoped to this organization + * + * @param string $organization Organization identifier (required) + * @param \QuantClient\Model\TokensCreateRequest $tokens_create_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['tokensCreate'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function tokensCreateAsyncWithHttpInfo($organization, $tokens_create_request, string $contentType = self::contentTypes['tokensCreate'][0]) + { + $returnType = '\QuantClient\Model\TokensCreate201Response'; + $request = $this->tokensCreateRequest($organization, $tokens_create_request, $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() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'tokensCreate' + * + * @param string $organization Organization identifier (required) + * @param \QuantClient\Model\TokensCreateRequest $tokens_create_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['tokensCreate'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function tokensCreateRequest($organization, $tokens_create_request, string $contentType = self::contentTypes['tokensCreate'][0]) + { + + // verify the required parameter 'organization' is set + if ($organization === null || (is_array($organization) && count($organization) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organization when calling tokensCreate' + ); + } + + // verify the required parameter 'tokens_create_request' is set + if ($tokens_create_request === null || (is_array($tokens_create_request) && count($tokens_create_request) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $tokens_create_request when calling tokensCreate' + ); + } + + + $resourcePath = '/api/v2/organizations/{organization}/tokens'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($organization !== null) { + $resourcePath = str_replace( + '{' . 'organization' . '}', + ObjectSerializer::toPathValue($organization), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($tokens_create_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($tokens_create_request)); + } else { + $httpBody = $tokens_create_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation tokensDelete + * + * Revoke an API token + * + * @param string $organization Organization identifier (required) + * @param int $token_id Token ID to revoke (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['tokensDelete'] 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\TokensDelete200Response|\QuantClient\Model\V2Error|\QuantClient\Model\V2Error + */ + public function tokensDelete($organization, $token_id, string $contentType = self::contentTypes['tokensDelete'][0]) + { + list($response) = $this->tokensDeleteWithHttpInfo($organization, $token_id, $contentType); + return $response; + } + + /** + * Operation tokensDeleteWithHttpInfo + * + * Revoke an API token + * + * @param string $organization Organization identifier (required) + * @param int $token_id Token ID to revoke (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['tokensDelete'] 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\TokensDelete200Response|\QuantClient\Model\V2Error|\QuantClient\Model\V2Error, HTTP status code, HTTP response headers (array of strings) + */ + public function tokensDeleteWithHttpInfo($organization, $token_id, string $contentType = self::contentTypes['tokensDelete'][0]) + { + $request = $this->tokensDeleteRequest($organization, $token_id, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\QuantClient\Model\TokensDelete200Response', + $request, + $response, + ); + case 403: + return $this->handleResponseWithDataType( + '\QuantClient\Model\V2Error', + $request, + $response, + ); + case 404: + 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 $this->handleResponseWithDataType( + '\QuantClient\Model\TokensDelete200Response', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\QuantClient\Model\TokensDelete200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\QuantClient\Model\V2Error', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\QuantClient\Model\V2Error', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation tokensDeleteAsync + * + * Revoke an API token + * + * @param string $organization Organization identifier (required) + * @param int $token_id Token ID to revoke (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['tokensDelete'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function tokensDeleteAsync($organization, $token_id, string $contentType = self::contentTypes['tokensDelete'][0]) + { + return $this->tokensDeleteAsyncWithHttpInfo($organization, $token_id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation tokensDeleteAsyncWithHttpInfo + * + * Revoke an API token + * + * @param string $organization Organization identifier (required) + * @param int $token_id Token ID to revoke (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['tokensDelete'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function tokensDeleteAsyncWithHttpInfo($organization, $token_id, string $contentType = self::contentTypes['tokensDelete'][0]) + { + $returnType = '\QuantClient\Model\TokensDelete200Response'; + $request = $this->tokensDeleteRequest($organization, $token_id, $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() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'tokensDelete' + * + * @param string $organization Organization identifier (required) + * @param int $token_id Token ID to revoke (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['tokensDelete'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function tokensDeleteRequest($organization, $token_id, string $contentType = self::contentTypes['tokensDelete'][0]) + { + + // verify the required parameter 'organization' is set + if ($organization === null || (is_array($organization) && count($organization) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organization when calling tokensDelete' + ); + } + + // verify the required parameter 'token_id' is set + if ($token_id === null || (is_array($token_id) && count($token_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $token_id when calling tokensDelete' + ); + } + + + $resourcePath = '/api/v2/organizations/{organization}/tokens/{token_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($organization !== null) { + $resourcePath = str_replace( + '{' . 'organization' . '}', + ObjectSerializer::toPathValue($organization), + $resourcePath + ); + } + // path params + if ($token_id !== null) { + $resourcePath = str_replace( + '{' . 'token_id' . '}', + ObjectSerializer::toPathValue($token_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation tokensList + * + * List API tokens scoped to this organization + * + * @param string $organization Organization identifier (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['tokensList'] 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\TokensList200ResponseInner[]|\QuantClient\Model\V2Error + */ + public function tokensList($organization, string $contentType = self::contentTypes['tokensList'][0]) + { + list($response) = $this->tokensListWithHttpInfo($organization, $contentType); + return $response; + } + + /** + * Operation tokensListWithHttpInfo + * + * List API tokens scoped to this organization + * + * @param string $organization Organization identifier (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['tokensList'] 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\TokensList200ResponseInner[]|\QuantClient\Model\V2Error, HTTP status code, HTTP response headers (array of strings) + */ + public function tokensListWithHttpInfo($organization, string $contentType = self::contentTypes['tokensList'][0]) + { + $request = $this->tokensListRequest($organization, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\QuantClient\Model\TokensList200ResponseInner[]', + $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 $this->handleResponseWithDataType( + '\QuantClient\Model\TokensList200ResponseInner[]', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\QuantClient\Model\TokensList200ResponseInner[]', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\QuantClient\Model\V2Error', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation tokensListAsync + * + * List API tokens scoped to this organization + * + * @param string $organization Organization identifier (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['tokensList'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function tokensListAsync($organization, string $contentType = self::contentTypes['tokensList'][0]) + { + return $this->tokensListAsyncWithHttpInfo($organization, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation tokensListAsyncWithHttpInfo + * + * List API tokens scoped to this organization + * + * @param string $organization Organization identifier (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['tokensList'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function tokensListAsyncWithHttpInfo($organization, string $contentType = self::contentTypes['tokensList'][0]) + { + $returnType = '\QuantClient\Model\TokensList200ResponseInner[]'; + $request = $this->tokensListRequest($organization, $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() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'tokensList' + * + * @param string $organization Organization identifier (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['tokensList'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function tokensListRequest($organization, string $contentType = self::contentTypes['tokensList'][0]) + { + + // verify the required parameter 'organization' is set + if ($organization === null || (is_array($organization) && count($organization) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $organization when calling tokensList' + ); + } + + + $resourcePath = '/api/v2/organizations/{organization}/tokens'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($organization !== null) { + $resourcePath = str_replace( + '{' . 'organization' . '}', + ObjectSerializer::toPathValue($organization), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + 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 8d97964..b5411d5 100644 --- a/src/Api/VariablesApi.php +++ b/src/Api/VariablesApi.php @@ -14,7 +14,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Api/VolumesApi.php b/src/Api/VolumesApi.php index 10829b4..4c57379 100644 --- a/src/Api/VolumesApi.php +++ b/src/Api/VolumesApi.php @@ -14,7 +14,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/ApiException.php b/src/ApiException.php index 19281b8..7e79262 100644 --- a/src/ApiException.php +++ b/src/ApiException.php @@ -14,7 +14,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Configuration.php b/src/Configuration.php index 595f702..58c1eee 100644 --- a/src/Configuration.php +++ b/src/Configuration.php @@ -14,7 +14,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ @@ -100,7 +100,7 @@ class Configuration * * @var string */ - protected $userAgent = 'OpenAPI-Generator/4.9.0/PHP'; + protected $userAgent = 'OpenAPI-Generator/4.15.3/PHP'; /** * Debug switch (default set to false) @@ -432,8 +432,8 @@ public static function toDebugReport() $report = 'PHP SDK (QuantClient) Debug Report:' . PHP_EOL; $report .= ' OS: ' . php_uname() . PHP_EOL; $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; - $report .= ' The version of the OpenAPI document: 4.9.0' . PHP_EOL; - $report .= ' SDK Package Version: 4.9.0' . PHP_EOL; + $report .= ' The version of the OpenAPI document: 4.15.3' . PHP_EOL; + $report .= ' SDK Package Version: 4.15.3' . PHP_EOL; $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; return $report; diff --git a/src/FormDataProcessor.php b/src/FormDataProcessor.php index 0c3babb..aa1c3ee 100644 --- a/src/FormDataProcessor.php +++ b/src/FormDataProcessor.php @@ -14,7 +14,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/HeaderSelector.php b/src/HeaderSelector.php index 42c49c9..ca6f9b0 100644 --- a/src/HeaderSelector.php +++ b/src/HeaderSelector.php @@ -14,7 +14,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/Application.php b/src/Model/Application.php index 5444a5b..1ec6b54 100644 --- a/src/Model/Application.php +++ b/src/Model/Application.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ApplicationDatabase.php b/src/Model/ApplicationDatabase.php index 84ab609..30e4d36 100644 --- a/src/Model/ApplicationDatabase.php +++ b/src/Model/ApplicationDatabase.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ApplicationDeploymentInformationInner.php b/src/Model/ApplicationDeploymentInformationInner.php index b4947a4..634be26 100644 --- a/src/Model/ApplicationDeploymentInformationInner.php +++ b/src/Model/ApplicationDeploymentInformationInner.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ApplicationEnvironmentsInner.php b/src/Model/ApplicationEnvironmentsInner.php index 793a69e..ef3ead0 100644 --- a/src/Model/ApplicationEnvironmentsInner.php +++ b/src/Model/ApplicationEnvironmentsInner.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ApplicationFilesystem.php b/src/Model/ApplicationFilesystem.php index cc71ee8..0677238 100644 --- a/src/Model/ApplicationFilesystem.php +++ b/src/Model/ApplicationFilesystem.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ApplicationImageReference.php b/src/Model/ApplicationImageReference.php index ed7a049..0b76009 100644 --- a/src/Model/ApplicationImageReference.php +++ b/src/Model/ApplicationImageReference.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/BulkSetEnvironmentVariablesRequest.php b/src/Model/BulkSetEnvironmentVariablesRequest.php index b24109a..99a57bc 100644 --- a/src/Model/BulkSetEnvironmentVariablesRequest.php +++ b/src/Model/BulkSetEnvironmentVariablesRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/BulkSetEnvironmentVariablesRequestEnvironmentInner.php b/src/Model/BulkSetEnvironmentVariablesRequestEnvironmentInner.php index a64186c..07295c7 100644 --- a/src/Model/BulkSetEnvironmentVariablesRequestEnvironmentInner.php +++ b/src/Model/BulkSetEnvironmentVariablesRequestEnvironmentInner.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ChatInference200Response.php b/src/Model/ChatInference200Response.php index 9b022dc..1e1b91a 100644 --- a/src/Model/ChatInference200Response.php +++ b/src/Model/ChatInference200Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ChatInference200ResponseResponse.php b/src/Model/ChatInference200ResponseResponse.php index e9720e6..9b830fc 100644 --- a/src/Model/ChatInference200ResponseResponse.php +++ b/src/Model/ChatInference200ResponseResponse.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ChatInference200ResponseResponseToolUse.php b/src/Model/ChatInference200ResponseResponseToolUse.php index 077137d..6f4257e 100644 --- a/src/Model/ChatInference200ResponseResponseToolUse.php +++ b/src/Model/ChatInference200ResponseResponseToolUse.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ChatInference200ResponseResponseToolUseOneOf.php b/src/Model/ChatInference200ResponseResponseToolUseOneOf.php index 57b74c2..115d2cf 100644 --- a/src/Model/ChatInference200ResponseResponseToolUseOneOf.php +++ b/src/Model/ChatInference200ResponseResponseToolUseOneOf.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ChatInference200ResponseResponseToolUseOneOf1Inner.php b/src/Model/ChatInference200ResponseResponseToolUseOneOf1Inner.php index 6a500b0..5a89c89 100644 --- a/src/Model/ChatInference200ResponseResponseToolUseOneOf1Inner.php +++ b/src/Model/ChatInference200ResponseResponseToolUseOneOf1Inner.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ChatInference200ResponseResponseToolUseOneOfResult.php b/src/Model/ChatInference200ResponseResponseToolUseOneOfResult.php index b5c993e..acdc609 100644 --- a/src/Model/ChatInference200ResponseResponseToolUseOneOfResult.php +++ b/src/Model/ChatInference200ResponseResponseToolUseOneOfResult.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ChatInference200ResponseUsage.php b/src/Model/ChatInference200ResponseUsage.php index af4f1d8..3ab1171 100644 --- a/src/Model/ChatInference200ResponseUsage.php +++ b/src/Model/ChatInference200ResponseUsage.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ChatInference202Response.php b/src/Model/ChatInference202Response.php index 5733524..cd6dc1c 100644 --- a/src/Model/ChatInference202Response.php +++ b/src/Model/ChatInference202Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ChatInferenceRequest.php b/src/Model/ChatInferenceRequest.php index dd6950c..2893e5c 100644 --- a/src/Model/ChatInferenceRequest.php +++ b/src/Model/ChatInferenceRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ @@ -68,7 +68,10 @@ class ChatInferenceRequest implements ModelInterface, ArrayAccess, \JsonSerializ 'response_format' => '\QuantClient\Model\ChatInferenceRequestResponseFormat', 'tool_config' => '\QuantClient\Model\ChatInferenceRequestToolConfig', 'session_id' => 'string', - 'async' => 'bool' + 'async' => 'bool', + 'allowed_tools' => 'string[]', + 'guardrails' => '\QuantClient\Model\ChatInferenceRequestGuardrails', + 'long_context' => 'bool' ]; /** @@ -90,7 +93,10 @@ class ChatInferenceRequest implements ModelInterface, ArrayAccess, \JsonSerializ 'response_format' => null, 'tool_config' => null, 'session_id' => 'uuid', - 'async' => null + 'async' => null, + 'allowed_tools' => null, + 'guardrails' => null, + 'long_context' => null ]; /** @@ -110,7 +116,10 @@ class ChatInferenceRequest implements ModelInterface, ArrayAccess, \JsonSerializ 'response_format' => false, 'tool_config' => false, 'session_id' => false, - 'async' => false + 'async' => false, + 'allowed_tools' => false, + 'guardrails' => false, + 'long_context' => false ]; /** @@ -210,7 +219,10 @@ public function isNullableSetToNull(string $property): bool 'response_format' => 'responseFormat', 'tool_config' => 'toolConfig', 'session_id' => 'sessionId', - 'async' => 'async' + 'async' => 'async', + 'allowed_tools' => 'allowedTools', + 'guardrails' => 'guardrails', + 'long_context' => 'longContext' ]; /** @@ -230,7 +242,10 @@ public function isNullableSetToNull(string $property): bool 'response_format' => 'setResponseFormat', 'tool_config' => 'setToolConfig', 'session_id' => 'setSessionId', - 'async' => 'setAsync' + 'async' => 'setAsync', + 'allowed_tools' => 'setAllowedTools', + 'guardrails' => 'setGuardrails', + 'long_context' => 'setLongContext' ]; /** @@ -250,7 +265,10 @@ public function isNullableSetToNull(string $property): bool 'response_format' => 'getResponseFormat', 'tool_config' => 'getToolConfig', 'session_id' => 'getSessionId', - 'async' => 'getAsync' + 'async' => 'getAsync', + 'allowed_tools' => 'getAllowedTools', + 'guardrails' => 'getGuardrails', + 'long_context' => 'getLongContext' ]; /** @@ -322,6 +340,9 @@ public function __construct(?array $data = null) $this->setIfExists('tool_config', $data ?? [], null); $this->setIfExists('session_id', $data ?? [], null); $this->setIfExists('async', $data ?? [], false); + $this->setIfExists('allowed_tools', $data ?? [], null); + $this->setIfExists('guardrails', $data ?? [], null); + $this->setIfExists('long_context', $data ?? [], false); } /** @@ -760,6 +781,87 @@ public function setAsync($async) return $this; } + + /** + * Gets allowed_tools + * + * @return string[]|null + */ + public function getAllowedTools() + { + return $this->container['allowed_tools']; + } + + /** + * Sets allowed_tools + * + * @param string[]|null $allowed_tools Top-level convenience alias for toolConfig.allowedTools. Whitelists which tools can be auto-executed. + * + * @return self + */ + public function setAllowedTools($allowed_tools) + { + if (is_null($allowed_tools)) { + throw new \InvalidArgumentException('non-nullable allowed_tools cannot be null'); + } + $this->container['allowed_tools'] = $allowed_tools; + + return $this; + } + + /** + * Gets guardrails + * + * @return \QuantClient\Model\ChatInferenceRequestGuardrails|null + */ + public function getGuardrails() + { + return $this->container['guardrails']; + } + + /** + * Sets guardrails + * + * @param \QuantClient\Model\ChatInferenceRequestGuardrails|null $guardrails guardrails + * + * @return self + */ + public function setGuardrails($guardrails) + { + if (is_null($guardrails)) { + throw new \InvalidArgumentException('non-nullable guardrails cannot be null'); + } + $this->container['guardrails'] = $guardrails; + + return $this; + } + + /** + * Gets long_context + * + * @return bool|null + */ + public function getLongContext() + { + return $this->container['long_context']; + } + + /** + * Sets long_context + * + * @param bool|null $long_context Enable 1M context window support regardless of token estimation. Use when sending large payloads (>200K tokens). + * + * @return self + */ + public function setLongContext($long_context) + { + if (is_null($long_context)) { + throw new \InvalidArgumentException('non-nullable long_context cannot be null'); + } + $this->container['long_context'] = $long_context; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/ChatInferenceRequestGuardrails.php b/src/Model/ChatInferenceRequestGuardrails.php new file mode 100644 index 0000000..a3af9a0 --- /dev/null +++ b/src/Model/ChatInferenceRequestGuardrails.php @@ -0,0 +1,512 @@ + + */ +class ChatInferenceRequestGuardrails implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'chatInference_request_guardrails'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'guardrail_identifier' => 'string', + 'guardrail_version' => 'string', + 'trace' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'guardrail_identifier' => null, + 'guardrail_version' => null, + 'trace' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'guardrail_identifier' => false, + 'guardrail_version' => false, + 'trace' => 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 = [ + 'guardrail_identifier' => 'guardrailIdentifier', + 'guardrail_version' => 'guardrailVersion', + 'trace' => 'trace' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'guardrail_identifier' => 'setGuardrailIdentifier', + 'guardrail_version' => 'setGuardrailVersion', + 'trace' => 'setTrace' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'guardrail_identifier' => 'getGuardrailIdentifier', + 'guardrail_version' => 'getGuardrailVersion', + 'trace' => 'getTrace' + ]; + + /** + * 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 TRACE_ENABLED = 'enabled'; + public const TRACE_DISABLED = 'disabled'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTraceAllowableValues() + { + return [ + self::TRACE_ENABLED, + self::TRACE_DISABLED, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('guardrail_identifier', $data ?? [], null); + $this->setIfExists('guardrail_version', $data ?? [], null); + $this->setIfExists('trace', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param 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->getTraceAllowableValues(); + if (!is_null($this->container['trace']) && !in_array($this->container['trace'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'trace', must be one of '%s'", + $this->container['trace'], + implode("', '", $allowedValues) + ); + } + + 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 guardrail_identifier + * + * @return string|null + */ + public function getGuardrailIdentifier() + { + return $this->container['guardrail_identifier']; + } + + /** + * Sets guardrail_identifier + * + * @param string|null $guardrail_identifier Guardrail identifier from AWS Bedrock + * + * @return self + */ + public function setGuardrailIdentifier($guardrail_identifier) + { + if (is_null($guardrail_identifier)) { + throw new \InvalidArgumentException('non-nullable guardrail_identifier cannot be null'); + } + $this->container['guardrail_identifier'] = $guardrail_identifier; + + return $this; + } + + /** + * Gets guardrail_version + * + * @return string|null + */ + public function getGuardrailVersion() + { + return $this->container['guardrail_version']; + } + + /** + * Sets guardrail_version + * + * @param string|null $guardrail_version Guardrail version + * + * @return self + */ + public function setGuardrailVersion($guardrail_version) + { + if (is_null($guardrail_version)) { + throw new \InvalidArgumentException('non-nullable guardrail_version cannot be null'); + } + $this->container['guardrail_version'] = $guardrail_version; + + return $this; + } + + /** + * Gets trace + * + * @return string|null + */ + public function getTrace() + { + return $this->container['trace']; + } + + /** + * Sets trace + * + * @param string|null $trace Enable guardrail trace output + * + * @return self + */ + public function setTrace($trace) + { + if (is_null($trace)) { + throw new \InvalidArgumentException('non-nullable trace cannot be null'); + } + $allowedValues = $this->getTraceAllowableValues(); + if (!in_array($trace, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'trace', must be one of '%s'", + $trace, + implode("', '", $allowedValues) + ) + ); + } + $this->container['trace'] = $trace; + + 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/ChatInferenceRequestMessagesInner.php b/src/Model/ChatInferenceRequestMessagesInner.php index dffc9aa..3fb0053 100644 --- a/src/Model/ChatInferenceRequestMessagesInner.php +++ b/src/Model/ChatInferenceRequestMessagesInner.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ChatInferenceRequestMessagesInnerContent.php b/src/Model/ChatInferenceRequestMessagesInnerContent.php index 8ffa59e..f97ada3 100644 --- a/src/Model/ChatInferenceRequestMessagesInnerContent.php +++ b/src/Model/ChatInferenceRequestMessagesInnerContent.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInner.php b/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInner.php index b92a3b2..fab1f42 100644 --- a/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInner.php +++ b/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInner.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf.php b/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf.php index 0c35868..bad15be 100644 --- a/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf.php +++ b/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf1.php b/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf1.php index 77dba46..f3582ff 100644 --- a/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf1.php +++ b/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf1.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf1Image.php b/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf1Image.php index 2c247e4..7acb987 100644 --- a/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf1Image.php +++ b/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf1Image.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf1ImageSource.php b/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf1ImageSource.php index 3a52b69..dd49a2d 100644 --- a/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf1ImageSource.php +++ b/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf1ImageSource.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf2.php b/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf2.php index 74c0721..a728247 100644 --- a/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf2.php +++ b/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf2.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf2Video.php b/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf2Video.php index 0aff0ec..2449682 100644 --- a/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf2Video.php +++ b/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf2Video.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf2VideoSource.php b/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf2VideoSource.php index a65a907..fb1386c 100644 --- a/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf2VideoSource.php +++ b/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf2VideoSource.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf3.php b/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf3.php index 9933a92..84ba532 100644 --- a/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf3.php +++ b/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf3.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf3Document.php b/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf3Document.php index 0c2a69a..c9fdf8c 100644 --- a/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf3Document.php +++ b/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf3Document.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf3DocumentSource.php b/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf3DocumentSource.php index 1b4ff95..5ed5634 100644 --- a/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf3DocumentSource.php +++ b/src/Model/ChatInferenceRequestMessagesInnerContentOneOfInnerOneOf3DocumentSource.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ChatInferenceRequestResponseFormat.php b/src/Model/ChatInferenceRequestResponseFormat.php index 0f19b23..f3e83b3 100644 --- a/src/Model/ChatInferenceRequestResponseFormat.php +++ b/src/Model/ChatInferenceRequestResponseFormat.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ChatInferenceRequestToolConfig.php b/src/Model/ChatInferenceRequestToolConfig.php index 886f305..f71b9b8 100644 --- a/src/Model/ChatInferenceRequestToolConfig.php +++ b/src/Model/ChatInferenceRequestToolConfig.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ChatInferenceRequestToolConfigToolsInner.php b/src/Model/ChatInferenceRequestToolConfigToolsInner.php index 378c251..2fad160 100644 --- a/src/Model/ChatInferenceRequestToolConfigToolsInner.php +++ b/src/Model/ChatInferenceRequestToolConfigToolsInner.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ChatInferenceRequestToolConfigToolsInnerToolSpec.php b/src/Model/ChatInferenceRequestToolConfigToolsInnerToolSpec.php index 97a14a0..4eea91e 100644 --- a/src/Model/ChatInferenceRequestToolConfigToolsInnerToolSpec.php +++ b/src/Model/ChatInferenceRequestToolConfigToolsInnerToolSpec.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ChatInferenceRequestToolConfigToolsInnerToolSpecInputSchema.php b/src/Model/ChatInferenceRequestToolConfigToolsInnerToolSpecInputSchema.php index c7a4255..0893f72 100644 --- a/src/Model/ChatInferenceRequestToolConfigToolsInnerToolSpecInputSchema.php +++ b/src/Model/ChatInferenceRequestToolConfigToolsInnerToolSpecInputSchema.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ChatInferenceStreamRequest.php b/src/Model/ChatInferenceStreamRequest.php index b5fc9da..016338c 100644 --- a/src/Model/ChatInferenceStreamRequest.php +++ b/src/Model/ChatInferenceStreamRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ @@ -67,7 +67,10 @@ class ChatInferenceStreamRequest implements ModelInterface, ArrayAccess, \JsonSe 'response_format' => '\QuantClient\Model\ChatInferenceRequestResponseFormat', 'tool_config' => '\QuantClient\Model\ChatInferenceRequestToolConfig', 'session_id' => 'string', - 'async' => 'bool' + 'async' => 'bool', + 'allowed_tools' => 'string[]', + 'guardrails' => '\QuantClient\Model\ChatInferenceRequestGuardrails', + 'long_context' => 'bool' ]; /** @@ -88,7 +91,10 @@ class ChatInferenceStreamRequest implements ModelInterface, ArrayAccess, \JsonSe 'response_format' => null, 'tool_config' => null, 'session_id' => 'uuid', - 'async' => null + 'async' => null, + 'allowed_tools' => null, + 'guardrails' => null, + 'long_context' => null ]; /** @@ -107,7 +113,10 @@ class ChatInferenceStreamRequest implements ModelInterface, ArrayAccess, \JsonSe 'response_format' => false, 'tool_config' => false, 'session_id' => false, - 'async' => false + 'async' => false, + 'allowed_tools' => false, + 'guardrails' => false, + 'long_context' => false ]; /** @@ -206,7 +215,10 @@ public function isNullableSetToNull(string $property): bool 'response_format' => 'responseFormat', 'tool_config' => 'toolConfig', 'session_id' => 'sessionId', - 'async' => 'async' + 'async' => 'async', + 'allowed_tools' => 'allowedTools', + 'guardrails' => 'guardrails', + 'long_context' => 'longContext' ]; /** @@ -225,7 +237,10 @@ public function isNullableSetToNull(string $property): bool 'response_format' => 'setResponseFormat', 'tool_config' => 'setToolConfig', 'session_id' => 'setSessionId', - 'async' => 'setAsync' + 'async' => 'setAsync', + 'allowed_tools' => 'setAllowedTools', + 'guardrails' => 'setGuardrails', + 'long_context' => 'setLongContext' ]; /** @@ -244,7 +259,10 @@ public function isNullableSetToNull(string $property): bool 'response_format' => 'getResponseFormat', 'tool_config' => 'getToolConfig', 'session_id' => 'getSessionId', - 'async' => 'getAsync' + 'async' => 'getAsync', + 'allowed_tools' => 'getAllowedTools', + 'guardrails' => 'getGuardrails', + 'long_context' => 'getLongContext' ]; /** @@ -315,6 +333,9 @@ public function __construct(?array $data = null) $this->setIfExists('tool_config', $data ?? [], null); $this->setIfExists('session_id', $data ?? [], null); $this->setIfExists('async', $data ?? [], false); + $this->setIfExists('allowed_tools', $data ?? [], null); + $this->setIfExists('guardrails', $data ?? [], null); + $this->setIfExists('long_context', $data ?? [], false); } /** @@ -726,6 +747,87 @@ public function setAsync($async) return $this; } + + /** + * Gets allowed_tools + * + * @return string[]|null + */ + public function getAllowedTools() + { + return $this->container['allowed_tools']; + } + + /** + * Sets allowed_tools + * + * @param string[]|null $allowed_tools Top-level convenience alias for toolConfig.allowedTools. Whitelists which tools can be auto-executed. + * + * @return self + */ + public function setAllowedTools($allowed_tools) + { + if (is_null($allowed_tools)) { + throw new \InvalidArgumentException('non-nullable allowed_tools cannot be null'); + } + $this->container['allowed_tools'] = $allowed_tools; + + return $this; + } + + /** + * Gets guardrails + * + * @return \QuantClient\Model\ChatInferenceRequestGuardrails|null + */ + public function getGuardrails() + { + return $this->container['guardrails']; + } + + /** + * Sets guardrails + * + * @param \QuantClient\Model\ChatInferenceRequestGuardrails|null $guardrails guardrails + * + * @return self + */ + public function setGuardrails($guardrails) + { + if (is_null($guardrails)) { + throw new \InvalidArgumentException('non-nullable guardrails cannot be null'); + } + $this->container['guardrails'] = $guardrails; + + return $this; + } + + /** + * Gets long_context + * + * @return bool|null + */ + public function getLongContext() + { + return $this->container['long_context']; + } + + /** + * Sets long_context + * + * @param bool|null $long_context Enable 1M context window support regardless of token estimation. Use when sending large payloads (>200K tokens). + * + * @return self + */ + public function setLongContext($long_context) + { + if (is_null($long_context)) { + throw new \InvalidArgumentException('non-nullable long_context cannot be null'); + } + $this->container['long_context'] = $long_context; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/ChatInferenceStreamRequestMessagesInner.php b/src/Model/ChatInferenceStreamRequestMessagesInner.php index 4408994..b7d5f5b 100644 --- a/src/Model/ChatInferenceStreamRequestMessagesInner.php +++ b/src/Model/ChatInferenceStreamRequestMessagesInner.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ChatInferenceStreamRequestMessagesInnerContent.php b/src/Model/ChatInferenceStreamRequestMessagesInnerContent.php index 1625ec3..2a6588b 100644 --- a/src/Model/ChatInferenceStreamRequestMessagesInnerContent.php +++ b/src/Model/ChatInferenceStreamRequestMessagesInnerContent.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ChatWithAIAgent200Response.php b/src/Model/ChatWithAIAgent200Response.php index 6cfa862..7ac6fa7 100644 --- a/src/Model/ChatWithAIAgent200Response.php +++ b/src/Model/ChatWithAIAgent200Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ChatWithAIAgent200ResponseResponse.php b/src/Model/ChatWithAIAgent200ResponseResponse.php index 9807399..afe9dce 100644 --- a/src/Model/ChatWithAIAgent200ResponseResponse.php +++ b/src/Model/ChatWithAIAgent200ResponseResponse.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ChatWithAIAgent200ResponseResponseUsage.php b/src/Model/ChatWithAIAgent200ResponseResponseUsage.php index 6799660..3f7fce8 100644 --- a/src/Model/ChatWithAIAgent200ResponseResponseUsage.php +++ b/src/Model/ChatWithAIAgent200ResponseResponseUsage.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ChatWithAIAgent202Response.php b/src/Model/ChatWithAIAgent202Response.php index 738283a..658f9be 100644 --- a/src/Model/ChatWithAIAgent202Response.php +++ b/src/Model/ChatWithAIAgent202Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ChatWithAIAgentRequest.php b/src/Model/ChatWithAIAgentRequest.php index cdba749..467261a 100644 --- a/src/Model/ChatWithAIAgentRequest.php +++ b/src/Model/ChatWithAIAgentRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ @@ -62,7 +62,10 @@ class ChatWithAIAgentRequest implements ModelInterface, ArrayAccess, \JsonSerial 'user_id' => 'string', 'stream' => 'bool', 'async' => 'bool', - 'system' => 'string' + 'system' => 'string', + 'long_context' => 'bool', + 'max_tool_iterations' => 'int', + 'allowed_collections' => 'string[]' ]; /** @@ -78,7 +81,10 @@ class ChatWithAIAgentRequest implements ModelInterface, ArrayAccess, \JsonSerial 'user_id' => null, 'stream' => null, 'async' => null, - 'system' => null + 'system' => null, + 'long_context' => null, + 'max_tool_iterations' => null, + 'allowed_collections' => null ]; /** @@ -92,7 +98,10 @@ class ChatWithAIAgentRequest implements ModelInterface, ArrayAccess, \JsonSerial 'user_id' => false, 'stream' => false, 'async' => false, - 'system' => false + 'system' => false, + 'long_context' => false, + 'max_tool_iterations' => false, + 'allowed_collections' => false ]; /** @@ -186,7 +195,10 @@ public function isNullableSetToNull(string $property): bool 'user_id' => 'userId', 'stream' => 'stream', 'async' => 'async', - 'system' => 'system' + 'system' => 'system', + 'long_context' => 'longContext', + 'max_tool_iterations' => 'maxToolIterations', + 'allowed_collections' => 'allowedCollections' ]; /** @@ -200,7 +212,10 @@ public function isNullableSetToNull(string $property): bool 'user_id' => 'setUserId', 'stream' => 'setStream', 'async' => 'setAsync', - 'system' => 'setSystem' + 'system' => 'setSystem', + 'long_context' => 'setLongContext', + 'max_tool_iterations' => 'setMaxToolIterations', + 'allowed_collections' => 'setAllowedCollections' ]; /** @@ -214,7 +229,10 @@ public function isNullableSetToNull(string $property): bool 'user_id' => 'getUserId', 'stream' => 'getStream', 'async' => 'getAsync', - 'system' => 'getSystem' + 'system' => 'getSystem', + 'long_context' => 'getLongContext', + 'max_tool_iterations' => 'getMaxToolIterations', + 'allowed_collections' => 'getAllowedCollections' ]; /** @@ -280,6 +298,9 @@ public function __construct(?array $data = null) $this->setIfExists('stream', $data ?? [], false); $this->setIfExists('async', $data ?? [], false); $this->setIfExists('system', $data ?? [], null); + $this->setIfExists('long_context', $data ?? [], false); + $this->setIfExists('max_tool_iterations', $data ?? [], null); + $this->setIfExists('allowed_collections', $data ?? [], null); } /** @@ -312,6 +333,14 @@ public function listInvalidProperties() if ($this->container['message'] === null) { $invalidProperties[] = "'message' can't be null"; } + if (!is_null($this->container['max_tool_iterations']) && ($this->container['max_tool_iterations'] > 1000)) { + $invalidProperties[] = "invalid value for 'max_tool_iterations', must be smaller than or equal to 1000."; + } + + if (!is_null($this->container['max_tool_iterations']) && ($this->container['max_tool_iterations'] < 1)) { + $invalidProperties[] = "invalid value for 'max_tool_iterations', must be bigger than or equal to 1."; + } + return $invalidProperties; } @@ -488,6 +517,95 @@ public function setSystem($system) return $this; } + + /** + * Gets long_context + * + * @return bool|null + */ + public function getLongContext() + { + return $this->container['long_context']; + } + + /** + * Sets long_context + * + * @param bool|null $long_context Per-request override to force 1M context window routing + * + * @return self + */ + public function setLongContext($long_context) + { + if (is_null($long_context)) { + throw new \InvalidArgumentException('non-nullable long_context cannot be null'); + } + $this->container['long_context'] = $long_context; + + return $this; + } + + /** + * Gets max_tool_iterations + * + * @return int|null + */ + public function getMaxToolIterations() + { + return $this->container['max_tool_iterations']; + } + + /** + * Sets max_tool_iterations + * + * @param int|null $max_tool_iterations Maximum tool auto-execution iterations for this request + * + * @return self + */ + public function setMaxToolIterations($max_tool_iterations) + { + if (is_null($max_tool_iterations)) { + throw new \InvalidArgumentException('non-nullable max_tool_iterations cannot be null'); + } + + if (($max_tool_iterations > 1000)) { + throw new \InvalidArgumentException('invalid value for $max_tool_iterations when calling ChatWithAIAgentRequest., must be smaller than or equal to 1000.'); + } + if (($max_tool_iterations < 1)) { + throw new \InvalidArgumentException('invalid value for $max_tool_iterations when calling ChatWithAIAgentRequest., must be bigger than or equal to 1.'); + } + + $this->container['max_tool_iterations'] = $max_tool_iterations; + + return $this; + } + + /** + * Gets allowed_collections + * + * @return string[]|null + */ + public function getAllowedCollections() + { + return $this->container['allowed_collections']; + } + + /** + * Sets allowed_collections + * + * @param string[]|null $allowed_collections Per-request override for vector DB collections the agent can query + * + * @return self + */ + public function setAllowedCollections($allowed_collections) + { + if (is_null($allowed_collections)) { + throw new \InvalidArgumentException('non-nullable allowed_collections cannot be null'); + } + $this->container['allowed_collections'] = $allowed_collections; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/Command.php b/src/Model/Command.php index ad4b9e3..0bc0228 100644 --- a/src/Model/Command.php +++ b/src/Model/Command.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/Compose.php b/src/Model/Compose.php index 78d7310..6c3e4c2 100644 --- a/src/Model/Compose.php +++ b/src/Model/Compose.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/Container.php b/src/Model/Container.php index 485d783..5369222 100644 --- a/src/Model/Container.php +++ b/src/Model/Container.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ContainerDependsOnInner.php b/src/Model/ContainerDependsOnInner.php index 83074a0..826e958 100644 --- a/src/Model/ContainerDependsOnInner.php +++ b/src/Model/ContainerDependsOnInner.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ContainerEnvironmentInner.php b/src/Model/ContainerEnvironmentInner.php index 6361124..262d39f 100644 --- a/src/Model/ContainerEnvironmentInner.php +++ b/src/Model/ContainerEnvironmentInner.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ContainerHealthCheck.php b/src/Model/ContainerHealthCheck.php index 3357176..0b968dc 100644 --- a/src/Model/ContainerHealthCheck.php +++ b/src/Model/ContainerHealthCheck.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ContainerImageReference.php b/src/Model/ContainerImageReference.php index 30d2cb9..d1afabc 100644 --- a/src/Model/ContainerImageReference.php +++ b/src/Model/ContainerImageReference.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ContainerMountPointsInner.php b/src/Model/ContainerMountPointsInner.php index 86b1483..3976ec4 100644 --- a/src/Model/ContainerMountPointsInner.php +++ b/src/Model/ContainerMountPointsInner.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ContainerOriginProtectionConfig.php b/src/Model/ContainerOriginProtectionConfig.php index 86b2a31..3c03bd0 100644 --- a/src/Model/ContainerOriginProtectionConfig.php +++ b/src/Model/ContainerOriginProtectionConfig.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ContainerSecretsInner.php b/src/Model/ContainerSecretsInner.php index 11cada7..62c893c 100644 --- a/src/Model/ContainerSecretsInner.php +++ b/src/Model/ContainerSecretsInner.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/CrawlersRun200Response.php b/src/Model/CrawlersRun200Response.php index af54c74..01518ab 100644 --- a/src/Model/CrawlersRun200Response.php +++ b/src/Model/CrawlersRun200Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/CrawlersRunRequest.php b/src/Model/CrawlersRunRequest.php index 248de50..46b6f49 100644 --- a/src/Model/CrawlersRunRequest.php +++ b/src/Model/CrawlersRunRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/CreateAIAgent201Response.php b/src/Model/CreateAIAgent201Response.php index 30368c9..14c6756 100644 --- a/src/Model/CreateAIAgent201Response.php +++ b/src/Model/CreateAIAgent201Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/CreateAIAgentRequest.php b/src/Model/CreateAIAgentRequest.php index 5727c89..f594d4f 100644 --- a/src/Model/CreateAIAgentRequest.php +++ b/src/Model/CreateAIAgentRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ @@ -66,7 +66,11 @@ class CreateAIAgentRequest implements ModelInterface, ArrayAccess, \JsonSerializ 'max_tokens' => 'int', 'allowed_tools' => 'string[]', 'allowed_collections' => 'string[]', - 'created_by' => 'string' + 'assigned_skills' => 'string[]', + 'created_by' => 'string', + 'long_context' => 'bool', + 'guardrail_preset' => 'string', + 'filter_policies' => 'string[]' ]; /** @@ -86,7 +90,11 @@ class CreateAIAgentRequest implements ModelInterface, ArrayAccess, \JsonSerializ 'max_tokens' => null, 'allowed_tools' => null, 'allowed_collections' => null, - 'created_by' => null + 'assigned_skills' => null, + 'created_by' => null, + 'long_context' => null, + 'guardrail_preset' => null, + 'filter_policies' => null ]; /** @@ -104,7 +112,11 @@ class CreateAIAgentRequest implements ModelInterface, ArrayAccess, \JsonSerializ 'max_tokens' => false, 'allowed_tools' => false, 'allowed_collections' => false, - 'created_by' => false + 'assigned_skills' => false, + 'created_by' => false, + 'long_context' => false, + 'guardrail_preset' => false, + 'filter_policies' => false ]; /** @@ -202,7 +214,11 @@ public function isNullableSetToNull(string $property): bool 'max_tokens' => 'maxTokens', 'allowed_tools' => 'allowedTools', 'allowed_collections' => 'allowedCollections', - 'created_by' => 'createdBy' + 'assigned_skills' => 'assignedSkills', + 'created_by' => 'createdBy', + 'long_context' => 'longContext', + 'guardrail_preset' => 'guardrailPreset', + 'filter_policies' => 'filterPolicies' ]; /** @@ -220,7 +236,11 @@ public function isNullableSetToNull(string $property): bool 'max_tokens' => 'setMaxTokens', 'allowed_tools' => 'setAllowedTools', 'allowed_collections' => 'setAllowedCollections', - 'created_by' => 'setCreatedBy' + 'assigned_skills' => 'setAssignedSkills', + 'created_by' => 'setCreatedBy', + 'long_context' => 'setLongContext', + 'guardrail_preset' => 'setGuardrailPreset', + 'filter_policies' => 'setFilterPolicies' ]; /** @@ -238,7 +258,11 @@ public function isNullableSetToNull(string $property): bool 'max_tokens' => 'getMaxTokens', 'allowed_tools' => 'getAllowedTools', 'allowed_collections' => 'getAllowedCollections', - 'created_by' => 'getCreatedBy' + 'assigned_skills' => 'getAssignedSkills', + 'created_by' => 'getCreatedBy', + 'long_context' => 'getLongContext', + 'guardrail_preset' => 'getGuardrailPreset', + 'filter_policies' => 'getFilterPolicies' ]; /** @@ -282,6 +306,23 @@ public function getModelName() return self::$openAPIModelName; } + public const GUARDRAIL_PRESET_OFFICIAL = 'official'; + public const GUARDRAIL_PRESET_OFFICIAL_SENSITIVE = 'official-sensitive'; + public const GUARDRAIL_PRESET__PROTECTED = 'protected'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getGuardrailPresetAllowableValues() + { + return [ + self::GUARDRAIL_PRESET_OFFICIAL, + self::GUARDRAIL_PRESET_OFFICIAL_SENSITIVE, + self::GUARDRAIL_PRESET__PROTECTED, + ]; + } /** * Associative array for storing property values @@ -307,7 +348,11 @@ public function __construct(?array $data = null) $this->setIfExists('max_tokens', $data ?? [], null); $this->setIfExists('allowed_tools', $data ?? [], null); $this->setIfExists('allowed_collections', $data ?? [], null); + $this->setIfExists('assigned_skills', $data ?? [], null); $this->setIfExists('created_by', $data ?? [], null); + $this->setIfExists('long_context', $data ?? [], null); + $this->setIfExists('guardrail_preset', $data ?? [], null); + $this->setIfExists('filter_policies', $data ?? [], null); } /** @@ -365,6 +410,15 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'max_tokens', must be bigger than or equal to 1."; } + $allowedValues = $this->getGuardrailPresetAllowableValues(); + if (!is_null($this->container['guardrail_preset']) && !in_array($this->container['guardrail_preset'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'guardrail_preset', must be one of '%s'", + $this->container['guardrail_preset'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -639,6 +693,33 @@ public function setAllowedCollections($allowed_collections) return $this; } + /** + * Gets assigned_skills + * + * @return string[]|null + */ + public function getAssignedSkills() + { + return $this->container['assigned_skills']; + } + + /** + * Sets assigned_skills + * + * @param string[]|null $assigned_skills Skill IDs to assign to this agent + * + * @return self + */ + public function setAssignedSkills($assigned_skills) + { + if (is_null($assigned_skills)) { + throw new \InvalidArgumentException('non-nullable assigned_skills cannot be null'); + } + $this->container['assigned_skills'] = $assigned_skills; + + return $this; + } + /** * Gets created_by * @@ -665,6 +746,97 @@ public function setCreatedBy($created_by) return $this; } + + /** + * Gets long_context + * + * @return bool|null + */ + public function getLongContext() + { + return $this->container['long_context']; + } + + /** + * Sets long_context + * + * @param bool|null $long_context Enable 1M context window support + * + * @return self + */ + public function setLongContext($long_context) + { + if (is_null($long_context)) { + throw new \InvalidArgumentException('non-nullable long_context cannot be null'); + } + $this->container['long_context'] = $long_context; + + return $this; + } + + /** + * Gets guardrail_preset + * + * @return string|null + */ + public function getGuardrailPreset() + { + return $this->container['guardrail_preset']; + } + + /** + * Sets guardrail_preset + * + * @param string|null $guardrail_preset Guardrail preset name + * + * @return self + */ + public function setGuardrailPreset($guardrail_preset) + { + if (is_null($guardrail_preset)) { + throw new \InvalidArgumentException('non-nullable guardrail_preset cannot be null'); + } + $allowedValues = $this->getGuardrailPresetAllowableValues(); + if (!in_array($guardrail_preset, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'guardrail_preset', must be one of '%s'", + $guardrail_preset, + implode("', '", $allowedValues) + ) + ); + } + $this->container['guardrail_preset'] = $guardrail_preset; + + return $this; + } + + /** + * Gets filter_policies + * + * @return string[]|null + */ + public function getFilterPolicies() + { + return $this->container['filter_policies']; + } + + /** + * Sets filter_policies + * + * @param string[]|null $filter_policies Filter policy IDs to apply to this agent's inference requests + * + * @return self + */ + public function setFilterPolicies($filter_policies) + { + if (is_null($filter_policies)) { + throw new \InvalidArgumentException('non-nullable filter_policies cannot be null'); + } + $this->container['filter_policies'] = $filter_policies; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/CreateAISession201Response.php b/src/Model/CreateAISession201Response.php index 163d6f5..afdaffd 100644 --- a/src/Model/CreateAISession201Response.php +++ b/src/Model/CreateAISession201Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/CreateAISessionRequest.php b/src/Model/CreateAISessionRequest.php index a856520..6c78eaf 100644 --- a/src/Model/CreateAISessionRequest.php +++ b/src/Model/CreateAISessionRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/CreateAISessionRequestInitialMessagesInner.php b/src/Model/CreateAISessionRequestInitialMessagesInner.php index 370a65b..f5b39bd 100644 --- a/src/Model/CreateAISessionRequestInitialMessagesInner.php +++ b/src/Model/CreateAISessionRequestInitialMessagesInner.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/CreateApplication403Response.php b/src/Model/CreateApplication403Response.php index 49f14e0..6e8c3f8 100644 --- a/src/Model/CreateApplication403Response.php +++ b/src/Model/CreateApplication403Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/CreateApplicationRequest.php b/src/Model/CreateApplicationRequest.php index c139bcc..e07aad2 100644 --- a/src/Model/CreateApplicationRequest.php +++ b/src/Model/CreateApplicationRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/CreateApplicationRequestDatabase.php b/src/Model/CreateApplicationRequestDatabase.php index b1337ac..1cff016 100644 --- a/src/Model/CreateApplicationRequestDatabase.php +++ b/src/Model/CreateApplicationRequestDatabase.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/CreateApplicationRequestEnvironmentInner.php b/src/Model/CreateApplicationRequestEnvironmentInner.php index 70c65d3..8985320 100644 --- a/src/Model/CreateApplicationRequestEnvironmentInner.php +++ b/src/Model/CreateApplicationRequestEnvironmentInner.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/CreateApplicationRequestFilesystem.php b/src/Model/CreateApplicationRequestFilesystem.php index 8e506af..4ab13bf 100644 --- a/src/Model/CreateApplicationRequestFilesystem.php +++ b/src/Model/CreateApplicationRequestFilesystem.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/CreateBackup202Response.php b/src/Model/CreateBackup202Response.php index c997c04..45640f5 100644 --- a/src/Model/CreateBackup202Response.php +++ b/src/Model/CreateBackup202Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/CreateBackupRequest.php b/src/Model/CreateBackupRequest.php index 73f55dd..f35e02c 100644 --- a/src/Model/CreateBackupRequest.php +++ b/src/Model/CreateBackupRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/CreateCommandRequest.php b/src/Model/CreateCommandRequest.php index dfdbd9a..66e461a 100644 --- a/src/Model/CreateCommandRequest.php +++ b/src/Model/CreateCommandRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/CreateCronJobRequest.php b/src/Model/CreateCronJobRequest.php index b67071c..c41b8a5 100644 --- a/src/Model/CreateCronJobRequest.php +++ b/src/Model/CreateCronJobRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/CreateCustomTool201Response.php b/src/Model/CreateCustomTool201Response.php index e626aac..2f9c376 100644 --- a/src/Model/CreateCustomTool201Response.php +++ b/src/Model/CreateCustomTool201Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/CreateCustomToolRequest.php b/src/Model/CreateCustomToolRequest.php index dc331d4..465d372 100644 --- a/src/Model/CreateCustomToolRequest.php +++ b/src/Model/CreateCustomToolRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/CreateEnvironment403Response.php b/src/Model/CreateEnvironment403Response.php index 7f624da..8e4525d 100644 --- a/src/Model/CreateEnvironment403Response.php +++ b/src/Model/CreateEnvironment403Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/CreateEnvironmentRequest.php b/src/Model/CreateEnvironmentRequest.php index 3d814c7..57af324 100644 --- a/src/Model/CreateEnvironmentRequest.php +++ b/src/Model/CreateEnvironmentRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/CreateEnvironmentRequestEnvironmentInner.php b/src/Model/CreateEnvironmentRequestEnvironmentInner.php index 87056e9..49878f6 100644 --- a/src/Model/CreateEnvironmentRequestEnvironmentInner.php +++ b/src/Model/CreateEnvironmentRequestEnvironmentInner.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/CreateFilterPolicyRequest.php b/src/Model/CreateFilterPolicyRequest.php new file mode 100644 index 0000000..57b0686 --- /dev/null +++ b/src/Model/CreateFilterPolicyRequest.php @@ -0,0 +1,555 @@ + + */ +class CreateFilterPolicyRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'createFilterPolicy_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'name' => 'string', + 'description' => 'string', + 'enabled' => 'bool', + 'rules' => '\QuantClient\Model\CreateFilterPolicyRequestRulesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'name' => null, + 'description' => null, + 'enabled' => null, + 'rules' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'name' => false, + 'description' => true, + 'enabled' => false, + 'rules' => 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 = [ + 'name' => 'name', + 'description' => 'description', + 'enabled' => 'enabled', + 'rules' => 'rules' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'description' => 'setDescription', + 'enabled' => 'setEnabled', + 'rules' => 'setRules' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'description' => 'getDescription', + 'enabled' => 'getEnabled', + 'rules' => 'getRules' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('enabled', $data ?? [], null); + $this->setIfExists('rules', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param 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['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ((mb_strlen($this->container['name']) > 255)) { + $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 255."; + } + + if (!is_null($this->container['description']) && (mb_strlen($this->container['description']) > 1000)) { + $invalidProperties[] = "invalid value for 'description', the character length must be smaller than or equal to 1000."; + } + + if ($this->container['rules'] === null) { + $invalidProperties[] = "'rules' can't be null"; + } + if ((count($this->container['rules']) > 100)) { + $invalidProperties[] = "invalid value for 'rules', number of items must be less than or equal to 100."; + } + + if ((count($this->container['rules']) < 1)) { + $invalidProperties[] = "invalid value for 'rules', number of items must be greater 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 name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name name + * + * @return self + */ + public function setName($name) + { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + if ((mb_strlen($name) > 255)) { + throw new \InvalidArgumentException('invalid length for $name when calling CreateFilterPolicyRequest., must be smaller than or equal to 255.'); + } + + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description description + * + * @return self + */ + public function setDescription($description) + { + if (is_null($description)) { + array_push($this->openAPINullablesSetToNull, 'description'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('description', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($description) && (mb_strlen($description) > 1000)) { + throw new \InvalidArgumentException('invalid length for $description when calling CreateFilterPolicyRequest., must be smaller than or equal to 1000.'); + } + + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets enabled + * + * @return bool|null + */ + public function getEnabled() + { + return $this->container['enabled']; + } + + /** + * Sets enabled + * + * @param bool|null $enabled enabled + * + * @return self + */ + public function setEnabled($enabled) + { + if (is_null($enabled)) { + throw new \InvalidArgumentException('non-nullable enabled cannot be null'); + } + $this->container['enabled'] = $enabled; + + return $this; + } + + /** + * Gets rules + * + * @return \QuantClient\Model\CreateFilterPolicyRequestRulesInner[] + */ + public function getRules() + { + return $this->container['rules']; + } + + /** + * Sets rules + * + * @param \QuantClient\Model\CreateFilterPolicyRequestRulesInner[] $rules rules + * + * @return self + */ + public function setRules($rules) + { + if (is_null($rules)) { + throw new \InvalidArgumentException('non-nullable rules cannot be null'); + } + + if ((count($rules) > 100)) { + throw new \InvalidArgumentException('invalid value for $rules when calling CreateFilterPolicyRequest., number of items must be less than or equal to 100.'); + } + if ((count($rules) < 1)) { + throw new \InvalidArgumentException('invalid length for $rules when calling CreateFilterPolicyRequest., number of items must be greater than or equal to 1.'); + } + $this->container['rules'] = $rules; + + 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/CreateFilterPolicyRequestRulesInner.php b/src/Model/CreateFilterPolicyRequestRulesInner.php new file mode 100644 index 0000000..53edf55 --- /dev/null +++ b/src/Model/CreateFilterPolicyRequestRulesInner.php @@ -0,0 +1,581 @@ + + */ +class CreateFilterPolicyRequestRulesInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'createFilterPolicy_request_rules_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'name' => 'string', + 'match' => '\QuantClient\Model\CreateFilterPolicyRequestRulesInnerMatch', + 'action' => 'string', + 'apply_to' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'name' => null, + 'match' => null, + 'action' => null, + 'apply_to' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'name' => false, + 'match' => false, + 'action' => false, + 'apply_to' => 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 = [ + 'name' => 'name', + 'match' => 'match', + 'action' => 'action', + 'apply_to' => 'applyTo' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'match' => 'setMatch', + 'action' => 'setAction', + 'apply_to' => 'setApplyTo' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'match' => 'getMatch', + 'action' => 'getAction', + 'apply_to' => 'getApplyTo' + ]; + + /** + * 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 ACTION_BLOCK = 'BLOCK'; + public const ACTION_REDACT = 'REDACT'; + public const APPLY_TO_INPUT = 'input'; + public const APPLY_TO_OUTPUT = 'output'; + public const APPLY_TO_BOTH = 'both'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getActionAllowableValues() + { + return [ + self::ACTION_BLOCK, + self::ACTION_REDACT, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getApplyToAllowableValues() + { + return [ + self::APPLY_TO_INPUT, + self::APPLY_TO_OUTPUT, + self::APPLY_TO_BOTH, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('match', $data ?? [], null); + $this->setIfExists('action', $data ?? [], null); + $this->setIfExists('apply_to', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param 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->getActionAllowableValues(); + if (!is_null($this->container['action']) && !in_array($this->container['action'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'action', must be one of '%s'", + $this->container['action'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getApplyToAllowableValues(); + if (!is_null($this->container['apply_to']) && !in_array($this->container['apply_to'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'apply_to', must be one of '%s'", + $this->container['apply_to'], + implode("', '", $allowedValues) + ); + } + + 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 name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return self + */ + public function setName($name) + { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets match + * + * @return \QuantClient\Model\CreateFilterPolicyRequestRulesInnerMatch|null + */ + public function getMatch() + { + return $this->container['match']; + } + + /** + * Sets match + * + * @param \QuantClient\Model\CreateFilterPolicyRequestRulesInnerMatch|null $match match + * + * @return self + */ + public function setMatch($match) + { + if (is_null($match)) { + throw new \InvalidArgumentException('non-nullable match cannot be null'); + } + $this->container['match'] = $match; + + return $this; + } + + /** + * Gets action + * + * @return string|null + */ + public function getAction() + { + return $this->container['action']; + } + + /** + * Sets action + * + * @param string|null $action action + * + * @return self + */ + public function setAction($action) + { + if (is_null($action)) { + throw new \InvalidArgumentException('non-nullable action cannot be null'); + } + $allowedValues = $this->getActionAllowableValues(); + if (!in_array($action, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'action', must be one of '%s'", + $action, + implode("', '", $allowedValues) + ) + ); + } + $this->container['action'] = $action; + + return $this; + } + + /** + * Gets apply_to + * + * @return string|null + */ + public function getApplyTo() + { + return $this->container['apply_to']; + } + + /** + * Sets apply_to + * + * @param string|null $apply_to apply_to + * + * @return self + */ + public function setApplyTo($apply_to) + { + if (is_null($apply_to)) { + throw new \InvalidArgumentException('non-nullable apply_to cannot be null'); + } + $allowedValues = $this->getApplyToAllowableValues(); + if (!in_array($apply_to, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'apply_to', must be one of '%s'", + $apply_to, + implode("', '", $allowedValues) + ) + ); + } + $this->container['apply_to'] = $apply_to; + + 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/CreateFilterPolicyRequestRulesInnerMatch.php b/src/Model/CreateFilterPolicyRequestRulesInnerMatch.php new file mode 100644 index 0000000..2aefd25 --- /dev/null +++ b/src/Model/CreateFilterPolicyRequestRulesInnerMatch.php @@ -0,0 +1,520 @@ + + */ +class CreateFilterPolicyRequestRulesInnerMatch implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'createFilterPolicy_request_rules_inner_match'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'type' => 'string', + 'values' => 'string[]', + 'pattern' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'type' => null, + 'values' => null, + 'pattern' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'type' => false, + 'values' => false, + 'pattern' => 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 = [ + 'type' => 'type', + 'values' => 'values', + 'pattern' => 'pattern' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'type' => 'setType', + 'values' => 'setValues', + 'pattern' => 'setPattern' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'type' => 'getType', + 'values' => 'getValues', + 'pattern' => 'getPattern' + ]; + + /** + * 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 TYPE_WORD = 'word'; + public const TYPE_REGEX = 'regex'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_WORD, + self::TYPE_REGEX, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('values', $data ?? [], null); + $this->setIfExists('pattern', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param 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->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + if (!is_null($this->container['pattern']) && (mb_strlen($this->container['pattern']) > 500)) { + $invalidProperties[] = "invalid value for 'pattern', the character length must be smaller than or equal to 500."; + } + + 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 type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type type + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets values + * + * @return string[]|null + */ + public function getValues() + { + return $this->container['values']; + } + + /** + * Sets values + * + * @param string[]|null $values Required when type=word + * + * @return self + */ + public function setValues($values) + { + if (is_null($values)) { + throw new \InvalidArgumentException('non-nullable values cannot be null'); + } + $this->container['values'] = $values; + + return $this; + } + + /** + * Gets pattern + * + * @return string|null + */ + public function getPattern() + { + return $this->container['pattern']; + } + + /** + * Sets pattern + * + * @param string|null $pattern Required when type=regex + * + * @return self + */ + public function setPattern($pattern) + { + if (is_null($pattern)) { + throw new \InvalidArgumentException('non-nullable pattern cannot be null'); + } + if ((mb_strlen($pattern) > 500)) { + throw new \InvalidArgumentException('invalid length for $pattern when calling CreateFilterPolicyRequestRulesInnerMatch., must be smaller than or equal to 500.'); + } + + $this->container['pattern'] = $pattern; + + 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/CreateOrchestrationRequest.php b/src/Model/CreateOrchestrationRequest.php new file mode 100644 index 0000000..e28ad04 --- /dev/null +++ b/src/Model/CreateOrchestrationRequest.php @@ -0,0 +1,856 @@ + + */ +class CreateOrchestrationRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'createOrchestration_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'name' => 'string', + 'description' => 'string', + 'agent_id' => 'string', + 'tool_id' => 'string', + 'workflow_id' => 'string', + 'input_source' => '\QuantClient\Model\CreateOrchestrationRequestInputSource', + 'batch_size' => 'int', + 'concurrency' => 'int', + 'stop_condition' => '\QuantClient\Model\CreateOrchestrationRequestStopCondition', + 'assigned_skills' => 'string[]', + 'context' => 'object', + 'auto_start' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'name' => null, + 'description' => null, + 'agent_id' => null, + 'tool_id' => null, + 'workflow_id' => null, + 'input_source' => null, + 'batch_size' => null, + 'concurrency' => null, + 'stop_condition' => null, + 'assigned_skills' => null, + 'context' => null, + 'auto_start' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'name' => false, + 'description' => true, + 'agent_id' => true, + 'tool_id' => true, + 'workflow_id' => true, + 'input_source' => false, + 'batch_size' => false, + 'concurrency' => false, + 'stop_condition' => false, + 'assigned_skills' => false, + 'context' => true, + 'auto_start' => 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 = [ + 'name' => 'name', + 'description' => 'description', + 'agent_id' => 'agentId', + 'tool_id' => 'toolId', + 'workflow_id' => 'workflowId', + 'input_source' => 'inputSource', + 'batch_size' => 'batchSize', + 'concurrency' => 'concurrency', + 'stop_condition' => 'stopCondition', + 'assigned_skills' => 'assignedSkills', + 'context' => 'context', + 'auto_start' => 'autoStart' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'description' => 'setDescription', + 'agent_id' => 'setAgentId', + 'tool_id' => 'setToolId', + 'workflow_id' => 'setWorkflowId', + 'input_source' => 'setInputSource', + 'batch_size' => 'setBatchSize', + 'concurrency' => 'setConcurrency', + 'stop_condition' => 'setStopCondition', + 'assigned_skills' => 'setAssignedSkills', + 'context' => 'setContext', + 'auto_start' => 'setAutoStart' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'description' => 'getDescription', + 'agent_id' => 'getAgentId', + 'tool_id' => 'getToolId', + 'workflow_id' => 'getWorkflowId', + 'input_source' => 'getInputSource', + 'batch_size' => 'getBatchSize', + 'concurrency' => 'getConcurrency', + 'stop_condition' => 'getStopCondition', + 'assigned_skills' => 'getAssignedSkills', + 'context' => 'getContext', + 'auto_start' => 'getAutoStart' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('agent_id', $data ?? [], null); + $this->setIfExists('tool_id', $data ?? [], null); + $this->setIfExists('workflow_id', $data ?? [], null); + $this->setIfExists('input_source', $data ?? [], null); + $this->setIfExists('batch_size', $data ?? [], 10); + $this->setIfExists('concurrency', $data ?? [], 1); + $this->setIfExists('stop_condition', $data ?? [], null); + $this->setIfExists('assigned_skills', $data ?? [], null); + $this->setIfExists('context', $data ?? [], null); + $this->setIfExists('auto_start', $data ?? [], true); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param 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['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['input_source'] === null) { + $invalidProperties[] = "'input_source' can't be null"; + } + if (!is_null($this->container['batch_size']) && ($this->container['batch_size'] > 100)) { + $invalidProperties[] = "invalid value for 'batch_size', must be smaller than or equal to 100."; + } + + if (!is_null($this->container['batch_size']) && ($this->container['batch_size'] < 1)) { + $invalidProperties[] = "invalid value for 'batch_size', must be bigger than or equal to 1."; + } + + if (!is_null($this->container['concurrency']) && ($this->container['concurrency'] > 10)) { + $invalidProperties[] = "invalid value for 'concurrency', must be smaller than or equal to 10."; + } + + if (!is_null($this->container['concurrency']) && ($this->container['concurrency'] < 1)) { + $invalidProperties[] = "invalid value for 'concurrency', 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 name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Orchestration name + * + * @return self + */ + public function setName($name) + { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description Optional description + * + * @return self + */ + public function setDescription($description) + { + if (is_null($description)) { + array_push($this->openAPINullablesSetToNull, 'description'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('description', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets agent_id + * + * @return string|null + */ + public function getAgentId() + { + return $this->container['agent_id']; + } + + /** + * Sets agent_id + * + * @param string|null $agent_id Agent to process items + * + * @return self + */ + public function setAgentId($agent_id) + { + if (is_null($agent_id)) { + array_push($this->openAPINullablesSetToNull, 'agent_id'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('agent_id', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['agent_id'] = $agent_id; + + return $this; + } + + /** + * Gets tool_id + * + * @return string|null + */ + public function getToolId() + { + return $this->container['tool_id']; + } + + /** + * Sets tool_id + * + * @param string|null $tool_id Tool to execute for items + * + * @return self + */ + public function setToolId($tool_id) + { + if (is_null($tool_id)) { + array_push($this->openAPINullablesSetToNull, 'tool_id'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('tool_id', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['tool_id'] = $tool_id; + + return $this; + } + + /** + * Gets workflow_id + * + * @return string|null + */ + public function getWorkflowId() + { + return $this->container['workflow_id']; + } + + /** + * Sets workflow_id + * + * @param string|null $workflow_id Workflow to run for items + * + * @return self + */ + public function setWorkflowId($workflow_id) + { + if (is_null($workflow_id)) { + array_push($this->openAPINullablesSetToNull, 'workflow_id'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('workflow_id', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['workflow_id'] = $workflow_id; + + return $this; + } + + /** + * Gets input_source + * + * @return \QuantClient\Model\CreateOrchestrationRequestInputSource + */ + public function getInputSource() + { + return $this->container['input_source']; + } + + /** + * Sets input_source + * + * @param \QuantClient\Model\CreateOrchestrationRequestInputSource $input_source input_source + * + * @return self + */ + public function setInputSource($input_source) + { + if (is_null($input_source)) { + throw new \InvalidArgumentException('non-nullable input_source cannot be null'); + } + $this->container['input_source'] = $input_source; + + return $this; + } + + /** + * Gets batch_size + * + * @return int|null + */ + public function getBatchSize() + { + return $this->container['batch_size']; + } + + /** + * Sets batch_size + * + * @param int|null $batch_size Items per batch + * + * @return self + */ + public function setBatchSize($batch_size) + { + if (is_null($batch_size)) { + throw new \InvalidArgumentException('non-nullable batch_size cannot be null'); + } + + if (($batch_size > 100)) { + throw new \InvalidArgumentException('invalid value for $batch_size when calling CreateOrchestrationRequest., must be smaller than or equal to 100.'); + } + if (($batch_size < 1)) { + throw new \InvalidArgumentException('invalid value for $batch_size when calling CreateOrchestrationRequest., must be bigger than or equal to 1.'); + } + + $this->container['batch_size'] = $batch_size; + + return $this; + } + + /** + * Gets concurrency + * + * @return int|null + */ + public function getConcurrency() + { + return $this->container['concurrency']; + } + + /** + * Sets concurrency + * + * @param int|null $concurrency Concurrent items within a batch + * + * @return self + */ + public function setConcurrency($concurrency) + { + if (is_null($concurrency)) { + throw new \InvalidArgumentException('non-nullable concurrency cannot be null'); + } + + if (($concurrency > 10)) { + throw new \InvalidArgumentException('invalid value for $concurrency when calling CreateOrchestrationRequest., must be smaller than or equal to 10.'); + } + if (($concurrency < 1)) { + throw new \InvalidArgumentException('invalid value for $concurrency when calling CreateOrchestrationRequest., must be bigger than or equal to 1.'); + } + + $this->container['concurrency'] = $concurrency; + + return $this; + } + + /** + * Gets stop_condition + * + * @return \QuantClient\Model\CreateOrchestrationRequestStopCondition|null + */ + public function getStopCondition() + { + return $this->container['stop_condition']; + } + + /** + * Sets stop_condition + * + * @param \QuantClient\Model\CreateOrchestrationRequestStopCondition|null $stop_condition stop_condition + * + * @return self + */ + public function setStopCondition($stop_condition) + { + if (is_null($stop_condition)) { + throw new \InvalidArgumentException('non-nullable stop_condition cannot be null'); + } + $this->container['stop_condition'] = $stop_condition; + + return $this; + } + + /** + * Gets assigned_skills + * + * @return string[]|null + */ + public function getAssignedSkills() + { + return $this->container['assigned_skills']; + } + + /** + * Sets assigned_skills + * + * @param string[]|null $assigned_skills Skill IDs to assign + * + * @return self + */ + public function setAssignedSkills($assigned_skills) + { + if (is_null($assigned_skills)) { + throw new \InvalidArgumentException('non-nullable assigned_skills cannot be null'); + } + $this->container['assigned_skills'] = $assigned_skills; + + return $this; + } + + /** + * Gets context + * + * @return object|null + */ + public function getContext() + { + return $this->container['context']; + } + + /** + * Sets context + * + * @param object|null $context Optional context merged into each item before processing (e.g. shared credentials or endpoints) + * + * @return self + */ + public function setContext($context) + { + if (is_null($context)) { + array_push($this->openAPINullablesSetToNull, 'context'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('context', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['context'] = $context; + + return $this; + } + + /** + * Gets auto_start + * + * @return bool|null + */ + public function getAutoStart() + { + return $this->container['auto_start']; + } + + /** + * Sets auto_start + * + * @param bool|null $auto_start Whether to start immediately + * + * @return self + */ + public function setAutoStart($auto_start) + { + if (is_null($auto_start)) { + throw new \InvalidArgumentException('non-nullable auto_start cannot be null'); + } + $this->container['auto_start'] = $auto_start; + + 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/CreateOrchestrationRequestInputSource.php b/src/Model/CreateOrchestrationRequestInputSource.php new file mode 100644 index 0000000..804c388 --- /dev/null +++ b/src/Model/CreateOrchestrationRequestInputSource.php @@ -0,0 +1,550 @@ + + */ +class CreateOrchestrationRequestInputSource implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'createOrchestration_request_inputSource'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'type' => 'string', + 'items' => 'object[]', + 'task_query' => 'object', + 'generator_prompt' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'type' => null, + 'items' => null, + 'task_query' => null, + 'generator_prompt' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'type' => false, + 'items' => false, + 'task_query' => false, + 'generator_prompt' => 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 = [ + 'type' => 'type', + 'items' => 'items', + 'task_query' => 'taskQuery', + 'generator_prompt' => 'generatorPrompt' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'type' => 'setType', + 'items' => 'setItems', + 'task_query' => 'setTaskQuery', + 'generator_prompt' => 'setGeneratorPrompt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'type' => 'getType', + 'items' => 'getItems', + 'task_query' => 'getTaskQuery', + 'generator_prompt' => 'getGeneratorPrompt' + ]; + + /** + * 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 TYPE__STATIC = 'static'; + public const TYPE_TASK_QUERY = 'task_query'; + public const TYPE_GENERATOR = 'generator'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE__STATIC, + self::TYPE_TASK_QUERY, + self::TYPE_GENERATOR, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('items', $data ?? [], null); + $this->setIfExists('task_query', $data ?? [], null); + $this->setIfExists('generator_prompt', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param 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['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + 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 type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type Input source type (api type not yet supported) + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets items + * + * @return object[]|null + */ + public function getItems() + { + return $this->container['items']; + } + + /** + * Sets items + * + * @param object[]|null $items Static items (for type=static) + * + * @return self + */ + public function setItems($items) + { + if (is_null($items)) { + throw new \InvalidArgumentException('non-nullable items cannot be null'); + } + $this->container['items'] = $items; + + return $this; + } + + /** + * Gets task_query + * + * @return object|null + */ + public function getTaskQuery() + { + return $this->container['task_query']; + } + + /** + * Sets task_query + * + * @param object|null $task_query Task query filters (for type=task_query) + * + * @return self + */ + public function setTaskQuery($task_query) + { + if (is_null($task_query)) { + throw new \InvalidArgumentException('non-nullable task_query cannot be null'); + } + $this->container['task_query'] = $task_query; + + return $this; + } + + /** + * Gets generator_prompt + * + * @return string|null + */ + public function getGeneratorPrompt() + { + return $this->container['generator_prompt']; + } + + /** + * Sets generator_prompt + * + * @param string|null $generator_prompt AI prompt (for type=generator) + * + * @return self + */ + public function setGeneratorPrompt($generator_prompt) + { + if (is_null($generator_prompt)) { + throw new \InvalidArgumentException('non-nullable generator_prompt cannot be null'); + } + $this->container['generator_prompt'] = $generator_prompt; + + 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/CreateOrchestrationRequestStopCondition.php b/src/Model/CreateOrchestrationRequestStopCondition.php new file mode 100644 index 0000000..fe226df --- /dev/null +++ b/src/Model/CreateOrchestrationRequestStopCondition.php @@ -0,0 +1,524 @@ + + */ +class CreateOrchestrationRequestStopCondition implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'createOrchestration_request_stopCondition'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'type' => 'string', + 'max_iterations' => 'int', + 'condition_prompt' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'type' => null, + 'max_iterations' => null, + 'condition_prompt' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'type' => false, + 'max_iterations' => false, + 'condition_prompt' => 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 = [ + 'type' => 'type', + 'max_iterations' => 'maxIterations', + 'condition_prompt' => 'conditionPrompt' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'type' => 'setType', + 'max_iterations' => 'setMaxIterations', + 'condition_prompt' => 'setConditionPrompt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'type' => 'getType', + 'max_iterations' => 'getMaxIterations', + 'condition_prompt' => 'getConditionPrompt' + ]; + + /** + * 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 TYPE_ALL_COMPLETE = 'all_complete'; + public const TYPE_MAX_ITERATIONS = 'max_iterations'; + public const TYPE_CONDITION = 'condition'; + public const TYPE_MANUAL = 'manual'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_ALL_COMPLETE, + self::TYPE_MAX_ITERATIONS, + self::TYPE_CONDITION, + self::TYPE_MANUAL, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('type', $data ?? [], 'all_complete'); + $this->setIfExists('max_iterations', $data ?? [], null); + $this->setIfExists('condition_prompt', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param 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->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + if (!is_null($this->container['max_iterations']) && ($this->container['max_iterations'] < 1)) { + $invalidProperties[] = "invalid value for 'max_iterations', 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 type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type type + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets max_iterations + * + * @return int|null + */ + public function getMaxIterations() + { + return $this->container['max_iterations']; + } + + /** + * Sets max_iterations + * + * @param int|null $max_iterations Max iterations (for type=max_iterations) + * + * @return self + */ + public function setMaxIterations($max_iterations) + { + if (is_null($max_iterations)) { + throw new \InvalidArgumentException('non-nullable max_iterations cannot be null'); + } + + if (($max_iterations < 1)) { + throw new \InvalidArgumentException('invalid value for $max_iterations when calling CreateOrchestrationRequestStopCondition., must be bigger than or equal to 1.'); + } + + $this->container['max_iterations'] = $max_iterations; + + return $this; + } + + /** + * Gets condition_prompt + * + * @return string|null + */ + public function getConditionPrompt() + { + return $this->container['condition_prompt']; + } + + /** + * Sets condition_prompt + * + * @param string|null $condition_prompt AI prompt to evaluate stop (for type=condition) + * + * @return self + */ + public function setConditionPrompt($condition_prompt) + { + if (is_null($condition_prompt)) { + throw new \InvalidArgumentException('non-nullable condition_prompt cannot be null'); + } + $this->container['condition_prompt'] = $condition_prompt; + + 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/CreateSkill201Response.php b/src/Model/CreateSkill201Response.php new file mode 100644 index 0000000..f5cd892 --- /dev/null +++ b/src/Model/CreateSkill201Response.php @@ -0,0 +1,477 @@ + + */ +class CreateSkill201Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'createSkill_201_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'success' => 'bool', + 'skill' => 'object', + 'message' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'success' => null, + 'skill' => null, + 'message' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'success' => false, + 'skill' => false, + 'message' => 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 = [ + 'success' => 'success', + 'skill' => 'skill', + 'message' => 'message' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'success' => 'setSuccess', + 'skill' => 'setSkill', + 'message' => 'setMessage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'success' => 'getSuccess', + 'skill' => 'getSkill', + 'message' => 'getMessage' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('success', $data ?? [], null); + $this->setIfExists('skill', $data ?? [], null); + $this->setIfExists('message', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets success + * + * @return bool|null + */ + public function getSuccess() + { + return $this->container['success']; + } + + /** + * Sets success + * + * @param bool|null $success success + * + * @return self + */ + public function setSuccess($success) + { + if (is_null($success)) { + throw new \InvalidArgumentException('non-nullable success cannot be null'); + } + $this->container['success'] = $success; + + return $this; + } + + /** + * Gets skill + * + * @return object|null + */ + public function getSkill() + { + return $this->container['skill']; + } + + /** + * Sets skill + * + * @param object|null $skill skill + * + * @return self + */ + public function setSkill($skill) + { + if (is_null($skill)) { + throw new \InvalidArgumentException('non-nullable skill cannot be null'); + } + $this->container['skill'] = $skill; + + return $this; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message message + * + * @return self + */ + public function setMessage($message) + { + if (is_null($message)) { + throw new \InvalidArgumentException('non-nullable message cannot be null'); + } + $this->container['message'] = $message; + + 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/CreateSkillRequest.php b/src/Model/CreateSkillRequest.php new file mode 100644 index 0000000..986643b --- /dev/null +++ b/src/Model/CreateSkillRequest.php @@ -0,0 +1,758 @@ + + */ +class CreateSkillRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'createSkill_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'name' => 'string', + 'description' => 'string', + 'content' => 'string', + 'trigger_condition' => 'string', + 'tags' => 'string[]', + 'required_tools' => 'string[]', + 'namespace' => 'string', + 'files' => 'object', + 'disable_model_invocation' => 'bool', + 'allowed_tools' => 'string[]', + 'installed_by' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'name' => null, + 'description' => null, + 'content' => null, + 'trigger_condition' => null, + 'tags' => null, + 'required_tools' => null, + 'namespace' => null, + 'files' => null, + 'disable_model_invocation' => null, + 'allowed_tools' => null, + 'installed_by' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'name' => false, + 'description' => false, + 'content' => false, + 'trigger_condition' => false, + 'tags' => false, + 'required_tools' => false, + 'namespace' => false, + 'files' => false, + 'disable_model_invocation' => false, + 'allowed_tools' => false, + 'installed_by' => 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 = [ + 'name' => 'name', + 'description' => 'description', + 'content' => 'content', + 'trigger_condition' => 'triggerCondition', + 'tags' => 'tags', + 'required_tools' => 'requiredTools', + 'namespace' => 'namespace', + 'files' => 'files', + 'disable_model_invocation' => 'disableModelInvocation', + 'allowed_tools' => 'allowedTools', + 'installed_by' => 'installedBy' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'description' => 'setDescription', + 'content' => 'setContent', + 'trigger_condition' => 'setTriggerCondition', + 'tags' => 'setTags', + 'required_tools' => 'setRequiredTools', + 'namespace' => 'setNamespace', + 'files' => 'setFiles', + 'disable_model_invocation' => 'setDisableModelInvocation', + 'allowed_tools' => 'setAllowedTools', + 'installed_by' => 'setInstalledBy' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'description' => 'getDescription', + 'content' => 'getContent', + 'trigger_condition' => 'getTriggerCondition', + 'tags' => 'getTags', + 'required_tools' => 'getRequiredTools', + 'namespace' => 'getNamespace', + 'files' => 'getFiles', + 'disable_model_invocation' => 'getDisableModelInvocation', + 'allowed_tools' => 'getAllowedTools', + 'installed_by' => 'getInstalledBy' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('content', $data ?? [], null); + $this->setIfExists('trigger_condition', $data ?? [], null); + $this->setIfExists('tags', $data ?? [], null); + $this->setIfExists('required_tools', $data ?? [], null); + $this->setIfExists('namespace', $data ?? [], null); + $this->setIfExists('files', $data ?? [], null); + $this->setIfExists('disable_model_invocation', $data ?? [], null); + $this->setIfExists('allowed_tools', $data ?? [], null); + $this->setIfExists('installed_by', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param 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['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['content'] === null) { + $invalidProperties[] = "'content' can't be null"; + } + if ($this->container['trigger_condition'] === null) { + $invalidProperties[] = "'trigger_condition' can't be null"; + } + 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 name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name name + * + * @return self + */ + public function setName($name) + { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description description + * + * @return self + */ + public function setDescription($description) + { + if (is_null($description)) { + throw new \InvalidArgumentException('non-nullable description cannot be null'); + } + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets content + * + * @return string + */ + public function getContent() + { + return $this->container['content']; + } + + /** + * Sets content + * + * @param string $content content + * + * @return self + */ + public function setContent($content) + { + if (is_null($content)) { + throw new \InvalidArgumentException('non-nullable content cannot be null'); + } + $this->container['content'] = $content; + + return $this; + } + + /** + * Gets trigger_condition + * + * @return string + */ + public function getTriggerCondition() + { + return $this->container['trigger_condition']; + } + + /** + * Sets trigger_condition + * + * @param string $trigger_condition trigger_condition + * + * @return self + */ + public function setTriggerCondition($trigger_condition) + { + if (is_null($trigger_condition)) { + throw new \InvalidArgumentException('non-nullable trigger_condition cannot be null'); + } + $this->container['trigger_condition'] = $trigger_condition; + + return $this; + } + + /** + * Gets tags + * + * @return string[]|null + */ + public function getTags() + { + return $this->container['tags']; + } + + /** + * Sets tags + * + * @param string[]|null $tags tags + * + * @return self + */ + public function setTags($tags) + { + if (is_null($tags)) { + throw new \InvalidArgumentException('non-nullable tags cannot be null'); + } + $this->container['tags'] = $tags; + + return $this; + } + + /** + * Gets required_tools + * + * @return string[]|null + */ + public function getRequiredTools() + { + return $this->container['required_tools']; + } + + /** + * Sets required_tools + * + * @param string[]|null $required_tools required_tools + * + * @return self + */ + public function setRequiredTools($required_tools) + { + if (is_null($required_tools)) { + throw new \InvalidArgumentException('non-nullable required_tools cannot be null'); + } + $this->container['required_tools'] = $required_tools; + + return $this; + } + + /** + * Gets namespace + * + * @return string|null + */ + public function getNamespace() + { + return $this->container['namespace']; + } + + /** + * Sets namespace + * + * @param string|null $namespace namespace + * + * @return self + */ + public function setNamespace($namespace) + { + if (is_null($namespace)) { + throw new \InvalidArgumentException('non-nullable namespace cannot be null'); + } + $this->container['namespace'] = $namespace; + + return $this; + } + + /** + * Gets files + * + * @return object|null + */ + public function getFiles() + { + return $this->container['files']; + } + + /** + * Sets files + * + * @param object|null $files files + * + * @return self + */ + public function setFiles($files) + { + if (is_null($files)) { + throw new \InvalidArgumentException('non-nullable files cannot be null'); + } + $this->container['files'] = $files; + + return $this; + } + + /** + * Gets disable_model_invocation + * + * @return bool|null + */ + public function getDisableModelInvocation() + { + return $this->container['disable_model_invocation']; + } + + /** + * Sets disable_model_invocation + * + * @param bool|null $disable_model_invocation disable_model_invocation + * + * @return self + */ + public function setDisableModelInvocation($disable_model_invocation) + { + if (is_null($disable_model_invocation)) { + throw new \InvalidArgumentException('non-nullable disable_model_invocation cannot be null'); + } + $this->container['disable_model_invocation'] = $disable_model_invocation; + + return $this; + } + + /** + * Gets allowed_tools + * + * @return string[]|null + */ + public function getAllowedTools() + { + return $this->container['allowed_tools']; + } + + /** + * Sets allowed_tools + * + * @param string[]|null $allowed_tools allowed_tools + * + * @return self + */ + public function setAllowedTools($allowed_tools) + { + if (is_null($allowed_tools)) { + throw new \InvalidArgumentException('non-nullable allowed_tools cannot be null'); + } + $this->container['allowed_tools'] = $allowed_tools; + + return $this; + } + + /** + * Gets installed_by + * + * @return string|null + */ + public function getInstalledBy() + { + return $this->container['installed_by']; + } + + /** + * Sets installed_by + * + * @param string|null $installed_by installed_by + * + * @return self + */ + public function setInstalledBy($installed_by) + { + if (is_null($installed_by)) { + throw new \InvalidArgumentException('non-nullable installed_by cannot be null'); + } + $this->container['installed_by'] = $installed_by; + + 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/CreateSlackBot201Response.php b/src/Model/CreateSlackBot201Response.php new file mode 100644 index 0000000..c0230ad --- /dev/null +++ b/src/Model/CreateSlackBot201Response.php @@ -0,0 +1,409 @@ + + */ +class CreateSlackBot201Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'createSlackBot_201_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'bot' => 'object' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'bot' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'bot' => 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 = [ + 'bot' => 'bot' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'bot' => 'setBot' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'bot' => 'getBot' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('bot', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets bot + * + * @return object|null + */ + public function getBot() + { + return $this->container['bot']; + } + + /** + * Sets bot + * + * @param object|null $bot bot + * + * @return self + */ + public function setBot($bot) + { + if (is_null($bot)) { + throw new \InvalidArgumentException('non-nullable bot cannot be null'); + } + $this->container['bot'] = $bot; + + 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/CreateSlackBotRequest.php b/src/Model/CreateSlackBotRequest.php new file mode 100644 index 0000000..0ad02ff --- /dev/null +++ b/src/Model/CreateSlackBotRequest.php @@ -0,0 +1,669 @@ + + */ +class CreateSlackBotRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'createSlackBot_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'agent_id' => 'string', + 'setup_type' => 'string', + 'session_ttl_days' => 'int', + 'allowed_channels' => 'string[]', + 'keywords_enabled' => 'bool', + 'keywords' => 'string[]', + 'slash_commands' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'agent_id' => null, + 'setup_type' => null, + 'session_ttl_days' => null, + 'allowed_channels' => null, + 'keywords_enabled' => null, + 'keywords' => null, + 'slash_commands' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'agent_id' => false, + 'setup_type' => false, + 'session_ttl_days' => false, + 'allowed_channels' => false, + 'keywords_enabled' => false, + 'keywords' => false, + 'slash_commands' => 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 = [ + 'agent_id' => 'agentId', + 'setup_type' => 'setupType', + 'session_ttl_days' => 'sessionTtlDays', + 'allowed_channels' => 'allowedChannels', + 'keywords_enabled' => 'keywordsEnabled', + 'keywords' => 'keywords', + 'slash_commands' => 'slashCommands' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'agent_id' => 'setAgentId', + 'setup_type' => 'setSetupType', + 'session_ttl_days' => 'setSessionTtlDays', + 'allowed_channels' => 'setAllowedChannels', + 'keywords_enabled' => 'setKeywordsEnabled', + 'keywords' => 'setKeywords', + 'slash_commands' => 'setSlashCommands' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'agent_id' => 'getAgentId', + 'setup_type' => 'getSetupType', + 'session_ttl_days' => 'getSessionTtlDays', + 'allowed_channels' => 'getAllowedChannels', + 'keywords_enabled' => 'getKeywordsEnabled', + 'keywords' => 'getKeywords', + 'slash_commands' => 'getSlashCommands' + ]; + + /** + * 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 SETUP_TYPE_QUANT = 'quant'; + public const SETUP_TYPE_BYO = 'byo'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSetupTypeAllowableValues() + { + return [ + self::SETUP_TYPE_QUANT, + self::SETUP_TYPE_BYO, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('agent_id', $data ?? [], null); + $this->setIfExists('setup_type', $data ?? [], null); + $this->setIfExists('session_ttl_days', $data ?? [], null); + $this->setIfExists('allowed_channels', $data ?? [], null); + $this->setIfExists('keywords_enabled', $data ?? [], null); + $this->setIfExists('keywords', $data ?? [], null); + $this->setIfExists('slash_commands', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param 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['agent_id'] === null) { + $invalidProperties[] = "'agent_id' can't be null"; + } + if ($this->container['setup_type'] === null) { + $invalidProperties[] = "'setup_type' can't be null"; + } + $allowedValues = $this->getSetupTypeAllowableValues(); + if (!is_null($this->container['setup_type']) && !in_array($this->container['setup_type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'setup_type', must be one of '%s'", + $this->container['setup_type'], + implode("', '", $allowedValues) + ); + } + + if (!is_null($this->container['session_ttl_days']) && ($this->container['session_ttl_days'] > 90)) { + $invalidProperties[] = "invalid value for 'session_ttl_days', must be smaller than or equal to 90."; + } + + if (!is_null($this->container['session_ttl_days']) && ($this->container['session_ttl_days'] < 1)) { + $invalidProperties[] = "invalid value for 'session_ttl_days', 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 agent_id + * + * @return string + */ + public function getAgentId() + { + return $this->container['agent_id']; + } + + /** + * Sets agent_id + * + * @param string $agent_id The AI agent that powers this bot + * + * @return self + */ + public function setAgentId($agent_id) + { + if (is_null($agent_id)) { + throw new \InvalidArgumentException('non-nullable agent_id cannot be null'); + } + $this->container['agent_id'] = $agent_id; + + return $this; + } + + /** + * Gets setup_type + * + * @return string + */ + public function getSetupType() + { + return $this->container['setup_type']; + } + + /** + * Sets setup_type + * + * @param string $setup_type Whether to use Quant-managed or customer-provided Slack app + * + * @return self + */ + public function setSetupType($setup_type) + { + if (is_null($setup_type)) { + throw new \InvalidArgumentException('non-nullable setup_type cannot be null'); + } + $allowedValues = $this->getSetupTypeAllowableValues(); + if (!in_array($setup_type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'setup_type', must be one of '%s'", + $setup_type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['setup_type'] = $setup_type; + + return $this; + } + + /** + * Gets session_ttl_days + * + * @return int|null + */ + public function getSessionTtlDays() + { + return $this->container['session_ttl_days']; + } + + /** + * Sets session_ttl_days + * + * @param int|null $session_ttl_days Session TTL in days + * + * @return self + */ + public function setSessionTtlDays($session_ttl_days) + { + if (is_null($session_ttl_days)) { + throw new \InvalidArgumentException('non-nullable session_ttl_days cannot be null'); + } + + if (($session_ttl_days > 90)) { + throw new \InvalidArgumentException('invalid value for $session_ttl_days when calling CreateSlackBotRequest., must be smaller than or equal to 90.'); + } + if (($session_ttl_days < 1)) { + throw new \InvalidArgumentException('invalid value for $session_ttl_days when calling CreateSlackBotRequest., must be bigger than or equal to 1.'); + } + + $this->container['session_ttl_days'] = $session_ttl_days; + + return $this; + } + + /** + * Gets allowed_channels + * + * @return string[]|null + */ + public function getAllowedChannels() + { + return $this->container['allowed_channels']; + } + + /** + * Sets allowed_channels + * + * @param string[]|null $allowed_channels Slack channel IDs the bot may respond in + * + * @return self + */ + public function setAllowedChannels($allowed_channels) + { + if (is_null($allowed_channels)) { + throw new \InvalidArgumentException('non-nullable allowed_channels cannot be null'); + } + $this->container['allowed_channels'] = $allowed_channels; + + return $this; + } + + /** + * Gets keywords_enabled + * + * @return bool|null + */ + public function getKeywordsEnabled() + { + return $this->container['keywords_enabled']; + } + + /** + * Sets keywords_enabled + * + * @param bool|null $keywords_enabled Whether keyword triggers are enabled + * + * @return self + */ + public function setKeywordsEnabled($keywords_enabled) + { + if (is_null($keywords_enabled)) { + throw new \InvalidArgumentException('non-nullable keywords_enabled cannot be null'); + } + $this->container['keywords_enabled'] = $keywords_enabled; + + return $this; + } + + /** + * Gets keywords + * + * @return string[]|null + */ + public function getKeywords() + { + return $this->container['keywords']; + } + + /** + * Sets keywords + * + * @param string[]|null $keywords Keywords that trigger the bot + * + * @return self + */ + public function setKeywords($keywords) + { + if (is_null($keywords)) { + throw new \InvalidArgumentException('non-nullable keywords cannot be null'); + } + $this->container['keywords'] = $keywords; + + return $this; + } + + /** + * Gets slash_commands + * + * @return string[]|null + */ + public function getSlashCommands() + { + return $this->container['slash_commands']; + } + + /** + * Sets slash_commands + * + * @param string[]|null $slash_commands Slash commands the bot responds to + * + * @return self + */ + public function setSlashCommands($slash_commands) + { + if (is_null($slash_commands)) { + throw new \InvalidArgumentException('non-nullable slash_commands cannot be null'); + } + $this->container['slash_commands'] = $slash_commands; + + 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/CreateTask201Response.php b/src/Model/CreateTask201Response.php index 5f99de2..616b055 100644 --- a/src/Model/CreateTask201Response.php +++ b/src/Model/CreateTask201Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/CreateTaskRequest.php b/src/Model/CreateTaskRequest.php index 07dc79b..b982ef3 100644 --- a/src/Model/CreateTaskRequest.php +++ b/src/Model/CreateTaskRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/CreateVectorCollection201Response.php b/src/Model/CreateVectorCollection201Response.php index 9c2a56e..16fd9b9 100644 --- a/src/Model/CreateVectorCollection201Response.php +++ b/src/Model/CreateVectorCollection201Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/CreateVectorCollection201ResponseCollection.php b/src/Model/CreateVectorCollection201ResponseCollection.php index 5bd0ac9..6b154e9 100644 --- a/src/Model/CreateVectorCollection201ResponseCollection.php +++ b/src/Model/CreateVectorCollection201ResponseCollection.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/CreateVectorCollectionRequest.php b/src/Model/CreateVectorCollectionRequest.php index ce4b6a1..2ccd3fe 100644 --- a/src/Model/CreateVectorCollectionRequest.php +++ b/src/Model/CreateVectorCollectionRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/CreateVolumeRequest.php b/src/Model/CreateVolumeRequest.php index 0f4ee91..a6cea43 100644 --- a/src/Model/CreateVolumeRequest.php +++ b/src/Model/CreateVolumeRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/Cron.php b/src/Model/Cron.php index 8f9d457..0757515 100644 --- a/src/Model/Cron.php +++ b/src/Model/Cron.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ @@ -58,8 +58,11 @@ class Cron implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPITypes = [ 'name' => 'string', - 'schedule' => 'string', - 'command' => 'string' + 'description' => 'string', + 'schedule_expression' => 'string', + 'command' => 'string[]', + 'target_container_name' => 'string', + 'is_enabled' => 'bool' ]; /** @@ -71,8 +74,11 @@ class Cron implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPIFormats = [ 'name' => null, - 'schedule' => null, - 'command' => null + 'description' => null, + 'schedule_expression' => null, + 'command' => null, + 'target_container_name' => null, + 'is_enabled' => null ]; /** @@ -82,8 +88,11 @@ class Cron implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static array $openAPINullables = [ 'name' => false, - 'schedule' => false, - 'command' => false + 'description' => true, + 'schedule_expression' => false, + 'command' => false, + 'target_container_name' => true, + 'is_enabled' => false ]; /** @@ -173,8 +182,11 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'name' => 'name', - 'schedule' => 'schedule', - 'command' => 'command' + 'description' => 'description', + 'schedule_expression' => 'scheduleExpression', + 'command' => 'command', + 'target_container_name' => 'targetContainerName', + 'is_enabled' => 'isEnabled' ]; /** @@ -184,8 +196,11 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'name' => 'setName', - 'schedule' => 'setSchedule', - 'command' => 'setCommand' + 'description' => 'setDescription', + 'schedule_expression' => 'setScheduleExpression', + 'command' => 'setCommand', + 'target_container_name' => 'setTargetContainerName', + 'is_enabled' => 'setIsEnabled' ]; /** @@ -195,8 +210,11 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'name' => 'getName', - 'schedule' => 'getSchedule', - 'command' => 'getCommand' + 'description' => 'getDescription', + 'schedule_expression' => 'getScheduleExpression', + 'command' => 'getCommand', + 'target_container_name' => 'getTargetContainerName', + 'is_enabled' => 'getIsEnabled' ]; /** @@ -257,8 +275,11 @@ public function getModelName() public function __construct(?array $data = null) { $this->setIfExists('name', $data ?? [], null); - $this->setIfExists('schedule', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('schedule_expression', $data ?? [], null); $this->setIfExists('command', $data ?? [], null); + $this->setIfExists('target_container_name', $data ?? [], null); + $this->setIfExists('is_enabled', $data ?? [], null); } /** @@ -331,37 +352,71 @@ public function setName($name) } /** - * Gets schedule + * Gets description * * @return string|null */ - public function getSchedule() + public function getDescription() { - return $this->container['schedule']; + return $this->container['description']; } /** - * Sets schedule + * Sets description * - * @param string|null $schedule schedule + * @param string|null $description description * * @return self */ - public function setSchedule($schedule) + public function setDescription($description) { - if (is_null($schedule)) { - throw new \InvalidArgumentException('non-nullable schedule cannot be null'); + if (is_null($description)) { + array_push($this->openAPINullablesSetToNull, 'description'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('description', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['schedule'] = $schedule; + $this->container['description'] = $description; return $this; } /** - * Gets command + * Gets schedule_expression * * @return string|null */ + public function getScheduleExpression() + { + return $this->container['schedule_expression']; + } + + /** + * Sets schedule_expression + * + * @param string|null $schedule_expression schedule_expression + * + * @return self + */ + public function setScheduleExpression($schedule_expression) + { + if (is_null($schedule_expression)) { + throw new \InvalidArgumentException('non-nullable schedule_expression cannot be null'); + } + $this->container['schedule_expression'] = $schedule_expression; + + return $this; + } + + /** + * Gets command + * + * @return string[]|null + */ public function getCommand() { return $this->container['command']; @@ -370,7 +425,7 @@ public function getCommand() /** * Sets command * - * @param string|null $command command + * @param string[]|null $command command * * @return self */ @@ -383,6 +438,67 @@ public function setCommand($command) return $this; } + + /** + * Gets target_container_name + * + * @return string|null + */ + public function getTargetContainerName() + { + return $this->container['target_container_name']; + } + + /** + * Sets target_container_name + * + * @param string|null $target_container_name target_container_name + * + * @return self + */ + public function setTargetContainerName($target_container_name) + { + if (is_null($target_container_name)) { + array_push($this->openAPINullablesSetToNull, 'target_container_name'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('target_container_name', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['target_container_name'] = $target_container_name; + + return $this; + } + + /** + * Gets is_enabled + * + * @return bool|null + */ + public function getIsEnabled() + { + return $this->container['is_enabled']; + } + + /** + * Sets is_enabled + * + * @param bool|null $is_enabled is_enabled + * + * @return self + */ + public function setIsEnabled($is_enabled) + { + if (is_null($is_enabled)) { + throw new \InvalidArgumentException('non-nullable is_enabled cannot be null'); + } + $this->container['is_enabled'] = $is_enabled; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/CronRun.php b/src/Model/CronRun.php index 90b76ef..7738d00 100644 --- a/src/Model/CronRun.php +++ b/src/Model/CronRun.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/DeleteAIAgent200Response.php b/src/Model/DeleteAIAgent200Response.php index 682da4e..355804f 100644 --- a/src/Model/DeleteAIAgent200Response.php +++ b/src/Model/DeleteAIAgent200Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/DeleteAISession200Response.php b/src/Model/DeleteAISession200Response.php index 44b1d75..41065ac 100644 --- a/src/Model/DeleteAISession200Response.php +++ b/src/Model/DeleteAISession200Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/DeleteVectorCollection200Response.php b/src/Model/DeleteAgentOverlay200Response.php similarity index 96% rename from src/Model/DeleteVectorCollection200Response.php rename to src/Model/DeleteAgentOverlay200Response.php index 521c91b..1820600 100644 --- a/src/Model/DeleteVectorCollection200Response.php +++ b/src/Model/DeleteAgentOverlay200Response.php @@ -1,6 +1,6 @@ */ -class DeleteVectorCollection200Response implements ModelInterface, ArrayAccess, \JsonSerializable +class DeleteAgentOverlay200Response implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -49,7 +49,7 @@ class DeleteVectorCollection200Response implements ModelInterface, ArrayAccess, * * @var string */ - protected static $openAPIModelName = 'deleteVectorCollection_200_response'; + protected static $openAPIModelName = 'deleteAgentOverlay_200_response'; /** * Array of property to type mappings. Used for (de)serialization diff --git a/src/Model/DeleteBackup200Response.php b/src/Model/DeleteBackup200Response.php index 582a3bb..131790b 100644 --- a/src/Model/DeleteBackup200Response.php +++ b/src/Model/DeleteBackup200Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/DeleteCustomTool200Response.php b/src/Model/DeleteCustomTool200Response.php index 457b16f..862477b 100644 --- a/src/Model/DeleteCustomTool200Response.php +++ b/src/Model/DeleteCustomTool200Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/DeleteFile200Response.php b/src/Model/DeleteFile200Response.php index 637cfe6..18daaa5 100644 --- a/src/Model/DeleteFile200Response.php +++ b/src/Model/DeleteFile200Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/DeleteSkill200Response.php b/src/Model/DeleteSkill200Response.php new file mode 100644 index 0000000..590d046 --- /dev/null +++ b/src/Model/DeleteSkill200Response.php @@ -0,0 +1,443 @@ + + */ +class DeleteSkill200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'deleteSkill_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'success' => 'bool', + 'message' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'success' => null, + 'message' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'success' => false, + 'message' => 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 = [ + 'success' => 'success', + 'message' => 'message' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'success' => 'setSuccess', + 'message' => 'setMessage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'success' => 'getSuccess', + 'message' => 'getMessage' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('success', $data ?? [], null); + $this->setIfExists('message', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets success + * + * @return bool|null + */ + public function getSuccess() + { + return $this->container['success']; + } + + /** + * Sets success + * + * @param bool|null $success success + * + * @return self + */ + public function setSuccess($success) + { + if (is_null($success)) { + throw new \InvalidArgumentException('non-nullable success cannot be null'); + } + $this->container['success'] = $success; + + return $this; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message message + * + * @return self + */ + public function setMessage($message) + { + if (is_null($message)) { + throw new \InvalidArgumentException('non-nullable message cannot be null'); + } + $this->container['message'] = $message; + + 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/DeleteSkillCollection200Response.php b/src/Model/DeleteSkillCollection200Response.php new file mode 100644 index 0000000..d06a820 --- /dev/null +++ b/src/Model/DeleteSkillCollection200Response.php @@ -0,0 +1,443 @@ + + */ +class DeleteSkillCollection200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'deleteSkillCollection_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'success' => 'bool', + 'message' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'success' => null, + 'message' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'success' => false, + 'message' => 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 = [ + 'success' => 'success', + 'message' => 'message' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'success' => 'setSuccess', + 'message' => 'setMessage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'success' => 'getSuccess', + 'message' => 'getMessage' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('success', $data ?? [], null); + $this->setIfExists('message', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets success + * + * @return bool|null + */ + public function getSuccess() + { + return $this->container['success']; + } + + /** + * Sets success + * + * @param bool|null $success success + * + * @return self + */ + public function setSuccess($success) + { + if (is_null($success)) { + throw new \InvalidArgumentException('non-nullable success cannot be null'); + } + $this->container['success'] = $success; + + return $this; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message message + * + * @return self + */ + public function setMessage($message) + { + if (is_null($message)) { + throw new \InvalidArgumentException('non-nullable message cannot be null'); + } + $this->container['message'] = $message; + + 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/DeleteSlackBot200Response.php b/src/Model/DeleteSlackBot200Response.php new file mode 100644 index 0000000..a95cc83 --- /dev/null +++ b/src/Model/DeleteSlackBot200Response.php @@ -0,0 +1,443 @@ + + */ +class DeleteSlackBot200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'deleteSlackBot_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'success' => 'bool', + 'message' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'success' => null, + 'message' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'success' => false, + 'message' => 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 = [ + 'success' => 'success', + 'message' => 'message' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'success' => 'setSuccess', + 'message' => 'setMessage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'success' => 'getSuccess', + 'message' => 'getMessage' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('success', $data ?? [], null); + $this->setIfExists('message', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets success + * + * @return bool|null + */ + public function getSuccess() + { + return $this->container['success']; + } + + /** + * Sets success + * + * @param bool|null $success success + * + * @return self + */ + public function setSuccess($success) + { + if (is_null($success)) { + throw new \InvalidArgumentException('non-nullable success cannot be null'); + } + $this->container['success'] = $success; + + return $this; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message message + * + * @return self + */ + public function setMessage($message) + { + if (is_null($message)) { + throw new \InvalidArgumentException('non-nullable message cannot be null'); + } + $this->container['message'] = $message; + + 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/DeleteTask200Response.php b/src/Model/DeleteTask200Response.php index cdd8cc9..c9eb8d9 100644 --- a/src/Model/DeleteTask200Response.php +++ b/src/Model/DeleteTask200Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/DeleteTask409Response.php b/src/Model/DeleteTask409Response.php index dd8be62..9251f0f 100644 --- a/src/Model/DeleteTask409Response.php +++ b/src/Model/DeleteTask409Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/DeleteVectorDocuments200Response.php b/src/Model/DeleteVectorDocuments200Response.php new file mode 100644 index 0000000..220136b --- /dev/null +++ b/src/Model/DeleteVectorDocuments200Response.php @@ -0,0 +1,477 @@ + + */ +class DeleteVectorDocuments200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'deleteVectorDocuments_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'message' => 'string', + 'collection_id' => 'string', + 'deleted_count' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'message' => null, + 'collection_id' => null, + 'deleted_count' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'message' => false, + 'collection_id' => false, + 'deleted_count' => 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 = [ + 'message' => 'message', + 'collection_id' => 'collectionId', + 'deleted_count' => 'deletedCount' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'message' => 'setMessage', + 'collection_id' => 'setCollectionId', + 'deleted_count' => 'setDeletedCount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'message' => 'getMessage', + 'collection_id' => 'getCollectionId', + 'deleted_count' => 'getDeletedCount' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('message', $data ?? [], null); + $this->setIfExists('collection_id', $data ?? [], null); + $this->setIfExists('deleted_count', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message message + * + * @return self + */ + public function setMessage($message) + { + if (is_null($message)) { + throw new \InvalidArgumentException('non-nullable message cannot be null'); + } + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets collection_id + * + * @return string|null + */ + public function getCollectionId() + { + return $this->container['collection_id']; + } + + /** + * Sets collection_id + * + * @param string|null $collection_id collection_id + * + * @return self + */ + public function setCollectionId($collection_id) + { + if (is_null($collection_id)) { + throw new \InvalidArgumentException('non-nullable collection_id cannot be null'); + } + $this->container['collection_id'] = $collection_id; + + return $this; + } + + /** + * Gets deleted_count + * + * @return int|null + */ + public function getDeletedCount() + { + return $this->container['deleted_count']; + } + + /** + * Sets deleted_count + * + * @param int|null $deleted_count deleted_count + * + * @return self + */ + public function setDeletedCount($deleted_count) + { + if (is_null($deleted_count)) { + throw new \InvalidArgumentException('non-nullable deleted_count cannot be null'); + } + $this->container['deleted_count'] = $deleted_count; + + 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/DeleteVectorDocumentsRequest.php b/src/Model/DeleteVectorDocumentsRequest.php new file mode 100644 index 0000000..175c941 --- /dev/null +++ b/src/Model/DeleteVectorDocumentsRequest.php @@ -0,0 +1,511 @@ + + */ +class DeleteVectorDocumentsRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'deleteVectorDocuments_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'purge_all' => 'bool', + 'document_ids' => 'string[]', + 'keys' => 'string[]', + 'metadata' => '\QuantClient\Model\DeleteVectorDocumentsRequestMetadata' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'purge_all' => null, + 'document_ids' => 'uuid', + 'keys' => null, + 'metadata' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'purge_all' => false, + 'document_ids' => false, + 'keys' => false, + 'metadata' => 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 = [ + 'purge_all' => 'purgeAll', + 'document_ids' => 'documentIds', + 'keys' => 'keys', + 'metadata' => 'metadata' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'purge_all' => 'setPurgeAll', + 'document_ids' => 'setDocumentIds', + 'keys' => 'setKeys', + 'metadata' => 'setMetadata' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'purge_all' => 'getPurgeAll', + 'document_ids' => 'getDocumentIds', + 'keys' => 'getKeys', + 'metadata' => 'getMetadata' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('purge_all', $data ?? [], null); + $this->setIfExists('document_ids', $data ?? [], null); + $this->setIfExists('keys', $data ?? [], null); + $this->setIfExists('metadata', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets purge_all + * + * @return bool|null + */ + public function getPurgeAll() + { + return $this->container['purge_all']; + } + + /** + * Sets purge_all + * + * @param bool|null $purge_all Delete ALL documents in collection + * + * @return self + */ + public function setPurgeAll($purge_all) + { + if (is_null($purge_all)) { + throw new \InvalidArgumentException('non-nullable purge_all cannot be null'); + } + $this->container['purge_all'] = $purge_all; + + return $this; + } + + /** + * Gets document_ids + * + * @return string[]|null + */ + public function getDocumentIds() + { + return $this->container['document_ids']; + } + + /** + * Sets document_ids + * + * @param string[]|null $document_ids Delete specific documents by UUID + * + * @return self + */ + public function setDocumentIds($document_ids) + { + if (is_null($document_ids)) { + throw new \InvalidArgumentException('non-nullable document_ids cannot be null'); + } + $this->container['document_ids'] = $document_ids; + + return $this; + } + + /** + * Gets keys + * + * @return string[]|null + */ + public function getKeys() + { + return $this->container['keys']; + } + + /** + * Sets keys + * + * @param string[]|null $keys Delete documents by key + * + * @return self + */ + public function setKeys($keys) + { + if (is_null($keys)) { + throw new \InvalidArgumentException('non-nullable keys cannot be null'); + } + $this->container['keys'] = $keys; + + return $this; + } + + /** + * Gets metadata + * + * @return \QuantClient\Model\DeleteVectorDocumentsRequestMetadata|null + */ + public function getMetadata() + { + return $this->container['metadata']; + } + + /** + * Sets metadata + * + * @param \QuantClient\Model\DeleteVectorDocumentsRequestMetadata|null $metadata metadata + * + * @return self + */ + public function setMetadata($metadata) + { + if (is_null($metadata)) { + throw new \InvalidArgumentException('non-nullable metadata cannot be null'); + } + $this->container['metadata'] = $metadata; + + 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/DeleteVectorDocumentsRequestMetadata.php b/src/Model/DeleteVectorDocumentsRequestMetadata.php new file mode 100644 index 0000000..cb315b9 --- /dev/null +++ b/src/Model/DeleteVectorDocumentsRequestMetadata.php @@ -0,0 +1,443 @@ + + */ +class DeleteVectorDocumentsRequestMetadata implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'deleteVectorDocuments_request_metadata'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'field' => 'string', + 'values' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'field' => null, + 'values' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'field' => false, + 'values' => 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 = [ + 'field' => 'field', + 'values' => 'values' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'field' => 'setField', + 'values' => 'setValues' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'field' => 'getField', + 'values' => 'getValues' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('field', $data ?? [], null); + $this->setIfExists('values', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets field + * + * @return string|null + */ + public function getField() + { + return $this->container['field']; + } + + /** + * Sets field + * + * @param string|null $field Metadata field name (e.g., 'drupal_entity_id') + * + * @return self + */ + public function setField($field) + { + if (is_null($field)) { + throw new \InvalidArgumentException('non-nullable field cannot be null'); + } + $this->container['field'] = $field; + + return $this; + } + + /** + * Gets values + * + * @return string[]|null + */ + public function getValues() + { + return $this->container['values']; + } + + /** + * Sets values + * + * @param string[]|null $values Values to match (OR logic) + * + * @return self + */ + public function setValues($values) + { + if (is_null($values)) { + throw new \InvalidArgumentException('non-nullable values cannot be null'); + } + $this->container['values'] = $values; + + 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/DownloadBackup200Response.php b/src/Model/DownloadBackup200Response.php index b79c200..a8f1046 100644 --- a/src/Model/DownloadBackup200Response.php +++ b/src/Model/DownloadBackup200Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/Embeddings200Response.php b/src/Model/Embeddings200Response.php index 7ff4923..ffc453b 100644 --- a/src/Model/Embeddings200Response.php +++ b/src/Model/Embeddings200Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/Embeddings200ResponseEmbeddings.php b/src/Model/Embeddings200ResponseEmbeddings.php index 311b99c..7267bba 100644 --- a/src/Model/Embeddings200ResponseEmbeddings.php +++ b/src/Model/Embeddings200ResponseEmbeddings.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/Embeddings200ResponseUsage.php b/src/Model/Embeddings200ResponseUsage.php index 945059f..d2456e4 100644 --- a/src/Model/Embeddings200ResponseUsage.php +++ b/src/Model/Embeddings200ResponseUsage.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/EmbeddingsRequest.php b/src/Model/EmbeddingsRequest.php index 3a79f62..2830810 100644 --- a/src/Model/EmbeddingsRequest.php +++ b/src/Model/EmbeddingsRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/EmbeddingsRequestInput.php b/src/Model/EmbeddingsRequestInput.php index 38fd995..d29ca67 100644 --- a/src/Model/EmbeddingsRequestInput.php +++ b/src/Model/EmbeddingsRequestInput.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/Environment.php b/src/Model/Environment.php index f771ded..4eafefe 100644 --- a/src/Model/Environment.php +++ b/src/Model/Environment.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/EnvironmentResponse.php b/src/Model/EnvironmentResponse.php index 9788e19..b8c08e5 100644 --- a/src/Model/EnvironmentResponse.php +++ b/src/Model/EnvironmentResponse.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/EnvironmentSummary.php b/src/Model/EnvironmentSummary.php index 8aaeecc..ba49b1a 100644 --- a/src/Model/EnvironmentSummary.php +++ b/src/Model/EnvironmentSummary.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ExtendAISession200Response.php b/src/Model/ExtendAISession200Response.php index 57d099f..bc0ac2f 100644 --- a/src/Model/ExtendAISession200Response.php +++ b/src/Model/ExtendAISession200Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ExtendAISessionRequest.php b/src/Model/ExtendAISessionRequest.php index 3d7efda..87c68d3 100644 --- a/src/Model/ExtendAISessionRequest.php +++ b/src/Model/ExtendAISessionRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/GetAIAgent200Response.php b/src/Model/GetAIAgent200Response.php index 79f4580..e15e9b9 100644 --- a/src/Model/GetAIAgent200Response.php +++ b/src/Model/GetAIAgent200Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/GetAIAgent200ResponseAgent.php b/src/Model/GetAIAgent200ResponseAgent.php index 8fad5ff..647490f 100644 --- a/src/Model/GetAIAgent200ResponseAgent.php +++ b/src/Model/GetAIAgent200ResponseAgent.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ @@ -67,6 +67,11 @@ class GetAIAgent200ResponseAgent implements ModelInterface, ArrayAccess, \JsonSe 'max_tokens' => 'int', 'allowed_tools' => 'string[]', 'allowed_collections' => 'string[]', + 'assigned_skills' => 'string[]', + 'long_context' => 'bool', + 'guardrail_preset' => 'string', + 'is_global' => 'bool', + 'has_overlay' => 'bool', 'created_by' => 'string', 'created_at' => '\DateTime', 'updated_at' => '\DateTime' @@ -90,6 +95,11 @@ class GetAIAgent200ResponseAgent implements ModelInterface, ArrayAccess, \JsonSe 'max_tokens' => null, 'allowed_tools' => null, 'allowed_collections' => null, + 'assigned_skills' => null, + 'long_context' => null, + 'guardrail_preset' => null, + 'is_global' => null, + 'has_overlay' => null, 'created_by' => null, 'created_at' => 'date-time', 'updated_at' => 'date-time' @@ -111,6 +121,11 @@ class GetAIAgent200ResponseAgent implements ModelInterface, ArrayAccess, \JsonSe 'max_tokens' => false, 'allowed_tools' => false, 'allowed_collections' => false, + 'assigned_skills' => false, + 'long_context' => false, + 'guardrail_preset' => false, + 'is_global' => false, + 'has_overlay' => false, 'created_by' => false, 'created_at' => false, 'updated_at' => false @@ -212,6 +227,11 @@ public function isNullableSetToNull(string $property): bool 'max_tokens' => 'maxTokens', 'allowed_tools' => 'allowedTools', 'allowed_collections' => 'allowedCollections', + 'assigned_skills' => 'assignedSkills', + 'long_context' => 'longContext', + 'guardrail_preset' => 'guardrailPreset', + 'is_global' => 'isGlobal', + 'has_overlay' => 'hasOverlay', 'created_by' => 'createdBy', 'created_at' => 'createdAt', 'updated_at' => 'updatedAt' @@ -233,6 +253,11 @@ public function isNullableSetToNull(string $property): bool 'max_tokens' => 'setMaxTokens', 'allowed_tools' => 'setAllowedTools', 'allowed_collections' => 'setAllowedCollections', + 'assigned_skills' => 'setAssignedSkills', + 'long_context' => 'setLongContext', + 'guardrail_preset' => 'setGuardrailPreset', + 'is_global' => 'setIsGlobal', + 'has_overlay' => 'setHasOverlay', 'created_by' => 'setCreatedBy', 'created_at' => 'setCreatedAt', 'updated_at' => 'setUpdatedAt' @@ -254,6 +279,11 @@ public function isNullableSetToNull(string $property): bool 'max_tokens' => 'getMaxTokens', 'allowed_tools' => 'getAllowedTools', 'allowed_collections' => 'getAllowedCollections', + 'assigned_skills' => 'getAssignedSkills', + 'long_context' => 'getLongContext', + 'guardrail_preset' => 'getGuardrailPreset', + 'is_global' => 'getIsGlobal', + 'has_overlay' => 'getHasOverlay', 'created_by' => 'getCreatedBy', 'created_at' => 'getCreatedAt', 'updated_at' => 'getUpdatedAt' @@ -326,6 +356,11 @@ public function __construct(?array $data = null) $this->setIfExists('max_tokens', $data ?? [], null); $this->setIfExists('allowed_tools', $data ?? [], null); $this->setIfExists('allowed_collections', $data ?? [], null); + $this->setIfExists('assigned_skills', $data ?? [], null); + $this->setIfExists('long_context', $data ?? [], null); + $this->setIfExists('guardrail_preset', $data ?? [], null); + $this->setIfExists('is_global', $data ?? [], null); + $this->setIfExists('has_overlay', $data ?? [], null); $this->setIfExists('created_by', $data ?? [], null); $this->setIfExists('created_at', $data ?? [], null); $this->setIfExists('updated_at', $data ?? [], null); @@ -643,6 +678,141 @@ public function setAllowedCollections($allowed_collections) return $this; } + /** + * Gets assigned_skills + * + * @return string[]|null + */ + public function getAssignedSkills() + { + return $this->container['assigned_skills']; + } + + /** + * Sets assigned_skills + * + * @param string[]|null $assigned_skills assigned_skills + * + * @return self + */ + public function setAssignedSkills($assigned_skills) + { + if (is_null($assigned_skills)) { + throw new \InvalidArgumentException('non-nullable assigned_skills cannot be null'); + } + $this->container['assigned_skills'] = $assigned_skills; + + return $this; + } + + /** + * Gets long_context + * + * @return bool|null + */ + public function getLongContext() + { + return $this->container['long_context']; + } + + /** + * Sets long_context + * + * @param bool|null $long_context Whether 1M context window is enabled + * + * @return self + */ + public function setLongContext($long_context) + { + if (is_null($long_context)) { + throw new \InvalidArgumentException('non-nullable long_context cannot be null'); + } + $this->container['long_context'] = $long_context; + + return $this; + } + + /** + * Gets guardrail_preset + * + * @return string|null + */ + public function getGuardrailPreset() + { + return $this->container['guardrail_preset']; + } + + /** + * Sets guardrail_preset + * + * @param string|null $guardrail_preset Guardrail preset name + * + * @return self + */ + public function setGuardrailPreset($guardrail_preset) + { + if (is_null($guardrail_preset)) { + throw new \InvalidArgumentException('non-nullable guardrail_preset cannot be null'); + } + $this->container['guardrail_preset'] = $guardrail_preset; + + return $this; + } + + /** + * Gets is_global + * + * @return bool|null + */ + public function getIsGlobal() + { + return $this->container['is_global']; + } + + /** + * Sets is_global + * + * @param bool|null $is_global Whether this is a platform-managed global agent + * + * @return self + */ + public function setIsGlobal($is_global) + { + if (is_null($is_global)) { + throw new \InvalidArgumentException('non-nullable is_global cannot be null'); + } + $this->container['is_global'] = $is_global; + + return $this; + } + + /** + * Gets has_overlay + * + * @return bool|null + */ + public function getHasOverlay() + { + return $this->container['has_overlay']; + } + + /** + * Sets has_overlay + * + * @param bool|null $has_overlay Whether the requesting org has a per-org overlay for this global agent + * + * @return self + */ + public function setHasOverlay($has_overlay) + { + if (is_null($has_overlay)) { + throw new \InvalidArgumentException('non-nullable has_overlay cannot be null'); + } + $this->container['has_overlay'] = $has_overlay; + + return $this; + } + /** * Gets created_by * diff --git a/src/Model/GetAIModel200Response.php b/src/Model/GetAIModel200Response.php index 8d3060d..565dd2b 100644 --- a/src/Model/GetAIModel200Response.php +++ b/src/Model/GetAIModel200Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/GetAIModel200ResponseCapabilities.php b/src/Model/GetAIModel200ResponseCapabilities.php index b3fa7d8..426722d 100644 --- a/src/Model/GetAIModel200ResponseCapabilities.php +++ b/src/Model/GetAIModel200ResponseCapabilities.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/GetAIModel200ResponsePricing.php b/src/Model/GetAIModel200ResponsePricing.php index f65166d..72c9c94 100644 --- a/src/Model/GetAIModel200ResponsePricing.php +++ b/src/Model/GetAIModel200ResponsePricing.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/GetAIModel404Response.php b/src/Model/GetAIModel404Response.php index fa07c85..901525f 100644 --- a/src/Model/GetAIModel404Response.php +++ b/src/Model/GetAIModel404Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/GetAIOrchestrationStatus200Response.php b/src/Model/GetAIOrchestrationStatus200Response.php index 8acbc43..98d4516 100644 --- a/src/Model/GetAIOrchestrationStatus200Response.php +++ b/src/Model/GetAIOrchestrationStatus200Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/GetAIOrchestrationStatus200ResponseToolsInner.php b/src/Model/GetAIOrchestrationStatus200ResponseToolsInner.php index efa9234..d73a106 100644 --- a/src/Model/GetAIOrchestrationStatus200ResponseToolsInner.php +++ b/src/Model/GetAIOrchestrationStatus200ResponseToolsInner.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/GetAIOrchestrationStatus404Response.php b/src/Model/GetAIOrchestrationStatus404Response.php index 6c2736d..e3f2e75 100644 --- a/src/Model/GetAIOrchestrationStatus404Response.php +++ b/src/Model/GetAIOrchestrationStatus404Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/GetAISession200Response.php b/src/Model/GetAISession200Response.php index b1c178d..c73c959 100644 --- a/src/Model/GetAISession200Response.php +++ b/src/Model/GetAISession200Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/GetAIToolExecutionStatus200Response.php b/src/Model/GetAIToolExecutionStatus200Response.php index 180af54..89eaa36 100644 --- a/src/Model/GetAIToolExecutionStatus200Response.php +++ b/src/Model/GetAIToolExecutionStatus200Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/GetAIToolExecutionStatus200ResponseResult.php b/src/Model/GetAIToolExecutionStatus200ResponseResult.php index 392788e..d01a306 100644 --- a/src/Model/GetAIToolExecutionStatus200ResponseResult.php +++ b/src/Model/GetAIToolExecutionStatus200ResponseResult.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/GetAIToolExecutionStatus404Response.php b/src/Model/GetAIToolExecutionStatus404Response.php index b7f7521..e2ead31 100644 --- a/src/Model/GetAIToolExecutionStatus404Response.php +++ b/src/Model/GetAIToolExecutionStatus404Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/GetAIUsageStats200Response.php b/src/Model/GetAIUsageStats200Response.php index dcd4eed..493567e 100644 --- a/src/Model/GetAIUsageStats200Response.php +++ b/src/Model/GetAIUsageStats200Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/GetAIUsageStats200ResponseByModelValue.php b/src/Model/GetAIUsageStats200ResponseByModelValue.php index 1723dac..b740864 100644 --- a/src/Model/GetAIUsageStats200ResponseByModelValue.php +++ b/src/Model/GetAIUsageStats200ResponseByModelValue.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/GetAgentOverlay200Response.php b/src/Model/GetAgentOverlay200Response.php new file mode 100644 index 0000000..44c7cab --- /dev/null +++ b/src/Model/GetAgentOverlay200Response.php @@ -0,0 +1,450 @@ + + */ +class GetAgentOverlay200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'getAgentOverlay_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'overlay' => '\QuantClient\Model\GetAgentOverlay200ResponseOverlay', + 'base' => '\QuantClient\Model\GetAgentOverlay200ResponseBase' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'overlay' => null, + 'base' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'overlay' => true, + 'base' => 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 = [ + 'overlay' => 'overlay', + 'base' => 'base' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'overlay' => 'setOverlay', + 'base' => 'setBase' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'overlay' => 'getOverlay', + 'base' => 'getBase' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('overlay', $data ?? [], null); + $this->setIfExists('base', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets overlay + * + * @return \QuantClient\Model\GetAgentOverlay200ResponseOverlay|null + */ + public function getOverlay() + { + return $this->container['overlay']; + } + + /** + * Sets overlay + * + * @param \QuantClient\Model\GetAgentOverlay200ResponseOverlay|null $overlay overlay + * + * @return self + */ + public function setOverlay($overlay) + { + if (is_null($overlay)) { + array_push($this->openAPINullablesSetToNull, 'overlay'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('overlay', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['overlay'] = $overlay; + + return $this; + } + + /** + * Gets base + * + * @return \QuantClient\Model\GetAgentOverlay200ResponseBase|null + */ + public function getBase() + { + return $this->container['base']; + } + + /** + * Sets base + * + * @param \QuantClient\Model\GetAgentOverlay200ResponseBase|null $base base + * + * @return self + */ + public function setBase($base) + { + if (is_null($base)) { + throw new \InvalidArgumentException('non-nullable base cannot be null'); + } + $this->container['base'] = $base; + + 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/GetAgentOverlay200ResponseBase.php b/src/Model/GetAgentOverlay200ResponseBase.php new file mode 100644 index 0000000..6ee3bd0 --- /dev/null +++ b/src/Model/GetAgentOverlay200ResponseBase.php @@ -0,0 +1,546 @@ + + */ +class GetAgentOverlay200ResponseBase implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'getAgentOverlay_200_response_base'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'agent_id' => 'string', + 'name' => 'string', + 'model_id' => 'string', + 'allowed_tools' => 'string[]', + 'assigned_skill_ids' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'agent_id' => null, + 'name' => null, + 'model_id' => null, + 'allowed_tools' => null, + 'assigned_skill_ids' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'agent_id' => false, + 'name' => false, + 'model_id' => false, + 'allowed_tools' => false, + 'assigned_skill_ids' => 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 = [ + 'agent_id' => 'agentId', + 'name' => 'name', + 'model_id' => 'modelId', + 'allowed_tools' => 'allowedTools', + 'assigned_skill_ids' => 'assignedSkillIds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'agent_id' => 'setAgentId', + 'name' => 'setName', + 'model_id' => 'setModelId', + 'allowed_tools' => 'setAllowedTools', + 'assigned_skill_ids' => 'setAssignedSkillIds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'agent_id' => 'getAgentId', + 'name' => 'getName', + 'model_id' => 'getModelId', + 'allowed_tools' => 'getAllowedTools', + 'assigned_skill_ids' => 'getAssignedSkillIds' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('agent_id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('model_id', $data ?? [], null); + $this->setIfExists('allowed_tools', $data ?? [], null); + $this->setIfExists('assigned_skill_ids', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets agent_id + * + * @return string|null + */ + public function getAgentId() + { + return $this->container['agent_id']; + } + + /** + * Sets agent_id + * + * @param string|null $agent_id agent_id + * + * @return self + */ + public function setAgentId($agent_id) + { + if (is_null($agent_id)) { + throw new \InvalidArgumentException('non-nullable agent_id cannot be null'); + } + $this->container['agent_id'] = $agent_id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return self + */ + public function setName($name) + { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets model_id + * + * @return string|null + */ + public function getModelId() + { + return $this->container['model_id']; + } + + /** + * Sets model_id + * + * @param string|null $model_id model_id + * + * @return self + */ + public function setModelId($model_id) + { + if (is_null($model_id)) { + throw new \InvalidArgumentException('non-nullable model_id cannot be null'); + } + $this->container['model_id'] = $model_id; + + return $this; + } + + /** + * Gets allowed_tools + * + * @return string[]|null + */ + public function getAllowedTools() + { + return $this->container['allowed_tools']; + } + + /** + * Sets allowed_tools + * + * @param string[]|null $allowed_tools allowed_tools + * + * @return self + */ + public function setAllowedTools($allowed_tools) + { + if (is_null($allowed_tools)) { + throw new \InvalidArgumentException('non-nullable allowed_tools cannot be null'); + } + $this->container['allowed_tools'] = $allowed_tools; + + return $this; + } + + /** + * Gets assigned_skill_ids + * + * @return string[]|null + */ + public function getAssignedSkillIds() + { + return $this->container['assigned_skill_ids']; + } + + /** + * Sets assigned_skill_ids + * + * @param string[]|null $assigned_skill_ids assigned_skill_ids + * + * @return self + */ + public function setAssignedSkillIds($assigned_skill_ids) + { + if (is_null($assigned_skill_ids)) { + throw new \InvalidArgumentException('non-nullable assigned_skill_ids cannot be null'); + } + $this->container['assigned_skill_ids'] = $assigned_skill_ids; + + 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/GetAgentOverlay200ResponseOverlay.php b/src/Model/GetAgentOverlay200ResponseOverlay.php new file mode 100644 index 0000000..cb90992 --- /dev/null +++ b/src/Model/GetAgentOverlay200ResponseOverlay.php @@ -0,0 +1,749 @@ + + */ +class GetAgentOverlay200ResponseOverlay implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'getAgentOverlay_200_response_overlay'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'model_id' => 'string', + 'temperature' => 'float', + 'max_tokens' => 'int', + 'disabled_skills' => 'string[]', + 'additional_skills' => 'string[]', + 'additional_tools' => 'string[]', + 'disabled_tools' => 'string[]', + 'system_prompt_append' => 'string', + 'allowed_collections' => 'string[]', + 'guardrail_preset' => 'string', + 'version' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'model_id' => null, + 'temperature' => null, + 'max_tokens' => null, + 'disabled_skills' => null, + 'additional_skills' => null, + 'additional_tools' => null, + 'disabled_tools' => null, + 'system_prompt_append' => null, + 'allowed_collections' => null, + 'guardrail_preset' => null, + 'version' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'model_id' => false, + 'temperature' => false, + 'max_tokens' => false, + 'disabled_skills' => false, + 'additional_skills' => false, + 'additional_tools' => false, + 'disabled_tools' => false, + 'system_prompt_append' => false, + 'allowed_collections' => false, + 'guardrail_preset' => false, + 'version' => 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 = [ + 'model_id' => 'modelId', + 'temperature' => 'temperature', + 'max_tokens' => 'maxTokens', + 'disabled_skills' => 'disabledSkills', + 'additional_skills' => 'additionalSkills', + 'additional_tools' => 'additionalTools', + 'disabled_tools' => 'disabledTools', + 'system_prompt_append' => 'systemPromptAppend', + 'allowed_collections' => 'allowedCollections', + 'guardrail_preset' => 'guardrailPreset', + 'version' => 'version' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'model_id' => 'setModelId', + 'temperature' => 'setTemperature', + 'max_tokens' => 'setMaxTokens', + 'disabled_skills' => 'setDisabledSkills', + 'additional_skills' => 'setAdditionalSkills', + 'additional_tools' => 'setAdditionalTools', + 'disabled_tools' => 'setDisabledTools', + 'system_prompt_append' => 'setSystemPromptAppend', + 'allowed_collections' => 'setAllowedCollections', + 'guardrail_preset' => 'setGuardrailPreset', + 'version' => 'setVersion' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'model_id' => 'getModelId', + 'temperature' => 'getTemperature', + 'max_tokens' => 'getMaxTokens', + 'disabled_skills' => 'getDisabledSkills', + 'additional_skills' => 'getAdditionalSkills', + 'additional_tools' => 'getAdditionalTools', + 'disabled_tools' => 'getDisabledTools', + 'system_prompt_append' => 'getSystemPromptAppend', + 'allowed_collections' => 'getAllowedCollections', + 'guardrail_preset' => 'getGuardrailPreset', + 'version' => 'getVersion' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('model_id', $data ?? [], null); + $this->setIfExists('temperature', $data ?? [], null); + $this->setIfExists('max_tokens', $data ?? [], null); + $this->setIfExists('disabled_skills', $data ?? [], null); + $this->setIfExists('additional_skills', $data ?? [], null); + $this->setIfExists('additional_tools', $data ?? [], null); + $this->setIfExists('disabled_tools', $data ?? [], null); + $this->setIfExists('system_prompt_append', $data ?? [], null); + $this->setIfExists('allowed_collections', $data ?? [], null); + $this->setIfExists('guardrail_preset', $data ?? [], null); + $this->setIfExists('version', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets model_id + * + * @return string|null + */ + public function getModelId() + { + return $this->container['model_id']; + } + + /** + * Sets model_id + * + * @param string|null $model_id model_id + * + * @return self + */ + public function setModelId($model_id) + { + if (is_null($model_id)) { + throw new \InvalidArgumentException('non-nullable model_id cannot be null'); + } + $this->container['model_id'] = $model_id; + + return $this; + } + + /** + * Gets temperature + * + * @return float|null + */ + public function getTemperature() + { + return $this->container['temperature']; + } + + /** + * Sets temperature + * + * @param float|null $temperature temperature + * + * @return self + */ + public function setTemperature($temperature) + { + if (is_null($temperature)) { + throw new \InvalidArgumentException('non-nullable temperature cannot be null'); + } + $this->container['temperature'] = $temperature; + + return $this; + } + + /** + * Gets max_tokens + * + * @return int|null + */ + public function getMaxTokens() + { + return $this->container['max_tokens']; + } + + /** + * Sets max_tokens + * + * @param int|null $max_tokens max_tokens + * + * @return self + */ + public function setMaxTokens($max_tokens) + { + if (is_null($max_tokens)) { + throw new \InvalidArgumentException('non-nullable max_tokens cannot be null'); + } + $this->container['max_tokens'] = $max_tokens; + + return $this; + } + + /** + * Gets disabled_skills + * + * @return string[]|null + */ + public function getDisabledSkills() + { + return $this->container['disabled_skills']; + } + + /** + * Sets disabled_skills + * + * @param string[]|null $disabled_skills disabled_skills + * + * @return self + */ + public function setDisabledSkills($disabled_skills) + { + if (is_null($disabled_skills)) { + throw new \InvalidArgumentException('non-nullable disabled_skills cannot be null'); + } + $this->container['disabled_skills'] = $disabled_skills; + + return $this; + } + + /** + * Gets additional_skills + * + * @return string[]|null + */ + public function getAdditionalSkills() + { + return $this->container['additional_skills']; + } + + /** + * Sets additional_skills + * + * @param string[]|null $additional_skills additional_skills + * + * @return self + */ + public function setAdditionalSkills($additional_skills) + { + if (is_null($additional_skills)) { + throw new \InvalidArgumentException('non-nullable additional_skills cannot be null'); + } + $this->container['additional_skills'] = $additional_skills; + + return $this; + } + + /** + * Gets additional_tools + * + * @return string[]|null + */ + public function getAdditionalTools() + { + return $this->container['additional_tools']; + } + + /** + * Sets additional_tools + * + * @param string[]|null $additional_tools additional_tools + * + * @return self + */ + public function setAdditionalTools($additional_tools) + { + if (is_null($additional_tools)) { + throw new \InvalidArgumentException('non-nullable additional_tools cannot be null'); + } + $this->container['additional_tools'] = $additional_tools; + + return $this; + } + + /** + * Gets disabled_tools + * + * @return string[]|null + */ + public function getDisabledTools() + { + return $this->container['disabled_tools']; + } + + /** + * Sets disabled_tools + * + * @param string[]|null $disabled_tools disabled_tools + * + * @return self + */ + public function setDisabledTools($disabled_tools) + { + if (is_null($disabled_tools)) { + throw new \InvalidArgumentException('non-nullable disabled_tools cannot be null'); + } + $this->container['disabled_tools'] = $disabled_tools; + + return $this; + } + + /** + * Gets system_prompt_append + * + * @return string|null + */ + public function getSystemPromptAppend() + { + return $this->container['system_prompt_append']; + } + + /** + * Sets system_prompt_append + * + * @param string|null $system_prompt_append system_prompt_append + * + * @return self + */ + public function setSystemPromptAppend($system_prompt_append) + { + if (is_null($system_prompt_append)) { + throw new \InvalidArgumentException('non-nullable system_prompt_append cannot be null'); + } + $this->container['system_prompt_append'] = $system_prompt_append; + + return $this; + } + + /** + * Gets allowed_collections + * + * @return string[]|null + */ + public function getAllowedCollections() + { + return $this->container['allowed_collections']; + } + + /** + * Sets allowed_collections + * + * @param string[]|null $allowed_collections allowed_collections + * + * @return self + */ + public function setAllowedCollections($allowed_collections) + { + if (is_null($allowed_collections)) { + throw new \InvalidArgumentException('non-nullable allowed_collections cannot be null'); + } + $this->container['allowed_collections'] = $allowed_collections; + + return $this; + } + + /** + * Gets guardrail_preset + * + * @return string|null + */ + public function getGuardrailPreset() + { + return $this->container['guardrail_preset']; + } + + /** + * Sets guardrail_preset + * + * @param string|null $guardrail_preset guardrail_preset + * + * @return self + */ + public function setGuardrailPreset($guardrail_preset) + { + if (is_null($guardrail_preset)) { + throw new \InvalidArgumentException('non-nullable guardrail_preset cannot be null'); + } + $this->container['guardrail_preset'] = $guardrail_preset; + + return $this; + } + + /** + * Gets version + * + * @return int|null + */ + public function getVersion() + { + return $this->container['version']; + } + + /** + * Sets version + * + * @param int|null $version version + * + * @return self + */ + public function setVersion($version) + { + if (is_null($version)) { + throw new \InvalidArgumentException('non-nullable version cannot be null'); + } + $this->container['version'] = $version; + + 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/GetDependencyGraph200Response.php b/src/Model/GetDependencyGraph200Response.php index 4bfcefa..0c2d8cc 100644 --- a/src/Model/GetDependencyGraph200Response.php +++ b/src/Model/GetDependencyGraph200Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/GetDurableExecutionStatus200Response.php b/src/Model/GetDurableExecutionStatus200Response.php index 4f0de20..e13f9d0 100644 --- a/src/Model/GetDurableExecutionStatus200Response.php +++ b/src/Model/GetDurableExecutionStatus200Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/GetDurableExecutionStatus200ResponseError.php b/src/Model/GetDurableExecutionStatus200ResponseError.php index 2e58ffa..d1f6bbd 100644 --- a/src/Model/GetDurableExecutionStatus200ResponseError.php +++ b/src/Model/GetDurableExecutionStatus200ResponseError.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/GetDurableExecutionStatus200ResponsePendingToolsInner.php b/src/Model/GetDurableExecutionStatus200ResponsePendingToolsInner.php index ee4070b..740a3b3 100644 --- a/src/Model/GetDurableExecutionStatus200ResponsePendingToolsInner.php +++ b/src/Model/GetDurableExecutionStatus200ResponsePendingToolsInner.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/GetDurableExecutionStatus200ResponseResult.php b/src/Model/GetDurableExecutionStatus200ResponseResult.php index c71ee26..facb38a 100644 --- a/src/Model/GetDurableExecutionStatus200ResponseResult.php +++ b/src/Model/GetDurableExecutionStatus200ResponseResult.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/GetDurableExecutionStatus200ResponseResultResponse.php b/src/Model/GetDurableExecutionStatus200ResponseResultResponse.php index faa57e6..a607f54 100644 --- a/src/Model/GetDurableExecutionStatus200ResponseResultResponse.php +++ b/src/Model/GetDurableExecutionStatus200ResponseResultResponse.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/GetDurableExecutionStatus200ResponseResultUsage.php b/src/Model/GetDurableExecutionStatus200ResponseResultUsage.php index 13225b4..027c3aa 100644 --- a/src/Model/GetDurableExecutionStatus200ResponseResultUsage.php +++ b/src/Model/GetDurableExecutionStatus200ResponseResultUsage.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/GetEcrLoginCredentials200Response.php b/src/Model/GetEcrLoginCredentials200Response.php index 861105e..7e7c3b0 100644 --- a/src/Model/GetEcrLoginCredentials200Response.php +++ b/src/Model/GetEcrLoginCredentials200Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/GetEnvironmentLogs200Response.php b/src/Model/GetEnvironmentLogs200Response.php index e0bdc34..224b0b8 100644 --- a/src/Model/GetEnvironmentLogs200Response.php +++ b/src/Model/GetEnvironmentLogs200Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/GetEnvironmentLogs200ResponseLogEventsInner.php b/src/Model/GetEnvironmentLogs200ResponseLogEventsInner.php index e4fa05a..862bff6 100644 --- a/src/Model/GetEnvironmentLogs200ResponseLogEventsInner.php +++ b/src/Model/GetEnvironmentLogs200ResponseLogEventsInner.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/GetFile200Response.php b/src/Model/GetFile200Response.php index eb8c41c..da8ff6d 100644 --- a/src/Model/GetFile200Response.php +++ b/src/Model/GetFile200Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/GetGovernanceConfig200Response.php b/src/Model/GetGovernanceConfig200Response.php new file mode 100644 index 0000000..152368e --- /dev/null +++ b/src/Model/GetGovernanceConfig200Response.php @@ -0,0 +1,690 @@ + + */ +class GetGovernanceConfig200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'getGovernanceConfig_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'org_id' => 'string', + 'ai_enabled' => 'bool', + 'model_policy' => 'string', + 'model_list' => 'string[]', + 'mandatory_guardrail_preset' => 'string', + 'mandatory_filter_policies' => 'string[]', + 'spend_limits' => '\QuantClient\Model\GetGovernanceConfig200ResponseSpendLimits', + 'version' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'org_id' => null, + 'ai_enabled' => null, + 'model_policy' => null, + 'model_list' => null, + 'mandatory_guardrail_preset' => null, + 'mandatory_filter_policies' => null, + 'spend_limits' => null, + 'version' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'org_id' => false, + 'ai_enabled' => false, + 'model_policy' => false, + 'model_list' => false, + 'mandatory_guardrail_preset' => true, + 'mandatory_filter_policies' => false, + 'spend_limits' => false, + 'version' => 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 = [ + 'org_id' => 'orgId', + 'ai_enabled' => 'aiEnabled', + 'model_policy' => 'modelPolicy', + 'model_list' => 'modelList', + 'mandatory_guardrail_preset' => 'mandatoryGuardrailPreset', + 'mandatory_filter_policies' => 'mandatoryFilterPolicies', + 'spend_limits' => 'spendLimits', + 'version' => 'version' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'org_id' => 'setOrgId', + 'ai_enabled' => 'setAiEnabled', + 'model_policy' => 'setModelPolicy', + 'model_list' => 'setModelList', + 'mandatory_guardrail_preset' => 'setMandatoryGuardrailPreset', + 'mandatory_filter_policies' => 'setMandatoryFilterPolicies', + 'spend_limits' => 'setSpendLimits', + 'version' => 'setVersion' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'org_id' => 'getOrgId', + 'ai_enabled' => 'getAiEnabled', + 'model_policy' => 'getModelPolicy', + 'model_list' => 'getModelList', + 'mandatory_guardrail_preset' => 'getMandatoryGuardrailPreset', + 'mandatory_filter_policies' => 'getMandatoryFilterPolicies', + 'spend_limits' => 'getSpendLimits', + 'version' => 'getVersion' + ]; + + /** + * 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 MODEL_POLICY_UNRESTRICTED = 'unrestricted'; + public const MODEL_POLICY_ALLOWLIST = 'allowlist'; + public const MODEL_POLICY_BLOCKLIST = 'blocklist'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getModelPolicyAllowableValues() + { + return [ + self::MODEL_POLICY_UNRESTRICTED, + self::MODEL_POLICY_ALLOWLIST, + self::MODEL_POLICY_BLOCKLIST, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('org_id', $data ?? [], null); + $this->setIfExists('ai_enabled', $data ?? [], null); + $this->setIfExists('model_policy', $data ?? [], null); + $this->setIfExists('model_list', $data ?? [], null); + $this->setIfExists('mandatory_guardrail_preset', $data ?? [], null); + $this->setIfExists('mandatory_filter_policies', $data ?? [], null); + $this->setIfExists('spend_limits', $data ?? [], null); + $this->setIfExists('version', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param 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->getModelPolicyAllowableValues(); + if (!is_null($this->container['model_policy']) && !in_array($this->container['model_policy'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'model_policy', must be one of '%s'", + $this->container['model_policy'], + implode("', '", $allowedValues) + ); + } + + 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 org_id + * + * @return string|null + */ + public function getOrgId() + { + return $this->container['org_id']; + } + + /** + * Sets org_id + * + * @param string|null $org_id org_id + * + * @return self + */ + public function setOrgId($org_id) + { + if (is_null($org_id)) { + throw new \InvalidArgumentException('non-nullable org_id cannot be null'); + } + $this->container['org_id'] = $org_id; + + return $this; + } + + /** + * Gets ai_enabled + * + * @return bool|null + */ + public function getAiEnabled() + { + return $this->container['ai_enabled']; + } + + /** + * Sets ai_enabled + * + * @param bool|null $ai_enabled ai_enabled + * + * @return self + */ + public function setAiEnabled($ai_enabled) + { + if (is_null($ai_enabled)) { + throw new \InvalidArgumentException('non-nullable ai_enabled cannot be null'); + } + $this->container['ai_enabled'] = $ai_enabled; + + return $this; + } + + /** + * Gets model_policy + * + * @return string|null + */ + public function getModelPolicy() + { + return $this->container['model_policy']; + } + + /** + * Sets model_policy + * + * @param string|null $model_policy model_policy + * + * @return self + */ + public function setModelPolicy($model_policy) + { + if (is_null($model_policy)) { + throw new \InvalidArgumentException('non-nullable model_policy cannot be null'); + } + $allowedValues = $this->getModelPolicyAllowableValues(); + if (!in_array($model_policy, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'model_policy', must be one of '%s'", + $model_policy, + implode("', '", $allowedValues) + ) + ); + } + $this->container['model_policy'] = $model_policy; + + return $this; + } + + /** + * Gets model_list + * + * @return string[]|null + */ + public function getModelList() + { + return $this->container['model_list']; + } + + /** + * Sets model_list + * + * @param string[]|null $model_list model_list + * + * @return self + */ + public function setModelList($model_list) + { + if (is_null($model_list)) { + throw new \InvalidArgumentException('non-nullable model_list cannot be null'); + } + $this->container['model_list'] = $model_list; + + return $this; + } + + /** + * Gets mandatory_guardrail_preset + * + * @return string|null + */ + public function getMandatoryGuardrailPreset() + { + return $this->container['mandatory_guardrail_preset']; + } + + /** + * Sets mandatory_guardrail_preset + * + * @param string|null $mandatory_guardrail_preset mandatory_guardrail_preset + * + * @return self + */ + public function setMandatoryGuardrailPreset($mandatory_guardrail_preset) + { + if (is_null($mandatory_guardrail_preset)) { + array_push($this->openAPINullablesSetToNull, 'mandatory_guardrail_preset'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('mandatory_guardrail_preset', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['mandatory_guardrail_preset'] = $mandatory_guardrail_preset; + + return $this; + } + + /** + * Gets mandatory_filter_policies + * + * @return string[]|null + */ + public function getMandatoryFilterPolicies() + { + return $this->container['mandatory_filter_policies']; + } + + /** + * Sets mandatory_filter_policies + * + * @param string[]|null $mandatory_filter_policies mandatory_filter_policies + * + * @return self + */ + public function setMandatoryFilterPolicies($mandatory_filter_policies) + { + if (is_null($mandatory_filter_policies)) { + throw new \InvalidArgumentException('non-nullable mandatory_filter_policies cannot be null'); + } + $this->container['mandatory_filter_policies'] = $mandatory_filter_policies; + + return $this; + } + + /** + * Gets spend_limits + * + * @return \QuantClient\Model\GetGovernanceConfig200ResponseSpendLimits|null + */ + public function getSpendLimits() + { + return $this->container['spend_limits']; + } + + /** + * Sets spend_limits + * + * @param \QuantClient\Model\GetGovernanceConfig200ResponseSpendLimits|null $spend_limits spend_limits + * + * @return self + */ + public function setSpendLimits($spend_limits) + { + if (is_null($spend_limits)) { + throw new \InvalidArgumentException('non-nullable spend_limits cannot be null'); + } + $this->container['spend_limits'] = $spend_limits; + + return $this; + } + + /** + * Gets version + * + * @return int|null + */ + public function getVersion() + { + return $this->container['version']; + } + + /** + * Sets version + * + * @param int|null $version version + * + * @return self + */ + public function setVersion($version) + { + if (is_null($version)) { + throw new \InvalidArgumentException('non-nullable version cannot be null'); + } + $this->container['version'] = $version; + + 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/GetGovernanceConfig200ResponseSpendLimits.php b/src/Model/GetGovernanceConfig200ResponseSpendLimits.php new file mode 100644 index 0000000..0ae9abc --- /dev/null +++ b/src/Model/GetGovernanceConfig200ResponseSpendLimits.php @@ -0,0 +1,580 @@ + + */ +class GetGovernanceConfig200ResponseSpendLimits implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'getGovernanceConfig_200_response_spendLimits'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'monthly_budget_cents' => 'int', + 'daily_budget_cents' => 'int', + 'per_user_monthly_budget_cents' => 'int', + 'per_user_daily_budget_cents' => 'int', + 'warning_threshold_percent' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'monthly_budget_cents' => null, + 'daily_budget_cents' => null, + 'per_user_monthly_budget_cents' => null, + 'per_user_daily_budget_cents' => null, + 'warning_threshold_percent' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'monthly_budget_cents' => true, + 'daily_budget_cents' => true, + 'per_user_monthly_budget_cents' => true, + 'per_user_daily_budget_cents' => true, + 'warning_threshold_percent' => true + ]; + + /** + * 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 = [ + 'monthly_budget_cents' => 'monthlyBudgetCents', + 'daily_budget_cents' => 'dailyBudgetCents', + 'per_user_monthly_budget_cents' => 'perUserMonthlyBudgetCents', + 'per_user_daily_budget_cents' => 'perUserDailyBudgetCents', + 'warning_threshold_percent' => 'warningThresholdPercent' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'monthly_budget_cents' => 'setMonthlyBudgetCents', + 'daily_budget_cents' => 'setDailyBudgetCents', + 'per_user_monthly_budget_cents' => 'setPerUserMonthlyBudgetCents', + 'per_user_daily_budget_cents' => 'setPerUserDailyBudgetCents', + 'warning_threshold_percent' => 'setWarningThresholdPercent' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'monthly_budget_cents' => 'getMonthlyBudgetCents', + 'daily_budget_cents' => 'getDailyBudgetCents', + 'per_user_monthly_budget_cents' => 'getPerUserMonthlyBudgetCents', + 'per_user_daily_budget_cents' => 'getPerUserDailyBudgetCents', + 'warning_threshold_percent' => 'getWarningThresholdPercent' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('monthly_budget_cents', $data ?? [], null); + $this->setIfExists('daily_budget_cents', $data ?? [], null); + $this->setIfExists('per_user_monthly_budget_cents', $data ?? [], null); + $this->setIfExists('per_user_daily_budget_cents', $data ?? [], null); + $this->setIfExists('warning_threshold_percent', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets monthly_budget_cents + * + * @return int|null + */ + public function getMonthlyBudgetCents() + { + return $this->container['monthly_budget_cents']; + } + + /** + * Sets monthly_budget_cents + * + * @param int|null $monthly_budget_cents monthly_budget_cents + * + * @return self + */ + public function setMonthlyBudgetCents($monthly_budget_cents) + { + if (is_null($monthly_budget_cents)) { + array_push($this->openAPINullablesSetToNull, 'monthly_budget_cents'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('monthly_budget_cents', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['monthly_budget_cents'] = $monthly_budget_cents; + + return $this; + } + + /** + * Gets daily_budget_cents + * + * @return int|null + */ + public function getDailyBudgetCents() + { + return $this->container['daily_budget_cents']; + } + + /** + * Sets daily_budget_cents + * + * @param int|null $daily_budget_cents daily_budget_cents + * + * @return self + */ + public function setDailyBudgetCents($daily_budget_cents) + { + if (is_null($daily_budget_cents)) { + array_push($this->openAPINullablesSetToNull, 'daily_budget_cents'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('daily_budget_cents', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['daily_budget_cents'] = $daily_budget_cents; + + return $this; + } + + /** + * Gets per_user_monthly_budget_cents + * + * @return int|null + */ + public function getPerUserMonthlyBudgetCents() + { + return $this->container['per_user_monthly_budget_cents']; + } + + /** + * Sets per_user_monthly_budget_cents + * + * @param int|null $per_user_monthly_budget_cents per_user_monthly_budget_cents + * + * @return self + */ + public function setPerUserMonthlyBudgetCents($per_user_monthly_budget_cents) + { + if (is_null($per_user_monthly_budget_cents)) { + array_push($this->openAPINullablesSetToNull, 'per_user_monthly_budget_cents'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('per_user_monthly_budget_cents', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['per_user_monthly_budget_cents'] = $per_user_monthly_budget_cents; + + return $this; + } + + /** + * Gets per_user_daily_budget_cents + * + * @return int|null + */ + public function getPerUserDailyBudgetCents() + { + return $this->container['per_user_daily_budget_cents']; + } + + /** + * Sets per_user_daily_budget_cents + * + * @param int|null $per_user_daily_budget_cents per_user_daily_budget_cents + * + * @return self + */ + public function setPerUserDailyBudgetCents($per_user_daily_budget_cents) + { + if (is_null($per_user_daily_budget_cents)) { + array_push($this->openAPINullablesSetToNull, 'per_user_daily_budget_cents'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('per_user_daily_budget_cents', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['per_user_daily_budget_cents'] = $per_user_daily_budget_cents; + + return $this; + } + + /** + * Gets warning_threshold_percent + * + * @return int|null + */ + public function getWarningThresholdPercent() + { + return $this->container['warning_threshold_percent']; + } + + /** + * Sets warning_threshold_percent + * + * @param int|null $warning_threshold_percent warning_threshold_percent + * + * @return self + */ + public function setWarningThresholdPercent($warning_threshold_percent) + { + if (is_null($warning_threshold_percent)) { + array_push($this->openAPINullablesSetToNull, 'warning_threshold_percent'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('warning_threshold_percent', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['warning_threshold_percent'] = $warning_threshold_percent; + + 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/GetMyUsage200Response.php b/src/Model/GetMyUsage200Response.php new file mode 100644 index 0000000..d88865c --- /dev/null +++ b/src/Model/GetMyUsage200Response.php @@ -0,0 +1,552 @@ + + */ +class GetMyUsage200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'getMyUsage_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'user_id' => 'string', + 'current_month' => 'string', + 'monthly' => '\QuantClient\Model\GetMyUsage200ResponseMonthly', + 'daily' => '\QuantClient\Model\GetMyUsage200ResponseDaily', + 'quota' => 'object' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'user_id' => null, + 'current_month' => null, + 'monthly' => null, + 'daily' => null, + 'quota' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'user_id' => false, + 'current_month' => false, + 'monthly' => false, + 'daily' => false, + 'quota' => true + ]; + + /** + * 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 = [ + 'user_id' => 'userId', + 'current_month' => 'currentMonth', + 'monthly' => 'monthly', + 'daily' => 'daily', + 'quota' => 'quota' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'user_id' => 'setUserId', + 'current_month' => 'setCurrentMonth', + 'monthly' => 'setMonthly', + 'daily' => 'setDaily', + 'quota' => 'setQuota' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'user_id' => 'getUserId', + 'current_month' => 'getCurrentMonth', + 'monthly' => 'getMonthly', + 'daily' => 'getDaily', + 'quota' => 'getQuota' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('user_id', $data ?? [], null); + $this->setIfExists('current_month', $data ?? [], null); + $this->setIfExists('monthly', $data ?? [], null); + $this->setIfExists('daily', $data ?? [], null); + $this->setIfExists('quota', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets user_id + * + * @return string|null + */ + public function getUserId() + { + return $this->container['user_id']; + } + + /** + * Sets user_id + * + * @param string|null $user_id user_id + * + * @return self + */ + public function setUserId($user_id) + { + if (is_null($user_id)) { + throw new \InvalidArgumentException('non-nullable user_id cannot be null'); + } + $this->container['user_id'] = $user_id; + + return $this; + } + + /** + * Gets current_month + * + * @return string|null + */ + public function getCurrentMonth() + { + return $this->container['current_month']; + } + + /** + * Sets current_month + * + * @param string|null $current_month current_month + * + * @return self + */ + public function setCurrentMonth($current_month) + { + if (is_null($current_month)) { + throw new \InvalidArgumentException('non-nullable current_month cannot be null'); + } + $this->container['current_month'] = $current_month; + + return $this; + } + + /** + * Gets monthly + * + * @return \QuantClient\Model\GetMyUsage200ResponseMonthly|null + */ + public function getMonthly() + { + return $this->container['monthly']; + } + + /** + * Sets monthly + * + * @param \QuantClient\Model\GetMyUsage200ResponseMonthly|null $monthly monthly + * + * @return self + */ + public function setMonthly($monthly) + { + if (is_null($monthly)) { + throw new \InvalidArgumentException('non-nullable monthly cannot be null'); + } + $this->container['monthly'] = $monthly; + + return $this; + } + + /** + * Gets daily + * + * @return \QuantClient\Model\GetMyUsage200ResponseDaily|null + */ + public function getDaily() + { + return $this->container['daily']; + } + + /** + * Sets daily + * + * @param \QuantClient\Model\GetMyUsage200ResponseDaily|null $daily daily + * + * @return self + */ + public function setDaily($daily) + { + if (is_null($daily)) { + throw new \InvalidArgumentException('non-nullable daily cannot be null'); + } + $this->container['daily'] = $daily; + + return $this; + } + + /** + * Gets quota + * + * @return object|null + */ + public function getQuota() + { + return $this->container['quota']; + } + + /** + * Sets quota + * + * @param object|null $quota quota + * + * @return self + */ + public function setQuota($quota) + { + if (is_null($quota)) { + array_push($this->openAPINullablesSetToNull, 'quota'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('quota', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['quota'] = $quota; + + 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/GetMyUsage200ResponseDaily.php b/src/Model/GetMyUsage200ResponseDaily.php new file mode 100644 index 0000000..4b04d15 --- /dev/null +++ b/src/Model/GetMyUsage200ResponseDaily.php @@ -0,0 +1,409 @@ + + */ +class GetMyUsage200ResponseDaily implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'getMyUsage_200_response_daily'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'spend_cents' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'spend_cents' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'spend_cents' => 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 = [ + 'spend_cents' => 'spendCents' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'spend_cents' => 'setSpendCents' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'spend_cents' => 'getSpendCents' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('spend_cents', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets spend_cents + * + * @return int|null + */ + public function getSpendCents() + { + return $this->container['spend_cents']; + } + + /** + * Sets spend_cents + * + * @param int|null $spend_cents spend_cents + * + * @return self + */ + public function setSpendCents($spend_cents) + { + if (is_null($spend_cents)) { + throw new \InvalidArgumentException('non-nullable spend_cents cannot be null'); + } + $this->container['spend_cents'] = $spend_cents; + + 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/GetMyUsage200ResponseMonthly.php b/src/Model/GetMyUsage200ResponseMonthly.php new file mode 100644 index 0000000..7788f79 --- /dev/null +++ b/src/Model/GetMyUsage200ResponseMonthly.php @@ -0,0 +1,443 @@ + + */ +class GetMyUsage200ResponseMonthly implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'getMyUsage_200_response_monthly'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'spend_cents' => 'int', + 'request_count' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'spend_cents' => null, + 'request_count' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'spend_cents' => false, + 'request_count' => 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 = [ + 'spend_cents' => 'spendCents', + 'request_count' => 'requestCount' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'spend_cents' => 'setSpendCents', + 'request_count' => 'setRequestCount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'spend_cents' => 'getSpendCents', + 'request_count' => 'getRequestCount' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('spend_cents', $data ?? [], null); + $this->setIfExists('request_count', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets spend_cents + * + * @return int|null + */ + public function getSpendCents() + { + return $this->container['spend_cents']; + } + + /** + * Sets spend_cents + * + * @param int|null $spend_cents spend_cents + * + * @return self + */ + public function setSpendCents($spend_cents) + { + if (is_null($spend_cents)) { + throw new \InvalidArgumentException('non-nullable spend_cents cannot be null'); + } + $this->container['spend_cents'] = $spend_cents; + + return $this; + } + + /** + * Gets request_count + * + * @return int|null + */ + public function getRequestCount() + { + return $this->container['request_count']; + } + + /** + * Sets request_count + * + * @param int|null $request_count request_count + * + * @return self + */ + public function setRequestCount($request_count) + { + if (is_null($request_count)) { + throw new \InvalidArgumentException('non-nullable request_count cannot be null'); + } + $this->container['request_count'] = $request_count; + + 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/GetSkill200Response.php b/src/Model/GetSkill200Response.php new file mode 100644 index 0000000..d717f4f --- /dev/null +++ b/src/Model/GetSkill200Response.php @@ -0,0 +1,409 @@ + + */ +class GetSkill200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'getSkill_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'skill' => '\QuantClient\Model\GetSkill200ResponseSkill' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'skill' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'skill' => 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 = [ + 'skill' => 'skill' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'skill' => 'setSkill' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'skill' => 'getSkill' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('skill', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets skill + * + * @return \QuantClient\Model\GetSkill200ResponseSkill|null + */ + public function getSkill() + { + return $this->container['skill']; + } + + /** + * Sets skill + * + * @param \QuantClient\Model\GetSkill200ResponseSkill|null $skill skill + * + * @return self + */ + public function setSkill($skill) + { + if (is_null($skill)) { + throw new \InvalidArgumentException('non-nullable skill cannot be null'); + } + $this->container['skill'] = $skill; + + 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/GetSkill200ResponseSkill.php b/src/Model/GetSkill200ResponseSkill.php new file mode 100644 index 0000000..4cf6e1f --- /dev/null +++ b/src/Model/GetSkill200ResponseSkill.php @@ -0,0 +1,851 @@ + + */ +class GetSkill200ResponseSkill implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'getSkill_200_response_skill'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'skill_id' => 'string', + 'name' => 'string', + 'description' => 'string', + 'content' => 'string', + 'trigger_condition' => 'string', + 'tags' => 'string[]', + 'source' => 'object', + 'required_tools' => 'string[]', + 'files' => 'object', + 'namespace' => 'string', + 'disable_model_invocation' => 'bool', + 'allowed_tools' => 'string[]', + 'installed_at' => '\DateTime', + 'updated_at' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'skill_id' => null, + 'name' => null, + 'description' => null, + 'content' => null, + 'trigger_condition' => null, + 'tags' => null, + 'source' => null, + 'required_tools' => null, + 'files' => null, + 'namespace' => null, + 'disable_model_invocation' => null, + 'allowed_tools' => null, + 'installed_at' => 'date-time', + 'updated_at' => 'date-time' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'skill_id' => false, + 'name' => false, + 'description' => false, + 'content' => false, + 'trigger_condition' => false, + 'tags' => false, + 'source' => false, + 'required_tools' => false, + 'files' => false, + 'namespace' => false, + 'disable_model_invocation' => false, + 'allowed_tools' => false, + 'installed_at' => false, + 'updated_at' => 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 = [ + 'skill_id' => 'skillId', + 'name' => 'name', + 'description' => 'description', + 'content' => 'content', + 'trigger_condition' => 'triggerCondition', + 'tags' => 'tags', + 'source' => 'source', + 'required_tools' => 'requiredTools', + 'files' => 'files', + 'namespace' => 'namespace', + 'disable_model_invocation' => 'disableModelInvocation', + 'allowed_tools' => 'allowedTools', + 'installed_at' => 'installedAt', + 'updated_at' => 'updatedAt' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'skill_id' => 'setSkillId', + 'name' => 'setName', + 'description' => 'setDescription', + 'content' => 'setContent', + 'trigger_condition' => 'setTriggerCondition', + 'tags' => 'setTags', + 'source' => 'setSource', + 'required_tools' => 'setRequiredTools', + 'files' => 'setFiles', + 'namespace' => 'setNamespace', + 'disable_model_invocation' => 'setDisableModelInvocation', + 'allowed_tools' => 'setAllowedTools', + 'installed_at' => 'setInstalledAt', + 'updated_at' => 'setUpdatedAt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'skill_id' => 'getSkillId', + 'name' => 'getName', + 'description' => 'getDescription', + 'content' => 'getContent', + 'trigger_condition' => 'getTriggerCondition', + 'tags' => 'getTags', + 'source' => 'getSource', + 'required_tools' => 'getRequiredTools', + 'files' => 'getFiles', + 'namespace' => 'getNamespace', + 'disable_model_invocation' => 'getDisableModelInvocation', + 'allowed_tools' => 'getAllowedTools', + 'installed_at' => 'getInstalledAt', + 'updated_at' => 'getUpdatedAt' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('skill_id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('content', $data ?? [], null); + $this->setIfExists('trigger_condition', $data ?? [], null); + $this->setIfExists('tags', $data ?? [], null); + $this->setIfExists('source', $data ?? [], null); + $this->setIfExists('required_tools', $data ?? [], null); + $this->setIfExists('files', $data ?? [], null); + $this->setIfExists('namespace', $data ?? [], null); + $this->setIfExists('disable_model_invocation', $data ?? [], null); + $this->setIfExists('allowed_tools', $data ?? [], null); + $this->setIfExists('installed_at', $data ?? [], null); + $this->setIfExists('updated_at', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets skill_id + * + * @return string|null + */ + public function getSkillId() + { + return $this->container['skill_id']; + } + + /** + * Sets skill_id + * + * @param string|null $skill_id skill_id + * + * @return self + */ + public function setSkillId($skill_id) + { + if (is_null($skill_id)) { + throw new \InvalidArgumentException('non-nullable skill_id cannot be null'); + } + $this->container['skill_id'] = $skill_id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return self + */ + public function setName($name) + { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description description + * + * @return self + */ + public function setDescription($description) + { + if (is_null($description)) { + throw new \InvalidArgumentException('non-nullable description cannot be null'); + } + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets content + * + * @return string|null + */ + public function getContent() + { + return $this->container['content']; + } + + /** + * Sets content + * + * @param string|null $content content + * + * @return self + */ + public function setContent($content) + { + if (is_null($content)) { + throw new \InvalidArgumentException('non-nullable content cannot be null'); + } + $this->container['content'] = $content; + + return $this; + } + + /** + * Gets trigger_condition + * + * @return string|null + */ + public function getTriggerCondition() + { + return $this->container['trigger_condition']; + } + + /** + * Sets trigger_condition + * + * @param string|null $trigger_condition trigger_condition + * + * @return self + */ + public function setTriggerCondition($trigger_condition) + { + if (is_null($trigger_condition)) { + throw new \InvalidArgumentException('non-nullable trigger_condition cannot be null'); + } + $this->container['trigger_condition'] = $trigger_condition; + + return $this; + } + + /** + * Gets tags + * + * @return string[]|null + */ + public function getTags() + { + return $this->container['tags']; + } + + /** + * Sets tags + * + * @param string[]|null $tags tags + * + * @return self + */ + public function setTags($tags) + { + if (is_null($tags)) { + throw new \InvalidArgumentException('non-nullable tags cannot be null'); + } + $this->container['tags'] = $tags; + + return $this; + } + + /** + * Gets source + * + * @return object|null + */ + public function getSource() + { + return $this->container['source']; + } + + /** + * Sets source + * + * @param object|null $source source + * + * @return self + */ + public function setSource($source) + { + if (is_null($source)) { + throw new \InvalidArgumentException('non-nullable source cannot be null'); + } + $this->container['source'] = $source; + + return $this; + } + + /** + * Gets required_tools + * + * @return string[]|null + */ + public function getRequiredTools() + { + return $this->container['required_tools']; + } + + /** + * Sets required_tools + * + * @param string[]|null $required_tools required_tools + * + * @return self + */ + public function setRequiredTools($required_tools) + { + if (is_null($required_tools)) { + throw new \InvalidArgumentException('non-nullable required_tools cannot be null'); + } + $this->container['required_tools'] = $required_tools; + + return $this; + } + + /** + * Gets files + * + * @return object|null + */ + public function getFiles() + { + return $this->container['files']; + } + + /** + * Sets files + * + * @param object|null $files files + * + * @return self + */ + public function setFiles($files) + { + if (is_null($files)) { + throw new \InvalidArgumentException('non-nullable files cannot be null'); + } + $this->container['files'] = $files; + + return $this; + } + + /** + * Gets namespace + * + * @return string|null + */ + public function getNamespace() + { + return $this->container['namespace']; + } + + /** + * Sets namespace + * + * @param string|null $namespace namespace + * + * @return self + */ + public function setNamespace($namespace) + { + if (is_null($namespace)) { + throw new \InvalidArgumentException('non-nullable namespace cannot be null'); + } + $this->container['namespace'] = $namespace; + + return $this; + } + + /** + * Gets disable_model_invocation + * + * @return bool|null + */ + public function getDisableModelInvocation() + { + return $this->container['disable_model_invocation']; + } + + /** + * Sets disable_model_invocation + * + * @param bool|null $disable_model_invocation disable_model_invocation + * + * @return self + */ + public function setDisableModelInvocation($disable_model_invocation) + { + if (is_null($disable_model_invocation)) { + throw new \InvalidArgumentException('non-nullable disable_model_invocation cannot be null'); + } + $this->container['disable_model_invocation'] = $disable_model_invocation; + + return $this; + } + + /** + * Gets allowed_tools + * + * @return string[]|null + */ + public function getAllowedTools() + { + return $this->container['allowed_tools']; + } + + /** + * Sets allowed_tools + * + * @param string[]|null $allowed_tools allowed_tools + * + * @return self + */ + public function setAllowedTools($allowed_tools) + { + if (is_null($allowed_tools)) { + throw new \InvalidArgumentException('non-nullable allowed_tools cannot be null'); + } + $this->container['allowed_tools'] = $allowed_tools; + + return $this; + } + + /** + * Gets installed_at + * + * @return \DateTime|null + */ + public function getInstalledAt() + { + return $this->container['installed_at']; + } + + /** + * Sets installed_at + * + * @param \DateTime|null $installed_at installed_at + * + * @return self + */ + public function setInstalledAt($installed_at) + { + if (is_null($installed_at)) { + throw new \InvalidArgumentException('non-nullable installed_at cannot be null'); + } + $this->container['installed_at'] = $installed_at; + + return $this; + } + + /** + * Gets updated_at + * + * @return \DateTime|null + */ + public function getUpdatedAt() + { + return $this->container['updated_at']; + } + + /** + * Sets updated_at + * + * @param \DateTime|null $updated_at updated_at + * + * @return self + */ + public function setUpdatedAt($updated_at) + { + if (is_null($updated_at)) { + throw new \InvalidArgumentException('non-nullable updated_at cannot be null'); + } + $this->container['updated_at'] = $updated_at; + + 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/GetSlackBot200Response.php b/src/Model/GetSlackBot200Response.php new file mode 100644 index 0000000..866ca20 --- /dev/null +++ b/src/Model/GetSlackBot200Response.php @@ -0,0 +1,409 @@ + + */ +class GetSlackBot200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'getSlackBot_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'bot' => '\QuantClient\Model\GetSlackBot200ResponseBot' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'bot' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'bot' => 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 = [ + 'bot' => 'bot' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'bot' => 'setBot' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'bot' => 'getBot' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('bot', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets bot + * + * @return \QuantClient\Model\GetSlackBot200ResponseBot|null + */ + public function getBot() + { + return $this->container['bot']; + } + + /** + * Sets bot + * + * @param \QuantClient\Model\GetSlackBot200ResponseBot|null $bot bot + * + * @return self + */ + public function setBot($bot) + { + if (is_null($bot)) { + throw new \InvalidArgumentException('non-nullable bot cannot be null'); + } + $this->container['bot'] = $bot; + + 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/GetSlackBot200ResponseBot.php b/src/Model/GetSlackBot200ResponseBot.php new file mode 100644 index 0000000..9ae81f4 --- /dev/null +++ b/src/Model/GetSlackBot200ResponseBot.php @@ -0,0 +1,851 @@ + + */ +class GetSlackBot200ResponseBot implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'getSlackBot_200_response_bot'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'bot_id' => 'string', + 'agent_id' => 'string', + 'setup_type' => 'string', + 'status' => 'string', + 'connected' => 'bool', + 'session_ttl_days' => 'int', + 'allowed_channels' => 'string[]', + 'keywords_enabled' => 'bool', + 'keywords' => 'string[]', + 'slash_commands' => 'string[]', + 'created_at' => '\DateTime', + 'updated_at' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'bot_id' => null, + 'agent_id' => null, + 'setup_type' => null, + 'status' => null, + 'connected' => null, + 'session_ttl_days' => null, + 'allowed_channels' => null, + 'keywords_enabled' => null, + 'keywords' => null, + 'slash_commands' => null, + 'created_at' => 'date-time', + 'updated_at' => 'date-time' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'bot_id' => false, + 'agent_id' => false, + 'setup_type' => false, + 'status' => false, + 'connected' => false, + 'session_ttl_days' => false, + 'allowed_channels' => false, + 'keywords_enabled' => false, + 'keywords' => false, + 'slash_commands' => false, + 'created_at' => false, + 'updated_at' => 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 = [ + 'bot_id' => 'botId', + 'agent_id' => 'agentId', + 'setup_type' => 'setupType', + 'status' => 'status', + 'connected' => 'connected', + 'session_ttl_days' => 'sessionTtlDays', + 'allowed_channels' => 'allowedChannels', + 'keywords_enabled' => 'keywordsEnabled', + 'keywords' => 'keywords', + 'slash_commands' => 'slashCommands', + 'created_at' => 'createdAt', + 'updated_at' => 'updatedAt' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'bot_id' => 'setBotId', + 'agent_id' => 'setAgentId', + 'setup_type' => 'setSetupType', + 'status' => 'setStatus', + 'connected' => 'setConnected', + 'session_ttl_days' => 'setSessionTtlDays', + 'allowed_channels' => 'setAllowedChannels', + 'keywords_enabled' => 'setKeywordsEnabled', + 'keywords' => 'setKeywords', + 'slash_commands' => 'setSlashCommands', + 'created_at' => 'setCreatedAt', + 'updated_at' => 'setUpdatedAt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'bot_id' => 'getBotId', + 'agent_id' => 'getAgentId', + 'setup_type' => 'getSetupType', + 'status' => 'getStatus', + 'connected' => 'getConnected', + 'session_ttl_days' => 'getSessionTtlDays', + 'allowed_channels' => 'getAllowedChannels', + 'keywords_enabled' => 'getKeywordsEnabled', + 'keywords' => 'getKeywords', + 'slash_commands' => 'getSlashCommands', + 'created_at' => 'getCreatedAt', + 'updated_at' => 'getUpdatedAt' + ]; + + /** + * 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 SETUP_TYPE_QUANT = 'quant'; + public const SETUP_TYPE_BYO = 'byo'; + public const STATUS_ACTIVE = 'active'; + public const STATUS_INACTIVE = 'inactive'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSetupTypeAllowableValues() + { + return [ + self::SETUP_TYPE_QUANT, + self::SETUP_TYPE_BYO, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_ACTIVE, + self::STATUS_INACTIVE, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('bot_id', $data ?? [], null); + $this->setIfExists('agent_id', $data ?? [], null); + $this->setIfExists('setup_type', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('connected', $data ?? [], null); + $this->setIfExists('session_ttl_days', $data ?? [], null); + $this->setIfExists('allowed_channels', $data ?? [], null); + $this->setIfExists('keywords_enabled', $data ?? [], null); + $this->setIfExists('keywords', $data ?? [], null); + $this->setIfExists('slash_commands', $data ?? [], null); + $this->setIfExists('created_at', $data ?? [], null); + $this->setIfExists('updated_at', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param 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->getSetupTypeAllowableValues(); + if (!is_null($this->container['setup_type']) && !in_array($this->container['setup_type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'setup_type', must be one of '%s'", + $this->container['setup_type'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'status', must be one of '%s'", + $this->container['status'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * 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 bot_id + * + * @return string|null + */ + public function getBotId() + { + return $this->container['bot_id']; + } + + /** + * Sets bot_id + * + * @param string|null $bot_id bot_id + * + * @return self + */ + public function setBotId($bot_id) + { + if (is_null($bot_id)) { + throw new \InvalidArgumentException('non-nullable bot_id cannot be null'); + } + $this->container['bot_id'] = $bot_id; + + return $this; + } + + /** + * Gets agent_id + * + * @return string|null + */ + public function getAgentId() + { + return $this->container['agent_id']; + } + + /** + * Sets agent_id + * + * @param string|null $agent_id agent_id + * + * @return self + */ + public function setAgentId($agent_id) + { + if (is_null($agent_id)) { + throw new \InvalidArgumentException('non-nullable agent_id cannot be null'); + } + $this->container['agent_id'] = $agent_id; + + return $this; + } + + /** + * Gets setup_type + * + * @return string|null + */ + public function getSetupType() + { + return $this->container['setup_type']; + } + + /** + * Sets setup_type + * + * @param string|null $setup_type setup_type + * + * @return self + */ + public function setSetupType($setup_type) + { + if (is_null($setup_type)) { + throw new \InvalidArgumentException('non-nullable setup_type cannot be null'); + } + $allowedValues = $this->getSetupTypeAllowableValues(); + if (!in_array($setup_type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'setup_type', must be one of '%s'", + $setup_type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['setup_type'] = $setup_type; + + return $this; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status status + * + * @return self + */ + public function setStatus($status) + { + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); + } + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets connected + * + * @return bool|null + */ + public function getConnected() + { + return $this->container['connected']; + } + + /** + * Sets connected + * + * @param bool|null $connected connected + * + * @return self + */ + public function setConnected($connected) + { + if (is_null($connected)) { + throw new \InvalidArgumentException('non-nullable connected cannot be null'); + } + $this->container['connected'] = $connected; + + return $this; + } + + /** + * Gets session_ttl_days + * + * @return int|null + */ + public function getSessionTtlDays() + { + return $this->container['session_ttl_days']; + } + + /** + * Sets session_ttl_days + * + * @param int|null $session_ttl_days session_ttl_days + * + * @return self + */ + public function setSessionTtlDays($session_ttl_days) + { + if (is_null($session_ttl_days)) { + throw new \InvalidArgumentException('non-nullable session_ttl_days cannot be null'); + } + $this->container['session_ttl_days'] = $session_ttl_days; + + return $this; + } + + /** + * Gets allowed_channels + * + * @return string[]|null + */ + public function getAllowedChannels() + { + return $this->container['allowed_channels']; + } + + /** + * Sets allowed_channels + * + * @param string[]|null $allowed_channels allowed_channels + * + * @return self + */ + public function setAllowedChannels($allowed_channels) + { + if (is_null($allowed_channels)) { + throw new \InvalidArgumentException('non-nullable allowed_channels cannot be null'); + } + $this->container['allowed_channels'] = $allowed_channels; + + return $this; + } + + /** + * Gets keywords_enabled + * + * @return bool|null + */ + public function getKeywordsEnabled() + { + return $this->container['keywords_enabled']; + } + + /** + * Sets keywords_enabled + * + * @param bool|null $keywords_enabled keywords_enabled + * + * @return self + */ + public function setKeywordsEnabled($keywords_enabled) + { + if (is_null($keywords_enabled)) { + throw new \InvalidArgumentException('non-nullable keywords_enabled cannot be null'); + } + $this->container['keywords_enabled'] = $keywords_enabled; + + return $this; + } + + /** + * Gets keywords + * + * @return string[]|null + */ + public function getKeywords() + { + return $this->container['keywords']; + } + + /** + * Sets keywords + * + * @param string[]|null $keywords keywords + * + * @return self + */ + public function setKeywords($keywords) + { + if (is_null($keywords)) { + throw new \InvalidArgumentException('non-nullable keywords cannot be null'); + } + $this->container['keywords'] = $keywords; + + return $this; + } + + /** + * Gets slash_commands + * + * @return string[]|null + */ + public function getSlashCommands() + { + return $this->container['slash_commands']; + } + + /** + * Sets slash_commands + * + * @param string[]|null $slash_commands slash_commands + * + * @return self + */ + public function setSlashCommands($slash_commands) + { + if (is_null($slash_commands)) { + throw new \InvalidArgumentException('non-nullable slash_commands cannot be null'); + } + $this->container['slash_commands'] = $slash_commands; + + return $this; + } + + /** + * Gets created_at + * + * @return \DateTime|null + */ + public function getCreatedAt() + { + return $this->container['created_at']; + } + + /** + * Sets created_at + * + * @param \DateTime|null $created_at created_at + * + * @return self + */ + public function setCreatedAt($created_at) + { + if (is_null($created_at)) { + throw new \InvalidArgumentException('non-nullable created_at cannot be null'); + } + $this->container['created_at'] = $created_at; + + return $this; + } + + /** + * Gets updated_at + * + * @return \DateTime|null + */ + public function getUpdatedAt() + { + return $this->container['updated_at']; + } + + /** + * Sets updated_at + * + * @param \DateTime|null $updated_at updated_at + * + * @return self + */ + public function setUpdatedAt($updated_at) + { + if (is_null($updated_at)) { + throw new \InvalidArgumentException('non-nullable updated_at cannot be null'); + } + $this->container['updated_at'] = $updated_at; + + 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/GetSshAccessCredentials200Response.php b/src/Model/GetSshAccessCredentials200Response.php index 30abf7f..a7d74aa 100644 --- a/src/Model/GetSshAccessCredentials200Response.php +++ b/src/Model/GetSshAccessCredentials200Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/GetSshAccessCredentials200ResponseCredentials.php b/src/Model/GetSshAccessCredentials200ResponseCredentials.php index d8d915a..1ab0f36 100644 --- a/src/Model/GetSshAccessCredentials200ResponseCredentials.php +++ b/src/Model/GetSshAccessCredentials200ResponseCredentials.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/GetTask200Response.php b/src/Model/GetTask200Response.php index 8c09371..266a787 100644 --- a/src/Model/GetTask200Response.php +++ b/src/Model/GetTask200Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/GetVectorCollection200Response.php b/src/Model/GetVectorCollection200Response.php index de78f88..ed95836 100644 --- a/src/Model/GetVectorCollection200Response.php +++ b/src/Model/GetVectorCollection200Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/GetVectorCollection200ResponseCollection.php b/src/Model/GetVectorCollection200ResponseCollection.php index cb01135..ad4c36c 100644 --- a/src/Model/GetVectorCollection200ResponseCollection.php +++ b/src/Model/GetVectorCollection200ResponseCollection.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ImageGeneration200Response.php b/src/Model/ImageGeneration200Response.php index 8c1a46a..3917caf 100644 --- a/src/Model/ImageGeneration200Response.php +++ b/src/Model/ImageGeneration200Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ImageGenerationRequest.php b/src/Model/ImageGenerationRequest.php index e257418..b61e5cc 100644 --- a/src/Model/ImageGenerationRequest.php +++ b/src/Model/ImageGenerationRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ImageGenerationRequestBackgroundRemovalParams.php b/src/Model/ImageGenerationRequestBackgroundRemovalParams.php index 9c368a9..d0b4eaf 100644 --- a/src/Model/ImageGenerationRequestBackgroundRemovalParams.php +++ b/src/Model/ImageGenerationRequestBackgroundRemovalParams.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ImageGenerationRequestColorGuidedGenerationParams.php b/src/Model/ImageGenerationRequestColorGuidedGenerationParams.php index d2b57de..faa1034 100644 --- a/src/Model/ImageGenerationRequestColorGuidedGenerationParams.php +++ b/src/Model/ImageGenerationRequestColorGuidedGenerationParams.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ImageGenerationRequestImageGenerationConfig.php b/src/Model/ImageGenerationRequestImageGenerationConfig.php index 70e6016..8f97122 100644 --- a/src/Model/ImageGenerationRequestImageGenerationConfig.php +++ b/src/Model/ImageGenerationRequestImageGenerationConfig.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ImageGenerationRequestImageVariationParams.php b/src/Model/ImageGenerationRequestImageVariationParams.php index df9ed59..fbb4deb 100644 --- a/src/Model/ImageGenerationRequestImageVariationParams.php +++ b/src/Model/ImageGenerationRequestImageVariationParams.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ImageGenerationRequestInPaintingParams.php b/src/Model/ImageGenerationRequestInPaintingParams.php index 53c515e..5945c62 100644 --- a/src/Model/ImageGenerationRequestInPaintingParams.php +++ b/src/Model/ImageGenerationRequestInPaintingParams.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ImageGenerationRequestOutPaintingParams.php b/src/Model/ImageGenerationRequestOutPaintingParams.php index 5e4df3e..afed260 100644 --- a/src/Model/ImageGenerationRequestOutPaintingParams.php +++ b/src/Model/ImageGenerationRequestOutPaintingParams.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ImageGenerationRequestTextToImageParams.php b/src/Model/ImageGenerationRequestTextToImageParams.php index 0afa81f..58896c2 100644 --- a/src/Model/ImageGenerationRequestTextToImageParams.php +++ b/src/Model/ImageGenerationRequestTextToImageParams.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ImportSkill201Response.php b/src/Model/ImportSkill201Response.php new file mode 100644 index 0000000..d5779e4 --- /dev/null +++ b/src/Model/ImportSkill201Response.php @@ -0,0 +1,443 @@ + + */ +class ImportSkill201Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'importSkill_201_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'skill' => 'object', + 'message' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'skill' => null, + 'message' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'skill' => false, + 'message' => 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 = [ + 'skill' => 'skill', + 'message' => 'message' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'skill' => 'setSkill', + 'message' => 'setMessage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'skill' => 'getSkill', + 'message' => 'getMessage' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('skill', $data ?? [], null); + $this->setIfExists('message', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets skill + * + * @return object|null + */ + public function getSkill() + { + return $this->container['skill']; + } + + /** + * Sets skill + * + * @param object|null $skill skill + * + * @return self + */ + public function setSkill($skill) + { + if (is_null($skill)) { + throw new \InvalidArgumentException('non-nullable skill cannot be null'); + } + $this->container['skill'] = $skill; + + return $this; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message message + * + * @return self + */ + public function setMessage($message) + { + if (is_null($message)) { + throw new \InvalidArgumentException('non-nullable message cannot be null'); + } + $this->container['message'] = $message; + + 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/ImportSkillCollection201Response.php b/src/Model/ImportSkillCollection201Response.php new file mode 100644 index 0000000..3a52aa8 --- /dev/null +++ b/src/Model/ImportSkillCollection201Response.php @@ -0,0 +1,545 @@ + + */ +class ImportSkillCollection201Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'importSkillCollection_201_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'namespace' => 'string', + 'imported' => 'int', + 'failed' => 'int', + 'skills' => 'object[]', + 'errors' => 'object[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'namespace' => null, + 'imported' => null, + 'failed' => null, + 'skills' => null, + 'errors' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'namespace' => false, + 'imported' => false, + 'failed' => false, + 'skills' => false, + 'errors' => 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 = [ + 'namespace' => 'namespace', + 'imported' => 'imported', + 'failed' => 'failed', + 'skills' => 'skills', + 'errors' => 'errors' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'namespace' => 'setNamespace', + 'imported' => 'setImported', + 'failed' => 'setFailed', + 'skills' => 'setSkills', + 'errors' => 'setErrors' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'namespace' => 'getNamespace', + 'imported' => 'getImported', + 'failed' => 'getFailed', + 'skills' => 'getSkills', + 'errors' => 'getErrors' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('namespace', $data ?? [], null); + $this->setIfExists('imported', $data ?? [], null); + $this->setIfExists('failed', $data ?? [], null); + $this->setIfExists('skills', $data ?? [], null); + $this->setIfExists('errors', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets namespace + * + * @return string|null + */ + public function getNamespace() + { + return $this->container['namespace']; + } + + /** + * Sets namespace + * + * @param string|null $namespace namespace + * + * @return self + */ + public function setNamespace($namespace) + { + if (is_null($namespace)) { + throw new \InvalidArgumentException('non-nullable namespace cannot be null'); + } + $this->container['namespace'] = $namespace; + + return $this; + } + + /** + * Gets imported + * + * @return int|null + */ + public function getImported() + { + return $this->container['imported']; + } + + /** + * Sets imported + * + * @param int|null $imported imported + * + * @return self + */ + public function setImported($imported) + { + if (is_null($imported)) { + throw new \InvalidArgumentException('non-nullable imported cannot be null'); + } + $this->container['imported'] = $imported; + + return $this; + } + + /** + * Gets failed + * + * @return int|null + */ + public function getFailed() + { + return $this->container['failed']; + } + + /** + * Sets failed + * + * @param int|null $failed failed + * + * @return self + */ + public function setFailed($failed) + { + if (is_null($failed)) { + throw new \InvalidArgumentException('non-nullable failed cannot be null'); + } + $this->container['failed'] = $failed; + + return $this; + } + + /** + * Gets skills + * + * @return object[]|null + */ + public function getSkills() + { + return $this->container['skills']; + } + + /** + * Sets skills + * + * @param object[]|null $skills skills + * + * @return self + */ + public function setSkills($skills) + { + if (is_null($skills)) { + throw new \InvalidArgumentException('non-nullable skills cannot be null'); + } + $this->container['skills'] = $skills; + + return $this; + } + + /** + * Gets errors + * + * @return object[]|null + */ + public function getErrors() + { + return $this->container['errors']; + } + + /** + * Sets errors + * + * @param object[]|null $errors errors + * + * @return self + */ + public function setErrors($errors) + { + if (is_null($errors)) { + throw new \InvalidArgumentException('non-nullable errors cannot be null'); + } + $this->container['errors'] = $errors; + + 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/ImportSkillCollectionRequest.php b/src/Model/ImportSkillCollectionRequest.php new file mode 100644 index 0000000..bbeef29 --- /dev/null +++ b/src/Model/ImportSkillCollectionRequest.php @@ -0,0 +1,526 @@ + + */ +class ImportSkillCollectionRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'importSkillCollection_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'namespace' => 'string', + 'source' => '\QuantClient\Model\ImportSkillCollectionRequestSource', + 'tags' => 'string[]', + 'installed_by' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'namespace' => null, + 'source' => null, + 'tags' => null, + 'installed_by' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'namespace' => false, + 'source' => false, + 'tags' => false, + 'installed_by' => 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 = [ + 'namespace' => 'namespace', + 'source' => 'source', + 'tags' => 'tags', + 'installed_by' => 'installedBy' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'namespace' => 'setNamespace', + 'source' => 'setSource', + 'tags' => 'setTags', + 'installed_by' => 'setInstalledBy' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'namespace' => 'getNamespace', + 'source' => 'getSource', + 'tags' => 'getTags', + 'installed_by' => 'getInstalledBy' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('namespace', $data ?? [], null); + $this->setIfExists('source', $data ?? [], null); + $this->setIfExists('tags', $data ?? [], null); + $this->setIfExists('installed_by', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param 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['namespace'] === null) { + $invalidProperties[] = "'namespace' can't be null"; + } + if (!preg_match("/^[a-z0-9][a-z0-9-]{0,62}[a-z0-9]$/", $this->container['namespace'])) { + $invalidProperties[] = "invalid value for 'namespace', must be conform to the pattern /^[a-z0-9][a-z0-9-]{0,62}[a-z0-9]$/."; + } + + if ($this->container['source'] === null) { + $invalidProperties[] = "'source' can't be null"; + } + 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 namespace + * + * @return string + */ + public function getNamespace() + { + return $this->container['namespace']; + } + + /** + * Sets namespace + * + * @param string $namespace namespace + * + * @return self + */ + public function setNamespace($namespace) + { + if (is_null($namespace)) { + throw new \InvalidArgumentException('non-nullable namespace cannot be null'); + } + + if ((!preg_match("/^[a-z0-9][a-z0-9-]{0,62}[a-z0-9]$/", ObjectSerializer::toString($namespace)))) { + throw new \InvalidArgumentException("invalid value for \$namespace when calling ImportSkillCollectionRequest., must conform to the pattern /^[a-z0-9][a-z0-9-]{0,62}[a-z0-9]$/."); + } + + $this->container['namespace'] = $namespace; + + return $this; + } + + /** + * Gets source + * + * @return \QuantClient\Model\ImportSkillCollectionRequestSource + */ + public function getSource() + { + return $this->container['source']; + } + + /** + * Sets source + * + * @param \QuantClient\Model\ImportSkillCollectionRequestSource $source source + * + * @return self + */ + public function setSource($source) + { + if (is_null($source)) { + throw new \InvalidArgumentException('non-nullable source cannot be null'); + } + $this->container['source'] = $source; + + return $this; + } + + /** + * Gets tags + * + * @return string[]|null + */ + public function getTags() + { + return $this->container['tags']; + } + + /** + * Sets tags + * + * @param string[]|null $tags tags + * + * @return self + */ + public function setTags($tags) + { + if (is_null($tags)) { + throw new \InvalidArgumentException('non-nullable tags cannot be null'); + } + $this->container['tags'] = $tags; + + return $this; + } + + /** + * Gets installed_by + * + * @return string|null + */ + public function getInstalledBy() + { + return $this->container['installed_by']; + } + + /** + * Sets installed_by + * + * @param string|null $installed_by installed_by + * + * @return self + */ + public function setInstalledBy($installed_by) + { + if (is_null($installed_by)) { + throw new \InvalidArgumentException('non-nullable installed_by cannot be null'); + } + $this->container['installed_by'] = $installed_by; + + 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/ImportSkillCollectionRequestSource.php b/src/Model/ImportSkillCollectionRequestSource.php new file mode 100644 index 0000000..31c59f0 --- /dev/null +++ b/src/Model/ImportSkillCollectionRequestSource.php @@ -0,0 +1,549 @@ + + */ +class ImportSkillCollectionRequestSource implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'importSkillCollection_request_source'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'type' => 'string', + 'repo' => 'string', + 'path' => 'string', + 'version' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'type' => null, + 'repo' => null, + 'path' => null, + 'version' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'type' => false, + 'repo' => false, + 'path' => false, + 'version' => 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 = [ + 'type' => 'type', + 'repo' => 'repo', + 'path' => 'path', + 'version' => 'version' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'type' => 'setType', + 'repo' => 'setRepo', + 'path' => 'setPath', + 'version' => 'setVersion' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'type' => 'getType', + 'repo' => 'getRepo', + 'path' => 'getPath', + 'version' => 'getVersion' + ]; + + /** + * 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 TYPE_GITHUB = 'github'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_GITHUB, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('repo', $data ?? [], null); + $this->setIfExists('path', $data ?? [], null); + $this->setIfExists('version', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param 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['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['repo'] === null) { + $invalidProperties[] = "'repo' can't be null"; + } + 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 type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type type + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets repo + * + * @return string + */ + public function getRepo() + { + return $this->container['repo']; + } + + /** + * Sets repo + * + * @param string $repo repo + * + * @return self + */ + public function setRepo($repo) + { + if (is_null($repo)) { + throw new \InvalidArgumentException('non-nullable repo cannot be null'); + } + $this->container['repo'] = $repo; + + return $this; + } + + /** + * Gets path + * + * @return string|null + */ + public function getPath() + { + return $this->container['path']; + } + + /** + * Sets path + * + * @param string|null $path path + * + * @return self + */ + public function setPath($path) + { + if (is_null($path)) { + throw new \InvalidArgumentException('non-nullable path cannot be null'); + } + $this->container['path'] = $path; + + return $this; + } + + /** + * Gets version + * + * @return string|null + */ + public function getVersion() + { + return $this->container['version']; + } + + /** + * Sets version + * + * @param string|null $version version + * + * @return self + */ + public function setVersion($version) + { + if (is_null($version)) { + throw new \InvalidArgumentException('non-nullable version cannot be null'); + } + $this->container['version'] = $version; + + 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/ImportSkillRequest.php b/src/Model/ImportSkillRequest.php new file mode 100644 index 0000000..3017e7a --- /dev/null +++ b/src/Model/ImportSkillRequest.php @@ -0,0 +1,684 @@ + + */ +class ImportSkillRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'importSkill_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'source' => '\QuantClient\Model\ImportSkillRequestSource', + 'name' => 'string', + 'description' => 'string', + 'tags' => 'string[]', + 'trigger_condition' => 'string', + 'required_tools' => 'string[]', + 'disable_model_invocation' => 'bool', + 'allowed_tools' => 'string[]', + 'installed_by' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'source' => null, + 'name' => null, + 'description' => null, + 'tags' => null, + 'trigger_condition' => null, + 'required_tools' => null, + 'disable_model_invocation' => null, + 'allowed_tools' => null, + 'installed_by' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'source' => false, + 'name' => false, + 'description' => false, + 'tags' => false, + 'trigger_condition' => false, + 'required_tools' => false, + 'disable_model_invocation' => false, + 'allowed_tools' => false, + 'installed_by' => 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 = [ + 'source' => 'source', + 'name' => 'name', + 'description' => 'description', + 'tags' => 'tags', + 'trigger_condition' => 'triggerCondition', + 'required_tools' => 'requiredTools', + 'disable_model_invocation' => 'disableModelInvocation', + 'allowed_tools' => 'allowedTools', + 'installed_by' => 'installedBy' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'source' => 'setSource', + 'name' => 'setName', + 'description' => 'setDescription', + 'tags' => 'setTags', + 'trigger_condition' => 'setTriggerCondition', + 'required_tools' => 'setRequiredTools', + 'disable_model_invocation' => 'setDisableModelInvocation', + 'allowed_tools' => 'setAllowedTools', + 'installed_by' => 'setInstalledBy' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'source' => 'getSource', + 'name' => 'getName', + 'description' => 'getDescription', + 'tags' => 'getTags', + 'trigger_condition' => 'getTriggerCondition', + 'required_tools' => 'getRequiredTools', + 'disable_model_invocation' => 'getDisableModelInvocation', + 'allowed_tools' => 'getAllowedTools', + 'installed_by' => 'getInstalledBy' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('source', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('tags', $data ?? [], null); + $this->setIfExists('trigger_condition', $data ?? [], null); + $this->setIfExists('required_tools', $data ?? [], null); + $this->setIfExists('disable_model_invocation', $data ?? [], null); + $this->setIfExists('allowed_tools', $data ?? [], null); + $this->setIfExists('installed_by', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param 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['source'] === null) { + $invalidProperties[] = "'source' can't be null"; + } + 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 source + * + * @return \QuantClient\Model\ImportSkillRequestSource + */ + public function getSource() + { + return $this->container['source']; + } + + /** + * Sets source + * + * @param \QuantClient\Model\ImportSkillRequestSource $source source + * + * @return self + */ + public function setSource($source) + { + if (is_null($source)) { + throw new \InvalidArgumentException('non-nullable source cannot be null'); + } + $this->container['source'] = $source; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return self + */ + public function setName($name) + { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description description + * + * @return self + */ + public function setDescription($description) + { + if (is_null($description)) { + throw new \InvalidArgumentException('non-nullable description cannot be null'); + } + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets tags + * + * @return string[]|null + */ + public function getTags() + { + return $this->container['tags']; + } + + /** + * Sets tags + * + * @param string[]|null $tags tags + * + * @return self + */ + public function setTags($tags) + { + if (is_null($tags)) { + throw new \InvalidArgumentException('non-nullable tags cannot be null'); + } + $this->container['tags'] = $tags; + + return $this; + } + + /** + * Gets trigger_condition + * + * @return string|null + */ + public function getTriggerCondition() + { + return $this->container['trigger_condition']; + } + + /** + * Sets trigger_condition + * + * @param string|null $trigger_condition trigger_condition + * + * @return self + */ + public function setTriggerCondition($trigger_condition) + { + if (is_null($trigger_condition)) { + throw new \InvalidArgumentException('non-nullable trigger_condition cannot be null'); + } + $this->container['trigger_condition'] = $trigger_condition; + + return $this; + } + + /** + * Gets required_tools + * + * @return string[]|null + */ + public function getRequiredTools() + { + return $this->container['required_tools']; + } + + /** + * Sets required_tools + * + * @param string[]|null $required_tools required_tools + * + * @return self + */ + public function setRequiredTools($required_tools) + { + if (is_null($required_tools)) { + throw new \InvalidArgumentException('non-nullable required_tools cannot be null'); + } + $this->container['required_tools'] = $required_tools; + + return $this; + } + + /** + * Gets disable_model_invocation + * + * @return bool|null + */ + public function getDisableModelInvocation() + { + return $this->container['disable_model_invocation']; + } + + /** + * Sets disable_model_invocation + * + * @param bool|null $disable_model_invocation disable_model_invocation + * + * @return self + */ + public function setDisableModelInvocation($disable_model_invocation) + { + if (is_null($disable_model_invocation)) { + throw new \InvalidArgumentException('non-nullable disable_model_invocation cannot be null'); + } + $this->container['disable_model_invocation'] = $disable_model_invocation; + + return $this; + } + + /** + * Gets allowed_tools + * + * @return string[]|null + */ + public function getAllowedTools() + { + return $this->container['allowed_tools']; + } + + /** + * Sets allowed_tools + * + * @param string[]|null $allowed_tools allowed_tools + * + * @return self + */ + public function setAllowedTools($allowed_tools) + { + if (is_null($allowed_tools)) { + throw new \InvalidArgumentException('non-nullable allowed_tools cannot be null'); + } + $this->container['allowed_tools'] = $allowed_tools; + + return $this; + } + + /** + * Gets installed_by + * + * @return string|null + */ + public function getInstalledBy() + { + return $this->container['installed_by']; + } + + /** + * Sets installed_by + * + * @param string|null $installed_by installed_by + * + * @return self + */ + public function setInstalledBy($installed_by) + { + if (is_null($installed_by)) { + throw new \InvalidArgumentException('non-nullable installed_by cannot be null'); + } + $this->container['installed_by'] = $installed_by; + + 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/ImportSkillRequestSource.php b/src/Model/ImportSkillRequestSource.php new file mode 100644 index 0000000..c95080a --- /dev/null +++ b/src/Model/ImportSkillRequestSource.php @@ -0,0 +1,582 @@ + + */ +class ImportSkillRequestSource implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'importSkill_request_source'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'type' => 'string', + 'url' => 'string', + 'repo' => 'string', + 'path' => 'string', + 'version' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'type' => null, + 'url' => null, + 'repo' => null, + 'path' => null, + 'version' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'type' => false, + 'url' => false, + 'repo' => false, + 'path' => false, + 'version' => 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 = [ + 'type' => 'type', + 'url' => 'url', + 'repo' => 'repo', + 'path' => 'path', + 'version' => 'version' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'type' => 'setType', + 'url' => 'setUrl', + 'repo' => 'setRepo', + 'path' => 'setPath', + 'version' => 'setVersion' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'type' => 'getType', + 'url' => 'getUrl', + 'repo' => 'getRepo', + 'path' => 'getPath', + 'version' => 'getVersion' + ]; + + /** + * 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 TYPE_SKILLS_SH = 'skills.sh'; + public const TYPE_GITHUB = 'github'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_SKILLS_SH, + self::TYPE_GITHUB, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('url', $data ?? [], null); + $this->setIfExists('repo', $data ?? [], null); + $this->setIfExists('path', $data ?? [], null); + $this->setIfExists('version', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param 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['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + 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 type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type type + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets url + * + * @return string|null + */ + public function getUrl() + { + return $this->container['url']; + } + + /** + * Sets url + * + * @param string|null $url url + * + * @return self + */ + public function setUrl($url) + { + if (is_null($url)) { + throw new \InvalidArgumentException('non-nullable url cannot be null'); + } + $this->container['url'] = $url; + + return $this; + } + + /** + * Gets repo + * + * @return string|null + */ + public function getRepo() + { + return $this->container['repo']; + } + + /** + * Sets repo + * + * @param string|null $repo repo + * + * @return self + */ + public function setRepo($repo) + { + if (is_null($repo)) { + throw new \InvalidArgumentException('non-nullable repo cannot be null'); + } + $this->container['repo'] = $repo; + + return $this; + } + + /** + * Gets path + * + * @return string|null + */ + public function getPath() + { + return $this->container['path']; + } + + /** + * Sets path + * + * @param string|null $path path + * + * @return self + */ + public function setPath($path) + { + if (is_null($path)) { + throw new \InvalidArgumentException('non-nullable path cannot be null'); + } + $this->container['path'] = $path; + + return $this; + } + + /** + * Gets version + * + * @return string|null + */ + public function getVersion() + { + return $this->container['version']; + } + + /** + * Sets version + * + * @param string|null $version version + * + * @return self + */ + public function setVersion($version) + { + if (is_null($version)) { + throw new \InvalidArgumentException('non-nullable version cannot be null'); + } + $this->container['version'] = $version; + + 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/KVItemsCreate200Response.php b/src/Model/KVItemsCreate200Response.php index fe20bc8..3d8263f 100644 --- a/src/Model/KVItemsCreate200Response.php +++ b/src/Model/KVItemsCreate200Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/KVItemsDelete200Response.php b/src/Model/KVItemsDelete200Response.php index 22e3313..51c4dac 100644 --- a/src/Model/KVItemsDelete200Response.php +++ b/src/Model/KVItemsDelete200Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/KVItemsShow200Response.php b/src/Model/KVItemsShow200Response.php index 9fe600f..76c6637 100644 --- a/src/Model/KVItemsShow200Response.php +++ b/src/Model/KVItemsShow200Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/KVItemsShow200ResponseValue.php b/src/Model/KVItemsShow200ResponseValue.php index 3b567d4..3a307c2 100644 --- a/src/Model/KVItemsShow200ResponseValue.php +++ b/src/Model/KVItemsShow200ResponseValue.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/KVLinkToProject200Response.php b/src/Model/KVLinkToProject200Response.php new file mode 100644 index 0000000..c4891a0 --- /dev/null +++ b/src/Model/KVLinkToProject200Response.php @@ -0,0 +1,443 @@ + + */ +class KVLinkToProject200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'KV_link_to_project_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'success' => 'bool', + 'message' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'success' => null, + 'message' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'success' => false, + 'message' => 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 = [ + 'success' => 'success', + 'message' => 'message' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'success' => 'setSuccess', + 'message' => 'setMessage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'success' => 'getSuccess', + 'message' => 'getMessage' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('success', $data ?? [], null); + $this->setIfExists('message', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets success + * + * @return bool|null + */ + public function getSuccess() + { + return $this->container['success']; + } + + /** + * Sets success + * + * @param bool|null $success success + * + * @return self + */ + public function setSuccess($success) + { + if (is_null($success)) { + throw new \InvalidArgumentException('non-nullable success cannot be null'); + } + $this->container['success'] = $success; + + return $this; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message message + * + * @return self + */ + public function setMessage($message) + { + if (is_null($message)) { + throw new \InvalidArgumentException('non-nullable message cannot be null'); + } + $this->container['message'] = $message; + + 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/KVLinkToProjectRequest.php b/src/Model/KVLinkToProjectRequest.php new file mode 100644 index 0000000..02fc095 --- /dev/null +++ b/src/Model/KVLinkToProjectRequest.php @@ -0,0 +1,412 @@ + + */ +class KVLinkToProjectRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'KV_link_to_project_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'project_id' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'project_id' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'project_id' => 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 = [ + 'project_id' => 'project_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'project_id' => 'setProjectId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'project_id' => 'getProjectId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('project_id', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param 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['project_id'] === null) { + $invalidProperties[] = "'project_id' can't be null"; + } + 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 project_id + * + * @return int + */ + public function getProjectId() + { + return $this->container['project_id']; + } + + /** + * Sets project_id + * + * @param int $project_id Target project ID to link to + * + * @return self + */ + public function setProjectId($project_id) + { + if (is_null($project_id)) { + throw new \InvalidArgumentException('non-nullable project_id cannot be null'); + } + $this->container['project_id'] = $project_id; + + 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/ListAIAgents200Response.php b/src/Model/ListAIAgents200Response.php index e84db05..1d13f82 100644 --- a/src/Model/ListAIAgents200Response.php +++ b/src/Model/ListAIAgents200Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ListAIAgents200ResponseAgentsInner.php b/src/Model/ListAIAgents200ResponseAgentsInner.php index 108a185..8d39605 100644 --- a/src/Model/ListAIAgents200ResponseAgentsInner.php +++ b/src/Model/ListAIAgents200ResponseAgentsInner.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ @@ -65,6 +65,11 @@ class ListAIAgents200ResponseAgentsInner implements ModelInterface, ArrayAccess, 'temperature' => 'float', 'max_tokens' => 'int', 'allowed_tools' => 'string[]', + 'assigned_skills' => 'string[]', + 'long_context' => 'bool', + 'guardrail_preset' => 'string', + 'is_global' => 'bool', + 'has_overlay' => 'bool', 'created_at' => '\DateTime', 'updated_at' => '\DateTime' ]; @@ -85,6 +90,11 @@ class ListAIAgents200ResponseAgentsInner implements ModelInterface, ArrayAccess, 'temperature' => null, 'max_tokens' => null, 'allowed_tools' => null, + 'assigned_skills' => null, + 'long_context' => null, + 'guardrail_preset' => null, + 'is_global' => null, + 'has_overlay' => null, 'created_at' => 'date-time', 'updated_at' => 'date-time' ]; @@ -103,6 +113,11 @@ class ListAIAgents200ResponseAgentsInner implements ModelInterface, ArrayAccess, 'temperature' => false, 'max_tokens' => false, 'allowed_tools' => false, + 'assigned_skills' => false, + 'long_context' => false, + 'guardrail_preset' => false, + 'is_global' => false, + 'has_overlay' => false, 'created_at' => false, 'updated_at' => false ]; @@ -201,6 +216,11 @@ public function isNullableSetToNull(string $property): bool 'temperature' => 'temperature', 'max_tokens' => 'maxTokens', 'allowed_tools' => 'allowedTools', + 'assigned_skills' => 'assignedSkills', + 'long_context' => 'longContext', + 'guardrail_preset' => 'guardrailPreset', + 'is_global' => 'isGlobal', + 'has_overlay' => 'hasOverlay', 'created_at' => 'createdAt', 'updated_at' => 'updatedAt' ]; @@ -219,6 +239,11 @@ public function isNullableSetToNull(string $property): bool 'temperature' => 'setTemperature', 'max_tokens' => 'setMaxTokens', 'allowed_tools' => 'setAllowedTools', + 'assigned_skills' => 'setAssignedSkills', + 'long_context' => 'setLongContext', + 'guardrail_preset' => 'setGuardrailPreset', + 'is_global' => 'setIsGlobal', + 'has_overlay' => 'setHasOverlay', 'created_at' => 'setCreatedAt', 'updated_at' => 'setUpdatedAt' ]; @@ -237,6 +262,11 @@ public function isNullableSetToNull(string $property): bool 'temperature' => 'getTemperature', 'max_tokens' => 'getMaxTokens', 'allowed_tools' => 'getAllowedTools', + 'assigned_skills' => 'getAssignedSkills', + 'long_context' => 'getLongContext', + 'guardrail_preset' => 'getGuardrailPreset', + 'is_global' => 'getIsGlobal', + 'has_overlay' => 'getHasOverlay', 'created_at' => 'getCreatedAt', 'updated_at' => 'getUpdatedAt' ]; @@ -306,6 +336,11 @@ public function __construct(?array $data = null) $this->setIfExists('temperature', $data ?? [], null); $this->setIfExists('max_tokens', $data ?? [], null); $this->setIfExists('allowed_tools', $data ?? [], null); + $this->setIfExists('assigned_skills', $data ?? [], null); + $this->setIfExists('long_context', $data ?? [], null); + $this->setIfExists('guardrail_preset', $data ?? [], null); + $this->setIfExists('is_global', $data ?? [], null); + $this->setIfExists('has_overlay', $data ?? [], null); $this->setIfExists('created_at', $data ?? [], null); $this->setIfExists('updated_at', $data ?? [], null); } @@ -568,6 +603,141 @@ public function setAllowedTools($allowed_tools) return $this; } + /** + * Gets assigned_skills + * + * @return string[]|null + */ + public function getAssignedSkills() + { + return $this->container['assigned_skills']; + } + + /** + * Sets assigned_skills + * + * @param string[]|null $assigned_skills assigned_skills + * + * @return self + */ + public function setAssignedSkills($assigned_skills) + { + if (is_null($assigned_skills)) { + throw new \InvalidArgumentException('non-nullable assigned_skills cannot be null'); + } + $this->container['assigned_skills'] = $assigned_skills; + + return $this; + } + + /** + * Gets long_context + * + * @return bool|null + */ + public function getLongContext() + { + return $this->container['long_context']; + } + + /** + * Sets long_context + * + * @param bool|null $long_context long_context + * + * @return self + */ + public function setLongContext($long_context) + { + if (is_null($long_context)) { + throw new \InvalidArgumentException('non-nullable long_context cannot be null'); + } + $this->container['long_context'] = $long_context; + + return $this; + } + + /** + * Gets guardrail_preset + * + * @return string|null + */ + public function getGuardrailPreset() + { + return $this->container['guardrail_preset']; + } + + /** + * Sets guardrail_preset + * + * @param string|null $guardrail_preset guardrail_preset + * + * @return self + */ + public function setGuardrailPreset($guardrail_preset) + { + if (is_null($guardrail_preset)) { + throw new \InvalidArgumentException('non-nullable guardrail_preset cannot be null'); + } + $this->container['guardrail_preset'] = $guardrail_preset; + + return $this; + } + + /** + * Gets is_global + * + * @return bool|null + */ + public function getIsGlobal() + { + return $this->container['is_global']; + } + + /** + * Sets is_global + * + * @param bool|null $is_global is_global + * + * @return self + */ + public function setIsGlobal($is_global) + { + if (is_null($is_global)) { + throw new \InvalidArgumentException('non-nullable is_global cannot be null'); + } + $this->container['is_global'] = $is_global; + + return $this; + } + + /** + * Gets has_overlay + * + * @return bool|null + */ + public function getHasOverlay() + { + return $this->container['has_overlay']; + } + + /** + * Sets has_overlay + * + * @param bool|null $has_overlay has_overlay + * + * @return self + */ + public function setHasOverlay($has_overlay) + { + if (is_null($has_overlay)) { + throw new \InvalidArgumentException('non-nullable has_overlay cannot be null'); + } + $this->container['has_overlay'] = $has_overlay; + + return $this; + } + /** * Gets created_at * diff --git a/src/Model/ListAIModels200Response.php b/src/Model/ListAIModels200Response.php index 1bd9c5b..ad543c3 100644 --- a/src/Model/ListAIModels200Response.php +++ b/src/Model/ListAIModels200Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ListAIModels200ResponseModelsInner.php b/src/Model/ListAIModels200ResponseModelsInner.php index c072856..0c810c4 100644 --- a/src/Model/ListAIModels200ResponseModelsInner.php +++ b/src/Model/ListAIModels200ResponseModelsInner.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ListAIModels200ResponseModelsInnerCapabilities.php b/src/Model/ListAIModels200ResponseModelsInnerCapabilities.php index 11181f2..29756fa 100644 --- a/src/Model/ListAIModels200ResponseModelsInnerCapabilities.php +++ b/src/Model/ListAIModels200ResponseModelsInnerCapabilities.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ListAISessions200ResponseInner.php b/src/Model/ListAISessions200ResponseInner.php index 0688794..3a35503 100644 --- a/src/Model/ListAISessions200ResponseInner.php +++ b/src/Model/ListAISessions200ResponseInner.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ListAIToolExecutions200Response.php b/src/Model/ListAIToolExecutions200Response.php index c85201f..6b903d3 100644 --- a/src/Model/ListAIToolExecutions200Response.php +++ b/src/Model/ListAIToolExecutions200Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ListAIToolExecutions200ResponseExecutionsInner.php b/src/Model/ListAIToolExecutions200ResponseExecutionsInner.php index d35f3d9..e611a1f 100644 --- a/src/Model/ListAIToolExecutions200ResponseExecutionsInner.php +++ b/src/Model/ListAIToolExecutions200ResponseExecutionsInner.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ListAIToolNames200Response.php b/src/Model/ListAIToolNames200Response.php index 08c4bff..e46b1d3 100644 --- a/src/Model/ListAIToolNames200Response.php +++ b/src/Model/ListAIToolNames200Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ListAITools200Response.php b/src/Model/ListAITools200Response.php index 30a4a55..3ade1d6 100644 --- a/src/Model/ListAITools200Response.php +++ b/src/Model/ListAITools200Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ListAITools200ResponseToolsInner.php b/src/Model/ListAITools200ResponseToolsInner.php index 1e894f3..1cd0e36 100644 --- a/src/Model/ListAITools200ResponseToolsInner.php +++ b/src/Model/ListAITools200ResponseToolsInner.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ListAITools200ResponseToolsInnerToolSpec.php b/src/Model/ListAITools200ResponseToolsInnerToolSpec.php index fcd955e..1475689 100644 --- a/src/Model/ListAITools200ResponseToolsInnerToolSpec.php +++ b/src/Model/ListAITools200ResponseToolsInnerToolSpec.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ListAITools200ResponseToolsInnerToolSpecInputSchema.php b/src/Model/ListAITools200ResponseToolsInnerToolSpecInputSchema.php index ee88959..3684ffc 100644 --- a/src/Model/ListAITools200ResponseToolsInnerToolSpecInputSchema.php +++ b/src/Model/ListAITools200ResponseToolsInnerToolSpecInputSchema.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ListBackups200Response.php b/src/Model/ListBackups200Response.php index 67caeac..3493fc5 100644 --- a/src/Model/ListBackups200Response.php +++ b/src/Model/ListBackups200Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ListBackups200ResponseBackupsInner.php b/src/Model/ListBackups200ResponseBackupsInner.php index ccfe861..e11c533 100644 --- a/src/Model/ListBackups200ResponseBackupsInner.php +++ b/src/Model/ListBackups200ResponseBackupsInner.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ListBackups422Response.php b/src/Model/ListBackups422Response.php index 8fd6fd4..ad6359d 100644 --- a/src/Model/ListBackups422Response.php +++ b/src/Model/ListBackups422Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ListCustomTools200Response.php b/src/Model/ListCustomTools200Response.php index 01c3455..681209f 100644 --- a/src/Model/ListCustomTools200Response.php +++ b/src/Model/ListCustomTools200Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ListCustomTools200ResponseToolsInner.php b/src/Model/ListCustomTools200ResponseToolsInner.php index 7c51328..38f7325 100644 --- a/src/Model/ListCustomTools200ResponseToolsInner.php +++ b/src/Model/ListCustomTools200ResponseToolsInner.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ListFiles200Response.php b/src/Model/ListFiles200Response.php index eec2b38..2af91e3 100644 --- a/src/Model/ListFiles200Response.php +++ b/src/Model/ListFiles200Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ListFiles200ResponseFilesInner.php b/src/Model/ListFiles200ResponseFilesInner.php index 33c88ff..08835b3 100644 --- a/src/Model/ListFiles200ResponseFilesInner.php +++ b/src/Model/ListFiles200ResponseFilesInner.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ListOrchestrationBatches200Response.php b/src/Model/ListOrchestrationBatches200Response.php new file mode 100644 index 0000000..948cdd9 --- /dev/null +++ b/src/Model/ListOrchestrationBatches200Response.php @@ -0,0 +1,450 @@ + + */ +class ListOrchestrationBatches200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'listOrchestrationBatches_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'batches' => '\QuantClient\Model\ListOrchestrationBatches200ResponseBatchesInner[]', + 'next_cursor' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'batches' => null, + 'next_cursor' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'batches' => false, + 'next_cursor' => true + ]; + + /** + * 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 = [ + 'batches' => 'batches', + 'next_cursor' => 'nextCursor' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'batches' => 'setBatches', + 'next_cursor' => 'setNextCursor' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'batches' => 'getBatches', + 'next_cursor' => 'getNextCursor' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('batches', $data ?? [], null); + $this->setIfExists('next_cursor', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets batches + * + * @return \QuantClient\Model\ListOrchestrationBatches200ResponseBatchesInner[]|null + */ + public function getBatches() + { + return $this->container['batches']; + } + + /** + * Sets batches + * + * @param \QuantClient\Model\ListOrchestrationBatches200ResponseBatchesInner[]|null $batches batches + * + * @return self + */ + public function setBatches($batches) + { + if (is_null($batches)) { + throw new \InvalidArgumentException('non-nullable batches cannot be null'); + } + $this->container['batches'] = $batches; + + return $this; + } + + /** + * Gets next_cursor + * + * @return string|null + */ + public function getNextCursor() + { + return $this->container['next_cursor']; + } + + /** + * Sets next_cursor + * + * @param string|null $next_cursor next_cursor + * + * @return self + */ + public function setNextCursor($next_cursor) + { + if (is_null($next_cursor)) { + array_push($this->openAPINullablesSetToNull, 'next_cursor'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('next_cursor', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['next_cursor'] = $next_cursor; + + 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/ListOrchestrationBatches200ResponseBatchesInner.php b/src/Model/ListOrchestrationBatches200ResponseBatchesInner.php new file mode 100644 index 0000000..2b861e6 --- /dev/null +++ b/src/Model/ListOrchestrationBatches200ResponseBatchesInner.php @@ -0,0 +1,760 @@ + + */ +class ListOrchestrationBatches200ResponseBatchesInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'listOrchestrationBatches_200_response_batches_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'batch_id' => 'string', + 'orchestration_id' => 'string', + 'iteration' => 'int', + 'item_count' => 'int', + 'completed_count' => 'int', + 'failed_count' => 'int', + 'status' => 'string', + 'started_at' => '\DateTime', + 'completed_at' => '\DateTime', + 'error' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'batch_id' => null, + 'orchestration_id' => null, + 'iteration' => null, + 'item_count' => null, + 'completed_count' => null, + 'failed_count' => null, + 'status' => null, + 'started_at' => 'date-time', + 'completed_at' => 'date-time', + 'error' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'batch_id' => false, + 'orchestration_id' => false, + 'iteration' => false, + 'item_count' => false, + 'completed_count' => false, + 'failed_count' => false, + 'status' => false, + 'started_at' => false, + 'completed_at' => false, + 'error' => true + ]; + + /** + * 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 = [ + 'batch_id' => 'batchId', + 'orchestration_id' => 'orchestrationId', + 'iteration' => 'iteration', + 'item_count' => 'itemCount', + 'completed_count' => 'completedCount', + 'failed_count' => 'failedCount', + 'status' => 'status', + 'started_at' => 'startedAt', + 'completed_at' => 'completedAt', + 'error' => 'error' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'batch_id' => 'setBatchId', + 'orchestration_id' => 'setOrchestrationId', + 'iteration' => 'setIteration', + 'item_count' => 'setItemCount', + 'completed_count' => 'setCompletedCount', + 'failed_count' => 'setFailedCount', + 'status' => 'setStatus', + 'started_at' => 'setStartedAt', + 'completed_at' => 'setCompletedAt', + 'error' => 'setError' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'batch_id' => 'getBatchId', + 'orchestration_id' => 'getOrchestrationId', + 'iteration' => 'getIteration', + 'item_count' => 'getItemCount', + 'completed_count' => 'getCompletedCount', + 'failed_count' => 'getFailedCount', + 'status' => 'getStatus', + 'started_at' => 'getStartedAt', + 'completed_at' => 'getCompletedAt', + 'error' => 'getError' + ]; + + /** + * 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 STATUS_PENDING = 'pending'; + public const STATUS_RUNNING = 'running'; + public const STATUS_COMPLETED = 'completed'; + public const STATUS_FAILED = 'failed'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_PENDING, + self::STATUS_RUNNING, + self::STATUS_COMPLETED, + self::STATUS_FAILED, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('batch_id', $data ?? [], null); + $this->setIfExists('orchestration_id', $data ?? [], null); + $this->setIfExists('iteration', $data ?? [], null); + $this->setIfExists('item_count', $data ?? [], null); + $this->setIfExists('completed_count', $data ?? [], null); + $this->setIfExists('failed_count', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('started_at', $data ?? [], null); + $this->setIfExists('completed_at', $data ?? [], null); + $this->setIfExists('error', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param 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->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'status', must be one of '%s'", + $this->container['status'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * 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 batch_id + * + * @return string|null + */ + public function getBatchId() + { + return $this->container['batch_id']; + } + + /** + * Sets batch_id + * + * @param string|null $batch_id batch_id + * + * @return self + */ + public function setBatchId($batch_id) + { + if (is_null($batch_id)) { + throw new \InvalidArgumentException('non-nullable batch_id cannot be null'); + } + $this->container['batch_id'] = $batch_id; + + return $this; + } + + /** + * Gets orchestration_id + * + * @return string|null + */ + public function getOrchestrationId() + { + return $this->container['orchestration_id']; + } + + /** + * Sets orchestration_id + * + * @param string|null $orchestration_id orchestration_id + * + * @return self + */ + public function setOrchestrationId($orchestration_id) + { + if (is_null($orchestration_id)) { + throw new \InvalidArgumentException('non-nullable orchestration_id cannot be null'); + } + $this->container['orchestration_id'] = $orchestration_id; + + return $this; + } + + /** + * Gets iteration + * + * @return int|null + */ + public function getIteration() + { + return $this->container['iteration']; + } + + /** + * Sets iteration + * + * @param int|null $iteration iteration + * + * @return self + */ + public function setIteration($iteration) + { + if (is_null($iteration)) { + throw new \InvalidArgumentException('non-nullable iteration cannot be null'); + } + $this->container['iteration'] = $iteration; + + return $this; + } + + /** + * Gets item_count + * + * @return int|null + */ + public function getItemCount() + { + return $this->container['item_count']; + } + + /** + * Sets item_count + * + * @param int|null $item_count item_count + * + * @return self + */ + public function setItemCount($item_count) + { + if (is_null($item_count)) { + throw new \InvalidArgumentException('non-nullable item_count cannot be null'); + } + $this->container['item_count'] = $item_count; + + return $this; + } + + /** + * Gets completed_count + * + * @return int|null + */ + public function getCompletedCount() + { + return $this->container['completed_count']; + } + + /** + * Sets completed_count + * + * @param int|null $completed_count completed_count + * + * @return self + */ + public function setCompletedCount($completed_count) + { + if (is_null($completed_count)) { + throw new \InvalidArgumentException('non-nullable completed_count cannot be null'); + } + $this->container['completed_count'] = $completed_count; + + return $this; + } + + /** + * Gets failed_count + * + * @return int|null + */ + public function getFailedCount() + { + return $this->container['failed_count']; + } + + /** + * Sets failed_count + * + * @param int|null $failed_count failed_count + * + * @return self + */ + public function setFailedCount($failed_count) + { + if (is_null($failed_count)) { + throw new \InvalidArgumentException('non-nullable failed_count cannot be null'); + } + $this->container['failed_count'] = $failed_count; + + return $this; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status status + * + * @return self + */ + public function setStatus($status) + { + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); + } + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets started_at + * + * @return \DateTime|null + */ + public function getStartedAt() + { + return $this->container['started_at']; + } + + /** + * Sets started_at + * + * @param \DateTime|null $started_at started_at + * + * @return self + */ + public function setStartedAt($started_at) + { + if (is_null($started_at)) { + throw new \InvalidArgumentException('non-nullable started_at cannot be null'); + } + $this->container['started_at'] = $started_at; + + return $this; + } + + /** + * Gets completed_at + * + * @return \DateTime|null + */ + public function getCompletedAt() + { + return $this->container['completed_at']; + } + + /** + * Sets completed_at + * + * @param \DateTime|null $completed_at completed_at + * + * @return self + */ + public function setCompletedAt($completed_at) + { + if (is_null($completed_at)) { + throw new \InvalidArgumentException('non-nullable completed_at cannot be null'); + } + $this->container['completed_at'] = $completed_at; + + return $this; + } + + /** + * Gets error + * + * @return string|null + */ + public function getError() + { + return $this->container['error']; + } + + /** + * Sets error + * + * @param string|null $error error + * + * @return self + */ + public function setError($error) + { + if (is_null($error)) { + array_push($this->openAPINullablesSetToNull, 'error'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('error', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['error'] = $error; + + 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/ListOrchestrations200Response.php b/src/Model/ListOrchestrations200Response.php new file mode 100644 index 0000000..1b1f8b9 --- /dev/null +++ b/src/Model/ListOrchestrations200Response.php @@ -0,0 +1,450 @@ + + */ +class ListOrchestrations200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'listOrchestrations_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'orchestrations' => 'object[]', + 'next_cursor' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'orchestrations' => null, + 'next_cursor' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'orchestrations' => false, + 'next_cursor' => true + ]; + + /** + * 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 = [ + 'orchestrations' => 'orchestrations', + 'next_cursor' => 'nextCursor' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'orchestrations' => 'setOrchestrations', + 'next_cursor' => 'setNextCursor' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'orchestrations' => 'getOrchestrations', + 'next_cursor' => 'getNextCursor' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('orchestrations', $data ?? [], null); + $this->setIfExists('next_cursor', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets orchestrations + * + * @return object[]|null + */ + public function getOrchestrations() + { + return $this->container['orchestrations']; + } + + /** + * Sets orchestrations + * + * @param object[]|null $orchestrations orchestrations + * + * @return self + */ + public function setOrchestrations($orchestrations) + { + if (is_null($orchestrations)) { + throw new \InvalidArgumentException('non-nullable orchestrations cannot be null'); + } + $this->container['orchestrations'] = $orchestrations; + + return $this; + } + + /** + * Gets next_cursor + * + * @return string|null + */ + public function getNextCursor() + { + return $this->container['next_cursor']; + } + + /** + * Sets next_cursor + * + * @param string|null $next_cursor next_cursor + * + * @return self + */ + public function setNextCursor($next_cursor) + { + if (is_null($next_cursor)) { + array_push($this->openAPINullablesSetToNull, 'next_cursor'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('next_cursor', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['next_cursor'] = $next_cursor; + + 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/ListSkillCollections200Response.php b/src/Model/ListSkillCollections200Response.php new file mode 100644 index 0000000..04ae84f --- /dev/null +++ b/src/Model/ListSkillCollections200Response.php @@ -0,0 +1,409 @@ + + */ +class ListSkillCollections200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'listSkillCollections_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'collections' => '\QuantClient\Model\ListSkillCollections200ResponseCollectionsInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'collections' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'collections' => 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 = [ + 'collections' => 'collections' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'collections' => 'setCollections' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'collections' => 'getCollections' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('collections', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets collections + * + * @return \QuantClient\Model\ListSkillCollections200ResponseCollectionsInner[]|null + */ + public function getCollections() + { + return $this->container['collections']; + } + + /** + * Sets collections + * + * @param \QuantClient\Model\ListSkillCollections200ResponseCollectionsInner[]|null $collections collections + * + * @return self + */ + public function setCollections($collections) + { + if (is_null($collections)) { + throw new \InvalidArgumentException('non-nullable collections cannot be null'); + } + $this->container['collections'] = $collections; + + 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/ListSkillCollections200ResponseCollectionsInner.php b/src/Model/ListSkillCollections200ResponseCollectionsInner.php new file mode 100644 index 0000000..54ebfc0 --- /dev/null +++ b/src/Model/ListSkillCollections200ResponseCollectionsInner.php @@ -0,0 +1,477 @@ + + */ +class ListSkillCollections200ResponseCollectionsInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'listSkillCollections_200_response_collections_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'namespace' => 'string', + 'count' => 'int', + 'skills' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'namespace' => null, + 'count' => null, + 'skills' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'namespace' => false, + 'count' => false, + 'skills' => 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 = [ + 'namespace' => 'namespace', + 'count' => 'count', + 'skills' => 'skills' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'namespace' => 'setNamespace', + 'count' => 'setCount', + 'skills' => 'setSkills' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'namespace' => 'getNamespace', + 'count' => 'getCount', + 'skills' => 'getSkills' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('namespace', $data ?? [], null); + $this->setIfExists('count', $data ?? [], null); + $this->setIfExists('skills', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets namespace + * + * @return string|null + */ + public function getNamespace() + { + return $this->container['namespace']; + } + + /** + * Sets namespace + * + * @param string|null $namespace namespace + * + * @return self + */ + public function setNamespace($namespace) + { + if (is_null($namespace)) { + throw new \InvalidArgumentException('non-nullable namespace cannot be null'); + } + $this->container['namespace'] = $namespace; + + return $this; + } + + /** + * Gets count + * + * @return int|null + */ + public function getCount() + { + return $this->container['count']; + } + + /** + * Sets count + * + * @param int|null $count count + * + * @return self + */ + public function setCount($count) + { + if (is_null($count)) { + throw new \InvalidArgumentException('non-nullable count cannot be null'); + } + $this->container['count'] = $count; + + return $this; + } + + /** + * Gets skills + * + * @return string[]|null + */ + public function getSkills() + { + return $this->container['skills']; + } + + /** + * Sets skills + * + * @param string[]|null $skills skills + * + * @return self + */ + public function setSkills($skills) + { + if (is_null($skills)) { + throw new \InvalidArgumentException('non-nullable skills cannot be null'); + } + $this->container['skills'] = $skills; + + 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/ListSkills200Response.php b/src/Model/ListSkills200Response.php new file mode 100644 index 0000000..4630daa --- /dev/null +++ b/src/Model/ListSkills200Response.php @@ -0,0 +1,443 @@ + + */ +class ListSkills200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'listSkills_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'skills' => '\QuantClient\Model\ListSkills200ResponseSkillsInner[]', + 'count' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'skills' => null, + 'count' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'skills' => false, + 'count' => 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 = [ + 'skills' => 'skills', + 'count' => 'count' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'skills' => 'setSkills', + 'count' => 'setCount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'skills' => 'getSkills', + 'count' => 'getCount' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('skills', $data ?? [], null); + $this->setIfExists('count', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets skills + * + * @return \QuantClient\Model\ListSkills200ResponseSkillsInner[]|null + */ + public function getSkills() + { + return $this->container['skills']; + } + + /** + * Sets skills + * + * @param \QuantClient\Model\ListSkills200ResponseSkillsInner[]|null $skills skills + * + * @return self + */ + public function setSkills($skills) + { + if (is_null($skills)) { + throw new \InvalidArgumentException('non-nullable skills cannot be null'); + } + $this->container['skills'] = $skills; + + return $this; + } + + /** + * Gets count + * + * @return int|null + */ + public function getCount() + { + return $this->container['count']; + } + + /** + * Sets count + * + * @param int|null $count count + * + * @return self + */ + public function setCount($count) + { + if (is_null($count)) { + throw new \InvalidArgumentException('non-nullable count cannot be null'); + } + $this->container['count'] = $count; + + 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/ListSkills200ResponseSkillsInner.php b/src/Model/ListSkills200ResponseSkillsInner.php new file mode 100644 index 0000000..9f600ff --- /dev/null +++ b/src/Model/ListSkills200ResponseSkillsInner.php @@ -0,0 +1,681 @@ + + */ +class ListSkills200ResponseSkillsInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'listSkills_200_response_skills_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'skill_id' => 'string', + 'name' => 'string', + 'description' => 'string', + 'tags' => 'string[]', + 'source' => 'object', + 'trigger_condition' => 'string', + 'namespace' => 'string', + 'installed_at' => '\DateTime', + 'updated_at' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'skill_id' => null, + 'name' => null, + 'description' => null, + 'tags' => null, + 'source' => null, + 'trigger_condition' => null, + 'namespace' => null, + 'installed_at' => 'date-time', + 'updated_at' => 'date-time' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'skill_id' => false, + 'name' => false, + 'description' => false, + 'tags' => false, + 'source' => false, + 'trigger_condition' => false, + 'namespace' => false, + 'installed_at' => false, + 'updated_at' => 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 = [ + 'skill_id' => 'skillId', + 'name' => 'name', + 'description' => 'description', + 'tags' => 'tags', + 'source' => 'source', + 'trigger_condition' => 'triggerCondition', + 'namespace' => 'namespace', + 'installed_at' => 'installedAt', + 'updated_at' => 'updatedAt' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'skill_id' => 'setSkillId', + 'name' => 'setName', + 'description' => 'setDescription', + 'tags' => 'setTags', + 'source' => 'setSource', + 'trigger_condition' => 'setTriggerCondition', + 'namespace' => 'setNamespace', + 'installed_at' => 'setInstalledAt', + 'updated_at' => 'setUpdatedAt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'skill_id' => 'getSkillId', + 'name' => 'getName', + 'description' => 'getDescription', + 'tags' => 'getTags', + 'source' => 'getSource', + 'trigger_condition' => 'getTriggerCondition', + 'namespace' => 'getNamespace', + 'installed_at' => 'getInstalledAt', + 'updated_at' => 'getUpdatedAt' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('skill_id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('tags', $data ?? [], null); + $this->setIfExists('source', $data ?? [], null); + $this->setIfExists('trigger_condition', $data ?? [], null); + $this->setIfExists('namespace', $data ?? [], null); + $this->setIfExists('installed_at', $data ?? [], null); + $this->setIfExists('updated_at', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets skill_id + * + * @return string|null + */ + public function getSkillId() + { + return $this->container['skill_id']; + } + + /** + * Sets skill_id + * + * @param string|null $skill_id skill_id + * + * @return self + */ + public function setSkillId($skill_id) + { + if (is_null($skill_id)) { + throw new \InvalidArgumentException('non-nullable skill_id cannot be null'); + } + $this->container['skill_id'] = $skill_id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return self + */ + public function setName($name) + { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description description + * + * @return self + */ + public function setDescription($description) + { + if (is_null($description)) { + throw new \InvalidArgumentException('non-nullable description cannot be null'); + } + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets tags + * + * @return string[]|null + */ + public function getTags() + { + return $this->container['tags']; + } + + /** + * Sets tags + * + * @param string[]|null $tags tags + * + * @return self + */ + public function setTags($tags) + { + if (is_null($tags)) { + throw new \InvalidArgumentException('non-nullable tags cannot be null'); + } + $this->container['tags'] = $tags; + + return $this; + } + + /** + * Gets source + * + * @return object|null + */ + public function getSource() + { + return $this->container['source']; + } + + /** + * Sets source + * + * @param object|null $source source + * + * @return self + */ + public function setSource($source) + { + if (is_null($source)) { + throw new \InvalidArgumentException('non-nullable source cannot be null'); + } + $this->container['source'] = $source; + + return $this; + } + + /** + * Gets trigger_condition + * + * @return string|null + */ + public function getTriggerCondition() + { + return $this->container['trigger_condition']; + } + + /** + * Sets trigger_condition + * + * @param string|null $trigger_condition trigger_condition + * + * @return self + */ + public function setTriggerCondition($trigger_condition) + { + if (is_null($trigger_condition)) { + throw new \InvalidArgumentException('non-nullable trigger_condition cannot be null'); + } + $this->container['trigger_condition'] = $trigger_condition; + + return $this; + } + + /** + * Gets namespace + * + * @return string|null + */ + public function getNamespace() + { + return $this->container['namespace']; + } + + /** + * Sets namespace + * + * @param string|null $namespace namespace + * + * @return self + */ + public function setNamespace($namespace) + { + if (is_null($namespace)) { + throw new \InvalidArgumentException('non-nullable namespace cannot be null'); + } + $this->container['namespace'] = $namespace; + + return $this; + } + + /** + * Gets installed_at + * + * @return \DateTime|null + */ + public function getInstalledAt() + { + return $this->container['installed_at']; + } + + /** + * Sets installed_at + * + * @param \DateTime|null $installed_at installed_at + * + * @return self + */ + public function setInstalledAt($installed_at) + { + if (is_null($installed_at)) { + throw new \InvalidArgumentException('non-nullable installed_at cannot be null'); + } + $this->container['installed_at'] = $installed_at; + + return $this; + } + + /** + * Gets updated_at + * + * @return \DateTime|null + */ + public function getUpdatedAt() + { + return $this->container['updated_at']; + } + + /** + * Sets updated_at + * + * @param \DateTime|null $updated_at updated_at + * + * @return self + */ + public function setUpdatedAt($updated_at) + { + if (is_null($updated_at)) { + throw new \InvalidArgumentException('non-nullable updated_at cannot be null'); + } + $this->container['updated_at'] = $updated_at; + + 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/ListSlackBots200Response.php b/src/Model/ListSlackBots200Response.php new file mode 100644 index 0000000..7cb80a9 --- /dev/null +++ b/src/Model/ListSlackBots200Response.php @@ -0,0 +1,409 @@ + + */ +class ListSlackBots200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'listSlackBots_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'bots' => '\QuantClient\Model\ListSlackBots200ResponseBotsInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'bots' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'bots' => 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 = [ + 'bots' => 'bots' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'bots' => 'setBots' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'bots' => 'getBots' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('bots', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets bots + * + * @return \QuantClient\Model\ListSlackBots200ResponseBotsInner[]|null + */ + public function getBots() + { + return $this->container['bots']; + } + + /** + * Sets bots + * + * @param \QuantClient\Model\ListSlackBots200ResponseBotsInner[]|null $bots bots + * + * @return self + */ + public function setBots($bots) + { + if (is_null($bots)) { + throw new \InvalidArgumentException('non-nullable bots cannot be null'); + } + $this->container['bots'] = $bots; + + 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/ListSlackBots200ResponseBotsInner.php b/src/Model/ListSlackBots200ResponseBotsInner.php new file mode 100644 index 0000000..f8c36b3 --- /dev/null +++ b/src/Model/ListSlackBots200ResponseBotsInner.php @@ -0,0 +1,715 @@ + + */ +class ListSlackBots200ResponseBotsInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'listSlackBots_200_response_bots_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'bot_id' => 'string', + 'agent_id' => 'string', + 'setup_type' => 'string', + 'status' => 'string', + 'connected' => 'bool', + 'session_ttl_days' => 'int', + 'keywords_enabled' => 'bool', + 'created_at' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'bot_id' => null, + 'agent_id' => null, + 'setup_type' => null, + 'status' => null, + 'connected' => null, + 'session_ttl_days' => null, + 'keywords_enabled' => null, + 'created_at' => 'date-time' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'bot_id' => false, + 'agent_id' => false, + 'setup_type' => false, + 'status' => false, + 'connected' => false, + 'session_ttl_days' => false, + 'keywords_enabled' => false, + 'created_at' => 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 = [ + 'bot_id' => 'botId', + 'agent_id' => 'agentId', + 'setup_type' => 'setupType', + 'status' => 'status', + 'connected' => 'connected', + 'session_ttl_days' => 'sessionTtlDays', + 'keywords_enabled' => 'keywordsEnabled', + 'created_at' => 'createdAt' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'bot_id' => 'setBotId', + 'agent_id' => 'setAgentId', + 'setup_type' => 'setSetupType', + 'status' => 'setStatus', + 'connected' => 'setConnected', + 'session_ttl_days' => 'setSessionTtlDays', + 'keywords_enabled' => 'setKeywordsEnabled', + 'created_at' => 'setCreatedAt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'bot_id' => 'getBotId', + 'agent_id' => 'getAgentId', + 'setup_type' => 'getSetupType', + 'status' => 'getStatus', + 'connected' => 'getConnected', + 'session_ttl_days' => 'getSessionTtlDays', + 'keywords_enabled' => 'getKeywordsEnabled', + 'created_at' => 'getCreatedAt' + ]; + + /** + * 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 SETUP_TYPE_QUANT = 'quant'; + public const SETUP_TYPE_BYO = 'byo'; + public const STATUS_ACTIVE = 'active'; + public const STATUS_INACTIVE = 'inactive'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSetupTypeAllowableValues() + { + return [ + self::SETUP_TYPE_QUANT, + self::SETUP_TYPE_BYO, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_ACTIVE, + self::STATUS_INACTIVE, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('bot_id', $data ?? [], null); + $this->setIfExists('agent_id', $data ?? [], null); + $this->setIfExists('setup_type', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('connected', $data ?? [], null); + $this->setIfExists('session_ttl_days', $data ?? [], null); + $this->setIfExists('keywords_enabled', $data ?? [], null); + $this->setIfExists('created_at', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param 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->getSetupTypeAllowableValues(); + if (!is_null($this->container['setup_type']) && !in_array($this->container['setup_type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'setup_type', must be one of '%s'", + $this->container['setup_type'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'status', must be one of '%s'", + $this->container['status'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * 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 bot_id + * + * @return string|null + */ + public function getBotId() + { + return $this->container['bot_id']; + } + + /** + * Sets bot_id + * + * @param string|null $bot_id bot_id + * + * @return self + */ + public function setBotId($bot_id) + { + if (is_null($bot_id)) { + throw new \InvalidArgumentException('non-nullable bot_id cannot be null'); + } + $this->container['bot_id'] = $bot_id; + + return $this; + } + + /** + * Gets agent_id + * + * @return string|null + */ + public function getAgentId() + { + return $this->container['agent_id']; + } + + /** + * Sets agent_id + * + * @param string|null $agent_id agent_id + * + * @return self + */ + public function setAgentId($agent_id) + { + if (is_null($agent_id)) { + throw new \InvalidArgumentException('non-nullable agent_id cannot be null'); + } + $this->container['agent_id'] = $agent_id; + + return $this; + } + + /** + * Gets setup_type + * + * @return string|null + */ + public function getSetupType() + { + return $this->container['setup_type']; + } + + /** + * Sets setup_type + * + * @param string|null $setup_type setup_type + * + * @return self + */ + public function setSetupType($setup_type) + { + if (is_null($setup_type)) { + throw new \InvalidArgumentException('non-nullable setup_type cannot be null'); + } + $allowedValues = $this->getSetupTypeAllowableValues(); + if (!in_array($setup_type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'setup_type', must be one of '%s'", + $setup_type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['setup_type'] = $setup_type; + + return $this; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status status + * + * @return self + */ + public function setStatus($status) + { + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); + } + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets connected + * + * @return bool|null + */ + public function getConnected() + { + return $this->container['connected']; + } + + /** + * Sets connected + * + * @param bool|null $connected connected + * + * @return self + */ + public function setConnected($connected) + { + if (is_null($connected)) { + throw new \InvalidArgumentException('non-nullable connected cannot be null'); + } + $this->container['connected'] = $connected; + + return $this; + } + + /** + * Gets session_ttl_days + * + * @return int|null + */ + public function getSessionTtlDays() + { + return $this->container['session_ttl_days']; + } + + /** + * Sets session_ttl_days + * + * @param int|null $session_ttl_days session_ttl_days + * + * @return self + */ + public function setSessionTtlDays($session_ttl_days) + { + if (is_null($session_ttl_days)) { + throw new \InvalidArgumentException('non-nullable session_ttl_days cannot be null'); + } + $this->container['session_ttl_days'] = $session_ttl_days; + + return $this; + } + + /** + * Gets keywords_enabled + * + * @return bool|null + */ + public function getKeywordsEnabled() + { + return $this->container['keywords_enabled']; + } + + /** + * Sets keywords_enabled + * + * @param bool|null $keywords_enabled keywords_enabled + * + * @return self + */ + public function setKeywordsEnabled($keywords_enabled) + { + if (is_null($keywords_enabled)) { + throw new \InvalidArgumentException('non-nullable keywords_enabled cannot be null'); + } + $this->container['keywords_enabled'] = $keywords_enabled; + + return $this; + } + + /** + * Gets created_at + * + * @return \DateTime|null + */ + public function getCreatedAt() + { + return $this->container['created_at']; + } + + /** + * Sets created_at + * + * @param \DateTime|null $created_at created_at + * + * @return self + */ + public function setCreatedAt($created_at) + { + if (is_null($created_at)) { + throw new \InvalidArgumentException('non-nullable created_at cannot be null'); + } + $this->container['created_at'] = $created_at; + + 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/ListTasks200Response.php b/src/Model/ListTasks200Response.php index 8f6b061..be518be 100644 --- a/src/Model/ListTasks200Response.php +++ b/src/Model/ListTasks200Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ListTasks200ResponseTasksInner.php b/src/Model/ListTasks200ResponseTasksInner.php index f476bcc..ca7e262 100644 --- a/src/Model/ListTasks200ResponseTasksInner.php +++ b/src/Model/ListTasks200ResponseTasksInner.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ListVectorCollections200Response.php b/src/Model/ListVectorCollections200Response.php index 3d87e5e..a8ad27c 100644 --- a/src/Model/ListVectorCollections200Response.php +++ b/src/Model/ListVectorCollections200Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ListVectorCollections200ResponseCollectionsInner.php b/src/Model/ListVectorCollections200ResponseCollectionsInner.php index 3fc6743..9690644 100644 --- a/src/Model/ListVectorCollections200ResponseCollectionsInner.php +++ b/src/Model/ListVectorCollections200ResponseCollectionsInner.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ModelInterface.php b/src/Model/ModelInterface.php index 44527fb..9a004ad 100644 --- a/src/Model/ModelInterface.php +++ b/src/Model/ModelInterface.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/OrganizationsList200ResponseInner.php b/src/Model/OrganizationsList200ResponseInner.php index 2d20f7f..b6bacf3 100644 --- a/src/Model/OrganizationsList200ResponseInner.php +++ b/src/Model/OrganizationsList200ResponseInner.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/PatchEnvironmentCompose202Response.php b/src/Model/PatchEnvironmentCompose202Response.php index ddab55f..95766f2 100644 --- a/src/Model/PatchEnvironmentCompose202Response.php +++ b/src/Model/PatchEnvironmentCompose202Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/PatchEnvironmentCompose202ResponseSpotConfiguration.php b/src/Model/PatchEnvironmentCompose202ResponseSpotConfiguration.php index ab44601..bfdf402 100644 --- a/src/Model/PatchEnvironmentCompose202ResponseSpotConfiguration.php +++ b/src/Model/PatchEnvironmentCompose202ResponseSpotConfiguration.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/PatchEnvironmentCompose400Response.php b/src/Model/PatchEnvironmentCompose400Response.php index 9e6c5b9..808ab10 100644 --- a/src/Model/PatchEnvironmentCompose400Response.php +++ b/src/Model/PatchEnvironmentCompose400Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/PatchEnvironmentComposeRequest.php b/src/Model/PatchEnvironmentComposeRequest.php index 6c7e380..4621243 100644 --- a/src/Model/PatchEnvironmentComposeRequest.php +++ b/src/Model/PatchEnvironmentComposeRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/PatchEnvironmentComposeRequestSpotConfiguration.php b/src/Model/PatchEnvironmentComposeRequestSpotConfiguration.php index 3914a03..ce9a595 100644 --- a/src/Model/PatchEnvironmentComposeRequestSpotConfiguration.php +++ b/src/Model/PatchEnvironmentComposeRequestSpotConfiguration.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/PurgeCreateRequest.php b/src/Model/PurgeCreateRequest.php index 133be9b..2a7d38c 100644 --- a/src/Model/PurgeCreateRequest.php +++ b/src/Model/PurgeCreateRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/QueryVectorCollection200Response.php b/src/Model/QueryVectorCollection200Response.php index 6cb1c64..a4cfa70 100644 --- a/src/Model/QueryVectorCollection200Response.php +++ b/src/Model/QueryVectorCollection200Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/QueryVectorCollection200ResponsePagination.php b/src/Model/QueryVectorCollection200ResponsePagination.php index c22e066..b613fed 100644 --- a/src/Model/QueryVectorCollection200ResponsePagination.php +++ b/src/Model/QueryVectorCollection200ResponsePagination.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/QueryVectorCollection200ResponseResultsInner.php b/src/Model/QueryVectorCollection200ResponseResultsInner.php index 50a399b..dd201b8 100644 --- a/src/Model/QueryVectorCollection200ResponseResultsInner.php +++ b/src/Model/QueryVectorCollection200ResponseResultsInner.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/QueryVectorCollectionRequest.php b/src/Model/QueryVectorCollectionRequest.php index 265e2ab..1293a70 100644 --- a/src/Model/QueryVectorCollectionRequest.php +++ b/src/Model/QueryVectorCollectionRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/QueryVectorCollectionRequestFilter.php b/src/Model/QueryVectorCollectionRequestFilter.php index eebf81d..f7b6642 100644 --- a/src/Model/QueryVectorCollectionRequestFilter.php +++ b/src/Model/QueryVectorCollectionRequestFilter.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ScalingPolicy.php b/src/Model/ScalingPolicy.php index c9c6ae2..1a6ef40 100644 --- a/src/Model/ScalingPolicy.php +++ b/src/Model/ScalingPolicy.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/SearchSlackWorkspaceChannels200Response.php b/src/Model/SearchSlackWorkspaceChannels200Response.php new file mode 100644 index 0000000..f76ff5a --- /dev/null +++ b/src/Model/SearchSlackWorkspaceChannels200Response.php @@ -0,0 +1,409 @@ + + */ +class SearchSlackWorkspaceChannels200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'searchSlackWorkspaceChannels_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'results' => '\QuantClient\Model\SearchSlackWorkspaceChannels200ResponseResultsInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'results' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'results' => 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 = [ + 'results' => 'results' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'results' => 'setResults' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'results' => 'getResults' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('results', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets results + * + * @return \QuantClient\Model\SearchSlackWorkspaceChannels200ResponseResultsInner[]|null + */ + public function getResults() + { + return $this->container['results']; + } + + /** + * Sets results + * + * @param \QuantClient\Model\SearchSlackWorkspaceChannels200ResponseResultsInner[]|null $results results + * + * @return self + */ + public function setResults($results) + { + if (is_null($results)) { + throw new \InvalidArgumentException('non-nullable results cannot be null'); + } + $this->container['results'] = $results; + + 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/SearchSlackWorkspaceChannels200ResponseResultsInner.php b/src/Model/SearchSlackWorkspaceChannels200ResponseResultsInner.php new file mode 100644 index 0000000..f9b3d07 --- /dev/null +++ b/src/Model/SearchSlackWorkspaceChannels200ResponseResultsInner.php @@ -0,0 +1,443 @@ + + */ +class SearchSlackWorkspaceChannels200ResponseResultsInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'searchSlackWorkspaceChannels_200_response_results_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string', + 'name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'name' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'name' => 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 = [ + 'id' => 'id', + 'name' => 'name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id id + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return self + */ + public function setName($name) + { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + 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/SearchSlackWorkspaceUsers200Response.php b/src/Model/SearchSlackWorkspaceUsers200Response.php new file mode 100644 index 0000000..6bbc269 --- /dev/null +++ b/src/Model/SearchSlackWorkspaceUsers200Response.php @@ -0,0 +1,409 @@ + + */ +class SearchSlackWorkspaceUsers200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'searchSlackWorkspaceUsers_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'results' => '\QuantClient\Model\SearchSlackWorkspaceUsers200ResponseResultsInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'results' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'results' => 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 = [ + 'results' => 'results' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'results' => 'setResults' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'results' => 'getResults' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('results', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets results + * + * @return \QuantClient\Model\SearchSlackWorkspaceUsers200ResponseResultsInner[]|null + */ + public function getResults() + { + return $this->container['results']; + } + + /** + * Sets results + * + * @param \QuantClient\Model\SearchSlackWorkspaceUsers200ResponseResultsInner[]|null $results results + * + * @return self + */ + public function setResults($results) + { + if (is_null($results)) { + throw new \InvalidArgumentException('non-nullable results cannot be null'); + } + $this->container['results'] = $results; + + 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/SearchSlackWorkspaceUsers200ResponseResultsInner.php b/src/Model/SearchSlackWorkspaceUsers200ResponseResultsInner.php new file mode 100644 index 0000000..5e23e4a --- /dev/null +++ b/src/Model/SearchSlackWorkspaceUsers200ResponseResultsInner.php @@ -0,0 +1,477 @@ + + */ +class SearchSlackWorkspaceUsers200ResponseResultsInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'searchSlackWorkspaceUsers_200_response_results_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string', + 'name' => 'string', + 'real_name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'name' => null, + 'real_name' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'name' => false, + 'real_name' => 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 = [ + 'id' => 'id', + 'name' => 'name', + 'real_name' => 'real_name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'real_name' => 'setRealName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'real_name' => 'getRealName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('real_name', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id id + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return self + */ + public function setName($name) + { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets real_name + * + * @return string|null + */ + public function getRealName() + { + return $this->container['real_name']; + } + + /** + * Sets real_name + * + * @param string|null $real_name real_name + * + * @return self + */ + public function setRealName($real_name) + { + if (is_null($real_name)) { + throw new \InvalidArgumentException('non-nullable real_name cannot be null'); + } + $this->container['real_name'] = $real_name; + + 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/SpotConfiguration.php b/src/Model/SpotConfiguration.php index 178bad1..0ad3b3c 100644 --- a/src/Model/SpotConfiguration.php +++ b/src/Model/SpotConfiguration.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/SubmitToolCallback200Response.php b/src/Model/SubmitToolCallback200Response.php index b3a36c7..28deea6 100644 --- a/src/Model/SubmitToolCallback200Response.php +++ b/src/Model/SubmitToolCallback200Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/SubmitToolCallbackRequest.php b/src/Model/SubmitToolCallbackRequest.php index e70f37c..9736bab 100644 --- a/src/Model/SubmitToolCallbackRequest.php +++ b/src/Model/SubmitToolCallbackRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/SubmitToolCallbackRequestToolResultsInner.php b/src/Model/SubmitToolCallbackRequestToolResultsInner.php index 617438b..ecd6fe8 100644 --- a/src/Model/SubmitToolCallbackRequestToolResultsInner.php +++ b/src/Model/SubmitToolCallbackRequestToolResultsInner.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/SyncOperation.php b/src/Model/SyncOperation.php index da9f8a8..f609ccb 100644 --- a/src/Model/SyncOperation.php +++ b/src/Model/SyncOperation.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/SyncSkillCollection200Response.php b/src/Model/SyncSkillCollection200Response.php new file mode 100644 index 0000000..5ff85d2 --- /dev/null +++ b/src/Model/SyncSkillCollection200Response.php @@ -0,0 +1,579 @@ + + */ +class SyncSkillCollection200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'syncSkillCollection_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'namespace' => 'string', + 'synced' => 'int', + 'created' => 'int', + 'failed' => 'int', + 'removed_from_source' => 'string[]', + 'skills' => 'object[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'namespace' => null, + 'synced' => null, + 'created' => null, + 'failed' => null, + 'removed_from_source' => null, + 'skills' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'namespace' => false, + 'synced' => false, + 'created' => false, + 'failed' => false, + 'removed_from_source' => false, + 'skills' => 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 = [ + 'namespace' => 'namespace', + 'synced' => 'synced', + 'created' => 'created', + 'failed' => 'failed', + 'removed_from_source' => 'removedFromSource', + 'skills' => 'skills' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'namespace' => 'setNamespace', + 'synced' => 'setSynced', + 'created' => 'setCreated', + 'failed' => 'setFailed', + 'removed_from_source' => 'setRemovedFromSource', + 'skills' => 'setSkills' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'namespace' => 'getNamespace', + 'synced' => 'getSynced', + 'created' => 'getCreated', + 'failed' => 'getFailed', + 'removed_from_source' => 'getRemovedFromSource', + 'skills' => 'getSkills' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('namespace', $data ?? [], null); + $this->setIfExists('synced', $data ?? [], null); + $this->setIfExists('created', $data ?? [], null); + $this->setIfExists('failed', $data ?? [], null); + $this->setIfExists('removed_from_source', $data ?? [], null); + $this->setIfExists('skills', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets namespace + * + * @return string|null + */ + public function getNamespace() + { + return $this->container['namespace']; + } + + /** + * Sets namespace + * + * @param string|null $namespace namespace + * + * @return self + */ + public function setNamespace($namespace) + { + if (is_null($namespace)) { + throw new \InvalidArgumentException('non-nullable namespace cannot be null'); + } + $this->container['namespace'] = $namespace; + + return $this; + } + + /** + * Gets synced + * + * @return int|null + */ + public function getSynced() + { + return $this->container['synced']; + } + + /** + * Sets synced + * + * @param int|null $synced synced + * + * @return self + */ + public function setSynced($synced) + { + if (is_null($synced)) { + throw new \InvalidArgumentException('non-nullable synced cannot be null'); + } + $this->container['synced'] = $synced; + + return $this; + } + + /** + * Gets created + * + * @return int|null + */ + public function getCreated() + { + return $this->container['created']; + } + + /** + * Sets created + * + * @param int|null $created created + * + * @return self + */ + public function setCreated($created) + { + if (is_null($created)) { + throw new \InvalidArgumentException('non-nullable created cannot be null'); + } + $this->container['created'] = $created; + + return $this; + } + + /** + * Gets failed + * + * @return int|null + */ + public function getFailed() + { + return $this->container['failed']; + } + + /** + * Sets failed + * + * @param int|null $failed failed + * + * @return self + */ + public function setFailed($failed) + { + if (is_null($failed)) { + throw new \InvalidArgumentException('non-nullable failed cannot be null'); + } + $this->container['failed'] = $failed; + + return $this; + } + + /** + * Gets removed_from_source + * + * @return string[]|null + */ + public function getRemovedFromSource() + { + return $this->container['removed_from_source']; + } + + /** + * Sets removed_from_source + * + * @param string[]|null $removed_from_source removed_from_source + * + * @return self + */ + public function setRemovedFromSource($removed_from_source) + { + if (is_null($removed_from_source)) { + throw new \InvalidArgumentException('non-nullable removed_from_source cannot be null'); + } + $this->container['removed_from_source'] = $removed_from_source; + + return $this; + } + + /** + * Gets skills + * + * @return object[]|null + */ + public function getSkills() + { + return $this->container['skills']; + } + + /** + * Sets skills + * + * @param object[]|null $skills skills + * + * @return self + */ + public function setSkills($skills) + { + if (is_null($skills)) { + throw new \InvalidArgumentException('non-nullable skills cannot be null'); + } + $this->container['skills'] = $skills; + + 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/SyncToEnvironmentRequest.php b/src/Model/SyncToEnvironmentRequest.php index f518b34..101ae0a 100644 --- a/src/Model/SyncToEnvironmentRequest.php +++ b/src/Model/SyncToEnvironmentRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/TokensCreate201Response.php b/src/Model/TokensCreate201Response.php new file mode 100644 index 0000000..309cd03 --- /dev/null +++ b/src/Model/TokensCreate201Response.php @@ -0,0 +1,675 @@ + + */ +class TokensCreate201Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Tokens_create_201_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'token' => 'string', + 'id' => 'int', + 'name' => 'string', + 'scopes' => 'string[]', + 'projects' => 'int[]', + 'preset' => 'string', + 'expires_at' => '\DateTime', + 'created_at' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'token' => null, + 'id' => null, + 'name' => null, + 'scopes' => null, + 'projects' => null, + 'preset' => null, + 'expires_at' => 'date-time', + 'created_at' => 'date-time' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'token' => false, + 'id' => false, + 'name' => false, + 'scopes' => true, + 'projects' => true, + 'preset' => true, + 'expires_at' => true, + 'created_at' => 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 = [ + 'token' => 'token', + 'id' => 'id', + 'name' => 'name', + 'scopes' => 'scopes', + 'projects' => 'projects', + 'preset' => 'preset', + 'expires_at' => 'expires_at', + 'created_at' => 'created_at' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'token' => 'setToken', + 'id' => 'setId', + 'name' => 'setName', + 'scopes' => 'setScopes', + 'projects' => 'setProjects', + 'preset' => 'setPreset', + 'expires_at' => 'setExpiresAt', + 'created_at' => 'setCreatedAt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'token' => 'getToken', + 'id' => 'getId', + 'name' => 'getName', + 'scopes' => 'getScopes', + 'projects' => 'getProjects', + 'preset' => 'getPreset', + 'expires_at' => 'getExpiresAt', + 'created_at' => 'getCreatedAt' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('token', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('scopes', $data ?? [], null); + $this->setIfExists('projects', $data ?? [], null); + $this->setIfExists('preset', $data ?? [], null); + $this->setIfExists('expires_at', $data ?? [], null); + $this->setIfExists('created_at', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets token + * + * @return string|null + */ + public function getToken() + { + return $this->container['token']; + } + + /** + * Sets token + * + * @param string|null $token The plain text token (shown once) + * + * @return self + */ + public function setToken($token) + { + if (is_null($token)) { + throw new \InvalidArgumentException('non-nullable token cannot be null'); + } + $this->container['token'] = $token; + + return $this; + } + + /** + * Gets id + * + * @return int|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id Token ID + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return self + */ + public function setName($name) + { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets scopes + * + * @return string[]|null + */ + public function getScopes() + { + return $this->container['scopes']; + } + + /** + * Sets scopes + * + * @param string[]|null $scopes scopes + * + * @return self + */ + public function setScopes($scopes) + { + if (is_null($scopes)) { + array_push($this->openAPINullablesSetToNull, 'scopes'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('scopes', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['scopes'] = $scopes; + + return $this; + } + + /** + * Gets projects + * + * @return int[]|null + */ + public function getProjects() + { + return $this->container['projects']; + } + + /** + * Sets projects + * + * @param int[]|null $projects projects + * + * @return self + */ + public function setProjects($projects) + { + if (is_null($projects)) { + array_push($this->openAPINullablesSetToNull, 'projects'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('projects', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['projects'] = $projects; + + return $this; + } + + /** + * Gets preset + * + * @return string|null + */ + public function getPreset() + { + return $this->container['preset']; + } + + /** + * Sets preset + * + * @param string|null $preset preset + * + * @return self + */ + public function setPreset($preset) + { + if (is_null($preset)) { + array_push($this->openAPINullablesSetToNull, 'preset'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('preset', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['preset'] = $preset; + + return $this; + } + + /** + * Gets expires_at + * + * @return \DateTime|null + */ + public function getExpiresAt() + { + return $this->container['expires_at']; + } + + /** + * Sets expires_at + * + * @param \DateTime|null $expires_at expires_at + * + * @return self + */ + public function setExpiresAt($expires_at) + { + if (is_null($expires_at)) { + array_push($this->openAPINullablesSetToNull, 'expires_at'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('expires_at', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['expires_at'] = $expires_at; + + return $this; + } + + /** + * Gets created_at + * + * @return \DateTime|null + */ + public function getCreatedAt() + { + return $this->container['created_at']; + } + + /** + * Sets created_at + * + * @param \DateTime|null $created_at created_at + * + * @return self + */ + public function setCreatedAt($created_at) + { + if (is_null($created_at)) { + throw new \InvalidArgumentException('non-nullable created_at cannot be null'); + } + $this->container['created_at'] = $created_at; + + 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/TokensCreateRequest.php b/src/Model/TokensCreateRequest.php new file mode 100644 index 0000000..9f369ff --- /dev/null +++ b/src/Model/TokensCreateRequest.php @@ -0,0 +1,614 @@ + + */ +class TokensCreateRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Tokens_create_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'name' => 'string', + 'preset' => 'string', + 'scopes' => 'string[]', + 'projects' => 'int[]', + 'expires_in' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'name' => null, + 'preset' => null, + 'scopes' => null, + 'projects' => null, + 'expires_in' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'name' => false, + 'preset' => true, + 'scopes' => true, + 'projects' => true, + 'expires_in' => true + ]; + + /** + * 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 = [ + 'name' => 'name', + 'preset' => 'preset', + 'scopes' => 'scopes', + 'projects' => 'projects', + 'expires_in' => 'expires_in' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'preset' => 'setPreset', + 'scopes' => 'setScopes', + 'projects' => 'setProjects', + 'expires_in' => 'setExpiresIn' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'preset' => 'getPreset', + 'scopes' => 'getScopes', + 'projects' => 'getProjects', + 'expires_in' => 'getExpiresIn' + ]; + + /** + * 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 EXPIRES_IN__30D = '30d'; + public const EXPIRES_IN__90D = '90d'; + public const EXPIRES_IN__365D = '365d'; + public const EXPIRES_IN_NEVER = 'never'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getExpiresInAllowableValues() + { + return [ + self::EXPIRES_IN__30D, + self::EXPIRES_IN__90D, + self::EXPIRES_IN__365D, + self::EXPIRES_IN_NEVER, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('preset', $data ?? [], null); + $this->setIfExists('scopes', $data ?? [], null); + $this->setIfExists('projects', $data ?? [], null); + $this->setIfExists('expires_in', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param 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['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + $allowedValues = $this->getExpiresInAllowableValues(); + if (!is_null($this->container['expires_in']) && !in_array($this->container['expires_in'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'expires_in', must be one of '%s'", + $this->container['expires_in'], + implode("', '", $allowedValues) + ); + } + + 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 name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name for the token + * + * @return self + */ + public function setName($name) + { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets preset + * + * @return string|null + */ + public function getPreset() + { + return $this->container['preset']; + } + + /** + * Sets preset + * + * @param string|null $preset Preset scope bundle + * + * @return self + */ + public function setPreset($preset) + { + if (is_null($preset)) { + array_push($this->openAPINullablesSetToNull, 'preset'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('preset', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['preset'] = $preset; + + return $this; + } + + /** + * Gets scopes + * + * @return string[]|null + */ + public function getScopes() + { + return $this->container['scopes']; + } + + /** + * Sets scopes + * + * @param string[]|null $scopes Individual scopes (mutually exclusive with preset) + * + * @return self + */ + public function setScopes($scopes) + { + if (is_null($scopes)) { + array_push($this->openAPINullablesSetToNull, 'scopes'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('scopes', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['scopes'] = $scopes; + + return $this; + } + + /** + * Gets projects + * + * @return int[]|null + */ + public function getProjects() + { + return $this->container['projects']; + } + + /** + * Sets projects + * + * @param int[]|null $projects Project IDs to restrict this token to + * + * @return self + */ + public function setProjects($projects) + { + if (is_null($projects)) { + array_push($this->openAPINullablesSetToNull, 'projects'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('projects', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['projects'] = $projects; + + return $this; + } + + /** + * Gets expires_in + * + * @return string|null + */ + public function getExpiresIn() + { + return $this->container['expires_in']; + } + + /** + * Sets expires_in + * + * @param string|null $expires_in Token expiration period + * + * @return self + */ + public function setExpiresIn($expires_in) + { + if (is_null($expires_in)) { + array_push($this->openAPINullablesSetToNull, 'expires_in'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('expires_in', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $allowedValues = $this->getExpiresInAllowableValues(); + if (!is_null($expires_in) && !in_array($expires_in, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'expires_in', must be one of '%s'", + $expires_in, + implode("', '", $allowedValues) + ) + ); + } + $this->container['expires_in'] = $expires_in; + + 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/TokensDelete200Response.php b/src/Model/TokensDelete200Response.php new file mode 100644 index 0000000..7c92522 --- /dev/null +++ b/src/Model/TokensDelete200Response.php @@ -0,0 +1,409 @@ + + */ +class TokensDelete200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Tokens_delete_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'message' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'message' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'message' => 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 = [ + 'message' => 'message' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'message' => 'setMessage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'message' => 'getMessage' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('message', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message message + * + * @return self + */ + public function setMessage($message) + { + if (is_null($message)) { + throw new \InvalidArgumentException('non-nullable message cannot be null'); + } + $this->container['message'] = $message; + + 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/TokensList200ResponseInner.php b/src/Model/TokensList200ResponseInner.php new file mode 100644 index 0000000..2da6391 --- /dev/null +++ b/src/Model/TokensList200ResponseInner.php @@ -0,0 +1,518 @@ + + */ +class TokensList200ResponseInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Tokens_list_200_response_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'int', + 'name' => 'string', + 'last_used' => '\DateTime', + 'created_at' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'name' => null, + 'last_used' => 'date-time', + 'created_at' => 'date-time' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'name' => false, + 'last_used' => true, + 'created_at' => 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 = [ + 'id' => 'id', + 'name' => 'name', + 'last_used' => 'last_used', + 'created_at' => 'created_at' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'last_used' => 'setLastUsed', + 'created_at' => 'setCreatedAt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'last_used' => 'getLastUsed', + 'created_at' => 'getCreatedAt' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('last_used', $data ?? [], null); + $this->setIfExists('created_at', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id id + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return self + */ + public function setName($name) + { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets last_used + * + * @return \DateTime|null + */ + public function getLastUsed() + { + return $this->container['last_used']; + } + + /** + * Sets last_used + * + * @param \DateTime|null $last_used last_used + * + * @return self + */ + public function setLastUsed($last_used) + { + if (is_null($last_used)) { + array_push($this->openAPINullablesSetToNull, 'last_used'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('last_used', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['last_used'] = $last_used; + + return $this; + } + + /** + * Gets created_at + * + * @return \DateTime|null + */ + public function getCreatedAt() + { + return $this->container['created_at']; + } + + /** + * Sets created_at + * + * @param \DateTime|null $created_at created_at + * + * @return self + */ + public function setCreatedAt($created_at) + { + if (is_null($created_at)) { + throw new \InvalidArgumentException('non-nullable created_at cannot be null'); + } + $this->container['created_at'] = $created_at; + + 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/UpdateAIAgent200Response.php b/src/Model/UpdateAIAgent200Response.php index 23d7a0d..759549b 100644 --- a/src/Model/UpdateAIAgent200Response.php +++ b/src/Model/UpdateAIAgent200Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/UpdateAIAgentRequest.php b/src/Model/UpdateAIAgentRequest.php index 534f210..3765212 100644 --- a/src/Model/UpdateAIAgentRequest.php +++ b/src/Model/UpdateAIAgentRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ @@ -65,7 +65,11 @@ class UpdateAIAgentRequest implements ModelInterface, ArrayAccess, \JsonSerializ 'model_id' => 'string', 'max_tokens' => 'int', 'allowed_tools' => 'string[]', - 'allowed_collections' => 'string[]' + 'allowed_collections' => 'string[]', + 'assigned_skills' => 'string[]', + 'long_context' => 'bool', + 'guardrail_preset' => 'string', + 'filter_policies' => 'string[]' ]; /** @@ -84,7 +88,11 @@ class UpdateAIAgentRequest implements ModelInterface, ArrayAccess, \JsonSerializ 'model_id' => null, 'max_tokens' => null, 'allowed_tools' => null, - 'allowed_collections' => null + 'allowed_collections' => null, + 'assigned_skills' => null, + 'long_context' => null, + 'guardrail_preset' => null, + 'filter_policies' => null ]; /** @@ -101,7 +109,11 @@ class UpdateAIAgentRequest implements ModelInterface, ArrayAccess, \JsonSerializ 'model_id' => false, 'max_tokens' => false, 'allowed_tools' => false, - 'allowed_collections' => false + 'allowed_collections' => false, + 'assigned_skills' => false, + 'long_context' => false, + 'guardrail_preset' => false, + 'filter_policies' => false ]; /** @@ -198,7 +210,11 @@ public function isNullableSetToNull(string $property): bool 'model_id' => 'modelId', 'max_tokens' => 'maxTokens', 'allowed_tools' => 'allowedTools', - 'allowed_collections' => 'allowedCollections' + 'allowed_collections' => 'allowedCollections', + 'assigned_skills' => 'assignedSkills', + 'long_context' => 'longContext', + 'guardrail_preset' => 'guardrailPreset', + 'filter_policies' => 'filterPolicies' ]; /** @@ -215,7 +231,11 @@ public function isNullableSetToNull(string $property): bool 'model_id' => 'setModelId', 'max_tokens' => 'setMaxTokens', 'allowed_tools' => 'setAllowedTools', - 'allowed_collections' => 'setAllowedCollections' + 'allowed_collections' => 'setAllowedCollections', + 'assigned_skills' => 'setAssignedSkills', + 'long_context' => 'setLongContext', + 'guardrail_preset' => 'setGuardrailPreset', + 'filter_policies' => 'setFilterPolicies' ]; /** @@ -232,7 +252,11 @@ public function isNullableSetToNull(string $property): bool 'model_id' => 'getModelId', 'max_tokens' => 'getMaxTokens', 'allowed_tools' => 'getAllowedTools', - 'allowed_collections' => 'getAllowedCollections' + 'allowed_collections' => 'getAllowedCollections', + 'assigned_skills' => 'getAssignedSkills', + 'long_context' => 'getLongContext', + 'guardrail_preset' => 'getGuardrailPreset', + 'filter_policies' => 'getFilterPolicies' ]; /** @@ -276,6 +300,23 @@ public function getModelName() return self::$openAPIModelName; } + public const GUARDRAIL_PRESET_OFFICIAL = 'official'; + public const GUARDRAIL_PRESET_OFFICIAL_SENSITIVE = 'official-sensitive'; + public const GUARDRAIL_PRESET__PROTECTED = 'protected'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getGuardrailPresetAllowableValues() + { + return [ + self::GUARDRAIL_PRESET_OFFICIAL, + self::GUARDRAIL_PRESET_OFFICIAL_SENSITIVE, + self::GUARDRAIL_PRESET__PROTECTED, + ]; + } /** * Associative array for storing property values @@ -301,6 +342,10 @@ public function __construct(?array $data = null) $this->setIfExists('max_tokens', $data ?? [], null); $this->setIfExists('allowed_tools', $data ?? [], null); $this->setIfExists('allowed_collections', $data ?? [], null); + $this->setIfExists('assigned_skills', $data ?? [], null); + $this->setIfExists('long_context', $data ?? [], null); + $this->setIfExists('guardrail_preset', $data ?? [], null); + $this->setIfExists('filter_policies', $data ?? [], null); } /** @@ -346,6 +391,15 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'max_tokens', must be bigger than or equal to 1."; } + $allowedValues = $this->getGuardrailPresetAllowableValues(); + if (!is_null($this->container['guardrail_preset']) && !in_array($this->container['guardrail_preset'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'guardrail_preset', must be one of '%s'", + $this->container['guardrail_preset'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -619,6 +673,124 @@ public function setAllowedCollections($allowed_collections) return $this; } + + /** + * Gets assigned_skills + * + * @return string[]|null + */ + public function getAssignedSkills() + { + return $this->container['assigned_skills']; + } + + /** + * Sets assigned_skills + * + * @param string[]|null $assigned_skills Skill IDs to assign to this agent + * + * @return self + */ + public function setAssignedSkills($assigned_skills) + { + if (is_null($assigned_skills)) { + throw new \InvalidArgumentException('non-nullable assigned_skills cannot be null'); + } + $this->container['assigned_skills'] = $assigned_skills; + + return $this; + } + + /** + * Gets long_context + * + * @return bool|null + */ + public function getLongContext() + { + return $this->container['long_context']; + } + + /** + * Sets long_context + * + * @param bool|null $long_context Enable 1M context window support + * + * @return self + */ + public function setLongContext($long_context) + { + if (is_null($long_context)) { + throw new \InvalidArgumentException('non-nullable long_context cannot be null'); + } + $this->container['long_context'] = $long_context; + + return $this; + } + + /** + * Gets guardrail_preset + * + * @return string|null + */ + public function getGuardrailPreset() + { + return $this->container['guardrail_preset']; + } + + /** + * Sets guardrail_preset + * + * @param string|null $guardrail_preset Guardrail preset name + * + * @return self + */ + public function setGuardrailPreset($guardrail_preset) + { + if (is_null($guardrail_preset)) { + throw new \InvalidArgumentException('non-nullable guardrail_preset cannot be null'); + } + $allowedValues = $this->getGuardrailPresetAllowableValues(); + if (!in_array($guardrail_preset, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'guardrail_preset', must be one of '%s'", + $guardrail_preset, + implode("', '", $allowedValues) + ) + ); + } + $this->container['guardrail_preset'] = $guardrail_preset; + + return $this; + } + + /** + * Gets filter_policies + * + * @return string[]|null + */ + public function getFilterPolicies() + { + return $this->container['filter_policies']; + } + + /** + * Sets filter_policies + * + * @param string[]|null $filter_policies Filter policy IDs to apply to this agent's inference requests + * + * @return self + */ + public function setFilterPolicies($filter_policies) + { + if (is_null($filter_policies)) { + throw new \InvalidArgumentException('non-nullable filter_policies cannot be null'); + } + $this->container['filter_policies'] = $filter_policies; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/UpdateAISession200Response.php b/src/Model/UpdateAISession200Response.php index e583541..dc1af57 100644 --- a/src/Model/UpdateAISession200Response.php +++ b/src/Model/UpdateAISession200Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/UpdateAISessionRequest.php b/src/Model/UpdateAISessionRequest.php index d263327..11a01c3 100644 --- a/src/Model/UpdateAISessionRequest.php +++ b/src/Model/UpdateAISessionRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/UpdateAISessionRequestNewMessagesInner.php b/src/Model/UpdateAISessionRequestNewMessagesInner.php index 6998816..b484152 100644 --- a/src/Model/UpdateAISessionRequestNewMessagesInner.php +++ b/src/Model/UpdateAISessionRequestNewMessagesInner.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/UpdateCronJobRequest.php b/src/Model/UpdateCronJobRequest.php index fba9c75..14bb165 100644 --- a/src/Model/UpdateCronJobRequest.php +++ b/src/Model/UpdateCronJobRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/UpdateEnvironmentRequest.php b/src/Model/UpdateEnvironmentRequest.php index 69b46f4..7f1fff5 100644 --- a/src/Model/UpdateEnvironmentRequest.php +++ b/src/Model/UpdateEnvironmentRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/UpdateEnvironmentStateRequest.php b/src/Model/UpdateEnvironmentStateRequest.php index c904593..db2f4a2 100644 --- a/src/Model/UpdateEnvironmentStateRequest.php +++ b/src/Model/UpdateEnvironmentStateRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/UpdateEnvironmentVariableRequest.php b/src/Model/UpdateEnvironmentVariableRequest.php index 542d671..478ede7 100644 --- a/src/Model/UpdateEnvironmentVariableRequest.php +++ b/src/Model/UpdateEnvironmentVariableRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/UpdateFilterPolicyRequest.php b/src/Model/UpdateFilterPolicyRequest.php new file mode 100644 index 0000000..6569d5f --- /dev/null +++ b/src/Model/UpdateFilterPolicyRequest.php @@ -0,0 +1,549 @@ + + */ +class UpdateFilterPolicyRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'updateFilterPolicy_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'name' => 'string', + 'description' => 'string', + 'enabled' => 'bool', + 'rules' => '\QuantClient\Model\CreateFilterPolicyRequestRulesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'name' => null, + 'description' => null, + 'enabled' => null, + 'rules' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'name' => false, + 'description' => true, + 'enabled' => false, + 'rules' => 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 = [ + 'name' => 'name', + 'description' => 'description', + 'enabled' => 'enabled', + 'rules' => 'rules' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'description' => 'setDescription', + 'enabled' => 'setEnabled', + 'rules' => 'setRules' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'description' => 'getDescription', + 'enabled' => 'getEnabled', + 'rules' => 'getRules' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('enabled', $data ?? [], null); + $this->setIfExists('rules', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param 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 (!is_null($this->container['name']) && (mb_strlen($this->container['name']) > 255)) { + $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 255."; + } + + if (!is_null($this->container['description']) && (mb_strlen($this->container['description']) > 1000)) { + $invalidProperties[] = "invalid value for 'description', the character length must be smaller than or equal to 1000."; + } + + if (!is_null($this->container['rules']) && (count($this->container['rules']) > 100)) { + $invalidProperties[] = "invalid value for 'rules', number of items must be less than or equal to 100."; + } + + if (!is_null($this->container['rules']) && (count($this->container['rules']) < 1)) { + $invalidProperties[] = "invalid value for 'rules', number of items must be greater 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 name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return self + */ + public function setName($name) + { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + if ((mb_strlen($name) > 255)) { + throw new \InvalidArgumentException('invalid length for $name when calling UpdateFilterPolicyRequest., must be smaller than or equal to 255.'); + } + + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description description + * + * @return self + */ + public function setDescription($description) + { + if (is_null($description)) { + array_push($this->openAPINullablesSetToNull, 'description'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('description', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($description) && (mb_strlen($description) > 1000)) { + throw new \InvalidArgumentException('invalid length for $description when calling UpdateFilterPolicyRequest., must be smaller than or equal to 1000.'); + } + + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets enabled + * + * @return bool|null + */ + public function getEnabled() + { + return $this->container['enabled']; + } + + /** + * Sets enabled + * + * @param bool|null $enabled enabled + * + * @return self + */ + public function setEnabled($enabled) + { + if (is_null($enabled)) { + throw new \InvalidArgumentException('non-nullable enabled cannot be null'); + } + $this->container['enabled'] = $enabled; + + return $this; + } + + /** + * Gets rules + * + * @return \QuantClient\Model\CreateFilterPolicyRequestRulesInner[]|null + */ + public function getRules() + { + return $this->container['rules']; + } + + /** + * Sets rules + * + * @param \QuantClient\Model\CreateFilterPolicyRequestRulesInner[]|null $rules rules + * + * @return self + */ + public function setRules($rules) + { + if (is_null($rules)) { + throw new \InvalidArgumentException('non-nullable rules cannot be null'); + } + + if ((count($rules) > 100)) { + throw new \InvalidArgumentException('invalid value for $rules when calling UpdateFilterPolicyRequest., number of items must be less than or equal to 100.'); + } + if ((count($rules) < 1)) { + throw new \InvalidArgumentException('invalid length for $rules when calling UpdateFilterPolicyRequest., number of items must be greater than or equal to 1.'); + } + $this->container['rules'] = $rules; + + 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/UpdateGovernanceConfig200Response.php b/src/Model/UpdateGovernanceConfig200Response.php new file mode 100644 index 0000000..74b0f11 --- /dev/null +++ b/src/Model/UpdateGovernanceConfig200Response.php @@ -0,0 +1,443 @@ + + */ +class UpdateGovernanceConfig200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'updateGovernanceConfig_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'success' => 'bool', + 'config' => 'object' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'success' => null, + 'config' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'success' => false, + 'config' => 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 = [ + 'success' => 'success', + 'config' => 'config' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'success' => 'setSuccess', + 'config' => 'setConfig' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'success' => 'getSuccess', + 'config' => 'getConfig' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('success', $data ?? [], null); + $this->setIfExists('config', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets success + * + * @return bool|null + */ + public function getSuccess() + { + return $this->container['success']; + } + + /** + * Sets success + * + * @param bool|null $success success + * + * @return self + */ + public function setSuccess($success) + { + if (is_null($success)) { + throw new \InvalidArgumentException('non-nullable success cannot be null'); + } + $this->container['success'] = $success; + + return $this; + } + + /** + * Gets config + * + * @return object|null + */ + public function getConfig() + { + return $this->container['config']; + } + + /** + * Sets config + * + * @param object|null $config config + * + * @return self + */ + public function setConfig($config) + { + if (is_null($config)) { + throw new \InvalidArgumentException('non-nullable config cannot be null'); + } + $this->container['config'] = $config; + + 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/UpdateGovernanceConfigRequest.php b/src/Model/UpdateGovernanceConfigRequest.php new file mode 100644 index 0000000..698a5c5 --- /dev/null +++ b/src/Model/UpdateGovernanceConfigRequest.php @@ -0,0 +1,698 @@ + + */ +class UpdateGovernanceConfigRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'updateGovernanceConfig_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'ai_enabled' => 'bool', + 'model_policy' => 'string', + 'model_list' => 'string[]', + 'mandatory_guardrail_preset' => 'string', + 'mandatory_filter_policies' => 'string[]', + 'spend_limits' => 'object', + 'version' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'ai_enabled' => null, + 'model_policy' => null, + 'model_list' => null, + 'mandatory_guardrail_preset' => null, + 'mandatory_filter_policies' => null, + 'spend_limits' => null, + 'version' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'ai_enabled' => false, + 'model_policy' => false, + 'model_list' => false, + 'mandatory_guardrail_preset' => true, + 'mandatory_filter_policies' => false, + 'spend_limits' => false, + 'version' => 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 = [ + 'ai_enabled' => 'aiEnabled', + 'model_policy' => 'modelPolicy', + 'model_list' => 'modelList', + 'mandatory_guardrail_preset' => 'mandatoryGuardrailPreset', + 'mandatory_filter_policies' => 'mandatoryFilterPolicies', + 'spend_limits' => 'spendLimits', + 'version' => 'version' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'ai_enabled' => 'setAiEnabled', + 'model_policy' => 'setModelPolicy', + 'model_list' => 'setModelList', + 'mandatory_guardrail_preset' => 'setMandatoryGuardrailPreset', + 'mandatory_filter_policies' => 'setMandatoryFilterPolicies', + 'spend_limits' => 'setSpendLimits', + 'version' => 'setVersion' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'ai_enabled' => 'getAiEnabled', + 'model_policy' => 'getModelPolicy', + 'model_list' => 'getModelList', + 'mandatory_guardrail_preset' => 'getMandatoryGuardrailPreset', + 'mandatory_filter_policies' => 'getMandatoryFilterPolicies', + 'spend_limits' => 'getSpendLimits', + 'version' => 'getVersion' + ]; + + /** + * 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 MODEL_POLICY_UNRESTRICTED = 'unrestricted'; + public const MODEL_POLICY_ALLOWLIST = 'allowlist'; + public const MODEL_POLICY_BLOCKLIST = 'blocklist'; + public const MANDATORY_GUARDRAIL_PRESET_OFFICIAL = 'official'; + public const MANDATORY_GUARDRAIL_PRESET_OFFICIAL_SENSITIVE = 'official-sensitive'; + public const MANDATORY_GUARDRAIL_PRESET__PROTECTED = 'protected'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getModelPolicyAllowableValues() + { + return [ + self::MODEL_POLICY_UNRESTRICTED, + self::MODEL_POLICY_ALLOWLIST, + self::MODEL_POLICY_BLOCKLIST, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getMandatoryGuardrailPresetAllowableValues() + { + return [ + self::MANDATORY_GUARDRAIL_PRESET_OFFICIAL, + self::MANDATORY_GUARDRAIL_PRESET_OFFICIAL_SENSITIVE, + self::MANDATORY_GUARDRAIL_PRESET__PROTECTED, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('ai_enabled', $data ?? [], null); + $this->setIfExists('model_policy', $data ?? [], null); + $this->setIfExists('model_list', $data ?? [], null); + $this->setIfExists('mandatory_guardrail_preset', $data ?? [], null); + $this->setIfExists('mandatory_filter_policies', $data ?? [], null); + $this->setIfExists('spend_limits', $data ?? [], null); + $this->setIfExists('version', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param 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['ai_enabled'] === null) { + $invalidProperties[] = "'ai_enabled' can't be null"; + } + if ($this->container['model_policy'] === null) { + $invalidProperties[] = "'model_policy' can't be null"; + } + $allowedValues = $this->getModelPolicyAllowableValues(); + if (!is_null($this->container['model_policy']) && !in_array($this->container['model_policy'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'model_policy', must be one of '%s'", + $this->container['model_policy'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getMandatoryGuardrailPresetAllowableValues(); + if (!is_null($this->container['mandatory_guardrail_preset']) && !in_array($this->container['mandatory_guardrail_preset'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'mandatory_guardrail_preset', must be one of '%s'", + $this->container['mandatory_guardrail_preset'], + implode("', '", $allowedValues) + ); + } + + 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 ai_enabled + * + * @return bool + */ + public function getAiEnabled() + { + return $this->container['ai_enabled']; + } + + /** + * Sets ai_enabled + * + * @param bool $ai_enabled ai_enabled + * + * @return self + */ + public function setAiEnabled($ai_enabled) + { + if (is_null($ai_enabled)) { + throw new \InvalidArgumentException('non-nullable ai_enabled cannot be null'); + } + $this->container['ai_enabled'] = $ai_enabled; + + return $this; + } + + /** + * Gets model_policy + * + * @return string + */ + public function getModelPolicy() + { + return $this->container['model_policy']; + } + + /** + * Sets model_policy + * + * @param string $model_policy model_policy + * + * @return self + */ + public function setModelPolicy($model_policy) + { + if (is_null($model_policy)) { + throw new \InvalidArgumentException('non-nullable model_policy cannot be null'); + } + $allowedValues = $this->getModelPolicyAllowableValues(); + if (!in_array($model_policy, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'model_policy', must be one of '%s'", + $model_policy, + implode("', '", $allowedValues) + ) + ); + } + $this->container['model_policy'] = $model_policy; + + return $this; + } + + /** + * Gets model_list + * + * @return string[]|null + */ + public function getModelList() + { + return $this->container['model_list']; + } + + /** + * Sets model_list + * + * @param string[]|null $model_list model_list + * + * @return self + */ + public function setModelList($model_list) + { + if (is_null($model_list)) { + throw new \InvalidArgumentException('non-nullable model_list cannot be null'); + } + $this->container['model_list'] = $model_list; + + return $this; + } + + /** + * Gets mandatory_guardrail_preset + * + * @return string|null + */ + public function getMandatoryGuardrailPreset() + { + return $this->container['mandatory_guardrail_preset']; + } + + /** + * Sets mandatory_guardrail_preset + * + * @param string|null $mandatory_guardrail_preset mandatory_guardrail_preset + * + * @return self + */ + public function setMandatoryGuardrailPreset($mandatory_guardrail_preset) + { + if (is_null($mandatory_guardrail_preset)) { + array_push($this->openAPINullablesSetToNull, 'mandatory_guardrail_preset'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('mandatory_guardrail_preset', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $allowedValues = $this->getMandatoryGuardrailPresetAllowableValues(); + if (!is_null($mandatory_guardrail_preset) && !in_array($mandatory_guardrail_preset, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'mandatory_guardrail_preset', must be one of '%s'", + $mandatory_guardrail_preset, + implode("', '", $allowedValues) + ) + ); + } + $this->container['mandatory_guardrail_preset'] = $mandatory_guardrail_preset; + + return $this; + } + + /** + * Gets mandatory_filter_policies + * + * @return string[]|null + */ + public function getMandatoryFilterPolicies() + { + return $this->container['mandatory_filter_policies']; + } + + /** + * Sets mandatory_filter_policies + * + * @param string[]|null $mandatory_filter_policies mandatory_filter_policies + * + * @return self + */ + public function setMandatoryFilterPolicies($mandatory_filter_policies) + { + if (is_null($mandatory_filter_policies)) { + throw new \InvalidArgumentException('non-nullable mandatory_filter_policies cannot be null'); + } + $this->container['mandatory_filter_policies'] = $mandatory_filter_policies; + + return $this; + } + + /** + * Gets spend_limits + * + * @return object|null + */ + public function getSpendLimits() + { + return $this->container['spend_limits']; + } + + /** + * Sets spend_limits + * + * @param object|null $spend_limits spend_limits + * + * @return self + */ + public function setSpendLimits($spend_limits) + { + if (is_null($spend_limits)) { + throw new \InvalidArgumentException('non-nullable spend_limits cannot be null'); + } + $this->container['spend_limits'] = $spend_limits; + + return $this; + } + + /** + * Gets version + * + * @return int|null + */ + public function getVersion() + { + return $this->container['version']; + } + + /** + * Sets version + * + * @param int|null $version version + * + * @return self + */ + public function setVersion($version) + { + if (is_null($version)) { + throw new \InvalidArgumentException('non-nullable version cannot be null'); + } + $this->container['version'] = $version; + + 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/UpdateSkill200Response.php b/src/Model/UpdateSkill200Response.php new file mode 100644 index 0000000..cbace26 --- /dev/null +++ b/src/Model/UpdateSkill200Response.php @@ -0,0 +1,477 @@ + + */ +class UpdateSkill200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'updateSkill_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'success' => 'bool', + 'skill' => 'object', + 'message' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'success' => null, + 'skill' => null, + 'message' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'success' => false, + 'skill' => false, + 'message' => 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 = [ + 'success' => 'success', + 'skill' => 'skill', + 'message' => 'message' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'success' => 'setSuccess', + 'skill' => 'setSkill', + 'message' => 'setMessage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'success' => 'getSuccess', + 'skill' => 'getSkill', + 'message' => 'getMessage' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('success', $data ?? [], null); + $this->setIfExists('skill', $data ?? [], null); + $this->setIfExists('message', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets success + * + * @return bool|null + */ + public function getSuccess() + { + return $this->container['success']; + } + + /** + * Sets success + * + * @param bool|null $success success + * + * @return self + */ + public function setSuccess($success) + { + if (is_null($success)) { + throw new \InvalidArgumentException('non-nullable success cannot be null'); + } + $this->container['success'] = $success; + + return $this; + } + + /** + * Gets skill + * + * @return object|null + */ + public function getSkill() + { + return $this->container['skill']; + } + + /** + * Sets skill + * + * @param object|null $skill skill + * + * @return self + */ + public function setSkill($skill) + { + if (is_null($skill)) { + throw new \InvalidArgumentException('non-nullable skill cannot be null'); + } + $this->container['skill'] = $skill; + + return $this; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message message + * + * @return self + */ + public function setMessage($message) + { + if (is_null($message)) { + throw new \InvalidArgumentException('non-nullable message cannot be null'); + } + $this->container['message'] = $message; + + 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/UpdateSkillRequest.php b/src/Model/UpdateSkillRequest.php new file mode 100644 index 0000000..4a34f1b --- /dev/null +++ b/src/Model/UpdateSkillRequest.php @@ -0,0 +1,749 @@ + + */ +class UpdateSkillRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'updateSkill_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'name' => 'string', + 'description' => 'string', + 'content' => 'string', + 'trigger_condition' => 'string', + 'tags' => 'string[]', + 'required_tools' => 'string[]', + 'source' => 'object', + 'files' => 'object', + 'disable_model_invocation' => 'bool', + 'allowed_tools' => 'string[]', + 'namespace' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'name' => null, + 'description' => null, + 'content' => null, + 'trigger_condition' => null, + 'tags' => null, + 'required_tools' => null, + 'source' => null, + 'files' => null, + 'disable_model_invocation' => null, + 'allowed_tools' => null, + 'namespace' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'name' => false, + 'description' => false, + 'content' => false, + 'trigger_condition' => false, + 'tags' => false, + 'required_tools' => false, + 'source' => false, + 'files' => false, + 'disable_model_invocation' => false, + 'allowed_tools' => false, + 'namespace' => 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 = [ + 'name' => 'name', + 'description' => 'description', + 'content' => 'content', + 'trigger_condition' => 'triggerCondition', + 'tags' => 'tags', + 'required_tools' => 'requiredTools', + 'source' => 'source', + 'files' => 'files', + 'disable_model_invocation' => 'disableModelInvocation', + 'allowed_tools' => 'allowedTools', + 'namespace' => 'namespace' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'description' => 'setDescription', + 'content' => 'setContent', + 'trigger_condition' => 'setTriggerCondition', + 'tags' => 'setTags', + 'required_tools' => 'setRequiredTools', + 'source' => 'setSource', + 'files' => 'setFiles', + 'disable_model_invocation' => 'setDisableModelInvocation', + 'allowed_tools' => 'setAllowedTools', + 'namespace' => 'setNamespace' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'description' => 'getDescription', + 'content' => 'getContent', + 'trigger_condition' => 'getTriggerCondition', + 'tags' => 'getTags', + 'required_tools' => 'getRequiredTools', + 'source' => 'getSource', + 'files' => 'getFiles', + 'disable_model_invocation' => 'getDisableModelInvocation', + 'allowed_tools' => 'getAllowedTools', + 'namespace' => 'getNamespace' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('content', $data ?? [], null); + $this->setIfExists('trigger_condition', $data ?? [], null); + $this->setIfExists('tags', $data ?? [], null); + $this->setIfExists('required_tools', $data ?? [], null); + $this->setIfExists('source', $data ?? [], null); + $this->setIfExists('files', $data ?? [], null); + $this->setIfExists('disable_model_invocation', $data ?? [], null); + $this->setIfExists('allowed_tools', $data ?? [], null); + $this->setIfExists('namespace', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return self + */ + public function setName($name) + { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description description + * + * @return self + */ + public function setDescription($description) + { + if (is_null($description)) { + throw new \InvalidArgumentException('non-nullable description cannot be null'); + } + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets content + * + * @return string|null + */ + public function getContent() + { + return $this->container['content']; + } + + /** + * Sets content + * + * @param string|null $content content + * + * @return self + */ + public function setContent($content) + { + if (is_null($content)) { + throw new \InvalidArgumentException('non-nullable content cannot be null'); + } + $this->container['content'] = $content; + + return $this; + } + + /** + * Gets trigger_condition + * + * @return string|null + */ + public function getTriggerCondition() + { + return $this->container['trigger_condition']; + } + + /** + * Sets trigger_condition + * + * @param string|null $trigger_condition trigger_condition + * + * @return self + */ + public function setTriggerCondition($trigger_condition) + { + if (is_null($trigger_condition)) { + throw new \InvalidArgumentException('non-nullable trigger_condition cannot be null'); + } + $this->container['trigger_condition'] = $trigger_condition; + + return $this; + } + + /** + * Gets tags + * + * @return string[]|null + */ + public function getTags() + { + return $this->container['tags']; + } + + /** + * Sets tags + * + * @param string[]|null $tags tags + * + * @return self + */ + public function setTags($tags) + { + if (is_null($tags)) { + throw new \InvalidArgumentException('non-nullable tags cannot be null'); + } + $this->container['tags'] = $tags; + + return $this; + } + + /** + * Gets required_tools + * + * @return string[]|null + */ + public function getRequiredTools() + { + return $this->container['required_tools']; + } + + /** + * Sets required_tools + * + * @param string[]|null $required_tools required_tools + * + * @return self + */ + public function setRequiredTools($required_tools) + { + if (is_null($required_tools)) { + throw new \InvalidArgumentException('non-nullable required_tools cannot be null'); + } + $this->container['required_tools'] = $required_tools; + + return $this; + } + + /** + * Gets source + * + * @return object|null + */ + public function getSource() + { + return $this->container['source']; + } + + /** + * Sets source + * + * @param object|null $source source + * + * @return self + */ + public function setSource($source) + { + if (is_null($source)) { + throw new \InvalidArgumentException('non-nullable source cannot be null'); + } + $this->container['source'] = $source; + + return $this; + } + + /** + * Gets files + * + * @return object|null + */ + public function getFiles() + { + return $this->container['files']; + } + + /** + * Sets files + * + * @param object|null $files files + * + * @return self + */ + public function setFiles($files) + { + if (is_null($files)) { + throw new \InvalidArgumentException('non-nullable files cannot be null'); + } + $this->container['files'] = $files; + + return $this; + } + + /** + * Gets disable_model_invocation + * + * @return bool|null + */ + public function getDisableModelInvocation() + { + return $this->container['disable_model_invocation']; + } + + /** + * Sets disable_model_invocation + * + * @param bool|null $disable_model_invocation disable_model_invocation + * + * @return self + */ + public function setDisableModelInvocation($disable_model_invocation) + { + if (is_null($disable_model_invocation)) { + throw new \InvalidArgumentException('non-nullable disable_model_invocation cannot be null'); + } + $this->container['disable_model_invocation'] = $disable_model_invocation; + + return $this; + } + + /** + * Gets allowed_tools + * + * @return string[]|null + */ + public function getAllowedTools() + { + return $this->container['allowed_tools']; + } + + /** + * Sets allowed_tools + * + * @param string[]|null $allowed_tools allowed_tools + * + * @return self + */ + public function setAllowedTools($allowed_tools) + { + if (is_null($allowed_tools)) { + throw new \InvalidArgumentException('non-nullable allowed_tools cannot be null'); + } + $this->container['allowed_tools'] = $allowed_tools; + + return $this; + } + + /** + * Gets namespace + * + * @return string|null + */ + public function getNamespace() + { + return $this->container['namespace']; + } + + /** + * Sets namespace + * + * @param string|null $namespace namespace + * + * @return self + */ + public function setNamespace($namespace) + { + if (is_null($namespace)) { + throw new \InvalidArgumentException('non-nullable namespace cannot be null'); + } + $this->container['namespace'] = $namespace; + + 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/UpdateSlackBotRequest.php b/src/Model/UpdateSlackBotRequest.php new file mode 100644 index 0000000..4e1ace0 --- /dev/null +++ b/src/Model/UpdateSlackBotRequest.php @@ -0,0 +1,663 @@ + + */ +class UpdateSlackBotRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'updateSlackBot_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'agent_id' => 'string', + 'status' => 'string', + 'session_ttl_days' => 'int', + 'allowed_channels' => 'string[]', + 'keywords_enabled' => 'bool', + 'keywords' => 'string[]', + 'slash_commands' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'agent_id' => null, + 'status' => null, + 'session_ttl_days' => null, + 'allowed_channels' => null, + 'keywords_enabled' => null, + 'keywords' => null, + 'slash_commands' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'agent_id' => false, + 'status' => false, + 'session_ttl_days' => false, + 'allowed_channels' => false, + 'keywords_enabled' => false, + 'keywords' => false, + 'slash_commands' => 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 = [ + 'agent_id' => 'agentId', + 'status' => 'status', + 'session_ttl_days' => 'sessionTtlDays', + 'allowed_channels' => 'allowedChannels', + 'keywords_enabled' => 'keywordsEnabled', + 'keywords' => 'keywords', + 'slash_commands' => 'slashCommands' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'agent_id' => 'setAgentId', + 'status' => 'setStatus', + 'session_ttl_days' => 'setSessionTtlDays', + 'allowed_channels' => 'setAllowedChannels', + 'keywords_enabled' => 'setKeywordsEnabled', + 'keywords' => 'setKeywords', + 'slash_commands' => 'setSlashCommands' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'agent_id' => 'getAgentId', + 'status' => 'getStatus', + 'session_ttl_days' => 'getSessionTtlDays', + 'allowed_channels' => 'getAllowedChannels', + 'keywords_enabled' => 'getKeywordsEnabled', + 'keywords' => 'getKeywords', + 'slash_commands' => 'getSlashCommands' + ]; + + /** + * 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 STATUS_ACTIVE = 'active'; + public const STATUS_INACTIVE = 'inactive'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_ACTIVE, + self::STATUS_INACTIVE, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('agent_id', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('session_ttl_days', $data ?? [], null); + $this->setIfExists('allowed_channels', $data ?? [], null); + $this->setIfExists('keywords_enabled', $data ?? [], null); + $this->setIfExists('keywords', $data ?? [], null); + $this->setIfExists('slash_commands', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param 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->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'status', must be one of '%s'", + $this->container['status'], + implode("', '", $allowedValues) + ); + } + + if (!is_null($this->container['session_ttl_days']) && ($this->container['session_ttl_days'] > 90)) { + $invalidProperties[] = "invalid value for 'session_ttl_days', must be smaller than or equal to 90."; + } + + if (!is_null($this->container['session_ttl_days']) && ($this->container['session_ttl_days'] < 1)) { + $invalidProperties[] = "invalid value for 'session_ttl_days', 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 agent_id + * + * @return string|null + */ + public function getAgentId() + { + return $this->container['agent_id']; + } + + /** + * Sets agent_id + * + * @param string|null $agent_id Change the backing AI agent + * + * @return self + */ + public function setAgentId($agent_id) + { + if (is_null($agent_id)) { + throw new \InvalidArgumentException('non-nullable agent_id cannot be null'); + } + $this->container['agent_id'] = $agent_id; + + return $this; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status Enable or disable the bot + * + * @return self + */ + public function setStatus($status) + { + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); + } + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets session_ttl_days + * + * @return int|null + */ + public function getSessionTtlDays() + { + return $this->container['session_ttl_days']; + } + + /** + * Sets session_ttl_days + * + * @param int|null $session_ttl_days Session TTL in days + * + * @return self + */ + public function setSessionTtlDays($session_ttl_days) + { + if (is_null($session_ttl_days)) { + throw new \InvalidArgumentException('non-nullable session_ttl_days cannot be null'); + } + + if (($session_ttl_days > 90)) { + throw new \InvalidArgumentException('invalid value for $session_ttl_days when calling UpdateSlackBotRequest., must be smaller than or equal to 90.'); + } + if (($session_ttl_days < 1)) { + throw new \InvalidArgumentException('invalid value for $session_ttl_days when calling UpdateSlackBotRequest., must be bigger than or equal to 1.'); + } + + $this->container['session_ttl_days'] = $session_ttl_days; + + return $this; + } + + /** + * Gets allowed_channels + * + * @return string[]|null + */ + public function getAllowedChannels() + { + return $this->container['allowed_channels']; + } + + /** + * Sets allowed_channels + * + * @param string[]|null $allowed_channels Slack channel IDs the bot may respond in + * + * @return self + */ + public function setAllowedChannels($allowed_channels) + { + if (is_null($allowed_channels)) { + throw new \InvalidArgumentException('non-nullable allowed_channels cannot be null'); + } + $this->container['allowed_channels'] = $allowed_channels; + + return $this; + } + + /** + * Gets keywords_enabled + * + * @return bool|null + */ + public function getKeywordsEnabled() + { + return $this->container['keywords_enabled']; + } + + /** + * Sets keywords_enabled + * + * @param bool|null $keywords_enabled Whether keyword triggers are enabled + * + * @return self + */ + public function setKeywordsEnabled($keywords_enabled) + { + if (is_null($keywords_enabled)) { + throw new \InvalidArgumentException('non-nullable keywords_enabled cannot be null'); + } + $this->container['keywords_enabled'] = $keywords_enabled; + + return $this; + } + + /** + * Gets keywords + * + * @return string[]|null + */ + public function getKeywords() + { + return $this->container['keywords']; + } + + /** + * Sets keywords + * + * @param string[]|null $keywords Keywords that trigger the bot + * + * @return self + */ + public function setKeywords($keywords) + { + if (is_null($keywords)) { + throw new \InvalidArgumentException('non-nullable keywords cannot be null'); + } + $this->container['keywords'] = $keywords; + + return $this; + } + + /** + * Gets slash_commands + * + * @return string[]|null + */ + public function getSlashCommands() + { + return $this->container['slash_commands']; + } + + /** + * Sets slash_commands + * + * @param string[]|null $slash_commands Slash commands the bot responds to + * + * @return self + */ + public function setSlashCommands($slash_commands) + { + if (is_null($slash_commands)) { + throw new \InvalidArgumentException('non-nullable slash_commands cannot be null'); + } + $this->container['slash_commands'] = $slash_commands; + + 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/UpdateTask200Response.php b/src/Model/UpdateTask200Response.php index 6ae10ce..906d252 100644 --- a/src/Model/UpdateTask200Response.php +++ b/src/Model/UpdateTask200Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/UpdateTaskRequest.php b/src/Model/UpdateTaskRequest.php index 55d55bd..cb35e9b 100644 --- a/src/Model/UpdateTaskRequest.php +++ b/src/Model/UpdateTaskRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/UploadFile201Response.php b/src/Model/UploadFile201Response.php index 0a25d33..f06685c 100644 --- a/src/Model/UploadFile201Response.php +++ b/src/Model/UploadFile201Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/UploadFileRequest.php b/src/Model/UploadFileRequest.php index b28e5fb..1adfa36 100644 --- a/src/Model/UploadFileRequest.php +++ b/src/Model/UploadFileRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/UploadVectorDocuments200Response.php b/src/Model/UploadVectorDocuments200Response.php index c085ffe..8bc587a 100644 --- a/src/Model/UploadVectorDocuments200Response.php +++ b/src/Model/UploadVectorDocuments200Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/UploadVectorDocumentsRequest.php b/src/Model/UploadVectorDocumentsRequest.php index d2815a3..332b089 100644 --- a/src/Model/UploadVectorDocumentsRequest.php +++ b/src/Model/UploadVectorDocumentsRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/UploadVectorDocumentsRequestDocumentsInner.php b/src/Model/UploadVectorDocumentsRequestDocumentsInner.php index 1ecbeda..cbb6b84 100644 --- a/src/Model/UploadVectorDocumentsRequestDocumentsInner.php +++ b/src/Model/UploadVectorDocumentsRequestDocumentsInner.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ @@ -58,6 +58,7 @@ class UploadVectorDocumentsRequestDocumentsInner implements ModelInterface, Arra */ protected static $openAPITypes = [ 'content' => 'string', + 'key' => 'string', 'metadata' => '\QuantClient\Model\UploadVectorDocumentsRequestDocumentsInnerMetadata' ]; @@ -70,6 +71,7 @@ class UploadVectorDocumentsRequestDocumentsInner implements ModelInterface, Arra */ protected static $openAPIFormats = [ 'content' => null, + 'key' => null, 'metadata' => null ]; @@ -80,6 +82,7 @@ class UploadVectorDocumentsRequestDocumentsInner implements ModelInterface, Arra */ protected static array $openAPINullables = [ 'content' => false, + 'key' => false, 'metadata' => false ]; @@ -170,6 +173,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'content' => 'content', + 'key' => 'key', 'metadata' => 'metadata' ]; @@ -180,6 +184,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'content' => 'setContent', + 'key' => 'setKey', 'metadata' => 'setMetadata' ]; @@ -190,6 +195,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'content' => 'getContent', + 'key' => 'getKey', 'metadata' => 'getMetadata' ]; @@ -251,6 +257,7 @@ public function getModelName() public function __construct(?array $data = null) { $this->setIfExists('content', $data ?? [], null); + $this->setIfExists('key', $data ?? [], null); $this->setIfExists('metadata', $data ?? [], null); } @@ -284,6 +291,10 @@ public function listInvalidProperties() if ($this->container['content'] === null) { $invalidProperties[] = "'content' can't be null"; } + if (!is_null($this->container['key']) && (mb_strlen($this->container['key']) > 512)) { + $invalidProperties[] = "invalid value for 'key', the character length must be smaller than or equal to 512."; + } + return $invalidProperties; } @@ -326,6 +337,37 @@ public function setContent($content) return $this; } + /** + * Gets key + * + * @return string|null + */ + public function getKey() + { + return $this->container['key']; + } + + /** + * Sets key + * + * @param string|null $key Stable document key for upsert + * + * @return self + */ + public function setKey($key) + { + if (is_null($key)) { + throw new \InvalidArgumentException('non-nullable key cannot be null'); + } + if ((mb_strlen($key) > 512)) { + throw new \InvalidArgumentException('invalid length for $key when calling UploadVectorDocumentsRequestDocumentsInner., must be smaller than or equal to 512.'); + } + + $this->container['key'] = $key; + + return $this; + } + /** * Gets metadata * diff --git a/src/Model/UploadVectorDocumentsRequestDocumentsInnerMetadata.php b/src/Model/UploadVectorDocumentsRequestDocumentsInnerMetadata.php index 1f67a43..adcb21d 100644 --- a/src/Model/UploadVectorDocumentsRequestDocumentsInnerMetadata.php +++ b/src/Model/UploadVectorDocumentsRequestDocumentsInnerMetadata.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/UpsertAgentOverlay200Response.php b/src/Model/UpsertAgentOverlay200Response.php new file mode 100644 index 0000000..a3d4bfc --- /dev/null +++ b/src/Model/UpsertAgentOverlay200Response.php @@ -0,0 +1,409 @@ + + */ +class UpsertAgentOverlay200Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'upsertAgentOverlay_200_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'overlay' => 'object' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'overlay' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'overlay' => 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 = [ + 'overlay' => 'overlay' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'overlay' => 'setOverlay' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'overlay' => 'getOverlay' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('overlay', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets overlay + * + * @return object|null + */ + public function getOverlay() + { + return $this->container['overlay']; + } + + /** + * Sets overlay + * + * @param object|null $overlay overlay + * + * @return self + */ + public function setOverlay($overlay) + { + if (is_null($overlay)) { + throw new \InvalidArgumentException('non-nullable overlay cannot be null'); + } + $this->container['overlay'] = $overlay; + + 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/UpsertAgentOverlayRequest.php b/src/Model/UpsertAgentOverlayRequest.php new file mode 100644 index 0000000..774e5c7 --- /dev/null +++ b/src/Model/UpsertAgentOverlayRequest.php @@ -0,0 +1,810 @@ + + */ +class UpsertAgentOverlayRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'upsertAgentOverlay_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'model_id' => 'string', + 'temperature' => 'float', + 'max_tokens' => 'int', + 'disabled_skills' => 'string[]', + 'additional_skills' => 'string[]', + 'additional_tools' => 'string[]', + 'disabled_tools' => 'string[]', + 'system_prompt_append' => 'string', + 'allowed_collections' => 'string[]', + 'guardrail_preset' => 'string', + 'version' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'model_id' => null, + 'temperature' => null, + 'max_tokens' => null, + 'disabled_skills' => null, + 'additional_skills' => null, + 'additional_tools' => null, + 'disabled_tools' => null, + 'system_prompt_append' => null, + 'allowed_collections' => null, + 'guardrail_preset' => null, + 'version' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'model_id' => false, + 'temperature' => false, + 'max_tokens' => false, + 'disabled_skills' => false, + 'additional_skills' => false, + 'additional_tools' => false, + 'disabled_tools' => false, + 'system_prompt_append' => false, + 'allowed_collections' => false, + 'guardrail_preset' => false, + 'version' => 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 = [ + 'model_id' => 'modelId', + 'temperature' => 'temperature', + 'max_tokens' => 'maxTokens', + 'disabled_skills' => 'disabledSkills', + 'additional_skills' => 'additionalSkills', + 'additional_tools' => 'additionalTools', + 'disabled_tools' => 'disabledTools', + 'system_prompt_append' => 'systemPromptAppend', + 'allowed_collections' => 'allowedCollections', + 'guardrail_preset' => 'guardrailPreset', + 'version' => 'version' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'model_id' => 'setModelId', + 'temperature' => 'setTemperature', + 'max_tokens' => 'setMaxTokens', + 'disabled_skills' => 'setDisabledSkills', + 'additional_skills' => 'setAdditionalSkills', + 'additional_tools' => 'setAdditionalTools', + 'disabled_tools' => 'setDisabledTools', + 'system_prompt_append' => 'setSystemPromptAppend', + 'allowed_collections' => 'setAllowedCollections', + 'guardrail_preset' => 'setGuardrailPreset', + 'version' => 'setVersion' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'model_id' => 'getModelId', + 'temperature' => 'getTemperature', + 'max_tokens' => 'getMaxTokens', + 'disabled_skills' => 'getDisabledSkills', + 'additional_skills' => 'getAdditionalSkills', + 'additional_tools' => 'getAdditionalTools', + 'disabled_tools' => 'getDisabledTools', + 'system_prompt_append' => 'getSystemPromptAppend', + 'allowed_collections' => 'getAllowedCollections', + 'guardrail_preset' => 'getGuardrailPreset', + 'version' => 'getVersion' + ]; + + /** + * 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 GUARDRAIL_PRESET_OFFICIAL = 'official'; + public const GUARDRAIL_PRESET_OFFICIAL_SENSITIVE = 'official-sensitive'; + public const GUARDRAIL_PRESET__PROTECTED = 'protected'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getGuardrailPresetAllowableValues() + { + return [ + self::GUARDRAIL_PRESET_OFFICIAL, + self::GUARDRAIL_PRESET_OFFICIAL_SENSITIVE, + self::GUARDRAIL_PRESET__PROTECTED, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('model_id', $data ?? [], null); + $this->setIfExists('temperature', $data ?? [], null); + $this->setIfExists('max_tokens', $data ?? [], null); + $this->setIfExists('disabled_skills', $data ?? [], null); + $this->setIfExists('additional_skills', $data ?? [], null); + $this->setIfExists('additional_tools', $data ?? [], null); + $this->setIfExists('disabled_tools', $data ?? [], null); + $this->setIfExists('system_prompt_append', $data ?? [], null); + $this->setIfExists('allowed_collections', $data ?? [], null); + $this->setIfExists('guardrail_preset', $data ?? [], null); + $this->setIfExists('version', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param 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 (!is_null($this->container['temperature']) && ($this->container['temperature'] > 1)) { + $invalidProperties[] = "invalid value for 'temperature', must be smaller than or equal to 1."; + } + + if (!is_null($this->container['temperature']) && ($this->container['temperature'] < 0)) { + $invalidProperties[] = "invalid value for 'temperature', must be bigger than or equal to 0."; + } + + if (!is_null($this->container['max_tokens']) && ($this->container['max_tokens'] < 1)) { + $invalidProperties[] = "invalid value for 'max_tokens', must be bigger than or equal to 1."; + } + + $allowedValues = $this->getGuardrailPresetAllowableValues(); + if (!is_null($this->container['guardrail_preset']) && !in_array($this->container['guardrail_preset'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'guardrail_preset', must be one of '%s'", + $this->container['guardrail_preset'], + implode("', '", $allowedValues) + ); + } + + 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 model_id + * + * @return string|null + */ + public function getModelId() + { + return $this->container['model_id']; + } + + /** + * Sets model_id + * + * @param string|null $model_id Override the base agent's model + * + * @return self + */ + public function setModelId($model_id) + { + if (is_null($model_id)) { + throw new \InvalidArgumentException('non-nullable model_id cannot be null'); + } + $this->container['model_id'] = $model_id; + + return $this; + } + + /** + * Gets temperature + * + * @return float|null + */ + public function getTemperature() + { + return $this->container['temperature']; + } + + /** + * Sets temperature + * + * @param float|null $temperature Override temperature + * + * @return self + */ + public function setTemperature($temperature) + { + if (is_null($temperature)) { + throw new \InvalidArgumentException('non-nullable temperature cannot be null'); + } + + if (($temperature > 1)) { + throw new \InvalidArgumentException('invalid value for $temperature when calling UpsertAgentOverlayRequest., must be smaller than or equal to 1.'); + } + if (($temperature < 0)) { + throw new \InvalidArgumentException('invalid value for $temperature when calling UpsertAgentOverlayRequest., must be bigger than or equal to 0.'); + } + + $this->container['temperature'] = $temperature; + + return $this; + } + + /** + * Gets max_tokens + * + * @return int|null + */ + public function getMaxTokens() + { + return $this->container['max_tokens']; + } + + /** + * Sets max_tokens + * + * @param int|null $max_tokens Override max tokens + * + * @return self + */ + public function setMaxTokens($max_tokens) + { + if (is_null($max_tokens)) { + throw new \InvalidArgumentException('non-nullable max_tokens cannot be null'); + } + + if (($max_tokens < 1)) { + throw new \InvalidArgumentException('invalid value for $max_tokens when calling UpsertAgentOverlayRequest., must be bigger than or equal to 1.'); + } + + $this->container['max_tokens'] = $max_tokens; + + return $this; + } + + /** + * Gets disabled_skills + * + * @return string[]|null + */ + public function getDisabledSkills() + { + return $this->container['disabled_skills']; + } + + /** + * Sets disabled_skills + * + * @param string[]|null $disabled_skills Global skill IDs to exclude + * + * @return self + */ + public function setDisabledSkills($disabled_skills) + { + if (is_null($disabled_skills)) { + throw new \InvalidArgumentException('non-nullable disabled_skills cannot be null'); + } + $this->container['disabled_skills'] = $disabled_skills; + + return $this; + } + + /** + * Gets additional_skills + * + * @return string[]|null + */ + public function getAdditionalSkills() + { + return $this->container['additional_skills']; + } + + /** + * Sets additional_skills + * + * @param string[]|null $additional_skills Org-owned skill IDs to add + * + * @return self + */ + public function setAdditionalSkills($additional_skills) + { + if (is_null($additional_skills)) { + throw new \InvalidArgumentException('non-nullable additional_skills cannot be null'); + } + $this->container['additional_skills'] = $additional_skills; + + return $this; + } + + /** + * Gets additional_tools + * + * @return string[]|null + */ + public function getAdditionalTools() + { + return $this->container['additional_tools']; + } + + /** + * Sets additional_tools + * + * @param string[]|null $additional_tools Tool names to add + * + * @return self + */ + public function setAdditionalTools($additional_tools) + { + if (is_null($additional_tools)) { + throw new \InvalidArgumentException('non-nullable additional_tools cannot be null'); + } + $this->container['additional_tools'] = $additional_tools; + + return $this; + } + + /** + * Gets disabled_tools + * + * @return string[]|null + */ + public function getDisabledTools() + { + return $this->container['disabled_tools']; + } + + /** + * Sets disabled_tools + * + * @param string[]|null $disabled_tools Tool names to remove + * + * @return self + */ + public function setDisabledTools($disabled_tools) + { + if (is_null($disabled_tools)) { + throw new \InvalidArgumentException('non-nullable disabled_tools cannot be null'); + } + $this->container['disabled_tools'] = $disabled_tools; + + return $this; + } + + /** + * Gets system_prompt_append + * + * @return string|null + */ + public function getSystemPromptAppend() + { + return $this->container['system_prompt_append']; + } + + /** + * Sets system_prompt_append + * + * @param string|null $system_prompt_append Text appended to base system prompt + * + * @return self + */ + public function setSystemPromptAppend($system_prompt_append) + { + if (is_null($system_prompt_append)) { + throw new \InvalidArgumentException('non-nullable system_prompt_append cannot be null'); + } + $this->container['system_prompt_append'] = $system_prompt_append; + + return $this; + } + + /** + * Gets allowed_collections + * + * @return string[]|null + */ + public function getAllowedCollections() + { + return $this->container['allowed_collections']; + } + + /** + * Sets allowed_collections + * + * @param string[]|null $allowed_collections Vector DB collections + * + * @return self + */ + public function setAllowedCollections($allowed_collections) + { + if (is_null($allowed_collections)) { + throw new \InvalidArgumentException('non-nullable allowed_collections cannot be null'); + } + $this->container['allowed_collections'] = $allowed_collections; + + return $this; + } + + /** + * Gets guardrail_preset + * + * @return string|null + */ + public function getGuardrailPreset() + { + return $this->container['guardrail_preset']; + } + + /** + * Sets guardrail_preset + * + * @param string|null $guardrail_preset Guardrail preset + * + * @return self + */ + public function setGuardrailPreset($guardrail_preset) + { + if (is_null($guardrail_preset)) { + throw new \InvalidArgumentException('non-nullable guardrail_preset cannot be null'); + } + $allowedValues = $this->getGuardrailPresetAllowableValues(); + if (!in_array($guardrail_preset, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'guardrail_preset', must be one of '%s'", + $guardrail_preset, + implode("', '", $allowedValues) + ) + ); + } + $this->container['guardrail_preset'] = $guardrail_preset; + + return $this; + } + + /** + * Gets version + * + * @return int|null + */ + public function getVersion() + { + return $this->container['version']; + } + + /** + * Sets version + * + * @param int|null $version Current version for optimistic concurrency + * + * @return self + */ + public function setVersion($version) + { + if (is_null($version)) { + throw new \InvalidArgumentException('non-nullable version cannot be null'); + } + $this->container['version'] = $version; + + 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/V1ContentItem.php b/src/Model/V1ContentItem.php index 5b889a7..1f40bec 100644 --- a/src/Model/V1ContentItem.php +++ b/src/Model/V1ContentItem.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V1ContentListResponse.php b/src/Model/V1ContentListResponse.php index 5d19376..091f667 100644 --- a/src/Model/V1ContentListResponse.php +++ b/src/Model/V1ContentListResponse.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V1ContentRequest.php b/src/Model/V1ContentRequest.php index 71ae074..0b4af9a 100644 --- a/src/Model/V1ContentRequest.php +++ b/src/Model/V1ContentRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V1DeleteResponse.php b/src/Model/V1DeleteResponse.php index 22af02d..9943714 100644 --- a/src/Model/V1DeleteResponse.php +++ b/src/Model/V1DeleteResponse.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V1Error.php b/src/Model/V1Error.php index 8caa572..bfaeb14 100644 --- a/src/Model/V1Error.php +++ b/src/Model/V1Error.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V1FormSubmissionItem.php b/src/Model/V1FormSubmissionItem.php index ca0646d..a9b9f57 100644 --- a/src/Model/V1FormSubmissionItem.php +++ b/src/Model/V1FormSubmissionItem.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V1FormSubmissionListResponse.php b/src/Model/V1FormSubmissionListResponse.php index 9e6d624..bfd1480 100644 --- a/src/Model/V1FormSubmissionListResponse.php +++ b/src/Model/V1FormSubmissionListResponse.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V1GetMetricSeriesResponse.php b/src/Model/V1GetMetricSeriesResponse.php index b20e1b1..195993d 100644 --- a/src/Model/V1GetMetricSeriesResponse.php +++ b/src/Model/V1GetMetricSeriesResponse.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V1GetMetricSeriesResponseData.php b/src/Model/V1GetMetricSeriesResponseData.php index da378f1..13f4cc6 100644 --- a/src/Model/V1GetMetricSeriesResponseData.php +++ b/src/Model/V1GetMetricSeriesResponseData.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V1GetMetricsResponse.php b/src/Model/V1GetMetricsResponse.php index ad447aa..7a77711 100644 --- a/src/Model/V1GetMetricsResponse.php +++ b/src/Model/V1GetMetricsResponse.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V1GetMetricsResponseData.php b/src/Model/V1GetMetricsResponseData.php index 78939b7..139b11f 100644 --- a/src/Model/V1GetMetricsResponseData.php +++ b/src/Model/V1GetMetricsResponseData.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V1GlobalMetaResponse.php b/src/Model/V1GlobalMetaResponse.php index 8d1da70..9130082 100644 --- a/src/Model/V1GlobalMetaResponse.php +++ b/src/Model/V1GlobalMetaResponse.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V1GlobalMetaResponseGlobalMeta.php b/src/Model/V1GlobalMetaResponseGlobalMeta.php index 6e7d3b6..83b7a26 100644 --- a/src/Model/V1GlobalMetaResponseGlobalMeta.php +++ b/src/Model/V1GlobalMetaResponseGlobalMeta.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V1Info.php b/src/Model/V1Info.php index f5f7bc8..d9baa22 100644 --- a/src/Model/V1Info.php +++ b/src/Model/V1Info.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V1Meta.php b/src/Model/V1Meta.php index 2224133..729d0a6 100644 --- a/src/Model/V1Meta.php +++ b/src/Model/V1Meta.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V1MetricDayStats.php b/src/Model/V1MetricDayStats.php index bc0a918..bba3a48 100644 --- a/src/Model/V1MetricDayStats.php +++ b/src/Model/V1MetricDayStats.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V1MetricMinuteStats.php b/src/Model/V1MetricMinuteStats.php index 411d1c0..e140d7e 100644 --- a/src/Model/V1MetricMinuteStats.php +++ b/src/Model/V1MetricMinuteStats.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V1MetricMonthStats.php b/src/Model/V1MetricMonthStats.php index 6742c3a..4fbdd06 100644 --- a/src/Model/V1MetricMonthStats.php +++ b/src/Model/V1MetricMonthStats.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V1PingResponse.php b/src/Model/V1PingResponse.php index 670f658..deefe96 100644 --- a/src/Model/V1PingResponse.php +++ b/src/Model/V1PingResponse.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V1ProxyItem.php b/src/Model/V1ProxyItem.php index 1c75bca..938920a 100644 --- a/src/Model/V1ProxyItem.php +++ b/src/Model/V1ProxyItem.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V1ProxyListResponse.php b/src/Model/V1ProxyListResponse.php index 6895e69..163cd4c 100644 --- a/src/Model/V1ProxyListResponse.php +++ b/src/Model/V1ProxyListResponse.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V1RedirectItem.php b/src/Model/V1RedirectItem.php index aa1ea0e..24db641 100644 --- a/src/Model/V1RedirectItem.php +++ b/src/Model/V1RedirectItem.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V1RedirectListResponse.php b/src/Model/V1RedirectListResponse.php index 1da0967..03b043a 100644 --- a/src/Model/V1RedirectListResponse.php +++ b/src/Model/V1RedirectListResponse.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V1RedirectRequest.php b/src/Model/V1RedirectRequest.php index 8799795..62eef18 100644 --- a/src/Model/V1RedirectRequest.php +++ b/src/Model/V1RedirectRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V1RedirectResponse.php b/src/Model/V1RedirectResponse.php index 1dbcf89..155bb05 100644 --- a/src/Model/V1RedirectResponse.php +++ b/src/Model/V1RedirectResponse.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V1Revision.php b/src/Model/V1Revision.php index 35505f2..49c8951 100644 --- a/src/Model/V1Revision.php +++ b/src/Model/V1Revision.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V1RevisionsResponse.php b/src/Model/V1RevisionsResponse.php index b112dc0..3ee1812 100644 --- a/src/Model/V1RevisionsResponse.php +++ b/src/Model/V1RevisionsResponse.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V1SearchHit.php b/src/Model/V1SearchHit.php index 66e4a83..32424ff 100644 --- a/src/Model/V1SearchHit.php +++ b/src/Model/V1SearchHit.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V1SearchItemsResponse.php b/src/Model/V1SearchItemsResponse.php index f294e57..b6c82c1 100644 --- a/src/Model/V1SearchItemsResponse.php +++ b/src/Model/V1SearchItemsResponse.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V1SearchMutationResponse.php b/src/Model/V1SearchMutationResponse.php index 69c4df3..5f32afb 100644 --- a/src/Model/V1SearchMutationResponse.php +++ b/src/Model/V1SearchMutationResponse.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V1SearchRecord.php b/src/Model/V1SearchRecord.php index c819623..31a95fd 100644 --- a/src/Model/V1SearchRecord.php +++ b/src/Model/V1SearchRecord.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V1SearchResponse.php b/src/Model/V1SearchResponse.php index f9c04ee..d0ef3e1 100644 --- a/src/Model/V1SearchResponse.php +++ b/src/Model/V1SearchResponse.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V1SeriesPointDay.php b/src/Model/V1SeriesPointDay.php index 1157378..d39355c 100644 --- a/src/Model/V1SeriesPointDay.php +++ b/src/Model/V1SeriesPointDay.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V1SeriesPointMonth.php b/src/Model/V1SeriesPointMonth.php index e3fd699..b21b916 100644 --- a/src/Model/V1SeriesPointMonth.php +++ b/src/Model/V1SeriesPointMonth.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V1Transition.php b/src/Model/V1Transition.php index a0941be..6ad84e4 100644 --- a/src/Model/V1Transition.php +++ b/src/Model/V1Transition.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V1UploadResponse.php b/src/Model/V1UploadResponse.php index 6126074..fb58181 100644 --- a/src/Model/V1UploadResponse.php +++ b/src/Model/V1UploadResponse.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V1UrlMetaRequest.php b/src/Model/V1UrlMetaRequest.php index 1b9afbe..b993649 100644 --- a/src/Model/V1UrlMetaRequest.php +++ b/src/Model/V1UrlMetaRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V1UrlMetaResponse.php b/src/Model/V1UrlMetaResponse.php index a2c3929..d2bbccb 100644 --- a/src/Model/V1UrlMetaResponse.php +++ b/src/Model/V1UrlMetaResponse.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V1WafLogItem.php b/src/Model/V1WafLogItem.php index bb82471..a33e8d0 100644 --- a/src/Model/V1WafLogItem.php +++ b/src/Model/V1WafLogItem.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V1WafLogListResponse.php b/src/Model/V1WafLogListResponse.php index b66242e..4deba62 100644 --- a/src/Model/V1WafLogListResponse.php +++ b/src/Model/V1WafLogListResponse.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V2Crawler.php b/src/Model/V2Crawler.php index 91ed6fe..8dad560 100644 --- a/src/Model/V2Crawler.php +++ b/src/Model/V2Crawler.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V2CrawlerAssets.php b/src/Model/V2CrawlerAssets.php index 9305d89..5acd845 100644 --- a/src/Model/V2CrawlerAssets.php +++ b/src/Model/V2CrawlerAssets.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V2CrawlerAssetsNetworkIntercept.php b/src/Model/V2CrawlerAssetsNetworkIntercept.php index d09a8b4..2b88cc5 100644 --- a/src/Model/V2CrawlerAssetsNetworkIntercept.php +++ b/src/Model/V2CrawlerAssetsNetworkIntercept.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V2CrawlerAssetsParser.php b/src/Model/V2CrawlerAssetsParser.php index f575638..1b752bf 100644 --- a/src/Model/V2CrawlerAssetsParser.php +++ b/src/Model/V2CrawlerAssetsParser.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V2CrawlerRequest.php b/src/Model/V2CrawlerRequest.php index 159533a..c64d40b 100644 --- a/src/Model/V2CrawlerRequest.php +++ b/src/Model/V2CrawlerRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V2CrawlerRun.php b/src/Model/V2CrawlerRun.php index db57dee..4fa369f 100644 --- a/src/Model/V2CrawlerRun.php +++ b/src/Model/V2CrawlerRun.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V2CrawlerSchedule.php b/src/Model/V2CrawlerSchedule.php index ea84619..aa1b560 100644 --- a/src/Model/V2CrawlerSchedule.php +++ b/src/Model/V2CrawlerSchedule.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ @@ -535,7 +535,7 @@ public function getScheduleCronString() /** * Sets schedule_cron_string * - * @param string $schedule_cron_string Cron schedule string + * @param string $schedule_cron_string Standard Unix cron expression with 5 space-separated fields: minute, hour, day-of-month, month, day-of-week. Example: 0 2 * * * runs daily at 2 AM. * * @return self */ diff --git a/src/Model/V2CrawlerScheduleRequest.php b/src/Model/V2CrawlerScheduleRequest.php index 75b59c9..9b2c844 100644 --- a/src/Model/V2CrawlerScheduleRequest.php +++ b/src/Model/V2CrawlerScheduleRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ @@ -281,9 +281,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; - } if ($this->container['schedule_cron_string'] === null) { $invalidProperties[] = "'schedule_cron_string' can't be null"; } @@ -305,7 +302,7 @@ public function valid() /** * Gets name * - * @return string + * @return string|null */ public function getName() { @@ -315,7 +312,7 @@ public function getName() /** * Sets name * - * @param string $name Schedule name + * @param string|null $name Schedule name. If not provided, defaults to 'Schedule {crawler_name}'. * * @return self */ @@ -342,7 +339,7 @@ public function getScheduleCronString() /** * Sets schedule_cron_string * - * @param string $schedule_cron_string Cron schedule string + * @param string $schedule_cron_string Standard Unix cron expression with 5 space-separated fields: minute, hour, day-of-month, month, day-of-week. Example: 0 2 * * * for daily at 2 AM. * * @return self */ diff --git a/src/Model/V2CrawlerSitemapInner.php b/src/Model/V2CrawlerSitemapInner.php index bbf1220..4ab076b 100644 --- a/src/Model/V2CrawlerSitemapInner.php +++ b/src/Model/V2CrawlerSitemapInner.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V2CustomHeaderRequest.php b/src/Model/V2CustomHeaderRequest.php index 335488f..92eb5cb 100644 --- a/src/Model/V2CustomHeaderRequest.php +++ b/src/Model/V2CustomHeaderRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V2Domain.php b/src/Model/V2Domain.php index 3a0deec..93855a2 100644 --- a/src/Model/V2Domain.php +++ b/src/Model/V2Domain.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V2DomainDnsGoLiveRecordsInner.php b/src/Model/V2DomainDnsGoLiveRecordsInner.php index 35c5364..a58e5bf 100644 --- a/src/Model/V2DomainDnsGoLiveRecordsInner.php +++ b/src/Model/V2DomainDnsGoLiveRecordsInner.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V2DomainDnsValidationRecordsInner.php b/src/Model/V2DomainDnsValidationRecordsInner.php index fad806f..c6d419e 100644 --- a/src/Model/V2DomainDnsValidationRecordsInner.php +++ b/src/Model/V2DomainDnsValidationRecordsInner.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V2DomainRequest.php b/src/Model/V2DomainRequest.php index 060e692..13a8a46 100644 --- a/src/Model/V2DomainRequest.php +++ b/src/Model/V2DomainRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V2Error.php b/src/Model/V2Error.php index 32f4c84..90977af 100644 --- a/src/Model/V2Error.php +++ b/src/Model/V2Error.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V2MetricData.php b/src/Model/V2MetricData.php new file mode 100644 index 0000000..5a4bde4 --- /dev/null +++ b/src/Model/V2MetricData.php @@ -0,0 +1,523 @@ + + */ +class V2MetricData implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'V2MetricData'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'series' => '\QuantClient\Model\V2MetricDataPoint[]', + 'period_total' => 'float', + 'all_time_total' => 'float', + 'period_average' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'series' => null, + 'period_total' => null, + 'all_time_total' => null, + 'period_average' => 'float' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'series' => false, + 'period_total' => false, + 'all_time_total' => false, + 'period_average' => 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 = [ + 'series' => 'series', + 'period_total' => 'period_total', + 'all_time_total' => 'all_time_total', + 'period_average' => 'period_average' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'series' => 'setSeries', + 'period_total' => 'setPeriodTotal', + 'all_time_total' => 'setAllTimeTotal', + 'period_average' => 'setPeriodAverage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'series' => 'getSeries', + 'period_total' => 'getPeriodTotal', + 'all_time_total' => 'getAllTimeTotal', + 'period_average' => 'getPeriodAverage' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('series', $data ?? [], null); + $this->setIfExists('period_total', $data ?? [], null); + $this->setIfExists('all_time_total', $data ?? [], null); + $this->setIfExists('period_average', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param 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['series'] === null) { + $invalidProperties[] = "'series' can't be null"; + } + if ($this->container['period_total'] === null) { + $invalidProperties[] = "'period_total' can't be null"; + } + if ($this->container['all_time_total'] === null) { + $invalidProperties[] = "'all_time_total' can't be null"; + } + if ($this->container['period_average'] === null) { + $invalidProperties[] = "'period_average' can't be null"; + } + 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 series + * + * @return \QuantClient\Model\V2MetricDataPoint[] + */ + public function getSeries() + { + return $this->container['series']; + } + + /** + * Sets series + * + * @param \QuantClient\Model\V2MetricDataPoint[] $series Time series data points + * + * @return self + */ + public function setSeries($series) + { + if (is_null($series)) { + throw new \InvalidArgumentException('non-nullable series cannot be null'); + } + $this->container['series'] = $series; + + return $this; + } + + /** + * Gets period_total + * + * @return float + */ + public function getPeriodTotal() + { + return $this->container['period_total']; + } + + /** + * Sets period_total + * + * @param float $period_total Total value for the period + * + * @return self + */ + public function setPeriodTotal($period_total) + { + if (is_null($period_total)) { + throw new \InvalidArgumentException('non-nullable period_total cannot be null'); + } + $this->container['period_total'] = $period_total; + + return $this; + } + + /** + * Gets all_time_total + * + * @return float + */ + public function getAllTimeTotal() + { + return $this->container['all_time_total']; + } + + /** + * Sets all_time_total + * + * @param float $all_time_total All-time total value + * + * @return self + */ + public function setAllTimeTotal($all_time_total) + { + if (is_null($all_time_total)) { + throw new \InvalidArgumentException('non-nullable all_time_total cannot be null'); + } + $this->container['all_time_total'] = $all_time_total; + + return $this; + } + + /** + * Gets period_average + * + * @return float + */ + public function getPeriodAverage() + { + return $this->container['period_average']; + } + + /** + * Sets period_average + * + * @param float $period_average Average value per time unit in the period + * + * @return self + */ + public function setPeriodAverage($period_average) + { + if (is_null($period_average)) { + throw new \InvalidArgumentException('non-nullable period_average cannot be null'); + } + $this->container['period_average'] = $period_average; + + 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/V2MetricDataPoint.php b/src/Model/V2MetricDataPoint.php new file mode 100644 index 0000000..39169ee --- /dev/null +++ b/src/Model/V2MetricDataPoint.php @@ -0,0 +1,449 @@ + + */ +class V2MetricDataPoint implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'V2MetricDataPoint'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'timestamp' => '\QuantClient\Model\V2MetricDataPointTimestamp', + 'value' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'timestamp' => null, + 'value' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'timestamp' => false, + 'value' => 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 = [ + 'timestamp' => 'timestamp', + 'value' => 'value' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'timestamp' => 'setTimestamp', + 'value' => 'setValue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'timestamp' => 'getTimestamp', + 'value' => 'getValue' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('timestamp', $data ?? [], null); + $this->setIfExists('value', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param 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['timestamp'] === null) { + $invalidProperties[] = "'timestamp' can't be null"; + } + if ($this->container['value'] === null) { + $invalidProperties[] = "'value' can't be null"; + } + 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 timestamp + * + * @return \QuantClient\Model\V2MetricDataPointTimestamp + */ + public function getTimestamp() + { + return $this->container['timestamp']; + } + + /** + * Sets timestamp + * + * @param \QuantClient\Model\V2MetricDataPointTimestamp $timestamp timestamp + * + * @return self + */ + public function setTimestamp($timestamp) + { + if (is_null($timestamp)) { + throw new \InvalidArgumentException('non-nullable timestamp cannot be null'); + } + $this->container['timestamp'] = $timestamp; + + return $this; + } + + /** + * Gets value + * + * @return float + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param float $value Metric value at this timestamp + * + * @return self + */ + public function setValue($value) + { + if (is_null($value)) { + throw new \InvalidArgumentException('non-nullable value cannot be null'); + } + $this->container['value'] = $value; + + 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/V2MetricDataPointTimestamp.php b/src/Model/V2MetricDataPointTimestamp.php new file mode 100644 index 0000000..ddc3816 --- /dev/null +++ b/src/Model/V2MetricDataPointTimestamp.php @@ -0,0 +1,382 @@ + + */ +class V2MetricDataPointTimestamp implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'V2MetricDataPoint_timestamp'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/V2MetricsMeta.php b/src/Model/V2MetricsMeta.php new file mode 100644 index 0000000..86bffab --- /dev/null +++ b/src/Model/V2MetricsMeta.php @@ -0,0 +1,673 @@ + + */ +class V2MetricsMeta implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'V2MetricsMeta'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'period' => 'string', + 'granularity' => 'string', + 'start_time' => 'string', + 'end_time' => 'string', + 'metrics' => 'string[]', + 'domain' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'period' => null, + 'granularity' => null, + 'start_time' => null, + 'end_time' => null, + 'metrics' => null, + 'domain' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'period' => false, + 'granularity' => false, + 'start_time' => false, + 'end_time' => false, + 'metrics' => false, + 'domain' => true + ]; + + /** + * 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 = [ + 'period' => 'period', + 'granularity' => 'granularity', + 'start_time' => 'start_time', + 'end_time' => 'end_time', + 'metrics' => 'metrics', + 'domain' => 'domain' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'period' => 'setPeriod', + 'granularity' => 'setGranularity', + 'start_time' => 'setStartTime', + 'end_time' => 'setEndTime', + 'metrics' => 'setMetrics', + 'domain' => 'setDomain' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'period' => 'getPeriod', + 'granularity' => 'getGranularity', + 'start_time' => 'getStartTime', + 'end_time' => 'getEndTime', + 'metrics' => 'getMetrics', + 'domain' => 'getDomain' + ]; + + /** + * 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 PERIOD_HOURLY = 'hourly'; + public const PERIOD_DAILY = 'daily'; + public const PERIOD_MONTHLY = 'monthly'; + public const GRANULARITY_MINUTE = 'minute'; + public const GRANULARITY_DAY = 'day'; + public const GRANULARITY_MONTH = 'month'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getPeriodAllowableValues() + { + return [ + self::PERIOD_HOURLY, + self::PERIOD_DAILY, + self::PERIOD_MONTHLY, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getGranularityAllowableValues() + { + return [ + self::GRANULARITY_MINUTE, + self::GRANULARITY_DAY, + self::GRANULARITY_MONTH, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('period', $data ?? [], null); + $this->setIfExists('granularity', $data ?? [], null); + $this->setIfExists('start_time', $data ?? [], null); + $this->setIfExists('end_time', $data ?? [], null); + $this->setIfExists('metrics', $data ?? [], null); + $this->setIfExists('domain', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param 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['period'] === null) { + $invalidProperties[] = "'period' can't be null"; + } + $allowedValues = $this->getPeriodAllowableValues(); + if (!is_null($this->container['period']) && !in_array($this->container['period'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'period', must be one of '%s'", + $this->container['period'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['granularity'] === null) { + $invalidProperties[] = "'granularity' can't be null"; + } + $allowedValues = $this->getGranularityAllowableValues(); + if (!is_null($this->container['granularity']) && !in_array($this->container['granularity'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'granularity', must be one of '%s'", + $this->container['granularity'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['start_time'] === null) { + $invalidProperties[] = "'start_time' can't be null"; + } + if ($this->container['end_time'] === null) { + $invalidProperties[] = "'end_time' can't be null"; + } + if ($this->container['metrics'] === null) { + $invalidProperties[] = "'metrics' can't be null"; + } + 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 period + * + * @return string + */ + public function getPeriod() + { + return $this->container['period']; + } + + /** + * Sets period + * + * @param string $period The period type for this data + * + * @return self + */ + public function setPeriod($period) + { + if (is_null($period)) { + throw new \InvalidArgumentException('non-nullable period cannot be null'); + } + $allowedValues = $this->getPeriodAllowableValues(); + if (!in_array($period, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'period', must be one of '%s'", + $period, + implode("', '", $allowedValues) + ) + ); + } + $this->container['period'] = $period; + + return $this; + } + + /** + * Gets granularity + * + * @return string + */ + public function getGranularity() + { + return $this->container['granularity']; + } + + /** + * Sets granularity + * + * @param string $granularity The granularity of data points + * + * @return self + */ + public function setGranularity($granularity) + { + if (is_null($granularity)) { + throw new \InvalidArgumentException('non-nullable granularity cannot be null'); + } + $allowedValues = $this->getGranularityAllowableValues(); + if (!in_array($granularity, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'granularity', must be one of '%s'", + $granularity, + implode("', '", $allowedValues) + ) + ); + } + $this->container['granularity'] = $granularity; + + return $this; + } + + /** + * Gets start_time + * + * @return string + */ + public function getStartTime() + { + return $this->container['start_time']; + } + + /** + * Sets start_time + * + * @param string $start_time Start time of the data range (ISO8601 or Unix timestamp based on timestamp_format parameter) + * + * @return self + */ + public function setStartTime($start_time) + { + if (is_null($start_time)) { + throw new \InvalidArgumentException('non-nullable start_time cannot be null'); + } + $this->container['start_time'] = $start_time; + + return $this; + } + + /** + * Gets end_time + * + * @return string + */ + public function getEndTime() + { + return $this->container['end_time']; + } + + /** + * Sets end_time + * + * @param string $end_time End time of the data range (ISO8601 or Unix timestamp based on timestamp_format parameter) + * + * @return self + */ + public function setEndTime($end_time) + { + if (is_null($end_time)) { + throw new \InvalidArgumentException('non-nullable end_time cannot be null'); + } + $this->container['end_time'] = $end_time; + + return $this; + } + + /** + * Gets metrics + * + * @return string[] + */ + public function getMetrics() + { + return $this->container['metrics']; + } + + /** + * Sets metrics + * + * @param string[] $metrics List of metrics included in the response + * + * @return self + */ + public function setMetrics($metrics) + { + if (is_null($metrics)) { + throw new \InvalidArgumentException('non-nullable metrics cannot be null'); + } + $this->container['metrics'] = $metrics; + + return $this; + } + + /** + * Gets domain + * + * @return string|null + */ + public function getDomain() + { + return $this->container['domain']; + } + + /** + * Sets domain + * + * @param string|null $domain Domain filter applied (if any) + * + * @return self + */ + public function setDomain($domain) + { + if (is_null($domain)) { + array_push($this->openAPINullablesSetToNull, 'domain'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('domain', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['domain'] = $domain; + + 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/V2MetricsResponse.php b/src/Model/V2MetricsResponse.php new file mode 100644 index 0000000..ae18cb5 --- /dev/null +++ b/src/Model/V2MetricsResponse.php @@ -0,0 +1,449 @@ + + */ +class V2MetricsResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'V2MetricsResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'meta' => '\QuantClient\Model\V2MetricsMeta', + 'data' => 'array' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'meta' => null, + 'data' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'meta' => false, + 'data' => 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 = [ + 'meta' => 'meta', + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'meta' => 'setMeta', + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'meta' => 'getMeta', + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('meta', $data ?? [], null); + $this->setIfExists('data', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param 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['meta'] === null) { + $invalidProperties[] = "'meta' can't be null"; + } + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + 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 meta + * + * @return \QuantClient\Model\V2MetricsMeta + */ + public function getMeta() + { + return $this->container['meta']; + } + + /** + * Sets meta + * + * @param \QuantClient\Model\V2MetricsMeta $meta meta + * + * @return self + */ + public function setMeta($meta) + { + if (is_null($meta)) { + throw new \InvalidArgumentException('non-nullable meta cannot be null'); + } + $this->container['meta'] = $meta; + + return $this; + } + + /** + * Gets data + * + * @return array + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param array $data Metrics data keyed by metric name + * + * @return self + */ + public function setData($data) + { + if (is_null($data)) { + throw new \InvalidArgumentException('non-nullable data cannot be null'); + } + $this->container['data'] = $data; + + 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/V2Organization.php b/src/Model/V2Organization.php index 0071506..504e63c 100644 --- a/src/Model/V2Organization.php +++ b/src/Model/V2Organization.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V2OrganizationRequest.php b/src/Model/V2OrganizationRequest.php index 65e3539..8cf5ad8 100644 --- a/src/Model/V2OrganizationRequest.php +++ b/src/Model/V2OrganizationRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V2Project.php b/src/Model/V2Project.php index 6cec9b7..3d2a88e 100644 --- a/src/Model/V2Project.php +++ b/src/Model/V2Project.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V2ProjectRequest.php b/src/Model/V2ProjectRequest.php index 9d9711a..d2d335e 100644 --- a/src/Model/V2ProjectRequest.php +++ b/src/Model/V2ProjectRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V2Rule.php b/src/Model/V2Rule.php index 347159a..cad6121 100644 --- a/src/Model/V2Rule.php +++ b/src/Model/V2Rule.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ @@ -71,6 +71,9 @@ class V2Rule implements ModelInterface, ArrayAccess, \JsonSerializable 'ip' => 'string', 'ip_is' => 'string[]', 'ip_is_not' => 'string[]', + 'asn' => 'string', + 'asn_is' => 'string[]', + 'asn_is_not' => 'string[]', 'country' => 'string', 'country_is' => 'string[]', 'country_is_not' => 'string[]', @@ -99,6 +102,9 @@ class V2Rule implements ModelInterface, ArrayAccess, \JsonSerializable 'ip' => null, 'ip_is' => null, 'ip_is_not' => null, + 'asn' => null, + 'asn_is' => null, + 'asn_is_not' => null, 'country' => null, 'country_is' => null, 'country_is_not' => null, @@ -125,6 +131,9 @@ class V2Rule implements ModelInterface, ArrayAccess, \JsonSerializable 'ip' => false, 'ip_is' => false, 'ip_is_not' => false, + 'asn' => false, + 'asn_is' => false, + 'asn_is_not' => false, 'country' => false, 'country_is' => false, 'country_is_not' => false, @@ -231,6 +240,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'ip', 'ip_is' => 'ip_is', 'ip_is_not' => 'ip_is_not', + 'asn' => 'asn', + 'asn_is' => 'asn_is', + 'asn_is_not' => 'asn_is_not', 'country' => 'country', 'country_is' => 'country_is', 'country_is_not' => 'country_is_not', @@ -257,6 +269,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'setIp', 'ip_is' => 'setIpIs', 'ip_is_not' => 'setIpIsNot', + 'asn' => 'setAsn', + 'asn_is' => 'setAsnIs', + 'asn_is_not' => 'setAsnIsNot', 'country' => 'setCountry', 'country_is' => 'setCountryIs', 'country_is_not' => 'setCountryIsNot', @@ -283,6 +298,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'getIp', 'ip_is' => 'getIpIs', 'ip_is_not' => 'getIpIsNot', + 'asn' => 'getAsn', + 'asn_is' => 'getAsnIs', + 'asn_is_not' => 'getAsnIsNot', 'country' => 'getCountry', 'country_is' => 'getCountryIs', 'country_is_not' => 'getCountryIsNot', @@ -360,6 +378,9 @@ public function __construct(?array $data = null) $this->setIfExists('ip', $data ?? [], null); $this->setIfExists('ip_is', $data ?? [], null); $this->setIfExists('ip_is_not', $data ?? [], null); + $this->setIfExists('asn', $data ?? [], null); + $this->setIfExists('asn_is', $data ?? [], null); + $this->setIfExists('asn_is_not', $data ?? [], null); $this->setIfExists('country', $data ?? [], null); $this->setIfExists('country_is', $data ?? [], null); $this->setIfExists('country_is_not', $data ?? [], null); @@ -795,6 +816,87 @@ public function setIpIsNot($ip_is_not) return $this; } + /** + * Gets asn + * + * @return string|null + */ + public function getAsn() + { + return $this->container['asn']; + } + + /** + * Sets asn + * + * @param string|null $asn ASN filter type (asn_is, asn_is_not, any) + * + * @return self + */ + public function setAsn($asn) + { + if (is_null($asn)) { + throw new \InvalidArgumentException('non-nullable asn cannot be null'); + } + $this->container['asn'] = $asn; + + return $this; + } + + /** + * Gets asn_is + * + * @return string[]|null + */ + public function getAsnIs() + { + return $this->container['asn_is']; + } + + /** + * Sets asn_is + * + * @param string[]|null $asn_is Allowed AS numbers + * + * @return self + */ + public function setAsnIs($asn_is) + { + if (is_null($asn_is)) { + throw new \InvalidArgumentException('non-nullable asn_is cannot be null'); + } + $this->container['asn_is'] = $asn_is; + + return $this; + } + + /** + * Gets asn_is_not + * + * @return string[]|null + */ + public function getAsnIsNot() + { + return $this->container['asn_is_not']; + } + + /** + * Sets asn_is_not + * + * @param string[]|null $asn_is_not Excluded AS numbers + * + * @return self + */ + public function setAsnIsNot($asn_is_not) + { + if (is_null($asn_is_not)) { + throw new \InvalidArgumentException('non-nullable asn_is_not cannot be null'); + } + $this->container['asn_is_not'] = $asn_is_not; + + return $this; + } + /** * Gets country * diff --git a/src/Model/V2RuleAuth.php b/src/Model/V2RuleAuth.php index e173a4e..814bd08 100644 --- a/src/Model/V2RuleAuth.php +++ b/src/Model/V2RuleAuth.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ @@ -71,6 +71,9 @@ class V2RuleAuth implements ModelInterface, ArrayAccess, \JsonSerializable 'ip' => 'string', 'ip_is' => 'string[]', 'ip_is_not' => 'string[]', + 'asn' => 'string', + 'asn_is' => 'string[]', + 'asn_is_not' => 'string[]', 'country' => 'string', 'country_is' => 'string[]', 'country_is_not' => 'string[]', @@ -100,6 +103,9 @@ class V2RuleAuth implements ModelInterface, ArrayAccess, \JsonSerializable 'ip' => null, 'ip_is' => null, 'ip_is_not' => null, + 'asn' => null, + 'asn_is' => null, + 'asn_is_not' => null, 'country' => null, 'country_is' => null, 'country_is_not' => null, @@ -127,6 +133,9 @@ class V2RuleAuth implements ModelInterface, ArrayAccess, \JsonSerializable 'ip' => false, 'ip_is' => false, 'ip_is_not' => false, + 'asn' => false, + 'asn_is' => false, + 'asn_is_not' => false, 'country' => false, 'country_is' => false, 'country_is_not' => false, @@ -234,6 +243,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'ip', 'ip_is' => 'ip_is', 'ip_is_not' => 'ip_is_not', + 'asn' => 'asn', + 'asn_is' => 'asn_is', + 'asn_is_not' => 'asn_is_not', 'country' => 'country', 'country_is' => 'country_is', 'country_is_not' => 'country_is_not', @@ -261,6 +273,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'setIp', 'ip_is' => 'setIpIs', 'ip_is_not' => 'setIpIsNot', + 'asn' => 'setAsn', + 'asn_is' => 'setAsnIs', + 'asn_is_not' => 'setAsnIsNot', 'country' => 'setCountry', 'country_is' => 'setCountryIs', 'country_is_not' => 'setCountryIsNot', @@ -288,6 +303,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'getIp', 'ip_is' => 'getIpIs', 'ip_is_not' => 'getIpIsNot', + 'asn' => 'getAsn', + 'asn_is' => 'getAsnIs', + 'asn_is_not' => 'getAsnIsNot', 'country' => 'getCountry', 'country_is' => 'getCountryIs', 'country_is_not' => 'getCountryIsNot', @@ -366,6 +384,9 @@ public function __construct(?array $data = null) $this->setIfExists('ip', $data ?? [], null); $this->setIfExists('ip_is', $data ?? [], null); $this->setIfExists('ip_is_not', $data ?? [], null); + $this->setIfExists('asn', $data ?? [], null); + $this->setIfExists('asn_is', $data ?? [], null); + $this->setIfExists('asn_is_not', $data ?? [], null); $this->setIfExists('country', $data ?? [], null); $this->setIfExists('country_is', $data ?? [], null); $this->setIfExists('country_is_not', $data ?? [], null); @@ -805,6 +826,87 @@ public function setIpIsNot($ip_is_not) return $this; } + /** + * Gets asn + * + * @return string|null + */ + public function getAsn() + { + return $this->container['asn']; + } + + /** + * Sets asn + * + * @param string|null $asn ASN filter type (asn_is, asn_is_not, any) + * + * @return self + */ + public function setAsn($asn) + { + if (is_null($asn)) { + throw new \InvalidArgumentException('non-nullable asn cannot be null'); + } + $this->container['asn'] = $asn; + + return $this; + } + + /** + * Gets asn_is + * + * @return string[]|null + */ + public function getAsnIs() + { + return $this->container['asn_is']; + } + + /** + * Sets asn_is + * + * @param string[]|null $asn_is Allowed AS numbers + * + * @return self + */ + public function setAsnIs($asn_is) + { + if (is_null($asn_is)) { + throw new \InvalidArgumentException('non-nullable asn_is cannot be null'); + } + $this->container['asn_is'] = $asn_is; + + return $this; + } + + /** + * Gets asn_is_not + * + * @return string[]|null + */ + public function getAsnIsNot() + { + return $this->container['asn_is_not']; + } + + /** + * Sets asn_is_not + * + * @param string[]|null $asn_is_not Excluded AS numbers + * + * @return self + */ + public function setAsnIsNot($asn_is_not) + { + if (is_null($asn_is_not)) { + throw new \InvalidArgumentException('non-nullable asn_is_not cannot be null'); + } + $this->container['asn_is_not'] = $asn_is_not; + + return $this; + } + /** * Gets country * diff --git a/src/Model/V2RuleAuthAction.php b/src/Model/V2RuleAuthAction.php index 1b251a4..479fb0f 100644 --- a/src/Model/V2RuleAuthAction.php +++ b/src/Model/V2RuleAuthAction.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V2RuleAuthRequest.php b/src/Model/V2RuleAuthRequest.php index 485a8fb..8020452 100644 --- a/src/Model/V2RuleAuthRequest.php +++ b/src/Model/V2RuleAuthRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ @@ -72,6 +72,9 @@ class V2RuleAuthRequest implements ModelInterface, ArrayAccess, \JsonSerializabl 'ip' => 'string', 'ip_is' => 'string[]', 'ip_is_not' => 'string[]', + 'asn' => 'string', + 'asn_is' => 'string[]', + 'asn_is_not' => 'string[]', 'auth_user' => 'string', 'auth_pass' => 'string' ]; @@ -99,6 +102,9 @@ class V2RuleAuthRequest implements ModelInterface, ArrayAccess, \JsonSerializabl 'ip' => null, 'ip_is' => null, 'ip_is_not' => null, + 'asn' => null, + 'asn_is' => null, + 'asn_is_not' => null, 'auth_user' => null, 'auth_pass' => null ]; @@ -124,6 +130,9 @@ class V2RuleAuthRequest implements ModelInterface, ArrayAccess, \JsonSerializabl 'ip' => false, 'ip_is' => false, 'ip_is_not' => false, + 'asn' => false, + 'asn_is' => false, + 'asn_is_not' => false, 'auth_user' => false, 'auth_pass' => false ]; @@ -229,6 +238,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'ip', 'ip_is' => 'ip_is', 'ip_is_not' => 'ip_is_not', + 'asn' => 'asn', + 'asn_is' => 'asn_is', + 'asn_is_not' => 'asn_is_not', 'auth_user' => 'auth_user', 'auth_pass' => 'auth_pass' ]; @@ -254,6 +266,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'setIp', 'ip_is' => 'setIpIs', 'ip_is_not' => 'setIpIsNot', + 'asn' => 'setAsn', + 'asn_is' => 'setAsnIs', + 'asn_is_not' => 'setAsnIsNot', 'auth_user' => 'setAuthUser', 'auth_pass' => 'setAuthPass' ]; @@ -279,6 +294,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'getIp', 'ip_is' => 'getIpIs', 'ip_is_not' => 'getIpIsNot', + 'asn' => 'getAsn', + 'asn_is' => 'getAsnIs', + 'asn_is_not' => 'getAsnIsNot', 'auth_user' => 'getAuthUser', 'auth_pass' => 'getAuthPass' ]; @@ -355,6 +373,9 @@ public function __construct(?array $data = null) $this->setIfExists('ip', $data ?? [], null); $this->setIfExists('ip_is', $data ?? [], null); $this->setIfExists('ip_is_not', $data ?? [], null); + $this->setIfExists('asn', $data ?? [], null); + $this->setIfExists('asn_is', $data ?? [], null); + $this->setIfExists('asn_is_not', $data ?? [], null); $this->setIfExists('auth_user', $data ?? [], null); $this->setIfExists('auth_pass', $data ?? [], null); } @@ -818,6 +839,87 @@ public function setIpIsNot($ip_is_not) return $this; } + /** + * Gets asn + * + * @return string|null + */ + public function getAsn() + { + return $this->container['asn']; + } + + /** + * Sets asn + * + * @param string|null $asn ASN filter type (asn_is, asn_is_not, any) + * + * @return self + */ + public function setAsn($asn) + { + if (is_null($asn)) { + throw new \InvalidArgumentException('non-nullable asn cannot be null'); + } + $this->container['asn'] = $asn; + + return $this; + } + + /** + * Gets asn_is + * + * @return string[]|null + */ + public function getAsnIs() + { + return $this->container['asn_is']; + } + + /** + * Sets asn_is + * + * @param string[]|null $asn_is Allowed AS numbers + * + * @return self + */ + public function setAsnIs($asn_is) + { + if (is_null($asn_is)) { + throw new \InvalidArgumentException('non-nullable asn_is cannot be null'); + } + $this->container['asn_is'] = $asn_is; + + return $this; + } + + /** + * Gets asn_is_not + * + * @return string[]|null + */ + public function getAsnIsNot() + { + return $this->container['asn_is_not']; + } + + /** + * Sets asn_is_not + * + * @param string[]|null $asn_is_not Excluded AS numbers + * + * @return self + */ + public function setAsnIsNot($asn_is_not) + { + if (is_null($asn_is_not)) { + throw new \InvalidArgumentException('non-nullable asn_is_not cannot be null'); + } + $this->container['asn_is_not'] = $asn_is_not; + + return $this; + } + /** * Gets auth_user * diff --git a/src/Model/V2RuleBotChallenge.php b/src/Model/V2RuleBotChallenge.php index 55b5ab4..0b13c3b 100644 --- a/src/Model/V2RuleBotChallenge.php +++ b/src/Model/V2RuleBotChallenge.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ @@ -71,6 +71,9 @@ class V2RuleBotChallenge implements ModelInterface, ArrayAccess, \JsonSerializab 'ip' => 'string', 'ip_is' => 'string[]', 'ip_is_not' => 'string[]', + 'asn' => 'string', + 'asn_is' => 'string[]', + 'asn_is_not' => 'string[]', 'country' => 'string', 'country_is' => 'string[]', 'country_is_not' => 'string[]', @@ -100,6 +103,9 @@ class V2RuleBotChallenge implements ModelInterface, ArrayAccess, \JsonSerializab 'ip' => null, 'ip_is' => null, 'ip_is_not' => null, + 'asn' => null, + 'asn_is' => null, + 'asn_is_not' => null, 'country' => null, 'country_is' => null, 'country_is_not' => null, @@ -127,6 +133,9 @@ class V2RuleBotChallenge implements ModelInterface, ArrayAccess, \JsonSerializab 'ip' => false, 'ip_is' => false, 'ip_is_not' => false, + 'asn' => false, + 'asn_is' => false, + 'asn_is_not' => false, 'country' => false, 'country_is' => false, 'country_is_not' => false, @@ -234,6 +243,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'ip', 'ip_is' => 'ip_is', 'ip_is_not' => 'ip_is_not', + 'asn' => 'asn', + 'asn_is' => 'asn_is', + 'asn_is_not' => 'asn_is_not', 'country' => 'country', 'country_is' => 'country_is', 'country_is_not' => 'country_is_not', @@ -261,6 +273,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'setIp', 'ip_is' => 'setIpIs', 'ip_is_not' => 'setIpIsNot', + 'asn' => 'setAsn', + 'asn_is' => 'setAsnIs', + 'asn_is_not' => 'setAsnIsNot', 'country' => 'setCountry', 'country_is' => 'setCountryIs', 'country_is_not' => 'setCountryIsNot', @@ -288,6 +303,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'getIp', 'ip_is' => 'getIpIs', 'ip_is_not' => 'getIpIsNot', + 'asn' => 'getAsn', + 'asn_is' => 'getAsnIs', + 'asn_is_not' => 'getAsnIsNot', 'country' => 'getCountry', 'country_is' => 'getCountryIs', 'country_is_not' => 'getCountryIsNot', @@ -366,6 +384,9 @@ public function __construct(?array $data = null) $this->setIfExists('ip', $data ?? [], null); $this->setIfExists('ip_is', $data ?? [], null); $this->setIfExists('ip_is_not', $data ?? [], null); + $this->setIfExists('asn', $data ?? [], null); + $this->setIfExists('asn_is', $data ?? [], null); + $this->setIfExists('asn_is_not', $data ?? [], null); $this->setIfExists('country', $data ?? [], null); $this->setIfExists('country_is', $data ?? [], null); $this->setIfExists('country_is_not', $data ?? [], null); @@ -805,6 +826,87 @@ public function setIpIsNot($ip_is_not) return $this; } + /** + * Gets asn + * + * @return string|null + */ + public function getAsn() + { + return $this->container['asn']; + } + + /** + * Sets asn + * + * @param string|null $asn ASN filter type (asn_is, asn_is_not, any) + * + * @return self + */ + public function setAsn($asn) + { + if (is_null($asn)) { + throw new \InvalidArgumentException('non-nullable asn cannot be null'); + } + $this->container['asn'] = $asn; + + return $this; + } + + /** + * Gets asn_is + * + * @return string[]|null + */ + public function getAsnIs() + { + return $this->container['asn_is']; + } + + /** + * Sets asn_is + * + * @param string[]|null $asn_is Allowed AS numbers + * + * @return self + */ + public function setAsnIs($asn_is) + { + if (is_null($asn_is)) { + throw new \InvalidArgumentException('non-nullable asn_is cannot be null'); + } + $this->container['asn_is'] = $asn_is; + + return $this; + } + + /** + * Gets asn_is_not + * + * @return string[]|null + */ + public function getAsnIsNot() + { + return $this->container['asn_is_not']; + } + + /** + * Sets asn_is_not + * + * @param string[]|null $asn_is_not Excluded AS numbers + * + * @return self + */ + public function setAsnIsNot($asn_is_not) + { + if (is_null($asn_is_not)) { + throw new \InvalidArgumentException('non-nullable asn_is_not cannot be null'); + } + $this->container['asn_is_not'] = $asn_is_not; + + return $this; + } + /** * Gets country * diff --git a/src/Model/V2RuleBotChallengeAction.php b/src/Model/V2RuleBotChallengeAction.php index 15f2e98..bfcac1f 100644 --- a/src/Model/V2RuleBotChallengeAction.php +++ b/src/Model/V2RuleBotChallengeAction.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V2RuleBotChallengeRequest.php b/src/Model/V2RuleBotChallengeRequest.php index 714f1c2..4548fca 100644 --- a/src/Model/V2RuleBotChallengeRequest.php +++ b/src/Model/V2RuleBotChallengeRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ @@ -72,6 +72,9 @@ class V2RuleBotChallengeRequest implements ModelInterface, ArrayAccess, \JsonSer 'ip' => 'string', 'ip_is' => 'string[]', 'ip_is_not' => 'string[]', + 'asn' => 'string', + 'asn_is' => 'string[]', + 'asn_is_not' => 'string[]', 'robot_challenge_type' => 'string', 'robot_challenge_verification_ttl' => 'int', 'robot_challenge_challenge_ttl' => 'int' @@ -100,6 +103,9 @@ class V2RuleBotChallengeRequest implements ModelInterface, ArrayAccess, \JsonSer 'ip' => null, 'ip_is' => null, 'ip_is_not' => null, + 'asn' => null, + 'asn_is' => null, + 'asn_is_not' => null, 'robot_challenge_type' => null, 'robot_challenge_verification_ttl' => null, 'robot_challenge_challenge_ttl' => null @@ -126,6 +132,9 @@ class V2RuleBotChallengeRequest implements ModelInterface, ArrayAccess, \JsonSer 'ip' => false, 'ip_is' => false, 'ip_is_not' => false, + 'asn' => false, + 'asn_is' => false, + 'asn_is_not' => false, 'robot_challenge_type' => false, 'robot_challenge_verification_ttl' => false, 'robot_challenge_challenge_ttl' => false @@ -232,6 +241,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'ip', 'ip_is' => 'ip_is', 'ip_is_not' => 'ip_is_not', + 'asn' => 'asn', + 'asn_is' => 'asn_is', + 'asn_is_not' => 'asn_is_not', 'robot_challenge_type' => 'robot_challenge_type', 'robot_challenge_verification_ttl' => 'robot_challenge_verification_ttl', 'robot_challenge_challenge_ttl' => 'robot_challenge_challenge_ttl' @@ -258,6 +270,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'setIp', 'ip_is' => 'setIpIs', 'ip_is_not' => 'setIpIsNot', + 'asn' => 'setAsn', + 'asn_is' => 'setAsnIs', + 'asn_is_not' => 'setAsnIsNot', 'robot_challenge_type' => 'setRobotChallengeType', 'robot_challenge_verification_ttl' => 'setRobotChallengeVerificationTtl', 'robot_challenge_challenge_ttl' => 'setRobotChallengeChallengeTtl' @@ -284,6 +299,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'getIp', 'ip_is' => 'getIpIs', 'ip_is_not' => 'getIpIsNot', + 'asn' => 'getAsn', + 'asn_is' => 'getAsnIs', + 'asn_is_not' => 'getAsnIsNot', 'robot_challenge_type' => 'getRobotChallengeType', 'robot_challenge_verification_ttl' => 'getRobotChallengeVerificationTtl', 'robot_challenge_challenge_ttl' => 'getRobotChallengeChallengeTtl' @@ -361,6 +379,9 @@ public function __construct(?array $data = null) $this->setIfExists('ip', $data ?? [], null); $this->setIfExists('ip_is', $data ?? [], null); $this->setIfExists('ip_is_not', $data ?? [], null); + $this->setIfExists('asn', $data ?? [], null); + $this->setIfExists('asn_is', $data ?? [], null); + $this->setIfExists('asn_is_not', $data ?? [], null); $this->setIfExists('robot_challenge_type', $data ?? [], null); $this->setIfExists('robot_challenge_verification_ttl', $data ?? [], 10800); $this->setIfExists('robot_challenge_challenge_ttl', $data ?? [], 30); @@ -822,6 +843,87 @@ public function setIpIsNot($ip_is_not) return $this; } + /** + * Gets asn + * + * @return string|null + */ + public function getAsn() + { + return $this->container['asn']; + } + + /** + * Sets asn + * + * @param string|null $asn ASN filter type (asn_is, asn_is_not, any) + * + * @return self + */ + public function setAsn($asn) + { + if (is_null($asn)) { + throw new \InvalidArgumentException('non-nullable asn cannot be null'); + } + $this->container['asn'] = $asn; + + return $this; + } + + /** + * Gets asn_is + * + * @return string[]|null + */ + public function getAsnIs() + { + return $this->container['asn_is']; + } + + /** + * Sets asn_is + * + * @param string[]|null $asn_is Allowed AS numbers + * + * @return self + */ + public function setAsnIs($asn_is) + { + if (is_null($asn_is)) { + throw new \InvalidArgumentException('non-nullable asn_is cannot be null'); + } + $this->container['asn_is'] = $asn_is; + + return $this; + } + + /** + * Gets asn_is_not + * + * @return string[]|null + */ + public function getAsnIsNot() + { + return $this->container['asn_is_not']; + } + + /** + * Sets asn_is_not + * + * @param string[]|null $asn_is_not Excluded AS numbers + * + * @return self + */ + public function setAsnIsNot($asn_is_not) + { + if (is_null($asn_is_not)) { + throw new \InvalidArgumentException('non-nullable asn_is_not cannot be null'); + } + $this->container['asn_is_not'] = $asn_is_not; + + return $this; + } + /** * Gets robot_challenge_type * diff --git a/src/Model/V2RuleContentFilter.php b/src/Model/V2RuleContentFilter.php index b96918a..ed54072 100644 --- a/src/Model/V2RuleContentFilter.php +++ b/src/Model/V2RuleContentFilter.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ @@ -71,6 +71,9 @@ class V2RuleContentFilter implements ModelInterface, ArrayAccess, \JsonSerializa 'ip' => 'string', 'ip_is' => 'string[]', 'ip_is_not' => 'string[]', + 'asn' => 'string', + 'asn_is' => 'string[]', + 'asn_is_not' => 'string[]', 'country' => 'string', 'country_is' => 'string[]', 'country_is_not' => 'string[]', @@ -100,6 +103,9 @@ class V2RuleContentFilter implements ModelInterface, ArrayAccess, \JsonSerializa 'ip' => null, 'ip_is' => null, 'ip_is_not' => null, + 'asn' => null, + 'asn_is' => null, + 'asn_is_not' => null, 'country' => null, 'country_is' => null, 'country_is_not' => null, @@ -127,6 +133,9 @@ class V2RuleContentFilter implements ModelInterface, ArrayAccess, \JsonSerializa 'ip' => false, 'ip_is' => false, 'ip_is_not' => false, + 'asn' => false, + 'asn_is' => false, + 'asn_is_not' => false, 'country' => false, 'country_is' => false, 'country_is_not' => false, @@ -234,6 +243,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'ip', 'ip_is' => 'ip_is', 'ip_is_not' => 'ip_is_not', + 'asn' => 'asn', + 'asn_is' => 'asn_is', + 'asn_is_not' => 'asn_is_not', 'country' => 'country', 'country_is' => 'country_is', 'country_is_not' => 'country_is_not', @@ -261,6 +273,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'setIp', 'ip_is' => 'setIpIs', 'ip_is_not' => 'setIpIsNot', + 'asn' => 'setAsn', + 'asn_is' => 'setAsnIs', + 'asn_is_not' => 'setAsnIsNot', 'country' => 'setCountry', 'country_is' => 'setCountryIs', 'country_is_not' => 'setCountryIsNot', @@ -288,6 +303,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'getIp', 'ip_is' => 'getIpIs', 'ip_is_not' => 'getIpIsNot', + 'asn' => 'getAsn', + 'asn_is' => 'getAsnIs', + 'asn_is_not' => 'getAsnIsNot', 'country' => 'getCountry', 'country_is' => 'getCountryIs', 'country_is_not' => 'getCountryIsNot', @@ -366,6 +384,9 @@ public function __construct(?array $data = null) $this->setIfExists('ip', $data ?? [], null); $this->setIfExists('ip_is', $data ?? [], null); $this->setIfExists('ip_is_not', $data ?? [], null); + $this->setIfExists('asn', $data ?? [], null); + $this->setIfExists('asn_is', $data ?? [], null); + $this->setIfExists('asn_is_not', $data ?? [], null); $this->setIfExists('country', $data ?? [], null); $this->setIfExists('country_is', $data ?? [], null); $this->setIfExists('country_is_not', $data ?? [], null); @@ -805,6 +826,87 @@ public function setIpIsNot($ip_is_not) return $this; } + /** + * Gets asn + * + * @return string|null + */ + public function getAsn() + { + return $this->container['asn']; + } + + /** + * Sets asn + * + * @param string|null $asn ASN filter type (asn_is, asn_is_not, any) + * + * @return self + */ + public function setAsn($asn) + { + if (is_null($asn)) { + throw new \InvalidArgumentException('non-nullable asn cannot be null'); + } + $this->container['asn'] = $asn; + + return $this; + } + + /** + * Gets asn_is + * + * @return string[]|null + */ + public function getAsnIs() + { + return $this->container['asn_is']; + } + + /** + * Sets asn_is + * + * @param string[]|null $asn_is Allowed AS numbers + * + * @return self + */ + public function setAsnIs($asn_is) + { + if (is_null($asn_is)) { + throw new \InvalidArgumentException('non-nullable asn_is cannot be null'); + } + $this->container['asn_is'] = $asn_is; + + return $this; + } + + /** + * Gets asn_is_not + * + * @return string[]|null + */ + public function getAsnIsNot() + { + return $this->container['asn_is_not']; + } + + /** + * Sets asn_is_not + * + * @param string[]|null $asn_is_not Excluded AS numbers + * + * @return self + */ + public function setAsnIsNot($asn_is_not) + { + if (is_null($asn_is_not)) { + throw new \InvalidArgumentException('non-nullable asn_is_not cannot be null'); + } + $this->container['asn_is_not'] = $asn_is_not; + + return $this; + } + /** * Gets country * diff --git a/src/Model/V2RuleContentFilterAction.php b/src/Model/V2RuleContentFilterAction.php index 5b084fb..0cd23c2 100644 --- a/src/Model/V2RuleContentFilterAction.php +++ b/src/Model/V2RuleContentFilterAction.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V2RuleContentFilterRequest.php b/src/Model/V2RuleContentFilterRequest.php index 66113e0..dce989e 100644 --- a/src/Model/V2RuleContentFilterRequest.php +++ b/src/Model/V2RuleContentFilterRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ @@ -72,6 +72,9 @@ class V2RuleContentFilterRequest implements ModelInterface, ArrayAccess, \JsonSe 'ip' => 'string', 'ip_is' => 'string[]', 'ip_is_not' => 'string[]', + 'asn' => 'string', + 'asn_is' => 'string[]', + 'asn_is_not' => 'string[]', 'fn_uuid' => 'string' ]; @@ -98,6 +101,9 @@ class V2RuleContentFilterRequest implements ModelInterface, ArrayAccess, \JsonSe 'ip' => null, 'ip_is' => null, 'ip_is_not' => null, + 'asn' => null, + 'asn_is' => null, + 'asn_is_not' => null, 'fn_uuid' => null ]; @@ -122,6 +128,9 @@ class V2RuleContentFilterRequest implements ModelInterface, ArrayAccess, \JsonSe 'ip' => false, 'ip_is' => false, 'ip_is_not' => false, + 'asn' => false, + 'asn_is' => false, + 'asn_is_not' => false, 'fn_uuid' => false ]; @@ -226,6 +235,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'ip', 'ip_is' => 'ip_is', 'ip_is_not' => 'ip_is_not', + 'asn' => 'asn', + 'asn_is' => 'asn_is', + 'asn_is_not' => 'asn_is_not', 'fn_uuid' => 'fn_uuid' ]; @@ -250,6 +262,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'setIp', 'ip_is' => 'setIpIs', 'ip_is_not' => 'setIpIsNot', + 'asn' => 'setAsn', + 'asn_is' => 'setAsnIs', + 'asn_is_not' => 'setAsnIsNot', 'fn_uuid' => 'setFnUuid' ]; @@ -274,6 +289,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'getIp', 'ip_is' => 'getIpIs', 'ip_is_not' => 'getIpIsNot', + 'asn' => 'getAsn', + 'asn_is' => 'getAsnIs', + 'asn_is_not' => 'getAsnIsNot', 'fn_uuid' => 'getFnUuid' ]; @@ -349,6 +367,9 @@ public function __construct(?array $data = null) $this->setIfExists('ip', $data ?? [], null); $this->setIfExists('ip_is', $data ?? [], null); $this->setIfExists('ip_is_not', $data ?? [], null); + $this->setIfExists('asn', $data ?? [], null); + $this->setIfExists('asn_is', $data ?? [], null); + $this->setIfExists('asn_is_not', $data ?? [], null); $this->setIfExists('fn_uuid', $data ?? [], null); } @@ -808,6 +829,87 @@ public function setIpIsNot($ip_is_not) return $this; } + /** + * Gets asn + * + * @return string|null + */ + public function getAsn() + { + return $this->container['asn']; + } + + /** + * Sets asn + * + * @param string|null $asn ASN filter type (asn_is, asn_is_not, any) + * + * @return self + */ + public function setAsn($asn) + { + if (is_null($asn)) { + throw new \InvalidArgumentException('non-nullable asn cannot be null'); + } + $this->container['asn'] = $asn; + + return $this; + } + + /** + * Gets asn_is + * + * @return string[]|null + */ + public function getAsnIs() + { + return $this->container['asn_is']; + } + + /** + * Sets asn_is + * + * @param string[]|null $asn_is Allowed AS numbers + * + * @return self + */ + public function setAsnIs($asn_is) + { + if (is_null($asn_is)) { + throw new \InvalidArgumentException('non-nullable asn_is cannot be null'); + } + $this->container['asn_is'] = $asn_is; + + return $this; + } + + /** + * Gets asn_is_not + * + * @return string[]|null + */ + public function getAsnIsNot() + { + return $this->container['asn_is_not']; + } + + /** + * Sets asn_is_not + * + * @param string[]|null $asn_is_not Excluded AS numbers + * + * @return self + */ + public function setAsnIsNot($asn_is_not) + { + if (is_null($asn_is_not)) { + throw new \InvalidArgumentException('non-nullable asn_is_not cannot be null'); + } + $this->container['asn_is_not'] = $asn_is_not; + + return $this; + } + /** * Gets fn_uuid * diff --git a/src/Model/V2RuleCustomResponse.php b/src/Model/V2RuleCustomResponse.php index d0a75e5..6398e2d 100644 --- a/src/Model/V2RuleCustomResponse.php +++ b/src/Model/V2RuleCustomResponse.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ @@ -71,6 +71,9 @@ class V2RuleCustomResponse implements ModelInterface, ArrayAccess, \JsonSerializ 'ip' => 'string', 'ip_is' => 'string[]', 'ip_is_not' => 'string[]', + 'asn' => 'string', + 'asn_is' => 'string[]', + 'asn_is_not' => 'string[]', 'country' => 'string', 'country_is' => 'string[]', 'country_is_not' => 'string[]', @@ -100,6 +103,9 @@ class V2RuleCustomResponse implements ModelInterface, ArrayAccess, \JsonSerializ 'ip' => null, 'ip_is' => null, 'ip_is_not' => null, + 'asn' => null, + 'asn_is' => null, + 'asn_is_not' => null, 'country' => null, 'country_is' => null, 'country_is_not' => null, @@ -127,6 +133,9 @@ class V2RuleCustomResponse implements ModelInterface, ArrayAccess, \JsonSerializ 'ip' => false, 'ip_is' => false, 'ip_is_not' => false, + 'asn' => false, + 'asn_is' => false, + 'asn_is_not' => false, 'country' => false, 'country_is' => false, 'country_is_not' => false, @@ -234,6 +243,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'ip', 'ip_is' => 'ip_is', 'ip_is_not' => 'ip_is_not', + 'asn' => 'asn', + 'asn_is' => 'asn_is', + 'asn_is_not' => 'asn_is_not', 'country' => 'country', 'country_is' => 'country_is', 'country_is_not' => 'country_is_not', @@ -261,6 +273,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'setIp', 'ip_is' => 'setIpIs', 'ip_is_not' => 'setIpIsNot', + 'asn' => 'setAsn', + 'asn_is' => 'setAsnIs', + 'asn_is_not' => 'setAsnIsNot', 'country' => 'setCountry', 'country_is' => 'setCountryIs', 'country_is_not' => 'setCountryIsNot', @@ -288,6 +303,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'getIp', 'ip_is' => 'getIpIs', 'ip_is_not' => 'getIpIsNot', + 'asn' => 'getAsn', + 'asn_is' => 'getAsnIs', + 'asn_is_not' => 'getAsnIsNot', 'country' => 'getCountry', 'country_is' => 'getCountryIs', 'country_is_not' => 'getCountryIsNot', @@ -366,6 +384,9 @@ public function __construct(?array $data = null) $this->setIfExists('ip', $data ?? [], null); $this->setIfExists('ip_is', $data ?? [], null); $this->setIfExists('ip_is_not', $data ?? [], null); + $this->setIfExists('asn', $data ?? [], null); + $this->setIfExists('asn_is', $data ?? [], null); + $this->setIfExists('asn_is_not', $data ?? [], null); $this->setIfExists('country', $data ?? [], null); $this->setIfExists('country_is', $data ?? [], null); $this->setIfExists('country_is_not', $data ?? [], null); @@ -802,6 +823,87 @@ public function setIpIsNot($ip_is_not) return $this; } + /** + * Gets asn + * + * @return string|null + */ + public function getAsn() + { + return $this->container['asn']; + } + + /** + * Sets asn + * + * @param string|null $asn ASN filter type (asn_is, asn_is_not, any) + * + * @return self + */ + public function setAsn($asn) + { + if (is_null($asn)) { + throw new \InvalidArgumentException('non-nullable asn cannot be null'); + } + $this->container['asn'] = $asn; + + return $this; + } + + /** + * Gets asn_is + * + * @return string[]|null + */ + public function getAsnIs() + { + return $this->container['asn_is']; + } + + /** + * Sets asn_is + * + * @param string[]|null $asn_is Allowed AS numbers + * + * @return self + */ + public function setAsnIs($asn_is) + { + if (is_null($asn_is)) { + throw new \InvalidArgumentException('non-nullable asn_is cannot be null'); + } + $this->container['asn_is'] = $asn_is; + + return $this; + } + + /** + * Gets asn_is_not + * + * @return string[]|null + */ + public function getAsnIsNot() + { + return $this->container['asn_is_not']; + } + + /** + * Sets asn_is_not + * + * @param string[]|null $asn_is_not Excluded AS numbers + * + * @return self + */ + public function setAsnIsNot($asn_is_not) + { + if (is_null($asn_is_not)) { + throw new \InvalidArgumentException('non-nullable asn_is_not cannot be null'); + } + $this->container['asn_is_not'] = $asn_is_not; + + return $this; + } + /** * Gets country * diff --git a/src/Model/V2RuleCustomResponseAction.php b/src/Model/V2RuleCustomResponseAction.php index e745874..e4a63be 100644 --- a/src/Model/V2RuleCustomResponseAction.php +++ b/src/Model/V2RuleCustomResponseAction.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V2RuleCustomResponseRequest.php b/src/Model/V2RuleCustomResponseRequest.php index e7e6ba0..8097208 100644 --- a/src/Model/V2RuleCustomResponseRequest.php +++ b/src/Model/V2RuleCustomResponseRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ @@ -72,6 +72,9 @@ class V2RuleCustomResponseRequest implements ModelInterface, ArrayAccess, \JsonS 'ip' => 'string', 'ip_is' => 'string[]', 'ip_is_not' => 'string[]', + 'asn' => 'string', + 'asn_is' => 'string[]', + 'asn_is_not' => 'string[]', 'custom_response_body' => 'string', 'custom_response_status_code' => 'int', 'status_code' => 'int', @@ -101,6 +104,9 @@ class V2RuleCustomResponseRequest implements ModelInterface, ArrayAccess, \JsonS 'ip' => null, 'ip_is' => null, 'ip_is_not' => null, + 'asn' => null, + 'asn_is' => null, + 'asn_is_not' => null, 'custom_response_body' => null, 'custom_response_status_code' => null, 'status_code' => null, @@ -128,6 +134,9 @@ class V2RuleCustomResponseRequest implements ModelInterface, ArrayAccess, \JsonS 'ip' => false, 'ip_is' => false, 'ip_is_not' => false, + 'asn' => false, + 'asn_is' => false, + 'asn_is_not' => false, 'custom_response_body' => false, 'custom_response_status_code' => false, 'status_code' => false, @@ -235,6 +244,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'ip', 'ip_is' => 'ip_is', 'ip_is_not' => 'ip_is_not', + 'asn' => 'asn', + 'asn_is' => 'asn_is', + 'asn_is_not' => 'asn_is_not', 'custom_response_body' => 'custom_response_body', 'custom_response_status_code' => 'custom_response_status_code', 'status_code' => 'status_code', @@ -262,6 +274,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'setIp', 'ip_is' => 'setIpIs', 'ip_is_not' => 'setIpIsNot', + 'asn' => 'setAsn', + 'asn_is' => 'setAsnIs', + 'asn_is_not' => 'setAsnIsNot', 'custom_response_body' => 'setCustomResponseBody', 'custom_response_status_code' => 'setCustomResponseStatusCode', 'status_code' => 'setStatusCode', @@ -289,6 +304,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'getIp', 'ip_is' => 'getIpIs', 'ip_is_not' => 'getIpIsNot', + 'asn' => 'getAsn', + 'asn_is' => 'getAsnIs', + 'asn_is_not' => 'getAsnIsNot', 'custom_response_body' => 'getCustomResponseBody', 'custom_response_status_code' => 'getCustomResponseStatusCode', 'status_code' => 'getStatusCode', @@ -367,6 +385,9 @@ public function __construct(?array $data = null) $this->setIfExists('ip', $data ?? [], null); $this->setIfExists('ip_is', $data ?? [], null); $this->setIfExists('ip_is_not', $data ?? [], null); + $this->setIfExists('asn', $data ?? [], null); + $this->setIfExists('asn_is', $data ?? [], null); + $this->setIfExists('asn_is_not', $data ?? [], null); $this->setIfExists('custom_response_body', $data ?? [], null); $this->setIfExists('custom_response_status_code', $data ?? [], 200); $this->setIfExists('status_code', $data ?? [], null); @@ -829,6 +850,87 @@ public function setIpIsNot($ip_is_not) return $this; } + /** + * Gets asn + * + * @return string|null + */ + public function getAsn() + { + return $this->container['asn']; + } + + /** + * Sets asn + * + * @param string|null $asn ASN filter type (asn_is, asn_is_not, any) + * + * @return self + */ + public function setAsn($asn) + { + if (is_null($asn)) { + throw new \InvalidArgumentException('non-nullable asn cannot be null'); + } + $this->container['asn'] = $asn; + + return $this; + } + + /** + * Gets asn_is + * + * @return string[]|null + */ + public function getAsnIs() + { + return $this->container['asn_is']; + } + + /** + * Sets asn_is + * + * @param string[]|null $asn_is Allowed AS numbers + * + * @return self + */ + public function setAsnIs($asn_is) + { + if (is_null($asn_is)) { + throw new \InvalidArgumentException('non-nullable asn_is cannot be null'); + } + $this->container['asn_is'] = $asn_is; + + return $this; + } + + /** + * Gets asn_is_not + * + * @return string[]|null + */ + public function getAsnIsNot() + { + return $this->container['asn_is_not']; + } + + /** + * Sets asn_is_not + * + * @param string[]|null $asn_is_not Excluded AS numbers + * + * @return self + */ + public function setAsnIsNot($asn_is_not) + { + if (is_null($asn_is_not)) { + throw new \InvalidArgumentException('non-nullable asn_is_not cannot be null'); + } + $this->container['asn_is_not'] = $asn_is_not; + + return $this; + } + /** * Gets custom_response_body * diff --git a/src/Model/V2RuleFunction.php b/src/Model/V2RuleFunction.php index 583fc5f..e7e80d4 100644 --- a/src/Model/V2RuleFunction.php +++ b/src/Model/V2RuleFunction.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ @@ -71,6 +71,9 @@ class V2RuleFunction implements ModelInterface, ArrayAccess, \JsonSerializable 'ip' => 'string', 'ip_is' => 'string[]', 'ip_is_not' => 'string[]', + 'asn' => 'string', + 'asn_is' => 'string[]', + 'asn_is_not' => 'string[]', 'country' => 'string', 'country_is' => 'string[]', 'country_is_not' => 'string[]', @@ -100,6 +103,9 @@ class V2RuleFunction implements ModelInterface, ArrayAccess, \JsonSerializable 'ip' => null, 'ip_is' => null, 'ip_is_not' => null, + 'asn' => null, + 'asn_is' => null, + 'asn_is_not' => null, 'country' => null, 'country_is' => null, 'country_is_not' => null, @@ -127,6 +133,9 @@ class V2RuleFunction implements ModelInterface, ArrayAccess, \JsonSerializable 'ip' => false, 'ip_is' => false, 'ip_is_not' => false, + 'asn' => false, + 'asn_is' => false, + 'asn_is_not' => false, 'country' => false, 'country_is' => false, 'country_is_not' => false, @@ -234,6 +243,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'ip', 'ip_is' => 'ip_is', 'ip_is_not' => 'ip_is_not', + 'asn' => 'asn', + 'asn_is' => 'asn_is', + 'asn_is_not' => 'asn_is_not', 'country' => 'country', 'country_is' => 'country_is', 'country_is_not' => 'country_is_not', @@ -261,6 +273,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'setIp', 'ip_is' => 'setIpIs', 'ip_is_not' => 'setIpIsNot', + 'asn' => 'setAsn', + 'asn_is' => 'setAsnIs', + 'asn_is_not' => 'setAsnIsNot', 'country' => 'setCountry', 'country_is' => 'setCountryIs', 'country_is_not' => 'setCountryIsNot', @@ -288,6 +303,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'getIp', 'ip_is' => 'getIpIs', 'ip_is_not' => 'getIpIsNot', + 'asn' => 'getAsn', + 'asn_is' => 'getAsnIs', + 'asn_is_not' => 'getAsnIsNot', 'country' => 'getCountry', 'country_is' => 'getCountryIs', 'country_is_not' => 'getCountryIsNot', @@ -366,6 +384,9 @@ public function __construct(?array $data = null) $this->setIfExists('ip', $data ?? [], null); $this->setIfExists('ip_is', $data ?? [], null); $this->setIfExists('ip_is_not', $data ?? [], null); + $this->setIfExists('asn', $data ?? [], null); + $this->setIfExists('asn_is', $data ?? [], null); + $this->setIfExists('asn_is_not', $data ?? [], null); $this->setIfExists('country', $data ?? [], null); $this->setIfExists('country_is', $data ?? [], null); $this->setIfExists('country_is_not', $data ?? [], null); @@ -805,6 +826,87 @@ public function setIpIsNot($ip_is_not) return $this; } + /** + * Gets asn + * + * @return string|null + */ + public function getAsn() + { + return $this->container['asn']; + } + + /** + * Sets asn + * + * @param string|null $asn ASN filter type (asn_is, asn_is_not, any) + * + * @return self + */ + public function setAsn($asn) + { + if (is_null($asn)) { + throw new \InvalidArgumentException('non-nullable asn cannot be null'); + } + $this->container['asn'] = $asn; + + return $this; + } + + /** + * Gets asn_is + * + * @return string[]|null + */ + public function getAsnIs() + { + return $this->container['asn_is']; + } + + /** + * Sets asn_is + * + * @param string[]|null $asn_is Allowed AS numbers + * + * @return self + */ + public function setAsnIs($asn_is) + { + if (is_null($asn_is)) { + throw new \InvalidArgumentException('non-nullable asn_is cannot be null'); + } + $this->container['asn_is'] = $asn_is; + + return $this; + } + + /** + * Gets asn_is_not + * + * @return string[]|null + */ + public function getAsnIsNot() + { + return $this->container['asn_is_not']; + } + + /** + * Sets asn_is_not + * + * @param string[]|null $asn_is_not Excluded AS numbers + * + * @return self + */ + public function setAsnIsNot($asn_is_not) + { + if (is_null($asn_is_not)) { + throw new \InvalidArgumentException('non-nullable asn_is_not cannot be null'); + } + $this->container['asn_is_not'] = $asn_is_not; + + return $this; + } + /** * Gets country * diff --git a/src/Model/V2RuleFunctionAction.php b/src/Model/V2RuleFunctionAction.php index ba292ca..aeedbbc 100644 --- a/src/Model/V2RuleFunctionAction.php +++ b/src/Model/V2RuleFunctionAction.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V2RuleFunctionRequest.php b/src/Model/V2RuleFunctionRequest.php index 28b30ac..046ac26 100644 --- a/src/Model/V2RuleFunctionRequest.php +++ b/src/Model/V2RuleFunctionRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ @@ -72,6 +72,9 @@ class V2RuleFunctionRequest implements ModelInterface, ArrayAccess, \JsonSeriali 'ip' => 'string', 'ip_is' => 'string[]', 'ip_is_not' => 'string[]', + 'asn' => 'string', + 'asn_is' => 'string[]', + 'asn_is_not' => 'string[]', 'fn_uuid' => 'string' ]; @@ -98,6 +101,9 @@ class V2RuleFunctionRequest implements ModelInterface, ArrayAccess, \JsonSeriali 'ip' => null, 'ip_is' => null, 'ip_is_not' => null, + 'asn' => null, + 'asn_is' => null, + 'asn_is_not' => null, 'fn_uuid' => null ]; @@ -122,6 +128,9 @@ class V2RuleFunctionRequest implements ModelInterface, ArrayAccess, \JsonSeriali 'ip' => false, 'ip_is' => false, 'ip_is_not' => false, + 'asn' => false, + 'asn_is' => false, + 'asn_is_not' => false, 'fn_uuid' => false ]; @@ -226,6 +235,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'ip', 'ip_is' => 'ip_is', 'ip_is_not' => 'ip_is_not', + 'asn' => 'asn', + 'asn_is' => 'asn_is', + 'asn_is_not' => 'asn_is_not', 'fn_uuid' => 'fn_uuid' ]; @@ -250,6 +262,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'setIp', 'ip_is' => 'setIpIs', 'ip_is_not' => 'setIpIsNot', + 'asn' => 'setAsn', + 'asn_is' => 'setAsnIs', + 'asn_is_not' => 'setAsnIsNot', 'fn_uuid' => 'setFnUuid' ]; @@ -274,6 +289,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'getIp', 'ip_is' => 'getIpIs', 'ip_is_not' => 'getIpIsNot', + 'asn' => 'getAsn', + 'asn_is' => 'getAsnIs', + 'asn_is_not' => 'getAsnIsNot', 'fn_uuid' => 'getFnUuid' ]; @@ -349,6 +367,9 @@ public function __construct(?array $data = null) $this->setIfExists('ip', $data ?? [], null); $this->setIfExists('ip_is', $data ?? [], null); $this->setIfExists('ip_is_not', $data ?? [], null); + $this->setIfExists('asn', $data ?? [], null); + $this->setIfExists('asn_is', $data ?? [], null); + $this->setIfExists('asn_is_not', $data ?? [], null); $this->setIfExists('fn_uuid', $data ?? [], null); } @@ -808,6 +829,87 @@ public function setIpIsNot($ip_is_not) return $this; } + /** + * Gets asn + * + * @return string|null + */ + public function getAsn() + { + return $this->container['asn']; + } + + /** + * Sets asn + * + * @param string|null $asn ASN filter type (asn_is, asn_is_not, any) + * + * @return self + */ + public function setAsn($asn) + { + if (is_null($asn)) { + throw new \InvalidArgumentException('non-nullable asn cannot be null'); + } + $this->container['asn'] = $asn; + + return $this; + } + + /** + * Gets asn_is + * + * @return string[]|null + */ + public function getAsnIs() + { + return $this->container['asn_is']; + } + + /** + * Sets asn_is + * + * @param string[]|null $asn_is Allowed AS numbers + * + * @return self + */ + public function setAsnIs($asn_is) + { + if (is_null($asn_is)) { + throw new \InvalidArgumentException('non-nullable asn_is cannot be null'); + } + $this->container['asn_is'] = $asn_is; + + return $this; + } + + /** + * Gets asn_is_not + * + * @return string[]|null + */ + public function getAsnIsNot() + { + return $this->container['asn_is_not']; + } + + /** + * Sets asn_is_not + * + * @param string[]|null $asn_is_not Excluded AS numbers + * + * @return self + */ + public function setAsnIsNot($asn_is_not) + { + if (is_null($asn_is_not)) { + throw new \InvalidArgumentException('non-nullable asn_is_not cannot be null'); + } + $this->container['asn_is_not'] = $asn_is_not; + + return $this; + } + /** * Gets fn_uuid * diff --git a/src/Model/V2RuleHeader.php b/src/Model/V2RuleHeader.php index e6af3ae..a90acc9 100644 --- a/src/Model/V2RuleHeader.php +++ b/src/Model/V2RuleHeader.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ @@ -71,6 +71,9 @@ class V2RuleHeader implements ModelInterface, ArrayAccess, \JsonSerializable 'ip' => 'string', 'ip_is' => 'string[]', 'ip_is_not' => 'string[]', + 'asn' => 'string', + 'asn_is' => 'string[]', + 'asn_is_not' => 'string[]', 'country' => 'string', 'country_is' => 'string[]', 'country_is_not' => 'string[]', @@ -100,6 +103,9 @@ class V2RuleHeader implements ModelInterface, ArrayAccess, \JsonSerializable 'ip' => null, 'ip_is' => null, 'ip_is_not' => null, + 'asn' => null, + 'asn_is' => null, + 'asn_is_not' => null, 'country' => null, 'country_is' => null, 'country_is_not' => null, @@ -127,6 +133,9 @@ class V2RuleHeader implements ModelInterface, ArrayAccess, \JsonSerializable 'ip' => false, 'ip_is' => false, 'ip_is_not' => false, + 'asn' => false, + 'asn_is' => false, + 'asn_is_not' => false, 'country' => false, 'country_is' => false, 'country_is_not' => false, @@ -234,6 +243,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'ip', 'ip_is' => 'ip_is', 'ip_is_not' => 'ip_is_not', + 'asn' => 'asn', + 'asn_is' => 'asn_is', + 'asn_is_not' => 'asn_is_not', 'country' => 'country', 'country_is' => 'country_is', 'country_is_not' => 'country_is_not', @@ -261,6 +273,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'setIp', 'ip_is' => 'setIpIs', 'ip_is_not' => 'setIpIsNot', + 'asn' => 'setAsn', + 'asn_is' => 'setAsnIs', + 'asn_is_not' => 'setAsnIsNot', 'country' => 'setCountry', 'country_is' => 'setCountryIs', 'country_is_not' => 'setCountryIsNot', @@ -288,6 +303,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'getIp', 'ip_is' => 'getIpIs', 'ip_is_not' => 'getIpIsNot', + 'asn' => 'getAsn', + 'asn_is' => 'getAsnIs', + 'asn_is_not' => 'getAsnIsNot', 'country' => 'getCountry', 'country_is' => 'getCountryIs', 'country_is_not' => 'getCountryIsNot', @@ -366,6 +384,9 @@ public function __construct(?array $data = null) $this->setIfExists('ip', $data ?? [], null); $this->setIfExists('ip_is', $data ?? [], null); $this->setIfExists('ip_is_not', $data ?? [], null); + $this->setIfExists('asn', $data ?? [], null); + $this->setIfExists('asn_is', $data ?? [], null); + $this->setIfExists('asn_is_not', $data ?? [], null); $this->setIfExists('country', $data ?? [], null); $this->setIfExists('country_is', $data ?? [], null); $this->setIfExists('country_is_not', $data ?? [], null); @@ -805,6 +826,87 @@ public function setIpIsNot($ip_is_not) return $this; } + /** + * Gets asn + * + * @return string|null + */ + public function getAsn() + { + return $this->container['asn']; + } + + /** + * Sets asn + * + * @param string|null $asn ASN filter type (asn_is, asn_is_not, any) + * + * @return self + */ + public function setAsn($asn) + { + if (is_null($asn)) { + throw new \InvalidArgumentException('non-nullable asn cannot be null'); + } + $this->container['asn'] = $asn; + + return $this; + } + + /** + * Gets asn_is + * + * @return string[]|null + */ + public function getAsnIs() + { + return $this->container['asn_is']; + } + + /** + * Sets asn_is + * + * @param string[]|null $asn_is Allowed AS numbers + * + * @return self + */ + public function setAsnIs($asn_is) + { + if (is_null($asn_is)) { + throw new \InvalidArgumentException('non-nullable asn_is cannot be null'); + } + $this->container['asn_is'] = $asn_is; + + return $this; + } + + /** + * Gets asn_is_not + * + * @return string[]|null + */ + public function getAsnIsNot() + { + return $this->container['asn_is_not']; + } + + /** + * Sets asn_is_not + * + * @param string[]|null $asn_is_not Excluded AS numbers + * + * @return self + */ + public function setAsnIsNot($asn_is_not) + { + if (is_null($asn_is_not)) { + throw new \InvalidArgumentException('non-nullable asn_is_not cannot be null'); + } + $this->container['asn_is_not'] = $asn_is_not; + + return $this; + } + /** * Gets country * diff --git a/src/Model/V2RuleHeaderAction.php b/src/Model/V2RuleHeaderAction.php index d29f50d..511d382 100644 --- a/src/Model/V2RuleHeaderAction.php +++ b/src/Model/V2RuleHeaderAction.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V2RuleHeaderRequest.php b/src/Model/V2RuleHeaderRequest.php index 0b4032e..1935827 100644 --- a/src/Model/V2RuleHeaderRequest.php +++ b/src/Model/V2RuleHeaderRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ @@ -72,6 +72,9 @@ class V2RuleHeaderRequest implements ModelInterface, ArrayAccess, \JsonSerializa 'ip' => 'string', 'ip_is' => 'string[]', 'ip_is_not' => 'string[]', + 'asn' => 'string', + 'asn_is' => 'string[]', + 'asn_is_not' => 'string[]', 'headers' => 'array' ]; @@ -98,6 +101,9 @@ class V2RuleHeaderRequest implements ModelInterface, ArrayAccess, \JsonSerializa 'ip' => null, 'ip_is' => null, 'ip_is_not' => null, + 'asn' => null, + 'asn_is' => null, + 'asn_is_not' => null, 'headers' => null ]; @@ -122,6 +128,9 @@ class V2RuleHeaderRequest implements ModelInterface, ArrayAccess, \JsonSerializa 'ip' => false, 'ip_is' => false, 'ip_is_not' => false, + 'asn' => false, + 'asn_is' => false, + 'asn_is_not' => false, 'headers' => false ]; @@ -226,6 +235,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'ip', 'ip_is' => 'ip_is', 'ip_is_not' => 'ip_is_not', + 'asn' => 'asn', + 'asn_is' => 'asn_is', + 'asn_is_not' => 'asn_is_not', 'headers' => 'headers' ]; @@ -250,6 +262,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'setIp', 'ip_is' => 'setIpIs', 'ip_is_not' => 'setIpIsNot', + 'asn' => 'setAsn', + 'asn_is' => 'setAsnIs', + 'asn_is_not' => 'setAsnIsNot', 'headers' => 'setHeaders' ]; @@ -274,6 +289,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'getIp', 'ip_is' => 'getIpIs', 'ip_is_not' => 'getIpIsNot', + 'asn' => 'getAsn', + 'asn_is' => 'getAsnIs', + 'asn_is_not' => 'getAsnIsNot', 'headers' => 'getHeaders' ]; @@ -349,6 +367,9 @@ public function __construct(?array $data = null) $this->setIfExists('ip', $data ?? [], null); $this->setIfExists('ip_is', $data ?? [], null); $this->setIfExists('ip_is_not', $data ?? [], null); + $this->setIfExists('asn', $data ?? [], null); + $this->setIfExists('asn_is', $data ?? [], null); + $this->setIfExists('asn_is_not', $data ?? [], null); $this->setIfExists('headers', $data ?? [], null); } @@ -808,6 +829,87 @@ public function setIpIsNot($ip_is_not) return $this; } + /** + * Gets asn + * + * @return string|null + */ + public function getAsn() + { + return $this->container['asn']; + } + + /** + * Sets asn + * + * @param string|null $asn ASN filter type (asn_is, asn_is_not, any) + * + * @return self + */ + public function setAsn($asn) + { + if (is_null($asn)) { + throw new \InvalidArgumentException('non-nullable asn cannot be null'); + } + $this->container['asn'] = $asn; + + return $this; + } + + /** + * Gets asn_is + * + * @return string[]|null + */ + public function getAsnIs() + { + return $this->container['asn_is']; + } + + /** + * Sets asn_is + * + * @param string[]|null $asn_is Allowed AS numbers + * + * @return self + */ + public function setAsnIs($asn_is) + { + if (is_null($asn_is)) { + throw new \InvalidArgumentException('non-nullable asn_is cannot be null'); + } + $this->container['asn_is'] = $asn_is; + + return $this; + } + + /** + * Gets asn_is_not + * + * @return string[]|null + */ + public function getAsnIsNot() + { + return $this->container['asn_is_not']; + } + + /** + * Sets asn_is_not + * + * @param string[]|null $asn_is_not Excluded AS numbers + * + * @return self + */ + public function setAsnIsNot($asn_is_not) + { + if (is_null($asn_is_not)) { + throw new \InvalidArgumentException('non-nullable asn_is_not cannot be null'); + } + $this->container['asn_is_not'] = $asn_is_not; + + return $this; + } + /** * Gets headers * diff --git a/src/Model/V2RuleProxy.php b/src/Model/V2RuleProxy.php index 762982e..3acfe39 100644 --- a/src/Model/V2RuleProxy.php +++ b/src/Model/V2RuleProxy.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ @@ -71,6 +71,9 @@ class V2RuleProxy implements ModelInterface, ArrayAccess, \JsonSerializable 'ip' => 'string', 'ip_is' => 'string[]', 'ip_is_not' => 'string[]', + 'asn' => 'string', + 'asn_is' => 'string[]', + 'asn_is_not' => 'string[]', 'country' => 'string', 'country_is' => 'string[]', 'country_is_not' => 'string[]', @@ -100,6 +103,9 @@ class V2RuleProxy implements ModelInterface, ArrayAccess, \JsonSerializable 'ip' => null, 'ip_is' => null, 'ip_is_not' => null, + 'asn' => null, + 'asn_is' => null, + 'asn_is_not' => null, 'country' => null, 'country_is' => null, 'country_is_not' => null, @@ -127,6 +133,9 @@ class V2RuleProxy implements ModelInterface, ArrayAccess, \JsonSerializable 'ip' => false, 'ip_is' => false, 'ip_is_not' => false, + 'asn' => false, + 'asn_is' => false, + 'asn_is_not' => false, 'country' => false, 'country_is' => false, 'country_is_not' => false, @@ -234,6 +243,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'ip', 'ip_is' => 'ip_is', 'ip_is_not' => 'ip_is_not', + 'asn' => 'asn', + 'asn_is' => 'asn_is', + 'asn_is_not' => 'asn_is_not', 'country' => 'country', 'country_is' => 'country_is', 'country_is_not' => 'country_is_not', @@ -261,6 +273,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'setIp', 'ip_is' => 'setIpIs', 'ip_is_not' => 'setIpIsNot', + 'asn' => 'setAsn', + 'asn_is' => 'setAsnIs', + 'asn_is_not' => 'setAsnIsNot', 'country' => 'setCountry', 'country_is' => 'setCountryIs', 'country_is_not' => 'setCountryIsNot', @@ -288,6 +303,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'getIp', 'ip_is' => 'getIpIs', 'ip_is_not' => 'getIpIsNot', + 'asn' => 'getAsn', + 'asn_is' => 'getAsnIs', + 'asn_is_not' => 'getAsnIsNot', 'country' => 'getCountry', 'country_is' => 'getCountryIs', 'country_is_not' => 'getCountryIsNot', @@ -366,6 +384,9 @@ public function __construct(?array $data = null) $this->setIfExists('ip', $data ?? [], null); $this->setIfExists('ip_is', $data ?? [], null); $this->setIfExists('ip_is_not', $data ?? [], null); + $this->setIfExists('asn', $data ?? [], null); + $this->setIfExists('asn_is', $data ?? [], null); + $this->setIfExists('asn_is_not', $data ?? [], null); $this->setIfExists('country', $data ?? [], null); $this->setIfExists('country_is', $data ?? [], null); $this->setIfExists('country_is_not', $data ?? [], null); @@ -805,6 +826,87 @@ public function setIpIsNot($ip_is_not) return $this; } + /** + * Gets asn + * + * @return string|null + */ + public function getAsn() + { + return $this->container['asn']; + } + + /** + * Sets asn + * + * @param string|null $asn ASN filter type (asn_is, asn_is_not, any) + * + * @return self + */ + public function setAsn($asn) + { + if (is_null($asn)) { + throw new \InvalidArgumentException('non-nullable asn cannot be null'); + } + $this->container['asn'] = $asn; + + return $this; + } + + /** + * Gets asn_is + * + * @return string[]|null + */ + public function getAsnIs() + { + return $this->container['asn_is']; + } + + /** + * Sets asn_is + * + * @param string[]|null $asn_is Allowed AS numbers + * + * @return self + */ + public function setAsnIs($asn_is) + { + if (is_null($asn_is)) { + throw new \InvalidArgumentException('non-nullable asn_is cannot be null'); + } + $this->container['asn_is'] = $asn_is; + + return $this; + } + + /** + * Gets asn_is_not + * + * @return string[]|null + */ + public function getAsnIsNot() + { + return $this->container['asn_is_not']; + } + + /** + * Sets asn_is_not + * + * @param string[]|null $asn_is_not Excluded AS numbers + * + * @return self + */ + public function setAsnIsNot($asn_is_not) + { + if (is_null($asn_is_not)) { + throw new \InvalidArgumentException('non-nullable asn_is_not cannot be null'); + } + $this->container['asn_is_not'] = $asn_is_not; + + return $this; + } + /** * Gets country * diff --git a/src/Model/V2RuleProxyAction.php b/src/Model/V2RuleProxyAction.php index e8f64fc..829d530 100644 --- a/src/Model/V2RuleProxyAction.php +++ b/src/Model/V2RuleProxyAction.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V2RuleProxyActionNotifyConfig.php b/src/Model/V2RuleProxyActionNotifyConfig.php index dfd00ae..960feb1 100644 --- a/src/Model/V2RuleProxyActionNotifyConfig.php +++ b/src/Model/V2RuleProxyActionNotifyConfig.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V2RuleProxyActionQuantCloudSelection.php b/src/Model/V2RuleProxyActionQuantCloudSelection.php index b83d7fe..b6adb89 100644 --- a/src/Model/V2RuleProxyActionQuantCloudSelection.php +++ b/src/Model/V2RuleProxyActionQuantCloudSelection.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V2RuleProxyRequest.php b/src/Model/V2RuleProxyRequest.php index ab82b37..df7c284 100644 --- a/src/Model/V2RuleProxyRequest.php +++ b/src/Model/V2RuleProxyRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ @@ -72,6 +72,9 @@ class V2RuleProxyRequest implements ModelInterface, ArrayAccess, \JsonSerializab 'ip' => 'string', 'ip_is' => 'string[]', 'ip_is_not' => 'string[]', + 'asn' => 'string', + 'asn_is' => 'string[]', + 'asn_is_not' => 'string[]', 'to' => 'string', 'host' => 'string', 'auth_user' => 'string', @@ -122,6 +125,9 @@ class V2RuleProxyRequest implements ModelInterface, ArrayAccess, \JsonSerializab 'ip' => null, 'ip_is' => null, 'ip_is_not' => null, + 'asn' => null, + 'asn_is' => null, + 'asn_is_not' => null, 'to' => null, 'host' => null, 'auth_user' => null, @@ -170,6 +176,9 @@ class V2RuleProxyRequest implements ModelInterface, ArrayAccess, \JsonSerializab 'ip' => false, 'ip_is' => false, 'ip_is_not' => false, + 'asn' => false, + 'asn_is' => false, + 'asn_is_not' => false, 'to' => false, 'host' => false, 'auth_user' => false, @@ -298,6 +307,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'ip', 'ip_is' => 'ip_is', 'ip_is_not' => 'ip_is_not', + 'asn' => 'asn', + 'asn_is' => 'asn_is', + 'asn_is_not' => 'asn_is_not', 'to' => 'to', 'host' => 'host', 'auth_user' => 'auth_user', @@ -346,6 +358,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'setIp', 'ip_is' => 'setIpIs', 'ip_is_not' => 'setIpIsNot', + 'asn' => 'setAsn', + 'asn_is' => 'setAsnIs', + 'asn_is_not' => 'setAsnIsNot', 'to' => 'setTo', 'host' => 'setHost', 'auth_user' => 'setAuthUser', @@ -394,6 +409,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'getIp', 'ip_is' => 'getIpIs', 'ip_is_not' => 'getIpIsNot', + 'asn' => 'getAsn', + 'asn_is' => 'getAsnIs', + 'asn_is_not' => 'getAsnIsNot', 'to' => 'getTo', 'host' => 'getHost', 'auth_user' => 'getAuthUser', @@ -493,6 +511,9 @@ public function __construct(?array $data = null) $this->setIfExists('ip', $data ?? [], null); $this->setIfExists('ip_is', $data ?? [], null); $this->setIfExists('ip_is_not', $data ?? [], null); + $this->setIfExists('asn', $data ?? [], null); + $this->setIfExists('asn_is', $data ?? [], null); + $this->setIfExists('asn_is_not', $data ?? [], null); $this->setIfExists('to', $data ?? [], null); $this->setIfExists('host', $data ?? [], null); $this->setIfExists('auth_user', $data ?? [], ''); @@ -976,6 +997,87 @@ public function setIpIsNot($ip_is_not) return $this; } + /** + * Gets asn + * + * @return string|null + */ + public function getAsn() + { + return $this->container['asn']; + } + + /** + * Sets asn + * + * @param string|null $asn ASN filter type (asn_is, asn_is_not, any) + * + * @return self + */ + public function setAsn($asn) + { + if (is_null($asn)) { + throw new \InvalidArgumentException('non-nullable asn cannot be null'); + } + $this->container['asn'] = $asn; + + return $this; + } + + /** + * Gets asn_is + * + * @return string[]|null + */ + public function getAsnIs() + { + return $this->container['asn_is']; + } + + /** + * Sets asn_is + * + * @param string[]|null $asn_is Allowed AS numbers + * + * @return self + */ + public function setAsnIs($asn_is) + { + if (is_null($asn_is)) { + throw new \InvalidArgumentException('non-nullable asn_is cannot be null'); + } + $this->container['asn_is'] = $asn_is; + + return $this; + } + + /** + * Gets asn_is_not + * + * @return string[]|null + */ + public function getAsnIsNot() + { + return $this->container['asn_is_not']; + } + + /** + * Sets asn_is_not + * + * @param string[]|null $asn_is_not Excluded AS numbers + * + * @return self + */ + public function setAsnIsNot($asn_is_not) + { + if (is_null($asn_is_not)) { + throw new \InvalidArgumentException('non-nullable asn_is_not cannot be null'); + } + $this->container['asn_is_not'] = $asn_is_not; + + return $this; + } + /** * Gets to * diff --git a/src/Model/V2RuleRedirect.php b/src/Model/V2RuleRedirect.php index 99fe93a..bc2704d 100644 --- a/src/Model/V2RuleRedirect.php +++ b/src/Model/V2RuleRedirect.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ @@ -71,6 +71,9 @@ class V2RuleRedirect implements ModelInterface, ArrayAccess, \JsonSerializable 'ip' => 'string', 'ip_is' => 'string[]', 'ip_is_not' => 'string[]', + 'asn' => 'string', + 'asn_is' => 'string[]', + 'asn_is_not' => 'string[]', 'country' => 'string', 'country_is' => 'string[]', 'country_is_not' => 'string[]', @@ -100,6 +103,9 @@ class V2RuleRedirect implements ModelInterface, ArrayAccess, \JsonSerializable 'ip' => null, 'ip_is' => null, 'ip_is_not' => null, + 'asn' => null, + 'asn_is' => null, + 'asn_is_not' => null, 'country' => null, 'country_is' => null, 'country_is_not' => null, @@ -127,6 +133,9 @@ class V2RuleRedirect implements ModelInterface, ArrayAccess, \JsonSerializable 'ip' => false, 'ip_is' => false, 'ip_is_not' => false, + 'asn' => false, + 'asn_is' => false, + 'asn_is_not' => false, 'country' => false, 'country_is' => false, 'country_is_not' => false, @@ -234,6 +243,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'ip', 'ip_is' => 'ip_is', 'ip_is_not' => 'ip_is_not', + 'asn' => 'asn', + 'asn_is' => 'asn_is', + 'asn_is_not' => 'asn_is_not', 'country' => 'country', 'country_is' => 'country_is', 'country_is_not' => 'country_is_not', @@ -261,6 +273,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'setIp', 'ip_is' => 'setIpIs', 'ip_is_not' => 'setIpIsNot', + 'asn' => 'setAsn', + 'asn_is' => 'setAsnIs', + 'asn_is_not' => 'setAsnIsNot', 'country' => 'setCountry', 'country_is' => 'setCountryIs', 'country_is_not' => 'setCountryIsNot', @@ -288,6 +303,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'getIp', 'ip_is' => 'getIpIs', 'ip_is_not' => 'getIpIsNot', + 'asn' => 'getAsn', + 'asn_is' => 'getAsnIs', + 'asn_is_not' => 'getAsnIsNot', 'country' => 'getCountry', 'country_is' => 'getCountryIs', 'country_is_not' => 'getCountryIsNot', @@ -366,6 +384,9 @@ public function __construct(?array $data = null) $this->setIfExists('ip', $data ?? [], null); $this->setIfExists('ip_is', $data ?? [], null); $this->setIfExists('ip_is_not', $data ?? [], null); + $this->setIfExists('asn', $data ?? [], null); + $this->setIfExists('asn_is', $data ?? [], null); + $this->setIfExists('asn_is_not', $data ?? [], null); $this->setIfExists('country', $data ?? [], null); $this->setIfExists('country_is', $data ?? [], null); $this->setIfExists('country_is_not', $data ?? [], null); @@ -802,6 +823,87 @@ public function setIpIsNot($ip_is_not) return $this; } + /** + * Gets asn + * + * @return string|null + */ + public function getAsn() + { + return $this->container['asn']; + } + + /** + * Sets asn + * + * @param string|null $asn ASN filter type (asn_is, asn_is_not, any) + * + * @return self + */ + public function setAsn($asn) + { + if (is_null($asn)) { + throw new \InvalidArgumentException('non-nullable asn cannot be null'); + } + $this->container['asn'] = $asn; + + return $this; + } + + /** + * Gets asn_is + * + * @return string[]|null + */ + public function getAsnIs() + { + return $this->container['asn_is']; + } + + /** + * Sets asn_is + * + * @param string[]|null $asn_is Allowed AS numbers + * + * @return self + */ + public function setAsnIs($asn_is) + { + if (is_null($asn_is)) { + throw new \InvalidArgumentException('non-nullable asn_is cannot be null'); + } + $this->container['asn_is'] = $asn_is; + + return $this; + } + + /** + * Gets asn_is_not + * + * @return string[]|null + */ + public function getAsnIsNot() + { + return $this->container['asn_is_not']; + } + + /** + * Sets asn_is_not + * + * @param string[]|null $asn_is_not Excluded AS numbers + * + * @return self + */ + public function setAsnIsNot($asn_is_not) + { + if (is_null($asn_is_not)) { + throw new \InvalidArgumentException('non-nullable asn_is_not cannot be null'); + } + $this->container['asn_is_not'] = $asn_is_not; + + return $this; + } + /** * Gets country * diff --git a/src/Model/V2RuleRedirectAction.php b/src/Model/V2RuleRedirectAction.php index 897c601..1156331 100644 --- a/src/Model/V2RuleRedirectAction.php +++ b/src/Model/V2RuleRedirectAction.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V2RuleRedirectRequest.php b/src/Model/V2RuleRedirectRequest.php index f272510..20804f8 100644 --- a/src/Model/V2RuleRedirectRequest.php +++ b/src/Model/V2RuleRedirectRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ @@ -72,6 +72,9 @@ class V2RuleRedirectRequest implements ModelInterface, ArrayAccess, \JsonSeriali 'ip' => 'string', 'ip_is' => 'string[]', 'ip_is_not' => 'string[]', + 'asn' => 'string', + 'asn_is' => 'string[]', + 'asn_is_not' => 'string[]', 'redirect_to' => 'string', 'redirect_code' => 'string' ]; @@ -99,6 +102,9 @@ class V2RuleRedirectRequest implements ModelInterface, ArrayAccess, \JsonSeriali 'ip' => null, 'ip_is' => null, 'ip_is_not' => null, + 'asn' => null, + 'asn_is' => null, + 'asn_is_not' => null, 'redirect_to' => null, 'redirect_code' => null ]; @@ -124,6 +130,9 @@ class V2RuleRedirectRequest implements ModelInterface, ArrayAccess, \JsonSeriali 'ip' => false, 'ip_is' => false, 'ip_is_not' => false, + 'asn' => false, + 'asn_is' => false, + 'asn_is_not' => false, 'redirect_to' => false, 'redirect_code' => false ]; @@ -229,6 +238,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'ip', 'ip_is' => 'ip_is', 'ip_is_not' => 'ip_is_not', + 'asn' => 'asn', + 'asn_is' => 'asn_is', + 'asn_is_not' => 'asn_is_not', 'redirect_to' => 'redirect_to', 'redirect_code' => 'redirect_code' ]; @@ -254,6 +266,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'setIp', 'ip_is' => 'setIpIs', 'ip_is_not' => 'setIpIsNot', + 'asn' => 'setAsn', + 'asn_is' => 'setAsnIs', + 'asn_is_not' => 'setAsnIsNot', 'redirect_to' => 'setRedirectTo', 'redirect_code' => 'setRedirectCode' ]; @@ -279,6 +294,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'getIp', 'ip_is' => 'getIpIs', 'ip_is_not' => 'getIpIsNot', + 'asn' => 'getAsn', + 'asn_is' => 'getAsnIs', + 'asn_is_not' => 'getAsnIsNot', 'redirect_to' => 'getRedirectTo', 'redirect_code' => 'getRedirectCode' ]; @@ -355,6 +373,9 @@ public function __construct(?array $data = null) $this->setIfExists('ip', $data ?? [], null); $this->setIfExists('ip_is', $data ?? [], null); $this->setIfExists('ip_is_not', $data ?? [], null); + $this->setIfExists('asn', $data ?? [], null); + $this->setIfExists('asn_is', $data ?? [], null); + $this->setIfExists('asn_is_not', $data ?? [], null); $this->setIfExists('redirect_to', $data ?? [], null); $this->setIfExists('redirect_code', $data ?? [], '301'); } @@ -815,6 +836,87 @@ public function setIpIsNot($ip_is_not) return $this; } + /** + * Gets asn + * + * @return string|null + */ + public function getAsn() + { + return $this->container['asn']; + } + + /** + * Sets asn + * + * @param string|null $asn ASN filter type (asn_is, asn_is_not, any) + * + * @return self + */ + public function setAsn($asn) + { + if (is_null($asn)) { + throw new \InvalidArgumentException('non-nullable asn cannot be null'); + } + $this->container['asn'] = $asn; + + return $this; + } + + /** + * Gets asn_is + * + * @return string[]|null + */ + public function getAsnIs() + { + return $this->container['asn_is']; + } + + /** + * Sets asn_is + * + * @param string[]|null $asn_is Allowed AS numbers + * + * @return self + */ + public function setAsnIs($asn_is) + { + if (is_null($asn_is)) { + throw new \InvalidArgumentException('non-nullable asn_is cannot be null'); + } + $this->container['asn_is'] = $asn_is; + + return $this; + } + + /** + * Gets asn_is_not + * + * @return string[]|null + */ + public function getAsnIsNot() + { + return $this->container['asn_is_not']; + } + + /** + * Sets asn_is_not + * + * @param string[]|null $asn_is_not Excluded AS numbers + * + * @return self + */ + public function setAsnIsNot($asn_is_not) + { + if (is_null($asn_is_not)) { + throw new \InvalidArgumentException('non-nullable asn_is_not cannot be null'); + } + $this->container['asn_is_not'] = $asn_is_not; + + return $this; + } + /** * Gets redirect_to * diff --git a/src/Model/V2RuleRequest.php b/src/Model/V2RuleRequest.php index 9aa123f..a7959af 100644 --- a/src/Model/V2RuleRequest.php +++ b/src/Model/V2RuleRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ @@ -71,7 +71,10 @@ class V2RuleRequest implements ModelInterface, ArrayAccess, \JsonSerializable 'method_is_not' => 'string[]', 'ip' => 'string', 'ip_is' => 'string[]', - 'ip_is_not' => 'string[]' + 'ip_is_not' => 'string[]', + 'asn' => 'string', + 'asn_is' => 'string[]', + 'asn_is_not' => 'string[]' ]; /** @@ -96,7 +99,10 @@ class V2RuleRequest implements ModelInterface, ArrayAccess, \JsonSerializable 'method_is_not' => null, 'ip' => null, 'ip_is' => null, - 'ip_is_not' => null + 'ip_is_not' => null, + 'asn' => null, + 'asn_is' => null, + 'asn_is_not' => null ]; /** @@ -119,7 +125,10 @@ class V2RuleRequest implements ModelInterface, ArrayAccess, \JsonSerializable 'method_is_not' => false, 'ip' => false, 'ip_is' => false, - 'ip_is_not' => false + 'ip_is_not' => false, + 'asn' => false, + 'asn_is' => false, + 'asn_is_not' => false ]; /** @@ -222,7 +231,10 @@ public function isNullableSetToNull(string $property): bool 'method_is_not' => 'method_is_not', 'ip' => 'ip', 'ip_is' => 'ip_is', - 'ip_is_not' => 'ip_is_not' + 'ip_is_not' => 'ip_is_not', + 'asn' => 'asn', + 'asn_is' => 'asn_is', + 'asn_is_not' => 'asn_is_not' ]; /** @@ -245,7 +257,10 @@ public function isNullableSetToNull(string $property): bool 'method_is_not' => 'setMethodIsNot', 'ip' => 'setIp', 'ip_is' => 'setIpIs', - 'ip_is_not' => 'setIpIsNot' + 'ip_is_not' => 'setIpIsNot', + 'asn' => 'setAsn', + 'asn_is' => 'setAsnIs', + 'asn_is_not' => 'setAsnIsNot' ]; /** @@ -268,7 +283,10 @@ public function isNullableSetToNull(string $property): bool 'method_is_not' => 'getMethodIsNot', 'ip' => 'getIp', 'ip_is' => 'getIpIs', - 'ip_is_not' => 'getIpIsNot' + 'ip_is_not' => 'getIpIsNot', + 'asn' => 'getAsn', + 'asn_is' => 'getAsnIs', + 'asn_is_not' => 'getAsnIsNot' ]; /** @@ -343,6 +361,9 @@ public function __construct(?array $data = null) $this->setIfExists('ip', $data ?? [], null); $this->setIfExists('ip_is', $data ?? [], null); $this->setIfExists('ip_is_not', $data ?? [], null); + $this->setIfExists('asn', $data ?? [], null); + $this->setIfExists('asn_is', $data ?? [], null); + $this->setIfExists('asn_is_not', $data ?? [], null); } /** @@ -797,6 +818,87 @@ public function setIpIsNot($ip_is_not) return $this; } + + /** + * Gets asn + * + * @return string|null + */ + public function getAsn() + { + return $this->container['asn']; + } + + /** + * Sets asn + * + * @param string|null $asn ASN filter type (asn_is, asn_is_not, any) + * + * @return self + */ + public function setAsn($asn) + { + if (is_null($asn)) { + throw new \InvalidArgumentException('non-nullable asn cannot be null'); + } + $this->container['asn'] = $asn; + + return $this; + } + + /** + * Gets asn_is + * + * @return string[]|null + */ + public function getAsnIs() + { + return $this->container['asn_is']; + } + + /** + * Sets asn_is + * + * @param string[]|null $asn_is Allowed AS numbers + * + * @return self + */ + public function setAsnIs($asn_is) + { + if (is_null($asn_is)) { + throw new \InvalidArgumentException('non-nullable asn_is cannot be null'); + } + $this->container['asn_is'] = $asn_is; + + return $this; + } + + /** + * Gets asn_is_not + * + * @return string[]|null + */ + public function getAsnIsNot() + { + return $this->container['asn_is_not']; + } + + /** + * Sets asn_is_not + * + * @param string[]|null $asn_is_not Excluded AS numbers + * + * @return self + */ + public function setAsnIsNot($asn_is_not) + { + if (is_null($asn_is_not)) { + throw new \InvalidArgumentException('non-nullable asn_is_not cannot be null'); + } + $this->container['asn_is_not'] = $asn_is_not; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/V2RuleServeStatic.php b/src/Model/V2RuleServeStatic.php index a4b31c1..14dd33d 100644 --- a/src/Model/V2RuleServeStatic.php +++ b/src/Model/V2RuleServeStatic.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ @@ -71,6 +71,9 @@ class V2RuleServeStatic implements ModelInterface, ArrayAccess, \JsonSerializabl 'ip' => 'string', 'ip_is' => 'string[]', 'ip_is_not' => 'string[]', + 'asn' => 'string', + 'asn_is' => 'string[]', + 'asn_is_not' => 'string[]', 'country' => 'string', 'country_is' => 'string[]', 'country_is_not' => 'string[]', @@ -100,6 +103,9 @@ class V2RuleServeStatic implements ModelInterface, ArrayAccess, \JsonSerializabl 'ip' => null, 'ip_is' => null, 'ip_is_not' => null, + 'asn' => null, + 'asn_is' => null, + 'asn_is_not' => null, 'country' => null, 'country_is' => null, 'country_is_not' => null, @@ -127,6 +133,9 @@ class V2RuleServeStatic implements ModelInterface, ArrayAccess, \JsonSerializabl 'ip' => false, 'ip_is' => false, 'ip_is_not' => false, + 'asn' => false, + 'asn_is' => false, + 'asn_is_not' => false, 'country' => false, 'country_is' => false, 'country_is_not' => false, @@ -234,6 +243,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'ip', 'ip_is' => 'ip_is', 'ip_is_not' => 'ip_is_not', + 'asn' => 'asn', + 'asn_is' => 'asn_is', + 'asn_is_not' => 'asn_is_not', 'country' => 'country', 'country_is' => 'country_is', 'country_is_not' => 'country_is_not', @@ -261,6 +273,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'setIp', 'ip_is' => 'setIpIs', 'ip_is_not' => 'setIpIsNot', + 'asn' => 'setAsn', + 'asn_is' => 'setAsnIs', + 'asn_is_not' => 'setAsnIsNot', 'country' => 'setCountry', 'country_is' => 'setCountryIs', 'country_is_not' => 'setCountryIsNot', @@ -288,6 +303,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'getIp', 'ip_is' => 'getIpIs', 'ip_is_not' => 'getIpIsNot', + 'asn' => 'getAsn', + 'asn_is' => 'getAsnIs', + 'asn_is_not' => 'getAsnIsNot', 'country' => 'getCountry', 'country_is' => 'getCountryIs', 'country_is_not' => 'getCountryIsNot', @@ -366,6 +384,9 @@ public function __construct(?array $data = null) $this->setIfExists('ip', $data ?? [], null); $this->setIfExists('ip_is', $data ?? [], null); $this->setIfExists('ip_is_not', $data ?? [], null); + $this->setIfExists('asn', $data ?? [], null); + $this->setIfExists('asn_is', $data ?? [], null); + $this->setIfExists('asn_is_not', $data ?? [], null); $this->setIfExists('country', $data ?? [], null); $this->setIfExists('country_is', $data ?? [], null); $this->setIfExists('country_is_not', $data ?? [], null); @@ -805,6 +826,87 @@ public function setIpIsNot($ip_is_not) return $this; } + /** + * Gets asn + * + * @return string|null + */ + public function getAsn() + { + return $this->container['asn']; + } + + /** + * Sets asn + * + * @param string|null $asn ASN filter type (asn_is, asn_is_not, any) + * + * @return self + */ + public function setAsn($asn) + { + if (is_null($asn)) { + throw new \InvalidArgumentException('non-nullable asn cannot be null'); + } + $this->container['asn'] = $asn; + + return $this; + } + + /** + * Gets asn_is + * + * @return string[]|null + */ + public function getAsnIs() + { + return $this->container['asn_is']; + } + + /** + * Sets asn_is + * + * @param string[]|null $asn_is Allowed AS numbers + * + * @return self + */ + public function setAsnIs($asn_is) + { + if (is_null($asn_is)) { + throw new \InvalidArgumentException('non-nullable asn_is cannot be null'); + } + $this->container['asn_is'] = $asn_is; + + return $this; + } + + /** + * Gets asn_is_not + * + * @return string[]|null + */ + public function getAsnIsNot() + { + return $this->container['asn_is_not']; + } + + /** + * Sets asn_is_not + * + * @param string[]|null $asn_is_not Excluded AS numbers + * + * @return self + */ + public function setAsnIsNot($asn_is_not) + { + if (is_null($asn_is_not)) { + throw new \InvalidArgumentException('non-nullable asn_is_not cannot be null'); + } + $this->container['asn_is_not'] = $asn_is_not; + + return $this; + } + /** * Gets country * diff --git a/src/Model/V2RuleServeStaticAction.php b/src/Model/V2RuleServeStaticAction.php index 7385cd3..0c4b9f1 100644 --- a/src/Model/V2RuleServeStaticAction.php +++ b/src/Model/V2RuleServeStaticAction.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V2RuleServeStaticRequest.php b/src/Model/V2RuleServeStaticRequest.php index 7d1936c..527fdd9 100644 --- a/src/Model/V2RuleServeStaticRequest.php +++ b/src/Model/V2RuleServeStaticRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ @@ -72,6 +72,9 @@ class V2RuleServeStaticRequest implements ModelInterface, ArrayAccess, \JsonSeri 'ip' => 'string', 'ip_is' => 'string[]', 'ip_is_not' => 'string[]', + 'asn' => 'string', + 'asn_is' => 'string[]', + 'asn_is_not' => 'string[]', 'static_file_path' => 'string' ]; @@ -98,6 +101,9 @@ class V2RuleServeStaticRequest implements ModelInterface, ArrayAccess, \JsonSeri 'ip' => null, 'ip_is' => null, 'ip_is_not' => null, + 'asn' => null, + 'asn_is' => null, + 'asn_is_not' => null, 'static_file_path' => null ]; @@ -122,6 +128,9 @@ class V2RuleServeStaticRequest implements ModelInterface, ArrayAccess, \JsonSeri 'ip' => false, 'ip_is' => false, 'ip_is_not' => false, + 'asn' => false, + 'asn_is' => false, + 'asn_is_not' => false, 'static_file_path' => false ]; @@ -226,6 +235,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'ip', 'ip_is' => 'ip_is', 'ip_is_not' => 'ip_is_not', + 'asn' => 'asn', + 'asn_is' => 'asn_is', + 'asn_is_not' => 'asn_is_not', 'static_file_path' => 'static_file_path' ]; @@ -250,6 +262,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'setIp', 'ip_is' => 'setIpIs', 'ip_is_not' => 'setIpIsNot', + 'asn' => 'setAsn', + 'asn_is' => 'setAsnIs', + 'asn_is_not' => 'setAsnIsNot', 'static_file_path' => 'setStaticFilePath' ]; @@ -274,6 +289,9 @@ public function isNullableSetToNull(string $property): bool 'ip' => 'getIp', 'ip_is' => 'getIpIs', 'ip_is_not' => 'getIpIsNot', + 'asn' => 'getAsn', + 'asn_is' => 'getAsnIs', + 'asn_is_not' => 'getAsnIsNot', 'static_file_path' => 'getStaticFilePath' ]; @@ -349,6 +367,9 @@ public function __construct(?array $data = null) $this->setIfExists('ip', $data ?? [], null); $this->setIfExists('ip_is', $data ?? [], null); $this->setIfExists('ip_is_not', $data ?? [], null); + $this->setIfExists('asn', $data ?? [], null); + $this->setIfExists('asn_is', $data ?? [], null); + $this->setIfExists('asn_is_not', $data ?? [], null); $this->setIfExists('static_file_path', $data ?? [], null); } @@ -808,6 +829,87 @@ public function setIpIsNot($ip_is_not) return $this; } + /** + * Gets asn + * + * @return string|null + */ + public function getAsn() + { + return $this->container['asn']; + } + + /** + * Sets asn + * + * @param string|null $asn ASN filter type (asn_is, asn_is_not, any) + * + * @return self + */ + public function setAsn($asn) + { + if (is_null($asn)) { + throw new \InvalidArgumentException('non-nullable asn cannot be null'); + } + $this->container['asn'] = $asn; + + return $this; + } + + /** + * Gets asn_is + * + * @return string[]|null + */ + public function getAsnIs() + { + return $this->container['asn_is']; + } + + /** + * Sets asn_is + * + * @param string[]|null $asn_is Allowed AS numbers + * + * @return self + */ + public function setAsnIs($asn_is) + { + if (is_null($asn_is)) { + throw new \InvalidArgumentException('non-nullable asn_is cannot be null'); + } + $this->container['asn_is'] = $asn_is; + + return $this; + } + + /** + * Gets asn_is_not + * + * @return string[]|null + */ + public function getAsnIsNot() + { + return $this->container['asn_is_not']; + } + + /** + * Sets asn_is_not + * + * @param string[]|null $asn_is_not Excluded AS numbers + * + * @return self + */ + public function setAsnIsNot($asn_is_not) + { + if (is_null($asn_is_not)) { + throw new \InvalidArgumentException('non-nullable asn_is_not cannot be null'); + } + $this->container['asn_is_not'] = $asn_is_not; + + return $this; + } + /** * Gets static_file_path * diff --git a/src/Model/V2SecretStore.php b/src/Model/V2SecretStore.php index adeb1ac..91771a1 100644 --- a/src/Model/V2SecretStore.php +++ b/src/Model/V2SecretStore.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V2SecretStoreRequest.php b/src/Model/V2SecretStoreRequest.php index d342e02..e53467b 100644 --- a/src/Model/V2SecretStoreRequest.php +++ b/src/Model/V2SecretStoreRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V2Store.php b/src/Model/V2Store.php index 78fb577..305f517 100644 --- a/src/Model/V2Store.php +++ b/src/Model/V2Store.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V2StoreItem.php b/src/Model/V2StoreItem.php index 85628fd..f873a6a 100644 --- a/src/Model/V2StoreItem.php +++ b/src/Model/V2StoreItem.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V2StoreItemRequest.php b/src/Model/V2StoreItemRequest.php index 46d4a74..9196041 100644 --- a/src/Model/V2StoreItemRequest.php +++ b/src/Model/V2StoreItemRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V2StoreItemUpdateRequest.php b/src/Model/V2StoreItemUpdateRequest.php index bb23010..5c06f5f 100644 --- a/src/Model/V2StoreItemUpdateRequest.php +++ b/src/Model/V2StoreItemUpdateRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V2StoreItemsListResponse.php b/src/Model/V2StoreItemsListResponse.php index 18c112f..b5ffa09 100644 --- a/src/Model/V2StoreItemsListResponse.php +++ b/src/Model/V2StoreItemsListResponse.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/V2StoreRequest.php b/src/Model/V2StoreRequest.php index 4a0d617..53282d8 100644 --- a/src/Model/V2StoreRequest.php +++ b/src/Model/V2StoreRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ValidateCompose200Response.php b/src/Model/ValidateCompose200Response.php index 81f07ec..2e8687e 100644 --- a/src/Model/ValidateCompose200Response.php +++ b/src/Model/ValidateCompose200Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ValidateCompose422Response.php b/src/Model/ValidateCompose422Response.php index 6b13b0b..1440ae9 100644 --- a/src/Model/ValidateCompose422Response.php +++ b/src/Model/ValidateCompose422Response.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/ValidateComposeRequest.php b/src/Model/ValidateComposeRequest.php index 4dfb246..69e81fd 100644 --- a/src/Model/ValidateComposeRequest.php +++ b/src/Model/ValidateComposeRequest.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/Variable.php b/src/Model/Variable.php index 2bb6713..0ecee00 100644 --- a/src/Model/Variable.php +++ b/src/Model/Variable.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/Volume.php b/src/Model/Volume.php index 93bdbff..b250aa3 100644 --- a/src/Model/Volume.php +++ b/src/Model/Volume.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/WafConfig.php b/src/Model/WafConfig.php index deabe31..9508fe2 100644 --- a/src/Model/WafConfig.php +++ b/src/Model/WafConfig.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/WafConfigBlockLists.php b/src/Model/WafConfigBlockLists.php index 45a57b0..3c33aa5 100644 --- a/src/Model/WafConfigBlockLists.php +++ b/src/Model/WafConfigBlockLists.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/WafConfigHttpbl.php b/src/Model/WafConfigHttpbl.php index 298a15f..5e229c1 100644 --- a/src/Model/WafConfigHttpbl.php +++ b/src/Model/WafConfigHttpbl.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/Model/WafConfigThresholdsInner.php b/src/Model/WafConfigThresholdsInner.php index d48e1a9..fcb88b3 100644 --- a/src/Model/WafConfigThresholdsInner.php +++ b/src/Model/WafConfigThresholdsInner.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */ diff --git a/src/ObjectSerializer.php b/src/ObjectSerializer.php index e2e1615..87bd404 100644 --- a/src/ObjectSerializer.php +++ b/src/ObjectSerializer.php @@ -15,7 +15,7 @@ * * Unified API for QuantCDN Admin and QuantCloud Platform services * - * The version of the OpenAPI document: 4.9.0 + * The version of the OpenAPI document: 4.15.3 * Generated by: https://openapi-generator.tech * Generator version: 7.13.0 */