From 836f02f264baa46f52cd8f98ae95e80aea2cb5bd Mon Sep 17 00:00:00 2001 From: flovntp <1842696+flovntp@users.noreply.github.com> Date: Wed, 25 Mar 2026 03:48:52 +0000 Subject: [PATCH] Update OpenAPI spec --- src/Api/BillingApi.php | 369 +++ src/Api/BillingProfileProjectsApi.php | 495 ++++ src/Api/BlackfireMonitoringApi.php | 2442 +++++++++++++++++ src/Api/BlackfireProfilingApi.php | 1557 +++++++++++ src/Api/DiffApi.php | 240 ++ src/Api/DomainClaimApi.php | 889 ++++++ src/Api/EntrypointApi.php | 244 ++ src/Api/EnvironmentApi.php | 967 +------ src/Api/HttpTrafficApi.php | 1935 +++++++++++++ src/Api/OrganizationProjectsApi.php | 18 +- src/Api/OrganizationsApi.php | 21 + src/Api/ProjectApi.php | 145 + src/Api/ResourcesApi.php | 1019 +++++++ src/Api/SbomApi.php | 449 +++ .../Serializer/ApiObjectAttributesMapper.php | 1333 ++++++++- src/Api/Serializer/ApiObjectFormatsMapper.php | 1501 +++++++++- src/Api/Serializer/ApiObjectTypesMapper.php | 1511 +++++++++- src/Api/SubscriptionsApi.php | 18 +- src/Api/TaskApi.php | 619 +++++ src/Model/Activity.php | 12 + src/Model/AddonCredential.php | 2 +- src/Model/AddonCredential1.php | 2 +- src/Model/BitbucketIntegration.php | 29 +- src/Model/BitbucketIntegrationCreateInput.php | 19 +- src/Model/BitbucketIntegrationPatch.php | 19 +- src/Model/BitbucketServerIntegration.php | 25 +- .../BitbucketServerIntegrationCreateInput.php | 17 +- src/Model/BitbucketServerIntegrationPatch.php | 17 +- src/Model/BlackfireIntegration.php | 13 + src/Model/BlackfireIntegrationCreateInput.php | 3 + src/Model/BlackfireIntegrationPatch.php | 3 + .../BlackfirePhpServerCaches200Response.php | 120 + ...irePhpServerCaches200ResponseDataInner.php | 91 + .../BlackfireProfileGraph200Response.php | 164 ++ .../BlackfireProfileProfile200Response.php | 77 + ...BlackfireProfileSubprofiles200Response.php | 77 + .../BlackfireProfileTimeline200Response.php | 101 + ...ckfireProfilesListAutomatic200Response.php | 94 + ...sListAutomatic200ResponseProfilesInner.php | 63 + ...Automatic200ResponseProfilesInnerLinks.php | 70 + ...c200ResponseProfilesInnerLinksGraphUrl.php | 51 + ...fireProfilesRecommendations200Response.php | 115 + ...dations200ResponseRecommendationsInner.php | 63 + ...ns200ResponseRecommendationsInnerLinks.php | 63 + ...ponseRecommendationsInnerLinksApiGraph.php | 51 + ...nseRecommendationsInnerLinksApiProfile.php | 51 + ...ecommendationsInnerLinksApiSubprofiles.php | 51 + ...seRecommendationsInnerLinksApiTimeline.php | 51 + ...fireProfilesRecommendations400Response.php | 63 + .../BlackfireServerGlobal200Response.php | 141 + ...Global200ResponseAlertEvaluationsInner.php | 67 + .../BlackfireServerGlobal200ResponseQuota.php | 71 + ...BlackfireServerGlobal200ResponseServer.php | 52 + ...ServerGlobal200ResponseServerDataInner.php | 84 + .../BlackfireServerTopSpans200Response.php | 313 +++ ...rverTopSpans200ResponseAdvancedFilters.php | 51 + ...s200ResponseAdvancedFiltersFieldsValue.php | 59 + ...eAdvancedFiltersFieldsValueValuesInner.php | 49 + ...fireServerTopSpans200ResponseTopSpans.php} | 15 +- ...erTopSpans200ResponseTopSpansDataInner.php | 105 + ...ServerTransactionsBreakdown200Response.php | 338 +++ ...nsBreakdown200ResponseBreakdownTopHits.php | 49 + ...onsBreakdown200ResponseTopHitsTimeline.php | 44 + ...own200ResponseTopHitsTimelineDataInner.php | 66 + ...HitsTimelineDataInnerTransactionsValue.php | 49 + ...ctionsBreakdown200ResponseTransactions.php | 44 + ...akdown200ResponseTransactionsDataInner.php | 112 + ...n200ResponseTransactionsDataInnerLinks.php | 56 + ...actionsDataInnerLinksAutomaticProfiles.php | 42 + ...nsactionsDataInnerLinksRecommendations.php | 42 + ...onseTransactionsDataInnerLinksTopSpans.php | 42 + src/Model/CacheConfiguration.php | 2 +- ...gSubscription200ResponseRequiredAction.php | 14 + src/Model/CommunityPackagesInner.php | 35 + src/Model/ComposableImages.php | 52 + src/Model/Config.php | 3 + src/Model/DedicatedDeploymentTarget.php | 21 +- .../DedicatedDeploymentTargetCreateInput.php | 7 +- src/Model/DedicatedDeploymentTargetPatch.php | 7 +- src/Model/Deployment.php | 3 + src/Model/DeploymentState.php | 44 + src/Model/DevelopmentResources.php | 6 +- src/Model/Diff.php | 92 + src/Model/DomainClaim.php | 86 + src/Model/EmailIntegration.php | 13 + src/Model/EmailIntegrationCreateInput.php | 3 + src/Model/EmailIntegrationPatch.php | 3 + src/Model/EnterpriseDeploymentTarget.php | 10 +- .../EnterpriseDeploymentTargetCreateInput.php | 8 +- src/Model/EnterpriseDeploymentTargetPatch.php | 8 +- src/Model/EnvironmentActivateInput.php | 2 +- src/Model/EnvironmentBackupInput.php | 4 +- src/Model/EnvironmentBranchInput.php | 10 +- src/Model/EnvironmentDeployInput.php | 4 +- src/Model/EnvironmentInitializeInput.php | 10 +- src/Model/EnvironmentMergeInput.php | 2 +- src/Model/EnvironmentOperationInput.php | 4 +- src/Model/EnvironmentRestoreInput.php | 14 +- src/Model/EnvironmentSourceOperationInput.php | 4 +- src/Model/EnvironmentSynchronizeInput.php | 16 +- src/Model/FastlyIntegration.php | 26 + src/Model/FastlyIntegrationCreateInput.php | 16 + src/Model/FastlyIntegrationPatch.php | 16 + src/Model/FilesInner.php | 8 +- src/Model/Firewall.php | 6 +- src/Model/FoundationDeploymentTarget.php | 9 +- .../FoundationDeploymentTargetCreateInput.php | 7 +- src/Model/FoundationDeploymentTargetPatch.php | 7 +- src/Model/GitLabIntegration.php | 36 +- src/Model/GitLabIntegrationCreateInput.php | 25 +- src/Model/GitLabIntegrationPatch.php | 25 +- src/Model/GithubIntegration.php | 29 +- src/Model/GithubIntegrationCreateInput.php | 19 +- src/Model/GithubIntegrationPatch.php | 19 +- src/Model/HealthWebHook.php | 1 + src/Model/HealthWebHookIntegration.php | 13 + .../HealthWebHookIntegrationCreateInput.php | 3 + src/Model/HealthWebHookIntegrationPatch.php | 3 + src/Model/Hooks1.php | 56 + src/Model/HttpLogIntegration.php | 16 + src/Model/HttpLogIntegrationCreateInput.php | 6 + src/Model/HttpLogIntegrationPatch.php | 9 + src/Model/HttpMetricsOverview200Response.php | 102 + .../HttpMetricsOverview200ResponseData.php | 54 + ...sOverview200ResponseDataTimelinesInner.php | 73 + ...view200ResponseDataTimelinesInnerCodes.php | 77 + ...200ResponseDataTimelinesInnerUrlsValue.php | 49 + ...etricsOverview200ResponseDataUrlsValue.php | 92 + src/Model/HttpMetricsOverview499Response.php | 49 + .../HttpMetricsTimelineIps200Response.php | 196 ++ ...MetricsTimelineIps200ResponseBreakdown.php | 61 + ...melineIps200ResponseBreakdownDataInner.php | 84 + ...TimelineIps200ResponseBreakdownTopHits.php | 49 + ...TimelineIps200ResponseTopHitsTimeline.php} | 16 +- ...Ips200ResponseTopHitsTimelineDataInner.php | 66 + ...ponseTopHitsTimelineDataInnerDataValue.php | 49 + .../HttpMetricsTimelineUrls200Response.php | 203 ++ ...etricsTimelineUrls200ResponseBreakdown.php | 61 + ...elineUrls200ResponseBreakdownDataInner.php | 99 + ...pMetricsTimelineUrls200ResponseFilters.php | 52 + ...elineUrls200ResponseFiltersFieldsValue.php | 59 + ...0ResponseFiltersFieldsValueValuesInner.php | 49 + ...TimelineUrls200ResponseTopHitsTimeline.php | 44 + ...rls200ResponseTopHitsTimelineDataInner.php | 87 + ...tpMetricsTimelineUserAgents200Response.php | 196 ++ ...TimelineUserAgents200ResponseBreakdown.php | 61 + ...serAgents200ResponseBreakdownDataInner.php | 84 + ...neUserAgents200ResponseTopHitsTimeline.php | 44 + ...nts200ResponseTopHitsTimelineDataInner.php | 66 + ...ponseTopHitsTimelineDataInnerDataValue.php | 49 + src/Model/Integration.php | 2 + .../KubernetesDeploymentTargetStorage.php | 100 + ...etesDeploymentTargetStorageCreateInput.php | 60 + ...KubernetesDeploymentTargetStoragePatch.php | 60 + src/Model/LastDeploymentCommandsInner.php | 56 + src/Model/Maintenance.php | 47 + src/Model/MaintenanceWindowConfiguration.php | 46 + src/Model/NewRelicIntegration.php | 16 + src/Model/NewRelicIntegrationCreateInput.php | 6 + src/Model/NewRelicIntegrationPatch.php | 6 + src/Model/OAuth2Consumer.php | 2 +- src/Model/OAuth2Consumer1.php | 2 +- .../ObservabilityEntrypoint200Response.php | 111 + ...lityEntrypoint200ResponseDataRetention.php | 84 + ...sponseDataRetentionContinuousProfiling.php | 56 + ...int200ResponseDataRetentionHttpTraffic.php | 56 + ...Entrypoint200ResponseDataRetentionLogs.php | 56 + ...point200ResponseDataRetentionResources.php | 56 + ...0ResponseDataRetentionServerMonitoring.php | 56 + ...bservabilityEntrypoint200ResponseLinks.php | 164 ++ ...0ResponseLinksBlackfirePhpServerCaches.php | 42 + ...t200ResponseLinksBlackfireServerGlobal.php | 42 + ...ksBlackfireServerTransactionsBreakdown.php | 42 + ...ResponseLinksConprofApplicationFilters.php | 42 + ...int200ResponseLinksConprofApplications.php | 42 + ...point200ResponseLinksConprofFlamegraph.php | 42 + ...rypoint200ResponseLinksConprofTimeline.php | 42 + ...nt200ResponseLinksConsoleSandboxAccess.php | 42 + ...int200ResponseLinksHttpMetricsOverview.php | 42 + ...200ResponseLinksHttpMetricsTimelineIps.php | 42 + ...00ResponseLinksHttpMetricsTimelineUrls.php | 42 + ...onseLinksHttpMetricsTimelineUserAgents.php | 42 + ...Entrypoint200ResponseLinksLogsOverview.php | 42 + ...ityEntrypoint200ResponseLinksLogsQuery.php | 42 + ...00ResponseLinksResourcesByServiceValue.php | 49 + ...point200ResponseLinksResourcesOverview.php | 42 + ...ypoint200ResponseLinksResourcesSummary.php | 42 + ...vabilityEntrypoint200ResponseLinksSelf.php | 42 + ...vabilityEntrypoint200ResponseRetention.php | 63 + src/Model/OrganizationProject.php | 17 + src/Model/OtlpLogIntegration.php | 127 + src/Model/OtlpLogIntegrationCreateInput.php | 86 + src/Model/OtlpLogIntegrationPatch.php | 86 + src/Model/PagerDutyIntegration.php | 13 + src/Model/PagerDutyIntegrationCreateInput.php | 3 + src/Model/PagerDutyIntegrationPatch.php | 3 + src/Model/ProdDomainStorage.php | 12 + src/Model/ProdDomainStorageCreateInput.php | 3 + src/Model/ProductionResources.php | 6 +- src/Model/Profile.php | 10 + src/Model/Project.php | 10 + src/Model/ProjectCapabilities.php | 7 + src/Model/ProjectSettings.php | 52 +- src/Model/ProjectSettingsPatch.php | 10 + src/Model/ProxyRoute.php | 17 +- src/Model/Recurrence.php | 66 + src/Model/RedirectConfiguration.php | 4 +- src/Model/RedirectRoute.php | 17 +- src/Model/RegionReference.php | 4 +- src/Model/ReplacementDomainStorage.php | 11 +- .../ReplacementDomainStorageCreateInput.php | 5 +- src/Model/ReplacementDomainStoragePatch.php | 2 +- src/Model/RepositoryInformation.php | 5 +- src/Model/Resources2.php | 2 +- src/Model/Resources3.php | 2 +- src/Model/Resources4.php | 2 +- src/Model/Resources5.php | 2 +- src/Model/Resources6.php | 2 +- src/Model/ResourcesByService200Response.php | 105 + ...ResourcesByService200ResponseDataInner.php | 52 + ...vice200ResponseDataInnerInstancesValue.php | 115 + ...esponseDataInnerInstancesValueCpuLimit.php | 42 + ...onseDataInnerInstancesValueCpuPressure.php | 105 + ...ResponseDataInnerInstancesValueCpuUsed.php | 105 + ...ponseDataInnerInstancesValueIoPressure.php | 105 + ...onseDataInnerInstancesValueIrqPressure.php | 105 + ...onseDataInnerInstancesValueMemoryLimit.php | 42 + ...eDataInnerInstancesValueMemoryPressure.php | 105 + ...ponseDataInnerInstancesValueMemoryUsed.php | 105 + ...ataInnerInstancesValueMountpointsValue.php | 63 + ...nstancesValueMountpointsValueDiskLimit.php | 42 + ...InstancesValueMountpointsValueDiskUsed.php | 105 + ...tancesValueMountpointsValueInodesLimit.php | 42 + ...stancesValueMountpointsValueInodesUsed.php | 105 + ...esponseDataInnerInstancesValueSwapUsed.php | 105 + src/Model/ResourcesLimits.php | 2 +- src/Model/ResourcesOverview200Response.php | 87 + .../ResourcesOverview200ResponseDataInner.php | 52 + ...rview200ResponseDataInnerServicesValue.php | 115 + ...ResponseDataInnerServicesValueCpuLimit.php | 42 + ...ponseDataInnerServicesValueCpuPressure.php | 105 + ...0ResponseDataInnerServicesValueCpuUsed.php | 105 + ...sponseDataInnerServicesValueIoPressure.php | 105 + ...ponseDataInnerServicesValueIrqPressure.php | 105 + ...ponseDataInnerServicesValueMemoryLimit.php | 42 + ...seDataInnerServicesValueMemoryPressure.php | 105 + ...sponseDataInnerServicesValueMemoryUsed.php | 105 + ...DataInnerServicesValueMountpointsValue.php | 63 + ...ServicesValueMountpointsValueDiskLimit.php | 42 + ...rServicesValueMountpointsValueDiskUsed.php | 105 + ...rvicesValueMountpointsValueInodesLimit.php | 42 + ...ervicesValueMountpointsValueInodesUsed.php | 105 + ...esponseDataInnerServicesValueSwapLimit.php | 42 + ...ResponseDataInnerServicesValueSwapUsed.php | 105 + src/Model/ResourcesSummary200Response.php | 77 + src/Model/ResourcesSummary200ResponseData.php | 42 + ...mmary200ResponseDataServicesValueValue.php | 115 + ...ponseDataServicesValueValueCpuPressure.php | 105 + ...0ResponseDataServicesValueValueCpuUsed.php | 105 + ...sponseDataServicesValueValueIoPressure.php | 105 + ...ponseDataServicesValueValueIrqPressure.php | 105 + ...seDataServicesValueValueMemoryPressure.php | 105 + ...sponseDataServicesValueValueMemoryUsed.php | 105 + ...DataServicesValueValueMountpointsValue.php | 63 + ...icesValueValueMountpointsValueDiskUsed.php | 105 + ...esValueValueMountpointsValueInodesUsed.php | 105 + ...ResponseDataServicesValueValueSwapUsed.php | 105 + src/Model/ResourcesSummary400Response.php | 63 + src/Model/RunConfiguration.php | 56 + src/Model/SSIConfiguration.php | 2 +- src/Model/ScriptIntegration.php | 13 + src/Model/ScriptIntegrationCreateInput.php | 3 + src/Model/ScriptIntegrationPatch.php | 3 + src/Model/ServicesValue.php | 7 + src/Model/SlackIntegration.php | 13 + src/Model/SlackIntegrationCreateInput.php | 3 + src/Model/SlackIntegrationPatch.php | 3 + ...uting.php => SourceCodeConfiguration1.php} | 16 +- src/Model/SplunkIntegration.php | 13 + src/Model/SplunkIntegrationCreateInput.php | 3 + src/Model/SplunkIntegrationPatch.php | 3 + src/Model/StickyConfiguration.php | 2 +- src/Model/StrictTransportSecurityOptions.php | 6 +- src/Model/SumologicIntegration.php | 16 + src/Model/SumologicIntegrationCreateInput.php | 6 + src/Model/SumologicIntegrationPatch.php | 6 + src/Model/SyslogIntegration.php | 13 + src/Model/SyslogIntegrationCreateInput.php | 3 + src/Model/SyslogIntegrationPatch.php | 3 + src/Model/TLSSettings.php | 2 +- src/Model/Task.php | 124 + src/Model/TaskTriggerInput.php | 42 + src/Model/{VersionPatch.php => Tasks.php} | 14 +- src/Model/UpdateOrgProfileRequest.php | 7 + src/Model/UpdateOrgRequest.php | 7 + src/Model/UpstreamRoute.php | 17 +- src/Model/Version.php | 75 - src/Model/WebApplicationsValue.php | 11 +- src/Model/WebHookIntegration.php | 13 + src/Model/WebHookIntegrationCreateInput.php | 3 + src/Model/WebHookIntegrationPatch.php | 3 + src/Model/WorkersValue.php | 11 +- 302 files changed, 28115 insertions(+), 1341 deletions(-) create mode 100644 src/Api/BillingApi.php create mode 100644 src/Api/BillingProfileProjectsApi.php create mode 100644 src/Api/BlackfireMonitoringApi.php create mode 100644 src/Api/BlackfireProfilingApi.php create mode 100644 src/Api/DiffApi.php create mode 100644 src/Api/DomainClaimApi.php create mode 100644 src/Api/EntrypointApi.php create mode 100644 src/Api/HttpTrafficApi.php create mode 100644 src/Api/ResourcesApi.php create mode 100644 src/Api/SbomApi.php create mode 100644 src/Api/TaskApi.php create mode 100644 src/Model/BlackfirePhpServerCaches200Response.php create mode 100644 src/Model/BlackfirePhpServerCaches200ResponseDataInner.php create mode 100644 src/Model/BlackfireProfileGraph200Response.php create mode 100644 src/Model/BlackfireProfileProfile200Response.php create mode 100644 src/Model/BlackfireProfileSubprofiles200Response.php create mode 100644 src/Model/BlackfireProfileTimeline200Response.php create mode 100644 src/Model/BlackfireProfilesListAutomatic200Response.php create mode 100644 src/Model/BlackfireProfilesListAutomatic200ResponseProfilesInner.php create mode 100644 src/Model/BlackfireProfilesListAutomatic200ResponseProfilesInnerLinks.php create mode 100644 src/Model/BlackfireProfilesListAutomatic200ResponseProfilesInnerLinksGraphUrl.php create mode 100644 src/Model/BlackfireProfilesRecommendations200Response.php create mode 100644 src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInner.php create mode 100644 src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinks.php create mode 100644 src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiGraph.php create mode 100644 src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiProfile.php create mode 100644 src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiSubprofiles.php create mode 100644 src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiTimeline.php create mode 100644 src/Model/BlackfireProfilesRecommendations400Response.php create mode 100644 src/Model/BlackfireServerGlobal200Response.php create mode 100644 src/Model/BlackfireServerGlobal200ResponseAlertEvaluationsInner.php create mode 100644 src/Model/BlackfireServerGlobal200ResponseQuota.php create mode 100644 src/Model/BlackfireServerGlobal200ResponseServer.php create mode 100644 src/Model/BlackfireServerGlobal200ResponseServerDataInner.php create mode 100644 src/Model/BlackfireServerTopSpans200Response.php create mode 100644 src/Model/BlackfireServerTopSpans200ResponseAdvancedFilters.php create mode 100644 src/Model/BlackfireServerTopSpans200ResponseAdvancedFiltersFieldsValue.php create mode 100644 src/Model/BlackfireServerTopSpans200ResponseAdvancedFiltersFieldsValueValuesInner.php rename src/Model/{VersionCreateInput.php => BlackfireServerTopSpans200ResponseTopSpans.php} (61%) create mode 100644 src/Model/BlackfireServerTopSpans200ResponseTopSpansDataInner.php create mode 100644 src/Model/BlackfireServerTransactionsBreakdown200Response.php create mode 100644 src/Model/BlackfireServerTransactionsBreakdown200ResponseBreakdownTopHits.php create mode 100644 src/Model/BlackfireServerTransactionsBreakdown200ResponseTopHitsTimeline.php create mode 100644 src/Model/BlackfireServerTransactionsBreakdown200ResponseTopHitsTimelineDataInner.php create mode 100644 src/Model/BlackfireServerTransactionsBreakdown200ResponseTopHitsTimelineDataInnerTransactionsValue.php create mode 100644 src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactions.php create mode 100644 src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInner.php create mode 100644 src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinks.php create mode 100644 src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksAutomaticProfiles.php create mode 100644 src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksRecommendations.php create mode 100644 src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksTopSpans.php create mode 100644 src/Model/CommunityPackagesInner.php create mode 100644 src/Model/ComposableImages.php create mode 100644 src/Model/Diff.php create mode 100644 src/Model/DomainClaim.php create mode 100644 src/Model/Hooks1.php create mode 100644 src/Model/HttpMetricsOverview200Response.php create mode 100644 src/Model/HttpMetricsOverview200ResponseData.php create mode 100644 src/Model/HttpMetricsOverview200ResponseDataTimelinesInner.php create mode 100644 src/Model/HttpMetricsOverview200ResponseDataTimelinesInnerCodes.php create mode 100644 src/Model/HttpMetricsOverview200ResponseDataTimelinesInnerUrlsValue.php create mode 100644 src/Model/HttpMetricsOverview200ResponseDataUrlsValue.php create mode 100644 src/Model/HttpMetricsOverview499Response.php create mode 100644 src/Model/HttpMetricsTimelineIps200Response.php create mode 100644 src/Model/HttpMetricsTimelineIps200ResponseBreakdown.php create mode 100644 src/Model/HttpMetricsTimelineIps200ResponseBreakdownDataInner.php create mode 100644 src/Model/HttpMetricsTimelineIps200ResponseBreakdownTopHits.php rename src/Model/{Routing1.php => HttpMetricsTimelineIps200ResponseTopHitsTimeline.php} (59%) create mode 100644 src/Model/HttpMetricsTimelineIps200ResponseTopHitsTimelineDataInner.php create mode 100644 src/Model/HttpMetricsTimelineIps200ResponseTopHitsTimelineDataInnerDataValue.php create mode 100644 src/Model/HttpMetricsTimelineUrls200Response.php create mode 100644 src/Model/HttpMetricsTimelineUrls200ResponseBreakdown.php create mode 100644 src/Model/HttpMetricsTimelineUrls200ResponseBreakdownDataInner.php create mode 100644 src/Model/HttpMetricsTimelineUrls200ResponseFilters.php create mode 100644 src/Model/HttpMetricsTimelineUrls200ResponseFiltersFieldsValue.php create mode 100644 src/Model/HttpMetricsTimelineUrls200ResponseFiltersFieldsValueValuesInner.php create mode 100644 src/Model/HttpMetricsTimelineUrls200ResponseTopHitsTimeline.php create mode 100644 src/Model/HttpMetricsTimelineUrls200ResponseTopHitsTimelineDataInner.php create mode 100644 src/Model/HttpMetricsTimelineUserAgents200Response.php create mode 100644 src/Model/HttpMetricsTimelineUserAgents200ResponseBreakdown.php create mode 100644 src/Model/HttpMetricsTimelineUserAgents200ResponseBreakdownDataInner.php create mode 100644 src/Model/HttpMetricsTimelineUserAgents200ResponseTopHitsTimeline.php create mode 100644 src/Model/HttpMetricsTimelineUserAgents200ResponseTopHitsTimelineDataInner.php create mode 100644 src/Model/HttpMetricsTimelineUserAgents200ResponseTopHitsTimelineDataInnerDataValue.php create mode 100644 src/Model/KubernetesDeploymentTargetStorage.php create mode 100644 src/Model/KubernetesDeploymentTargetStorageCreateInput.php create mode 100644 src/Model/KubernetesDeploymentTargetStoragePatch.php create mode 100644 src/Model/LastDeploymentCommandsInner.php create mode 100644 src/Model/Maintenance.php create mode 100644 src/Model/MaintenanceWindowConfiguration.php create mode 100644 src/Model/ObservabilityEntrypoint200Response.php create mode 100644 src/Model/ObservabilityEntrypoint200ResponseDataRetention.php create mode 100644 src/Model/ObservabilityEntrypoint200ResponseDataRetentionContinuousProfiling.php create mode 100644 src/Model/ObservabilityEntrypoint200ResponseDataRetentionHttpTraffic.php create mode 100644 src/Model/ObservabilityEntrypoint200ResponseDataRetentionLogs.php create mode 100644 src/Model/ObservabilityEntrypoint200ResponseDataRetentionResources.php create mode 100644 src/Model/ObservabilityEntrypoint200ResponseDataRetentionServerMonitoring.php create mode 100644 src/Model/ObservabilityEntrypoint200ResponseLinks.php create mode 100644 src/Model/ObservabilityEntrypoint200ResponseLinksBlackfirePhpServerCaches.php create mode 100644 src/Model/ObservabilityEntrypoint200ResponseLinksBlackfireServerGlobal.php create mode 100644 src/Model/ObservabilityEntrypoint200ResponseLinksBlackfireServerTransactionsBreakdown.php create mode 100644 src/Model/ObservabilityEntrypoint200ResponseLinksConprofApplicationFilters.php create mode 100644 src/Model/ObservabilityEntrypoint200ResponseLinksConprofApplications.php create mode 100644 src/Model/ObservabilityEntrypoint200ResponseLinksConprofFlamegraph.php create mode 100644 src/Model/ObservabilityEntrypoint200ResponseLinksConprofTimeline.php create mode 100644 src/Model/ObservabilityEntrypoint200ResponseLinksConsoleSandboxAccess.php create mode 100644 src/Model/ObservabilityEntrypoint200ResponseLinksHttpMetricsOverview.php create mode 100644 src/Model/ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineIps.php create mode 100644 src/Model/ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineUrls.php create mode 100644 src/Model/ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineUserAgents.php create mode 100644 src/Model/ObservabilityEntrypoint200ResponseLinksLogsOverview.php create mode 100644 src/Model/ObservabilityEntrypoint200ResponseLinksLogsQuery.php create mode 100644 src/Model/ObservabilityEntrypoint200ResponseLinksResourcesByServiceValue.php create mode 100644 src/Model/ObservabilityEntrypoint200ResponseLinksResourcesOverview.php create mode 100644 src/Model/ObservabilityEntrypoint200ResponseLinksResourcesSummary.php create mode 100644 src/Model/ObservabilityEntrypoint200ResponseLinksSelf.php create mode 100644 src/Model/ObservabilityEntrypoint200ResponseRetention.php create mode 100644 src/Model/OtlpLogIntegration.php create mode 100644 src/Model/OtlpLogIntegrationCreateInput.php create mode 100644 src/Model/OtlpLogIntegrationPatch.php create mode 100644 src/Model/Recurrence.php create mode 100644 src/Model/ResourcesByService200Response.php create mode 100644 src/Model/ResourcesByService200ResponseDataInner.php create mode 100644 src/Model/ResourcesByService200ResponseDataInnerInstancesValue.php create mode 100644 src/Model/ResourcesByService200ResponseDataInnerInstancesValueCpuLimit.php create mode 100644 src/Model/ResourcesByService200ResponseDataInnerInstancesValueCpuPressure.php create mode 100644 src/Model/ResourcesByService200ResponseDataInnerInstancesValueCpuUsed.php create mode 100644 src/Model/ResourcesByService200ResponseDataInnerInstancesValueIoPressure.php create mode 100644 src/Model/ResourcesByService200ResponseDataInnerInstancesValueIrqPressure.php create mode 100644 src/Model/ResourcesByService200ResponseDataInnerInstancesValueMemoryLimit.php create mode 100644 src/Model/ResourcesByService200ResponseDataInnerInstancesValueMemoryPressure.php create mode 100644 src/Model/ResourcesByService200ResponseDataInnerInstancesValueMemoryUsed.php create mode 100644 src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValue.php create mode 100644 src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueDiskLimit.php create mode 100644 src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueDiskUsed.php create mode 100644 src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueInodesLimit.php create mode 100644 src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueInodesUsed.php create mode 100644 src/Model/ResourcesByService200ResponseDataInnerInstancesValueSwapUsed.php create mode 100644 src/Model/ResourcesOverview200Response.php create mode 100644 src/Model/ResourcesOverview200ResponseDataInner.php create mode 100644 src/Model/ResourcesOverview200ResponseDataInnerServicesValue.php create mode 100644 src/Model/ResourcesOverview200ResponseDataInnerServicesValueCpuLimit.php create mode 100644 src/Model/ResourcesOverview200ResponseDataInnerServicesValueCpuPressure.php create mode 100644 src/Model/ResourcesOverview200ResponseDataInnerServicesValueCpuUsed.php create mode 100644 src/Model/ResourcesOverview200ResponseDataInnerServicesValueIoPressure.php create mode 100644 src/Model/ResourcesOverview200ResponseDataInnerServicesValueIrqPressure.php create mode 100644 src/Model/ResourcesOverview200ResponseDataInnerServicesValueMemoryLimit.php create mode 100644 src/Model/ResourcesOverview200ResponseDataInnerServicesValueMemoryPressure.php create mode 100644 src/Model/ResourcesOverview200ResponseDataInnerServicesValueMemoryUsed.php create mode 100644 src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValue.php create mode 100644 src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueDiskLimit.php create mode 100644 src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueDiskUsed.php create mode 100644 src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueInodesLimit.php create mode 100644 src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueInodesUsed.php create mode 100644 src/Model/ResourcesOverview200ResponseDataInnerServicesValueSwapLimit.php create mode 100644 src/Model/ResourcesOverview200ResponseDataInnerServicesValueSwapUsed.php create mode 100644 src/Model/ResourcesSummary200Response.php create mode 100644 src/Model/ResourcesSummary200ResponseData.php create mode 100644 src/Model/ResourcesSummary200ResponseDataServicesValueValue.php create mode 100644 src/Model/ResourcesSummary200ResponseDataServicesValueValueCpuPressure.php create mode 100644 src/Model/ResourcesSummary200ResponseDataServicesValueValueCpuUsed.php create mode 100644 src/Model/ResourcesSummary200ResponseDataServicesValueValueIoPressure.php create mode 100644 src/Model/ResourcesSummary200ResponseDataServicesValueValueIrqPressure.php create mode 100644 src/Model/ResourcesSummary200ResponseDataServicesValueValueMemoryPressure.php create mode 100644 src/Model/ResourcesSummary200ResponseDataServicesValueValueMemoryUsed.php create mode 100644 src/Model/ResourcesSummary200ResponseDataServicesValueValueMountpointsValue.php create mode 100644 src/Model/ResourcesSummary200ResponseDataServicesValueValueMountpointsValueDiskUsed.php create mode 100644 src/Model/ResourcesSummary200ResponseDataServicesValueValueMountpointsValueInodesUsed.php create mode 100644 src/Model/ResourcesSummary200ResponseDataServicesValueValueSwapUsed.php create mode 100644 src/Model/ResourcesSummary400Response.php create mode 100644 src/Model/RunConfiguration.php rename src/Model/{Routing.php => SourceCodeConfiguration1.php} (60%) create mode 100644 src/Model/Task.php create mode 100644 src/Model/TaskTriggerInput.php rename src/Model/{VersionPatch.php => Tasks.php} (63%) delete mode 100644 src/Model/Version.php diff --git a/src/Api/BillingApi.php b/src/Api/BillingApi.php new file mode 100644 index 00000000..5277600c --- /dev/null +++ b/src/Api/BillingApi.php @@ -0,0 +1,369 @@ +config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + + $this->headerSelector = $selector ?? new ApiHeaderSelector(); + } + + /** + * Billing profile organizations + * + * Retrieves organizations that belong to the specified billing profile. + * + * @param string $billingProfileId + * The ID of the billing profile. (required) + * @param \Upsun\Model\StringFilter|null $filterType (optional) + * @param \Upsun\Model\StringFilter|null $filterStatus (optional) + * @param \Upsun\Model\DateTimeFilter|null $filterUpdatedAt (optional) + * @param int|null $pageSize (optional) + * @param string|null $pageBefore (optional) + * @param string|null $pageAfter (optional) + * @param string|null $sort (optional) + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + * @see https://docs.upsun.com/api/#tag/Billing/operation/list-billing-profile-orgs + */ + public function listBillingProfileOrgs( + string $billingProfileId, + ?StringFilter $filterType = null, + ?StringFilter $filterStatus = null, + ?DateTimeFilter $filterUpdatedAt = null, + ?int $pageSize = null, + ?string $pageBefore = null, + ?string $pageAfter = null, + ?string $sort = null + ): ListUserOrgs200Response { + return $this->listBillingProfileOrgsWithHttpInfo( + $billingProfileId, + $filterType, + $filterStatus, + $filterUpdatedAt, + $pageSize, + $pageBefore, + $pageAfter, + $sort + ); + } + + /** + * Billing profile organizations with HTTP Info + * + * @param string $billingProfileId + * The ID of the billing profile. (required) + * @param \Upsun\Model\StringFilter|null $filterType (optional) + * @param \Upsun\Model\StringFilter|null $filterStatus (optional) + * @param \Upsun\Model\DateTimeFilter|null $filterUpdatedAt (optional) + * @param int|null $pageSize (optional) + * @param string|null $pageBefore (optional) + * @param string|null $pageAfter (optional) + * @param string|null $sort (optional) + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + */ + private function listBillingProfileOrgsWithHttpInfo( + string $billingProfileId, + ?StringFilter $filterType = null, + ?StringFilter $filterStatus = null, + ?DateTimeFilter $filterUpdatedAt = null, + ?int $pageSize = null, + ?string $pageBefore = null, + ?string $pageAfter = null, + ?string $sort = null + ): ListUserOrgs200Response { + $request = $this->listBillingProfileOrgsRequest( + $billingProfileId, + $filterType, + $filterStatus, + $filterUpdatedAt, + $pageSize, + $pageBefore, + $pageAfter, + $sort + ); + + try { + $response = $this->sendAuthenticatedRequest( + $request->getMethod(), + (string) $request->getUri(), + $request->getHeaders(), + $request->getBody() + ); + + return $this->handleResponseWithDataType( + '\Upsun\Model\ListUserOrgs200Response', + $request, + $response + ); + } catch (Exception $exception) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $exception->getCode(), + '/billing/profiles/{billing_profile_id}/organizations' + ), + $request, + $response ?? null, + $exception + ); + } + } + + /** + * Create request for operation 'listBillingProfileOrgs' + * + * @param string $billingProfileId + * The ID of the billing profile. (required) + * @param \Upsun\Model\StringFilter|null $filterType (optional) + * @param \Upsun\Model\StringFilter|null $filterStatus (optional) + * @param \Upsun\Model\DateTimeFilter|null $filterUpdatedAt (optional) + * @param int|null $pageSize (optional) + * @param string|null $pageBefore (optional) + * @param string|null $pageAfter (optional) + * @param string|null $sort (optional) + * + * @throws InvalidArgumentException + */ + private function listBillingProfileOrgsRequest( + string $billingProfileId, + ?StringFilter $filterType = null, + ?StringFilter $filterStatus = null, + ?DateTimeFilter $filterUpdatedAt = null, + ?int $pageSize = null, + ?string $pageBefore = null, + ?string $pageAfter = null, + ?string $sort = null + ): RequestInterface { + // verify the required parameter 'billingProfileId' is set + if (empty($billingProfileId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $billingProfileId + when calling listBillingProfileOrgs' + ); + } + + if ($pageSize !== null && $pageSize > 100) { + throw new InvalidArgumentException( + 'invalid value for "$pageSize" when calling BillingApi.listBillingProfileOrgs, + must be smaller than or equal to 100.' + ); + } + + if ($pageSize !== null && $pageSize < 1) { + throw new InvalidArgumentException( + 'invalid value for "$pageSize" when calling BillingApi.listBillingProfileOrgs, + must be bigger than or equal to 1.' + ); + } + + $resourcePath = '/billing/profiles/{billing_profile_id}/organizations'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = null; + $multipart = false; + + // query params + if ($filterType !== null) { + if ('form' === 'deepObject' && is_array($filterType)) { + foreach ($filterType as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['filter[type]'] = $filterType instanceof DateTime + ? $filterType->format(DATE_ATOM) + : ($filterType->getEq()); + } + } + + // query params + if ($filterStatus !== null) { + if ('form' === 'deepObject' && is_array($filterStatus)) { + foreach ($filterStatus as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['filter[status]'] = $filterStatus instanceof DateTime + ? $filterStatus->format(DATE_ATOM) + : ($filterStatus->getEq()); + } + } + + // query params + if ($filterUpdatedAt !== null) { + if ('form' === 'deepObject' && is_array($filterUpdatedAt)) { + foreach ($filterUpdatedAt as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['filter[updated_at]'] = $filterUpdatedAt instanceof DateTime + ? $filterUpdatedAt->format(DATE_ATOM) + : ($filterUpdatedAt->getEq()); + } + } + + // query params + if ($pageSize !== null) { + if ('form' === 'form' && is_array($pageSize)) { + foreach ($pageSize as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['page[size]'] = $pageSize instanceof DateTime + ? $pageSize->format(DATE_ATOM) + : ($pageSize); + } + } + + // query params + if ($pageBefore !== null) { + if ('form' === 'form' && is_array($pageBefore)) { + foreach ($pageBefore as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['page[before]'] = $pageBefore instanceof DateTime + ? $pageBefore->format(DATE_ATOM) + : ($pageBefore); + } + } + + // query params + if ($pageAfter !== null) { + if ('form' === 'form' && is_array($pageAfter)) { + foreach ($pageAfter as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['page[after]'] = $pageAfter instanceof DateTime + ? $pageAfter->format(DATE_ATOM) + : ($pageAfter); + } + } + + // query params + if ($sort !== null) { + if ('form' === 'form' && is_array($sort)) { + foreach ($sort as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['sort'] = $sort instanceof DateTime + ? $sort->format(DATE_ATOM) + : ($sort); + } + } + + // path params + + if ($billingProfileId !== null) { + $resourcePath = str_replace( + '{' . 'billing_profile_id' . '}', + ObjectSerializer::toPathValue($billingProfileId), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'application/problem+json'], + '', + $multipart + ); + + // for model (json/xml) + if ($formParams !== []) { + 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 ($this->headerSelector->isJsonMime($headers['Content-Type'])) { + $httpBody = json_encode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if ($this->config->getAccessToken() !== null) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + if ($this->config->getUpsunClientHeader()) { + $defaultHeaders['X-Upsun-Client'] = $this->config->getUpsunClientHeader(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + + $uri = $this->createUri($operationHost, $resourcePath, $queryParams); + + return $this->createRequest('GET', $uri, $headers, $httpBody); + } +} diff --git a/src/Api/BillingProfileProjectsApi.php b/src/Api/BillingProfileProjectsApi.php new file mode 100644 index 00000000..adfdd188 --- /dev/null +++ b/src/Api/BillingProfileProjectsApi.php @@ -0,0 +1,495 @@ +config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + + $this->headerSelector = $selector ?? new ApiHeaderSelector(); + } + + /** + * List projects + * + * Retrieves a list of projects for the specified billing profile. + * + * @param string $billingProfileId + * The ID of the billing profile. (required) + * @param \Upsun\Model\StringFilter|null $filterId (optional) + * @param \Upsun\Model\StringFilter|null $filterTitle (optional) + * @param \Upsun\Model\StringFilter|null $filterSubscriptionId (optional) + * @param \Upsun\Model\StringFilter|null $filterRegion (optional) + * @param \Upsun\Model\StringFilter|null $filterType (optional) + * @param \Upsun\Model\StringFilter|null $filterPlan (optional) + * @param \Upsun\Model\StringFilter|null $filterStatus (optional) + * @param \Upsun\Model\DateTimeFilter|null $filterUpdatedAt (optional) + * @param \Upsun\Model\DateTimeFilter|null $filterCreatedAt (optional) + * @param int|null $pageSize (optional) + * @param string|null $pageBefore (optional) + * @param string|null $pageAfter (optional) + * @param string|null $sort (optional) + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + * @see https://docs.upsun.com/api/#tag/Billing-Profile-Projects/operation/list-billing-profile-projects + */ + public function listBillingProfileProjects( + string $billingProfileId, + ?StringFilter $filterId = null, + ?StringFilter $filterTitle = null, + ?StringFilter $filterSubscriptionId = null, + ?StringFilter $filterRegion = null, + ?StringFilter $filterType = null, + ?StringFilter $filterPlan = null, + ?StringFilter $filterStatus = null, + ?DateTimeFilter $filterUpdatedAt = null, + ?DateTimeFilter $filterCreatedAt = null, + ?int $pageSize = null, + ?string $pageBefore = null, + ?string $pageAfter = null, + ?string $sort = null + ): ListOrgProjects200Response { + return $this->listBillingProfileProjectsWithHttpInfo( + $billingProfileId, + $filterId, + $filterTitle, + $filterSubscriptionId, + $filterRegion, + $filterType, + $filterPlan, + $filterStatus, + $filterUpdatedAt, + $filterCreatedAt, + $pageSize, + $pageBefore, + $pageAfter, + $sort + ); + } + + /** + * List projects with HTTP Info + * + * @param string $billingProfileId + * The ID of the billing profile. (required) + * @param \Upsun\Model\StringFilter|null $filterId (optional) + * @param \Upsun\Model\StringFilter|null $filterTitle (optional) + * @param \Upsun\Model\StringFilter|null $filterSubscriptionId (optional) + * @param \Upsun\Model\StringFilter|null $filterRegion (optional) + * @param \Upsun\Model\StringFilter|null $filterType (optional) + * @param \Upsun\Model\StringFilter|null $filterPlan (optional) + * @param \Upsun\Model\StringFilter|null $filterStatus (optional) + * @param \Upsun\Model\DateTimeFilter|null $filterUpdatedAt (optional) + * @param \Upsun\Model\DateTimeFilter|null $filterCreatedAt (optional) + * @param int|null $pageSize (optional) + * @param string|null $pageBefore (optional) + * @param string|null $pageAfter (optional) + * @param string|null $sort (optional) + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + */ + private function listBillingProfileProjectsWithHttpInfo( + string $billingProfileId, + ?StringFilter $filterId = null, + ?StringFilter $filterTitle = null, + ?StringFilter $filterSubscriptionId = null, + ?StringFilter $filterRegion = null, + ?StringFilter $filterType = null, + ?StringFilter $filterPlan = null, + ?StringFilter $filterStatus = null, + ?DateTimeFilter $filterUpdatedAt = null, + ?DateTimeFilter $filterCreatedAt = null, + ?int $pageSize = null, + ?string $pageBefore = null, + ?string $pageAfter = null, + ?string $sort = null + ): ListOrgProjects200Response { + $request = $this->listBillingProfileProjectsRequest( + $billingProfileId, + $filterId, + $filterTitle, + $filterSubscriptionId, + $filterRegion, + $filterType, + $filterPlan, + $filterStatus, + $filterUpdatedAt, + $filterCreatedAt, + $pageSize, + $pageBefore, + $pageAfter, + $sort + ); + + try { + $response = $this->sendAuthenticatedRequest( + $request->getMethod(), + (string) $request->getUri(), + $request->getHeaders(), + $request->getBody() + ); + + return $this->handleResponseWithDataType( + '\Upsun\Model\ListOrgProjects200Response', + $request, + $response + ); + } catch (Exception $exception) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $exception->getCode(), + '/billing/profiles/{billing_profile_id}/projects' + ), + $request, + $response ?? null, + $exception + ); + } + } + + /** + * Create request for operation 'listBillingProfileProjects' + * + * @param string $billingProfileId + * The ID of the billing profile. (required) + * @param \Upsun\Model\StringFilter|null $filterId (optional) + * @param \Upsun\Model\StringFilter|null $filterTitle (optional) + * @param \Upsun\Model\StringFilter|null $filterSubscriptionId (optional) + * @param \Upsun\Model\StringFilter|null $filterRegion (optional) + * @param \Upsun\Model\StringFilter|null $filterType (optional) + * @param \Upsun\Model\StringFilter|null $filterPlan (optional) + * @param \Upsun\Model\StringFilter|null $filterStatus (optional) + * @param \Upsun\Model\DateTimeFilter|null $filterUpdatedAt (optional) + * @param \Upsun\Model\DateTimeFilter|null $filterCreatedAt (optional) + * @param int|null $pageSize (optional) + * @param string|null $pageBefore (optional) + * @param string|null $pageAfter (optional) + * @param string|null $sort (optional) + * + * @throws InvalidArgumentException + */ + private function listBillingProfileProjectsRequest( + string $billingProfileId, + ?StringFilter $filterId = null, + ?StringFilter $filterTitle = null, + ?StringFilter $filterSubscriptionId = null, + ?StringFilter $filterRegion = null, + ?StringFilter $filterType = null, + ?StringFilter $filterPlan = null, + ?StringFilter $filterStatus = null, + ?DateTimeFilter $filterUpdatedAt = null, + ?DateTimeFilter $filterCreatedAt = null, + ?int $pageSize = null, + ?string $pageBefore = null, + ?string $pageAfter = null, + ?string $sort = null + ): RequestInterface { + // verify the required parameter 'billingProfileId' is set + if (empty($billingProfileId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $billingProfileId + when calling listBillingProfileProjects' + ); + } + + if ($pageSize !== null && $pageSize > 100) { + throw new InvalidArgumentException( + 'invalid value for "$pageSize" when calling BillingProfileProjectsApi.listBillingProfileProjects, + must be smaller than or equal to 100.' + ); + } + + if ($pageSize !== null && $pageSize < 1) { + throw new InvalidArgumentException( + 'invalid value for "$pageSize" when calling BillingProfileProjectsApi.listBillingProfileProjects, + must be bigger than or equal to 1.' + ); + } + + $resourcePath = '/billing/profiles/{billing_profile_id}/projects'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = null; + $multipart = false; + + // query params + if ($filterId !== null) { + if ('form' === 'deepObject' && is_array($filterId)) { + foreach ($filterId as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['filter[id]'] = $filterId instanceof DateTime + ? $filterId->format(DATE_ATOM) + : ($filterId->getEq()); + } + } + + // query params + if ($filterTitle !== null) { + if ('form' === 'deepObject' && is_array($filterTitle)) { + foreach ($filterTitle as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['filter[title]'] = $filterTitle instanceof DateTime + ? $filterTitle->format(DATE_ATOM) + : ($filterTitle->getEq()); + } + } + + // query params + if ($filterSubscriptionId !== null) { + if ('form' === 'deepObject' && is_array($filterSubscriptionId)) { + foreach ($filterSubscriptionId as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['filter[subscription_id]'] = $filterSubscriptionId instanceof DateTime + ? $filterSubscriptionId->format(DATE_ATOM) + : ($filterSubscriptionId->getEq()); + } + } + + // query params + if ($filterRegion !== null) { + if ('form' === 'deepObject' && is_array($filterRegion)) { + foreach ($filterRegion as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['filter[region]'] = $filterRegion instanceof DateTime + ? $filterRegion->format(DATE_ATOM) + : ($filterRegion->getEq()); + } + } + + // query params + if ($filterType !== null) { + if ('form' === 'deepObject' && is_array($filterType)) { + foreach ($filterType as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['filter[type]'] = $filterType instanceof DateTime + ? $filterType->format(DATE_ATOM) + : ($filterType->getEq()); + } + } + + // query params + if ($filterPlan !== null) { + if ('form' === 'deepObject' && is_array($filterPlan)) { + foreach ($filterPlan as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['filter[plan]'] = $filterPlan instanceof DateTime + ? $filterPlan->format(DATE_ATOM) + : ($filterPlan->getEq()); + } + } + + // query params + if ($filterStatus !== null) { + if ('form' === 'deepObject' && is_array($filterStatus)) { + foreach ($filterStatus as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['filter[status]'] = $filterStatus instanceof DateTime + ? $filterStatus->format(DATE_ATOM) + : ($filterStatus->getEq()); + } + } + + // query params + if ($filterUpdatedAt !== null) { + if ('form' === 'deepObject' && is_array($filterUpdatedAt)) { + foreach ($filterUpdatedAt as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['filter[updated_at]'] = $filterUpdatedAt instanceof DateTime + ? $filterUpdatedAt->format(DATE_ATOM) + : ($filterUpdatedAt->getEq()); + } + } + + // query params + if ($filterCreatedAt !== null) { + if ('form' === 'deepObject' && is_array($filterCreatedAt)) { + foreach ($filterCreatedAt as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['filter[created_at]'] = $filterCreatedAt instanceof DateTime + ? $filterCreatedAt->format(DATE_ATOM) + : ($filterCreatedAt->getEq()); + } + } + + // query params + if ($pageSize !== null) { + if ('form' === 'form' && is_array($pageSize)) { + foreach ($pageSize as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['page[size]'] = $pageSize instanceof DateTime + ? $pageSize->format(DATE_ATOM) + : ($pageSize); + } + } + + // query params + if ($pageBefore !== null) { + if ('form' === 'form' && is_array($pageBefore)) { + foreach ($pageBefore as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['page[before]'] = $pageBefore instanceof DateTime + ? $pageBefore->format(DATE_ATOM) + : ($pageBefore); + } + } + + // query params + if ($pageAfter !== null) { + if ('form' === 'form' && is_array($pageAfter)) { + foreach ($pageAfter as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['page[after]'] = $pageAfter instanceof DateTime + ? $pageAfter->format(DATE_ATOM) + : ($pageAfter); + } + } + + // query params + if ($sort !== null) { + if ('form' === 'form' && is_array($sort)) { + foreach ($sort as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['sort'] = $sort instanceof DateTime + ? $sort->format(DATE_ATOM) + : ($sort); + } + } + + // path params + + if ($billingProfileId !== null) { + $resourcePath = str_replace( + '{' . 'billing_profile_id' . '}', + ObjectSerializer::toPathValue($billingProfileId), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'application/problem+json'], + '', + $multipart + ); + + // for model (json/xml) + if ($formParams !== []) { + 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 ($this->headerSelector->isJsonMime($headers['Content-Type'])) { + $httpBody = json_encode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if ($this->config->getAccessToken() !== null) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + if ($this->config->getUpsunClientHeader()) { + $defaultHeaders['X-Upsun-Client'] = $this->config->getUpsunClientHeader(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + + $uri = $this->createUri($operationHost, $resourcePath, $queryParams); + + return $this->createRequest('GET', $uri, $headers, $httpBody); + } +} diff --git a/src/Api/BlackfireMonitoringApi.php b/src/Api/BlackfireMonitoringApi.php new file mode 100644 index 00000000..cc9e4422 --- /dev/null +++ b/src/Api/BlackfireMonitoringApi.php @@ -0,0 +1,2442 @@ +config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + + $this->headerSelector = $selector ?? new ApiHeaderSelector(); + } + + /** + * Get server cache metrics + * + * Returns time-series PHP cache usage ratios (0.0-1.0) for OPcache memory, OPcache interned strings buffer (ISB), + * APCu memory, realpath cache, and PCRE cache. Includes hit rate ratios (0.0-1.0) for APCu and OPcache. Each data + * point contains `timestamp` and optional data fields. Fields are omitted for timestamps with no data - this + * indicates no data was received. Filtered by agent ID and execution contexts (web, cli, etc.). + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param int $from (required) + * @param int $to (required) + * @param int|null $grain (optional) + * @param string[]|null $contexts (optional) + * @param string|null $contextsMode (optional) + * @param string|null $distributionCost (optional) + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + * @see https://docs.upsun.com/api/#tag/Blackfire-Monitoring/operation/blackfire_php_server_caches + */ + public function blackfirePhpServerCaches( + string $projectId, + string $environmentId, + int $from, + int $to, + ?int $grain = null, + ?array $contexts = null, + ?string $contextsMode = null, + ?string $distributionCost = null + ): BlackfirePhpServerCaches200Response { + return $this->blackfirePhpServerCachesWithHttpInfo( + $projectId, + $environmentId, + $from, + $to, + $grain, + $contexts, + $contextsMode, + $distributionCost + ); + } + + /** + * Get server cache metrics with HTTP Info + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param int $from (required) + * @param int $to (required) + * @param int|null $grain (optional) + * @param string[]|null $contexts (optional) + * @param string|null $contextsMode (optional) + * @param string|null $distributionCost (optional) + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + */ + private function blackfirePhpServerCachesWithHttpInfo( + string $projectId, + string $environmentId, + int $from, + int $to, + ?int $grain = null, + ?array $contexts = null, + ?string $contextsMode = null, + ?string $distributionCost = null + ): BlackfirePhpServerCaches200Response { + $request = $this->blackfirePhpServerCachesRequest( + $projectId, + $environmentId, + $from, + $to, + $grain, + $contexts, + $contextsMode, + $distributionCost + ); + + try { + $response = $this->sendAuthenticatedRequest( + $request->getMethod(), + (string) $request->getUri(), + $request->getHeaders(), + $request->getBody() + ); + + return $this->handleResponseWithDataType( + '\Upsun\Model\BlackfirePhpServerCaches200Response', + $request, + $response + ); + } catch (Exception $exception) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $exception->getCode(), + '/projects/{projectId}/environments/{environmentId}/observability/server/caches' + ), + $request, + $response ?? null, + $exception + ); + } + } + + /** + * Create request for operation 'blackfirePhpServerCaches' + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param int $from (required) + * @param int $to (required) + * @param int|null $grain (optional) + * @param string[]|null $contexts (optional) + * @param string|null $contextsMode (optional) + * @param string|null $distributionCost (optional) + * + * @throws InvalidArgumentException + */ + private function blackfirePhpServerCachesRequest( + string $projectId, + string $environmentId, + int $from, + int $to, + ?int $grain = null, + ?array $contexts = null, + ?string $contextsMode = null, + ?string $distributionCost = null + ): RequestInterface { + // verify the required parameter 'projectId' is set + if (empty($projectId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $projectId + when calling blackfirePhpServerCaches' + ); + } + + if (!preg_match("/[a-z0-9]+/", $projectId)) { + throw new InvalidArgumentException( + "invalid value for \"projectId\" when calling BlackfireMonitoringApi.blackfirePhpServerCaches, + must conform to the pattern /[a-z0-9]+/." + ); + } + + // verify the required parameter 'environmentId' is set + if (empty($environmentId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $environmentId + when calling blackfirePhpServerCaches' + ); + } + + if (!preg_match("/.+/", $environmentId)) { + throw new InvalidArgumentException( + "invalid value for \"environmentId\" when calling BlackfireMonitoringApi.blackfirePhpServerCaches, + must conform to the pattern /.+/." + ); + } + + // verify the required parameter 'from' is set + if (empty($from)) { + throw new InvalidArgumentException( + 'Missing the required parameter $from + when calling blackfirePhpServerCaches' + ); + } + // verify the required parameter 'to' is set + if (empty($to)) { + throw new InvalidArgumentException( + 'Missing the required parameter $to + when calling blackfirePhpServerCaches' + ); + } + + $resourcePath = '/projects/{projectId}/environments/{environmentId}/observability/server/caches'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = null; + $multipart = false; + + // query params + if ($from !== null) { + if ('form' === 'form' && is_array($from)) { + foreach ($from as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['from'] = $from instanceof DateTime + ? $from->format(DATE_ATOM) + : ($from); + } + } + + // query params + if ($to !== null) { + if ('form' === 'form' && is_array($to)) { + foreach ($to as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['to'] = $to instanceof DateTime + ? $to->format(DATE_ATOM) + : ($to); + } + } + + // query params + if ($grain !== null) { + if ('form' === 'form' && is_array($grain)) { + foreach ($grain as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['grain'] = $grain instanceof DateTime + ? $grain->format(DATE_ATOM) + : ($grain); + } + } + + // query params + if ($contexts !== null) { + if ('form' === 'form' && is_array($contexts)) { + foreach ($contexts as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['contexts[]'] = $contexts instanceof DateTime + ? $contexts->format(DATE_ATOM) + : ($contexts); + } + } + + // query params + if ($contextsMode !== null) { + if ('form' === 'form' && is_array($contextsMode)) { + foreach ($contextsMode as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['contexts_mode'] = $contextsMode instanceof DateTime + ? $contextsMode->format(DATE_ATOM) + : ($contextsMode); + } + } + + // query params + if ($distributionCost !== null) { + if ('form' === 'form' && is_array($distributionCost)) { + foreach ($distributionCost as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['distribution_cost'] = $distributionCost instanceof DateTime + ? $distributionCost->format(DATE_ATOM) + : ($distributionCost); + } + } + + // path params + + if ($projectId !== null) { + $resourcePath = str_replace( + '{' . 'projectId' . '}', + ObjectSerializer::toPathValue($projectId), + $resourcePath + ); + } + // path params + + if ($environmentId !== null) { + $resourcePath = str_replace( + '{' . 'environmentId' . '}', + ObjectSerializer::toPathValue($environmentId), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + '', + $multipart + ); + + // for model (json/xml) + if ($formParams !== []) { + 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 ($this->headerSelector->isJsonMime($headers['Content-Type'])) { + $httpBody = json_encode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if ($this->config->getAccessToken() !== null) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + if ($this->config->getUpsunClientHeader()) { + $defaultHeaders['X-Upsun-Client'] = $this->config->getUpsunClientHeader(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + + $uri = $this->createUri($operationHost, $resourcePath, $queryParams); + + return $this->createRequest('GET', $uri, $headers, $httpBody); + } + + /** + * Get server monitoring overview + * + * Returns time-series server monitoring data for the specified metrics (wall time, memory usage, peak memory usage, + * CPU load, stdout, requests per minute). Includes alert evaluations and APM quota usage. Data points contain + * metric values aggregated at the requested granularity. + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param int $from (required) + * @param int $to (required) + * @param string[] $keys (required) + * @param int|null $grain (optional) + * @param string[]|null $contexts (optional) + * @param string|null $contextsMode (optional) + * @param string|null $distributionCost (optional) + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + * @see https://docs.upsun.com/api/#tag/Blackfire-Monitoring/operation/blackfire_server_global + */ + public function blackfireServerGlobal( + string $projectId, + string $environmentId, + int $from, + int $to, + array $keys, + ?int $grain = null, + ?array $contexts = null, + ?string $contextsMode = null, + ?string $distributionCost = null + ): BlackfireServerGlobal200Response { + return $this->blackfireServerGlobalWithHttpInfo( + $projectId, + $environmentId, + $from, + $to, + $keys, + $grain, + $contexts, + $contextsMode, + $distributionCost + ); + } + + /** + * Get server monitoring overview with HTTP Info + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param int $from (required) + * @param int $to (required) + * @param string[] $keys (required) + * @param int|null $grain (optional) + * @param string[]|null $contexts (optional) + * @param string|null $contextsMode (optional) + * @param string|null $distributionCost (optional) + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + */ + private function blackfireServerGlobalWithHttpInfo( + string $projectId, + string $environmentId, + int $from, + int $to, + array $keys, + ?int $grain = null, + ?array $contexts = null, + ?string $contextsMode = null, + ?string $distributionCost = null + ): BlackfireServerGlobal200Response { + $request = $this->blackfireServerGlobalRequest( + $projectId, + $environmentId, + $from, + $to, + $keys, + $grain, + $contexts, + $contextsMode, + $distributionCost + ); + + try { + $response = $this->sendAuthenticatedRequest( + $request->getMethod(), + (string) $request->getUri(), + $request->getHeaders(), + $request->getBody() + ); + + return $this->handleResponseWithDataType( + '\Upsun\Model\BlackfireServerGlobal200Response', + $request, + $response + ); + } catch (Exception $exception) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $exception->getCode(), + '/projects/{projectId}/environments/{environmentId}/observability/server' + ), + $request, + $response ?? null, + $exception + ); + } + } + + /** + * Create request for operation 'blackfireServerGlobal' + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param int $from (required) + * @param int $to (required) + * @param string[] $keys (required) + * @param int|null $grain (optional) + * @param string[]|null $contexts (optional) + * @param string|null $contextsMode (optional) + * @param string|null $distributionCost (optional) + * + * @throws InvalidArgumentException + */ + private function blackfireServerGlobalRequest( + string $projectId, + string $environmentId, + int $from, + int $to, + array $keys, + ?int $grain = null, + ?array $contexts = null, + ?string $contextsMode = null, + ?string $distributionCost = null + ): RequestInterface { + // verify the required parameter 'projectId' is set + if (empty($projectId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $projectId + when calling blackfireServerGlobal' + ); + } + + if (!preg_match("/[a-z0-9]+/", $projectId)) { + throw new InvalidArgumentException( + "invalid value for \"projectId\" when calling BlackfireMonitoringApi.blackfireServerGlobal, + must conform to the pattern /[a-z0-9]+/." + ); + } + + // verify the required parameter 'environmentId' is set + if (empty($environmentId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $environmentId + when calling blackfireServerGlobal' + ); + } + + if (!preg_match("/.+/", $environmentId)) { + throw new InvalidArgumentException( + "invalid value for \"environmentId\" when calling BlackfireMonitoringApi.blackfireServerGlobal, + must conform to the pattern /.+/." + ); + } + + // verify the required parameter 'from' is set + if (empty($from)) { + throw new InvalidArgumentException( + 'Missing the required parameter $from + when calling blackfireServerGlobal' + ); + } + // verify the required parameter 'to' is set + if (empty($to)) { + throw new InvalidArgumentException( + 'Missing the required parameter $to + when calling blackfireServerGlobal' + ); + } + // verify the required parameter 'keys' is set + if (empty($keys)) { + throw new InvalidArgumentException( + 'Missing the required parameter $keys + when calling blackfireServerGlobal' + ); + } + + $resourcePath = '/projects/{projectId}/environments/{environmentId}/observability/server'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = null; + $multipart = false; + + // query params + if ($from !== null) { + if ('form' === 'form' && is_array($from)) { + foreach ($from as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['from'] = $from instanceof DateTime + ? $from->format(DATE_ATOM) + : ($from); + } + } + + // query params + if ($to !== null) { + if ('form' === 'form' && is_array($to)) { + foreach ($to as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['to'] = $to instanceof DateTime + ? $to->format(DATE_ATOM) + : ($to); + } + } + + // query params + if ($keys !== null) { + if ('form' === 'form' && is_array($keys)) { + foreach ($keys as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['keys[]'] = $keys instanceof DateTime + ? $keys->format(DATE_ATOM) + : ($keys); + } + } + + // query params + if ($grain !== null) { + if ('form' === 'form' && is_array($grain)) { + foreach ($grain as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['grain'] = $grain instanceof DateTime + ? $grain->format(DATE_ATOM) + : ($grain); + } + } + + // query params + if ($contexts !== null) { + if ('form' === 'form' && is_array($contexts)) { + foreach ($contexts as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['contexts[]'] = $contexts instanceof DateTime + ? $contexts->format(DATE_ATOM) + : ($contexts); + } + } + + // query params + if ($contextsMode !== null) { + if ('form' === 'form' && is_array($contextsMode)) { + foreach ($contextsMode as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['contexts_mode'] = $contextsMode instanceof DateTime + ? $contextsMode->format(DATE_ATOM) + : ($contextsMode); + } + } + + // query params + if ($distributionCost !== null) { + if ('form' === 'form' && is_array($distributionCost)) { + foreach ($distributionCost as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['distribution_cost'] = $distributionCost instanceof DateTime + ? $distributionCost->format(DATE_ATOM) + : ($distributionCost); + } + } + + // path params + + if ($projectId !== null) { + $resourcePath = str_replace( + '{' . 'projectId' . '}', + ObjectSerializer::toPathValue($projectId), + $resourcePath + ); + } + // path params + + if ($environmentId !== null) { + $resourcePath = str_replace( + '{' . 'environmentId' . '}', + ObjectSerializer::toPathValue($environmentId), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + '', + $multipart + ); + + // for model (json/xml) + if ($formParams !== []) { + 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 ($this->headerSelector->isJsonMime($headers['Content-Type'])) { + $httpBody = json_encode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if ($this->config->getAccessToken() !== null) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + if ($this->config->getUpsunClientHeader()) { + $defaultHeaders['X-Upsun-Client'] = $this->config->getUpsunClientHeader(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + + $uri = $this->createUri($operationHost, $resourcePath, $queryParams); + + return $this->createRequest('GET', $uri, $headers, $httpBody); + } + + /** + * Get top spans + * + * Returns the top spans aggregated across traces, sorted by impact or other metrics. Each span includes wall time, + * P96, call count, percentage of traces containing the span, and impact score. Supports filtering by context, + * transaction, host, framework, runtime, HTTP method/status, and service layer. + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param int $from (required) + * @param int $to (required) + * @param int|null $grain (optional) + * @param string|null $sort (optional) + * @param string[]|null $contexts (optional) + * @param string|null $contextsMode (optional) + * @param string[]|null $transactions (optional) + * @param string|null $transactionsMode (optional) + * @param string[]|null $wtSlots (optional) + * @param string|null $wtSlotsMode (optional) + * @param string[]|null $pmuSlots (optional) + * @param string|null $pmuSlotsMode (optional) + * @param string[]|null $httpStatusCodes (optional) + * @param string|null $httpStatusCodesMode (optional) + * @param string[]|null $httpHosts (optional) + * @param string|null $httpHostsMode (optional) + * @param string[]|null $hosts (optional) + * @param string|null $hostsMode (optional) + * @param string[]|null $frameworks (optional) + * @param string|null $frameworksMode (optional) + * @param string[]|null $languages (optional) + * @param string|null $languagesMode (optional) + * @param string[]|null $methods (optional) + * @param string|null $methodsMode (optional) + * @param string[]|null $runtimes (optional) + * @param string|null $runtimesMode (optional) + * @param string[]|null $oss (optional) + * @param string|null $ossMode (optional) + * @param string|null $distributionCost (optional) + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + * @see https://docs.upsun.com/api/#tag/Blackfire-Monitoring/operation/blackfire_server_top_spans + */ + public function blackfireServerTopSpans( + string $projectId, + string $environmentId, + int $from, + int $to, + ?int $grain = null, + ?string $sort = null, + ?array $contexts = null, + ?string $contextsMode = null, + ?array $transactions = null, + ?string $transactionsMode = null, + ?array $wtSlots = null, + ?string $wtSlotsMode = null, + ?array $pmuSlots = null, + ?string $pmuSlotsMode = null, + ?array $httpStatusCodes = null, + ?string $httpStatusCodesMode = null, + ?array $httpHosts = null, + ?string $httpHostsMode = null, + ?array $hosts = null, + ?string $hostsMode = null, + ?array $frameworks = null, + ?string $frameworksMode = null, + ?array $languages = null, + ?string $languagesMode = null, + ?array $methods = null, + ?string $methodsMode = null, + ?array $runtimes = null, + ?string $runtimesMode = null, + ?array $oss = null, + ?string $ossMode = null, + ?string $distributionCost = null + ): BlackfireServerTopSpans200Response { + return $this->blackfireServerTopSpansWithHttpInfo( + $projectId, + $environmentId, + $from, + $to, + $grain, + $sort, + $contexts, + $contextsMode, + $transactions, + $transactionsMode, + $wtSlots, + $wtSlotsMode, + $pmuSlots, + $pmuSlotsMode, + $httpStatusCodes, + $httpStatusCodesMode, + $httpHosts, + $httpHostsMode, + $hosts, + $hostsMode, + $frameworks, + $frameworksMode, + $languages, + $languagesMode, + $methods, + $methodsMode, + $runtimes, + $runtimesMode, + $oss, + $ossMode, + $distributionCost + ); + } + + /** + * Get top spans with HTTP Info + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param int $from (required) + * @param int $to (required) + * @param int|null $grain (optional) + * @param string|null $sort (optional) + * @param string[]|null $contexts (optional) + * @param string|null $contextsMode (optional) + * @param string[]|null $transactions (optional) + * @param string|null $transactionsMode (optional) + * @param string[]|null $wtSlots (optional) + * @param string|null $wtSlotsMode (optional) + * @param string[]|null $pmuSlots (optional) + * @param string|null $pmuSlotsMode (optional) + * @param string[]|null $httpStatusCodes (optional) + * @param string|null $httpStatusCodesMode (optional) + * @param string[]|null $httpHosts (optional) + * @param string|null $httpHostsMode (optional) + * @param string[]|null $hosts (optional) + * @param string|null $hostsMode (optional) + * @param string[]|null $frameworks (optional) + * @param string|null $frameworksMode (optional) + * @param string[]|null $languages (optional) + * @param string|null $languagesMode (optional) + * @param string[]|null $methods (optional) + * @param string|null $methodsMode (optional) + * @param string[]|null $runtimes (optional) + * @param string|null $runtimesMode (optional) + * @param string[]|null $oss (optional) + * @param string|null $ossMode (optional) + * @param string|null $distributionCost (optional) + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + */ + private function blackfireServerTopSpansWithHttpInfo( + string $projectId, + string $environmentId, + int $from, + int $to, + ?int $grain = null, + ?string $sort = null, + ?array $contexts = null, + ?string $contextsMode = null, + ?array $transactions = null, + ?string $transactionsMode = null, + ?array $wtSlots = null, + ?string $wtSlotsMode = null, + ?array $pmuSlots = null, + ?string $pmuSlotsMode = null, + ?array $httpStatusCodes = null, + ?string $httpStatusCodesMode = null, + ?array $httpHosts = null, + ?string $httpHostsMode = null, + ?array $hosts = null, + ?string $hostsMode = null, + ?array $frameworks = null, + ?string $frameworksMode = null, + ?array $languages = null, + ?string $languagesMode = null, + ?array $methods = null, + ?string $methodsMode = null, + ?array $runtimes = null, + ?string $runtimesMode = null, + ?array $oss = null, + ?string $ossMode = null, + ?string $distributionCost = null + ): BlackfireServerTopSpans200Response { + $request = $this->blackfireServerTopSpansRequest( + $projectId, + $environmentId, + $from, + $to, + $grain, + $sort, + $contexts, + $contextsMode, + $transactions, + $transactionsMode, + $wtSlots, + $wtSlotsMode, + $pmuSlots, + $pmuSlotsMode, + $httpStatusCodes, + $httpStatusCodesMode, + $httpHosts, + $httpHostsMode, + $hosts, + $hostsMode, + $frameworks, + $frameworksMode, + $languages, + $languagesMode, + $methods, + $methodsMode, + $runtimes, + $runtimesMode, + $oss, + $ossMode, + $distributionCost + ); + + try { + $response = $this->sendAuthenticatedRequest( + $request->getMethod(), + (string) $request->getUri(), + $request->getHeaders(), + $request->getBody() + ); + + return $this->handleResponseWithDataType( + '\Upsun\Model\BlackfireServerTopSpans200Response', + $request, + $response + ); + } catch (Exception $exception) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $exception->getCode(), + '/projects/{projectId}/environments/{environmentId}/observability/server/top-spans' + ), + $request, + $response ?? null, + $exception + ); + } + } + + /** + * Create request for operation 'blackfireServerTopSpans' + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param int $from (required) + * @param int $to (required) + * @param int|null $grain (optional) + * @param string|null $sort (optional) + * @param string[]|null $contexts (optional) + * @param string|null $contextsMode (optional) + * @param string[]|null $transactions (optional) + * @param string|null $transactionsMode (optional) + * @param string[]|null $wtSlots (optional) + * @param string|null $wtSlotsMode (optional) + * @param string[]|null $pmuSlots (optional) + * @param string|null $pmuSlotsMode (optional) + * @param string[]|null $httpStatusCodes (optional) + * @param string|null $httpStatusCodesMode (optional) + * @param string[]|null $httpHosts (optional) + * @param string|null $httpHostsMode (optional) + * @param string[]|null $hosts (optional) + * @param string|null $hostsMode (optional) + * @param string[]|null $frameworks (optional) + * @param string|null $frameworksMode (optional) + * @param string[]|null $languages (optional) + * @param string|null $languagesMode (optional) + * @param string[]|null $methods (optional) + * @param string|null $methodsMode (optional) + * @param string[]|null $runtimes (optional) + * @param string|null $runtimesMode (optional) + * @param string[]|null $oss (optional) + * @param string|null $ossMode (optional) + * @param string|null $distributionCost (optional) + * + * @throws InvalidArgumentException + */ + private function blackfireServerTopSpansRequest( + string $projectId, + string $environmentId, + int $from, + int $to, + ?int $grain = null, + ?string $sort = null, + ?array $contexts = null, + ?string $contextsMode = null, + ?array $transactions = null, + ?string $transactionsMode = null, + ?array $wtSlots = null, + ?string $wtSlotsMode = null, + ?array $pmuSlots = null, + ?string $pmuSlotsMode = null, + ?array $httpStatusCodes = null, + ?string $httpStatusCodesMode = null, + ?array $httpHosts = null, + ?string $httpHostsMode = null, + ?array $hosts = null, + ?string $hostsMode = null, + ?array $frameworks = null, + ?string $frameworksMode = null, + ?array $languages = null, + ?string $languagesMode = null, + ?array $methods = null, + ?string $methodsMode = null, + ?array $runtimes = null, + ?string $runtimesMode = null, + ?array $oss = null, + ?string $ossMode = null, + ?string $distributionCost = null + ): RequestInterface { + // verify the required parameter 'projectId' is set + if (empty($projectId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $projectId + when calling blackfireServerTopSpans' + ); + } + + if (!preg_match("/[a-z0-9]+/", $projectId)) { + throw new InvalidArgumentException( + "invalid value for \"projectId\" when calling BlackfireMonitoringApi.blackfireServerTopSpans, + must conform to the pattern /[a-z0-9]+/." + ); + } + + // verify the required parameter 'environmentId' is set + if (empty($environmentId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $environmentId + when calling blackfireServerTopSpans' + ); + } + + if (!preg_match("/.+/", $environmentId)) { + throw new InvalidArgumentException( + "invalid value for \"environmentId\" when calling BlackfireMonitoringApi.blackfireServerTopSpans, + must conform to the pattern /.+/." + ); + } + + // verify the required parameter 'from' is set + if (empty($from)) { + throw new InvalidArgumentException( + 'Missing the required parameter $from + when calling blackfireServerTopSpans' + ); + } + // verify the required parameter 'to' is set + if (empty($to)) { + throw new InvalidArgumentException( + 'Missing the required parameter $to + when calling blackfireServerTopSpans' + ); + } + + $resourcePath = '/projects/{projectId}/environments/{environmentId}/observability/server/top-spans'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = null; + $multipart = false; + + // query params + if ($from !== null) { + if ('form' === 'form' && is_array($from)) { + foreach ($from as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['from'] = $from instanceof DateTime + ? $from->format(DATE_ATOM) + : ($from); + } + } + + // query params + if ($to !== null) { + if ('form' === 'form' && is_array($to)) { + foreach ($to as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['to'] = $to instanceof DateTime + ? $to->format(DATE_ATOM) + : ($to); + } + } + + // query params + if ($grain !== null) { + if ('form' === 'form' && is_array($grain)) { + foreach ($grain as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['grain'] = $grain instanceof DateTime + ? $grain->format(DATE_ATOM) + : ($grain); + } + } + + // query params + if ($sort !== null) { + if ('form' === 'form' && is_array($sort)) { + foreach ($sort as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['sort'] = $sort instanceof DateTime + ? $sort->format(DATE_ATOM) + : ($sort); + } + } + + // query params + if ($contexts !== null) { + if ('form' === 'form' && is_array($contexts)) { + foreach ($contexts as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['contexts[]'] = $contexts instanceof DateTime + ? $contexts->format(DATE_ATOM) + : ($contexts); + } + } + + // query params + if ($contextsMode !== null) { + if ('form' === 'form' && is_array($contextsMode)) { + foreach ($contextsMode as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['contexts_mode'] = $contextsMode instanceof DateTime + ? $contextsMode->format(DATE_ATOM) + : ($contextsMode); + } + } + + // query params + if ($transactions !== null) { + if ('form' === 'form' && is_array($transactions)) { + foreach ($transactions as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['transactions[]'] = $transactions instanceof DateTime + ? $transactions->format(DATE_ATOM) + : ($transactions); + } + } + + // query params + if ($transactionsMode !== null) { + if ('form' === 'form' && is_array($transactionsMode)) { + foreach ($transactionsMode as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['transactions_mode'] = $transactionsMode instanceof DateTime + ? $transactionsMode->format(DATE_ATOM) + : ($transactionsMode); + } + } + + // query params + if ($wtSlots !== null) { + if ('form' === 'form' && is_array($wtSlots)) { + foreach ($wtSlots as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['wt_slots[]'] = $wtSlots instanceof DateTime + ? $wtSlots->format(DATE_ATOM) + : ($wtSlots); + } + } + + // query params + if ($wtSlotsMode !== null) { + if ('form' === 'form' && is_array($wtSlotsMode)) { + foreach ($wtSlotsMode as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['wt_slots_mode'] = $wtSlotsMode instanceof DateTime + ? $wtSlotsMode->format(DATE_ATOM) + : ($wtSlotsMode); + } + } + + // query params + if ($pmuSlots !== null) { + if ('form' === 'form' && is_array($pmuSlots)) { + foreach ($pmuSlots as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['pmu_slots[]'] = $pmuSlots instanceof DateTime + ? $pmuSlots->format(DATE_ATOM) + : ($pmuSlots); + } + } + + // query params + if ($pmuSlotsMode !== null) { + if ('form' === 'form' && is_array($pmuSlotsMode)) { + foreach ($pmuSlotsMode as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['pmu_slots_mode'] = $pmuSlotsMode instanceof DateTime + ? $pmuSlotsMode->format(DATE_ATOM) + : ($pmuSlotsMode); + } + } + + // query params + if ($httpStatusCodes !== null) { + if ('form' === 'form' && is_array($httpStatusCodes)) { + foreach ($httpStatusCodes as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['http_status_codes[]'] = $httpStatusCodes instanceof DateTime + ? $httpStatusCodes->format(DATE_ATOM) + : ($httpStatusCodes); + } + } + + // query params + if ($httpStatusCodesMode !== null) { + if ('form' === 'form' && is_array($httpStatusCodesMode)) { + foreach ($httpStatusCodesMode as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['http_status_codes_mode'] = $httpStatusCodesMode instanceof DateTime + ? $httpStatusCodesMode->format(DATE_ATOM) + : ($httpStatusCodesMode); + } + } + + // query params + if ($httpHosts !== null) { + if ('form' === 'form' && is_array($httpHosts)) { + foreach ($httpHosts as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['http_hosts[]'] = $httpHosts instanceof DateTime + ? $httpHosts->format(DATE_ATOM) + : ($httpHosts); + } + } + + // query params + if ($httpHostsMode !== null) { + if ('form' === 'form' && is_array($httpHostsMode)) { + foreach ($httpHostsMode as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['http_hosts_mode'] = $httpHostsMode instanceof DateTime + ? $httpHostsMode->format(DATE_ATOM) + : ($httpHostsMode); + } + } + + // query params + if ($hosts !== null) { + if ('form' === 'form' && is_array($hosts)) { + foreach ($hosts as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['hosts[]'] = $hosts instanceof DateTime + ? $hosts->format(DATE_ATOM) + : ($hosts); + } + } + + // query params + if ($hostsMode !== null) { + if ('form' === 'form' && is_array($hostsMode)) { + foreach ($hostsMode as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['hosts_mode'] = $hostsMode instanceof DateTime + ? $hostsMode->format(DATE_ATOM) + : ($hostsMode); + } + } + + // query params + if ($frameworks !== null) { + if ('form' === 'form' && is_array($frameworks)) { + foreach ($frameworks as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['frameworks[]'] = $frameworks instanceof DateTime + ? $frameworks->format(DATE_ATOM) + : ($frameworks); + } + } + + // query params + if ($frameworksMode !== null) { + if ('form' === 'form' && is_array($frameworksMode)) { + foreach ($frameworksMode as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['frameworks_mode'] = $frameworksMode instanceof DateTime + ? $frameworksMode->format(DATE_ATOM) + : ($frameworksMode); + } + } + + // query params + if ($languages !== null) { + if ('form' === 'form' && is_array($languages)) { + foreach ($languages as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['languages[]'] = $languages instanceof DateTime + ? $languages->format(DATE_ATOM) + : ($languages); + } + } + + // query params + if ($languagesMode !== null) { + if ('form' === 'form' && is_array($languagesMode)) { + foreach ($languagesMode as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['languages_mode'] = $languagesMode instanceof DateTime + ? $languagesMode->format(DATE_ATOM) + : ($languagesMode); + } + } + + // query params + if ($methods !== null) { + if ('form' === 'form' && is_array($methods)) { + foreach ($methods as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['methods[]'] = $methods instanceof DateTime + ? $methods->format(DATE_ATOM) + : ($methods); + } + } + + // query params + if ($methodsMode !== null) { + if ('form' === 'form' && is_array($methodsMode)) { + foreach ($methodsMode as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['methods_mode'] = $methodsMode instanceof DateTime + ? $methodsMode->format(DATE_ATOM) + : ($methodsMode); + } + } + + // query params + if ($runtimes !== null) { + if ('form' === 'form' && is_array($runtimes)) { + foreach ($runtimes as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['runtimes[]'] = $runtimes instanceof DateTime + ? $runtimes->format(DATE_ATOM) + : ($runtimes); + } + } + + // query params + if ($runtimesMode !== null) { + if ('form' === 'form' && is_array($runtimesMode)) { + foreach ($runtimesMode as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['runtimes_mode'] = $runtimesMode instanceof DateTime + ? $runtimesMode->format(DATE_ATOM) + : ($runtimesMode); + } + } + + // query params + if ($oss !== null) { + if ('form' === 'form' && is_array($oss)) { + foreach ($oss as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['oss[]'] = $oss instanceof DateTime + ? $oss->format(DATE_ATOM) + : ($oss); + } + } + + // query params + if ($ossMode !== null) { + if ('form' === 'form' && is_array($ossMode)) { + foreach ($ossMode as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['oss_mode'] = $ossMode instanceof DateTime + ? $ossMode->format(DATE_ATOM) + : ($ossMode); + } + } + + // query params + if ($distributionCost !== null) { + if ('form' === 'form' && is_array($distributionCost)) { + foreach ($distributionCost as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['distribution_cost'] = $distributionCost instanceof DateTime + ? $distributionCost->format(DATE_ATOM) + : ($distributionCost); + } + } + + // path params + + if ($projectId !== null) { + $resourcePath = str_replace( + '{' . 'projectId' . '}', + ObjectSerializer::toPathValue($projectId), + $resourcePath + ); + } + // path params + + if ($environmentId !== null) { + $resourcePath = str_replace( + '{' . 'environmentId' . '}', + ObjectSerializer::toPathValue($environmentId), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + '', + $multipart + ); + + // for model (json/xml) + if ($formParams !== []) { + 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 ($this->headerSelector->isJsonMime($headers['Content-Type'])) { + $httpBody = json_encode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if ($this->config->getAccessToken() !== null) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + if ($this->config->getUpsunClientHeader()) { + $defaultHeaders['X-Upsun-Client'] = $this->config->getUpsunClientHeader(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + + $uri = $this->createUri($operationHost, $resourcePath, $queryParams); + + return $this->createRequest('GET', $uri, $headers, $httpBody); + } + + /** + * Get server transaction breakdown + * + * Returns transaction breakdown with impact scores, showing how each transaction contributes to overall resource + * consumption. Includes time-series data for top-hit transactions and aggregated metrics per transaction. Use + * breakdown_dimension to analyze by wall time (wt), memory (pmu), or stdout. Supports extensive filtering by + * context, transaction, host, framework, runtime, HTTP method, status code, and more. + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param int $from (required) + * @param int $to (required) + * @param int|null $grain (optional) + * @param string|null $breakdownDimension (optional) + * @param string|null $sort (optional) + * @param int|null $breakdownLimit (optional) + * @param string[]|null $contexts (optional) + * @param string|null $contextsMode (optional) + * @param string[]|null $transactions (optional) + * @param string|null $transactionsMode (optional) + * @param string[]|null $wtSlots (optional) + * @param string|null $wtSlotsMode (optional) + * @param string[]|null $pmuSlots (optional) + * @param string|null $pmuSlotsMode (optional) + * @param string[]|null $httpStatusCodes (optional) + * @param string|null $httpStatusCodesMode (optional) + * @param string[]|null $httpHosts (optional) + * @param string|null $httpHostsMode (optional) + * @param string[]|null $hosts (optional) + * @param string|null $hostsMode (optional) + * @param string[]|null $frameworks (optional) + * @param string|null $frameworksMode (optional) + * @param string[]|null $languages (optional) + * @param string|null $languagesMode (optional) + * @param string[]|null $methods (optional) + * @param string|null $methodsMode (optional) + * @param string[]|null $runtimes (optional) + * @param string|null $runtimesMode (optional) + * @param string[]|null $oss (optional) + * @param string|null $ossMode (optional) + * @param string|null $distributionCost (optional) + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + * @see https://docs.upsun.com/api/#tag/Blackfire-Monitoring/operation/blackfire_server_transactions_breakdown + */ + public function blackfireServerTransactionsBreakdown( + string $projectId, + string $environmentId, + int $from, + int $to, + ?int $grain = null, + ?string $breakdownDimension = null, + ?string $sort = null, + ?int $breakdownLimit = null, + ?array $contexts = null, + ?string $contextsMode = null, + ?array $transactions = null, + ?string $transactionsMode = null, + ?array $wtSlots = null, + ?string $wtSlotsMode = null, + ?array $pmuSlots = null, + ?string $pmuSlotsMode = null, + ?array $httpStatusCodes = null, + ?string $httpStatusCodesMode = null, + ?array $httpHosts = null, + ?string $httpHostsMode = null, + ?array $hosts = null, + ?string $hostsMode = null, + ?array $frameworks = null, + ?string $frameworksMode = null, + ?array $languages = null, + ?string $languagesMode = null, + ?array $methods = null, + ?string $methodsMode = null, + ?array $runtimes = null, + ?string $runtimesMode = null, + ?array $oss = null, + ?string $ossMode = null, + ?string $distributionCost = null + ): BlackfireServerTransactionsBreakdown200Response { + return $this->blackfireServerTransactionsBreakdownWithHttpInfo( + $projectId, + $environmentId, + $from, + $to, + $grain, + $breakdownDimension, + $sort, + $breakdownLimit, + $contexts, + $contextsMode, + $transactions, + $transactionsMode, + $wtSlots, + $wtSlotsMode, + $pmuSlots, + $pmuSlotsMode, + $httpStatusCodes, + $httpStatusCodesMode, + $httpHosts, + $httpHostsMode, + $hosts, + $hostsMode, + $frameworks, + $frameworksMode, + $languages, + $languagesMode, + $methods, + $methodsMode, + $runtimes, + $runtimesMode, + $oss, + $ossMode, + $distributionCost + ); + } + + /** + * Get server transaction breakdown with HTTP Info + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param int $from (required) + * @param int $to (required) + * @param int|null $grain (optional) + * @param string|null $breakdownDimension (optional) + * @param string|null $sort (optional) + * @param int|null $breakdownLimit (optional) + * @param string[]|null $contexts (optional) + * @param string|null $contextsMode (optional) + * @param string[]|null $transactions (optional) + * @param string|null $transactionsMode (optional) + * @param string[]|null $wtSlots (optional) + * @param string|null $wtSlotsMode (optional) + * @param string[]|null $pmuSlots (optional) + * @param string|null $pmuSlotsMode (optional) + * @param string[]|null $httpStatusCodes (optional) + * @param string|null $httpStatusCodesMode (optional) + * @param string[]|null $httpHosts (optional) + * @param string|null $httpHostsMode (optional) + * @param string[]|null $hosts (optional) + * @param string|null $hostsMode (optional) + * @param string[]|null $frameworks (optional) + * @param string|null $frameworksMode (optional) + * @param string[]|null $languages (optional) + * @param string|null $languagesMode (optional) + * @param string[]|null $methods (optional) + * @param string|null $methodsMode (optional) + * @param string[]|null $runtimes (optional) + * @param string|null $runtimesMode (optional) + * @param string[]|null $oss (optional) + * @param string|null $ossMode (optional) + * @param string|null $distributionCost (optional) + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + */ + private function blackfireServerTransactionsBreakdownWithHttpInfo( + string $projectId, + string $environmentId, + int $from, + int $to, + ?int $grain = null, + ?string $breakdownDimension = null, + ?string $sort = null, + ?int $breakdownLimit = null, + ?array $contexts = null, + ?string $contextsMode = null, + ?array $transactions = null, + ?string $transactionsMode = null, + ?array $wtSlots = null, + ?string $wtSlotsMode = null, + ?array $pmuSlots = null, + ?string $pmuSlotsMode = null, + ?array $httpStatusCodes = null, + ?string $httpStatusCodesMode = null, + ?array $httpHosts = null, + ?string $httpHostsMode = null, + ?array $hosts = null, + ?string $hostsMode = null, + ?array $frameworks = null, + ?string $frameworksMode = null, + ?array $languages = null, + ?string $languagesMode = null, + ?array $methods = null, + ?string $methodsMode = null, + ?array $runtimes = null, + ?string $runtimesMode = null, + ?array $oss = null, + ?string $ossMode = null, + ?string $distributionCost = null + ): BlackfireServerTransactionsBreakdown200Response { + $request = $this->blackfireServerTransactionsBreakdownRequest( + $projectId, + $environmentId, + $from, + $to, + $grain, + $breakdownDimension, + $sort, + $breakdownLimit, + $contexts, + $contextsMode, + $transactions, + $transactionsMode, + $wtSlots, + $wtSlotsMode, + $pmuSlots, + $pmuSlotsMode, + $httpStatusCodes, + $httpStatusCodesMode, + $httpHosts, + $httpHostsMode, + $hosts, + $hostsMode, + $frameworks, + $frameworksMode, + $languages, + $languagesMode, + $methods, + $methodsMode, + $runtimes, + $runtimesMode, + $oss, + $ossMode, + $distributionCost + ); + + try { + $response = $this->sendAuthenticatedRequest( + $request->getMethod(), + (string) $request->getUri(), + $request->getHeaders(), + $request->getBody() + ); + + return $this->handleResponseWithDataType( + '\Upsun\Model\BlackfireServerTransactionsBreakdown200Response', + $request, + $response + ); + } catch (Exception $exception) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $exception->getCode(), + '/projects/{projectId}/environments/{environmentId}/observability/server/transactions-break-down' + ), + $request, + $response ?? null, + $exception + ); + } + } + + /** + * Create request for operation 'blackfireServerTransactionsBreakdown' + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param int $from (required) + * @param int $to (required) + * @param int|null $grain (optional) + * @param string|null $breakdownDimension (optional) + * @param string|null $sort (optional) + * @param int|null $breakdownLimit (optional) + * @param string[]|null $contexts (optional) + * @param string|null $contextsMode (optional) + * @param string[]|null $transactions (optional) + * @param string|null $transactionsMode (optional) + * @param string[]|null $wtSlots (optional) + * @param string|null $wtSlotsMode (optional) + * @param string[]|null $pmuSlots (optional) + * @param string|null $pmuSlotsMode (optional) + * @param string[]|null $httpStatusCodes (optional) + * @param string|null $httpStatusCodesMode (optional) + * @param string[]|null $httpHosts (optional) + * @param string|null $httpHostsMode (optional) + * @param string[]|null $hosts (optional) + * @param string|null $hostsMode (optional) + * @param string[]|null $frameworks (optional) + * @param string|null $frameworksMode (optional) + * @param string[]|null $languages (optional) + * @param string|null $languagesMode (optional) + * @param string[]|null $methods (optional) + * @param string|null $methodsMode (optional) + * @param string[]|null $runtimes (optional) + * @param string|null $runtimesMode (optional) + * @param string[]|null $oss (optional) + * @param string|null $ossMode (optional) + * @param string|null $distributionCost (optional) + * + * @throws InvalidArgumentException + */ + private function blackfireServerTransactionsBreakdownRequest( + string $projectId, + string $environmentId, + int $from, + int $to, + ?int $grain = null, + ?string $breakdownDimension = null, + ?string $sort = null, + ?int $breakdownLimit = null, + ?array $contexts = null, + ?string $contextsMode = null, + ?array $transactions = null, + ?string $transactionsMode = null, + ?array $wtSlots = null, + ?string $wtSlotsMode = null, + ?array $pmuSlots = null, + ?string $pmuSlotsMode = null, + ?array $httpStatusCodes = null, + ?string $httpStatusCodesMode = null, + ?array $httpHosts = null, + ?string $httpHostsMode = null, + ?array $hosts = null, + ?string $hostsMode = null, + ?array $frameworks = null, + ?string $frameworksMode = null, + ?array $languages = null, + ?string $languagesMode = null, + ?array $methods = null, + ?string $methodsMode = null, + ?array $runtimes = null, + ?string $runtimesMode = null, + ?array $oss = null, + ?string $ossMode = null, + ?string $distributionCost = null + ): RequestInterface { + // verify the required parameter 'projectId' is set + if (empty($projectId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $projectId + when calling blackfireServerTransactionsBreakdown' + ); + } + + if (!preg_match("/[a-z0-9]+/", $projectId)) { + throw new InvalidArgumentException( + "invalid value for \"projectId\" when calling BlackfireMonitoringApi.blackfireServerTransactionsBreakdown, + must conform to the pattern /[a-z0-9]+/." + ); + } + + // verify the required parameter 'environmentId' is set + if (empty($environmentId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $environmentId + when calling blackfireServerTransactionsBreakdown' + ); + } + + if (!preg_match("/.+/", $environmentId)) { + throw new InvalidArgumentException( + "invalid value for \"environmentId\" when calling BlackfireMonitoringApi.blackfireServerTransactionsBreakdown, + must conform to the pattern /.+/." + ); + } + + // verify the required parameter 'from' is set + if (empty($from)) { + throw new InvalidArgumentException( + 'Missing the required parameter $from + when calling blackfireServerTransactionsBreakdown' + ); + } + // verify the required parameter 'to' is set + if (empty($to)) { + throw new InvalidArgumentException( + 'Missing the required parameter $to + when calling blackfireServerTransactionsBreakdown' + ); + } + + if ($breakdownLimit !== null && $breakdownLimit > 300) { + throw new InvalidArgumentException( + 'invalid value for "$breakdownLimit" when calling BlackfireMonitoringApi.blackfireServerTransactionsBreakdown, + must be smaller than or equal to 300.' + ); + } + + if ($breakdownLimit !== null && $breakdownLimit < 1) { + throw new InvalidArgumentException( + 'invalid value for "$breakdownLimit" when calling BlackfireMonitoringApi.blackfireServerTransactionsBreakdown, + must be bigger than or equal to 1.' + ); + } + + $resourcePath = '/projects/{projectId}/environments/{environmentId}/observability/server/transactions-break-down'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = null; + $multipart = false; + + // query params + if ($from !== null) { + if ('form' === 'form' && is_array($from)) { + foreach ($from as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['from'] = $from instanceof DateTime + ? $from->format(DATE_ATOM) + : ($from); + } + } + + // query params + if ($to !== null) { + if ('form' === 'form' && is_array($to)) { + foreach ($to as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['to'] = $to instanceof DateTime + ? $to->format(DATE_ATOM) + : ($to); + } + } + + // query params + if ($grain !== null) { + if ('form' === 'form' && is_array($grain)) { + foreach ($grain as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['grain'] = $grain instanceof DateTime + ? $grain->format(DATE_ATOM) + : ($grain); + } + } + + // query params + if ($breakdownDimension !== null) { + if ('form' === 'form' && is_array($breakdownDimension)) { + foreach ($breakdownDimension as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['breakdown_dimension'] = $breakdownDimension instanceof DateTime + ? $breakdownDimension->format(DATE_ATOM) + : ($breakdownDimension); + } + } + + // query params + if ($sort !== null) { + if ('form' === 'form' && is_array($sort)) { + foreach ($sort as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['sort'] = $sort instanceof DateTime + ? $sort->format(DATE_ATOM) + : ($sort); + } + } + + // query params + if ($breakdownLimit !== null) { + if ('form' === 'form' && is_array($breakdownLimit)) { + foreach ($breakdownLimit as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['breakdown_limit'] = $breakdownLimit instanceof DateTime + ? $breakdownLimit->format(DATE_ATOM) + : ($breakdownLimit); + } + } + + // query params + if ($contexts !== null) { + if ('form' === 'form' && is_array($contexts)) { + foreach ($contexts as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['contexts[]'] = $contexts instanceof DateTime + ? $contexts->format(DATE_ATOM) + : ($contexts); + } + } + + // query params + if ($contextsMode !== null) { + if ('form' === 'form' && is_array($contextsMode)) { + foreach ($contextsMode as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['contexts_mode'] = $contextsMode instanceof DateTime + ? $contextsMode->format(DATE_ATOM) + : ($contextsMode); + } + } + + // query params + if ($transactions !== null) { + if ('form' === 'form' && is_array($transactions)) { + foreach ($transactions as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['transactions[]'] = $transactions instanceof DateTime + ? $transactions->format(DATE_ATOM) + : ($transactions); + } + } + + // query params + if ($transactionsMode !== null) { + if ('form' === 'form' && is_array($transactionsMode)) { + foreach ($transactionsMode as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['transactions_mode'] = $transactionsMode instanceof DateTime + ? $transactionsMode->format(DATE_ATOM) + : ($transactionsMode); + } + } + + // query params + if ($wtSlots !== null) { + if ('form' === 'form' && is_array($wtSlots)) { + foreach ($wtSlots as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['wt_slots[]'] = $wtSlots instanceof DateTime + ? $wtSlots->format(DATE_ATOM) + : ($wtSlots); + } + } + + // query params + if ($wtSlotsMode !== null) { + if ('form' === 'form' && is_array($wtSlotsMode)) { + foreach ($wtSlotsMode as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['wt_slots_mode'] = $wtSlotsMode instanceof DateTime + ? $wtSlotsMode->format(DATE_ATOM) + : ($wtSlotsMode); + } + } + + // query params + if ($pmuSlots !== null) { + if ('form' === 'form' && is_array($pmuSlots)) { + foreach ($pmuSlots as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['pmu_slots[]'] = $pmuSlots instanceof DateTime + ? $pmuSlots->format(DATE_ATOM) + : ($pmuSlots); + } + } + + // query params + if ($pmuSlotsMode !== null) { + if ('form' === 'form' && is_array($pmuSlotsMode)) { + foreach ($pmuSlotsMode as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['pmu_slots_mode'] = $pmuSlotsMode instanceof DateTime + ? $pmuSlotsMode->format(DATE_ATOM) + : ($pmuSlotsMode); + } + } + + // query params + if ($httpStatusCodes !== null) { + if ('form' === 'form' && is_array($httpStatusCodes)) { + foreach ($httpStatusCodes as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['http_status_codes[]'] = $httpStatusCodes instanceof DateTime + ? $httpStatusCodes->format(DATE_ATOM) + : ($httpStatusCodes); + } + } + + // query params + if ($httpStatusCodesMode !== null) { + if ('form' === 'form' && is_array($httpStatusCodesMode)) { + foreach ($httpStatusCodesMode as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['http_status_codes_mode'] = $httpStatusCodesMode instanceof DateTime + ? $httpStatusCodesMode->format(DATE_ATOM) + : ($httpStatusCodesMode); + } + } + + // query params + if ($httpHosts !== null) { + if ('form' === 'form' && is_array($httpHosts)) { + foreach ($httpHosts as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['http_hosts[]'] = $httpHosts instanceof DateTime + ? $httpHosts->format(DATE_ATOM) + : ($httpHosts); + } + } + + // query params + if ($httpHostsMode !== null) { + if ('form' === 'form' && is_array($httpHostsMode)) { + foreach ($httpHostsMode as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['http_hosts_mode'] = $httpHostsMode instanceof DateTime + ? $httpHostsMode->format(DATE_ATOM) + : ($httpHostsMode); + } + } + + // query params + if ($hosts !== null) { + if ('form' === 'form' && is_array($hosts)) { + foreach ($hosts as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['hosts[]'] = $hosts instanceof DateTime + ? $hosts->format(DATE_ATOM) + : ($hosts); + } + } + + // query params + if ($hostsMode !== null) { + if ('form' === 'form' && is_array($hostsMode)) { + foreach ($hostsMode as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['hosts_mode'] = $hostsMode instanceof DateTime + ? $hostsMode->format(DATE_ATOM) + : ($hostsMode); + } + } + + // query params + if ($frameworks !== null) { + if ('form' === 'form' && is_array($frameworks)) { + foreach ($frameworks as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['frameworks[]'] = $frameworks instanceof DateTime + ? $frameworks->format(DATE_ATOM) + : ($frameworks); + } + } + + // query params + if ($frameworksMode !== null) { + if ('form' === 'form' && is_array($frameworksMode)) { + foreach ($frameworksMode as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['frameworks_mode'] = $frameworksMode instanceof DateTime + ? $frameworksMode->format(DATE_ATOM) + : ($frameworksMode); + } + } + + // query params + if ($languages !== null) { + if ('form' === 'form' && is_array($languages)) { + foreach ($languages as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['languages[]'] = $languages instanceof DateTime + ? $languages->format(DATE_ATOM) + : ($languages); + } + } + + // query params + if ($languagesMode !== null) { + if ('form' === 'form' && is_array($languagesMode)) { + foreach ($languagesMode as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['languages_mode'] = $languagesMode instanceof DateTime + ? $languagesMode->format(DATE_ATOM) + : ($languagesMode); + } + } + + // query params + if ($methods !== null) { + if ('form' === 'form' && is_array($methods)) { + foreach ($methods as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['methods[]'] = $methods instanceof DateTime + ? $methods->format(DATE_ATOM) + : ($methods); + } + } + + // query params + if ($methodsMode !== null) { + if ('form' === 'form' && is_array($methodsMode)) { + foreach ($methodsMode as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['methods_mode'] = $methodsMode instanceof DateTime + ? $methodsMode->format(DATE_ATOM) + : ($methodsMode); + } + } + + // query params + if ($runtimes !== null) { + if ('form' === 'form' && is_array($runtimes)) { + foreach ($runtimes as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['runtimes[]'] = $runtimes instanceof DateTime + ? $runtimes->format(DATE_ATOM) + : ($runtimes); + } + } + + // query params + if ($runtimesMode !== null) { + if ('form' === 'form' && is_array($runtimesMode)) { + foreach ($runtimesMode as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['runtimes_mode'] = $runtimesMode instanceof DateTime + ? $runtimesMode->format(DATE_ATOM) + : ($runtimesMode); + } + } + + // query params + if ($oss !== null) { + if ('form' === 'form' && is_array($oss)) { + foreach ($oss as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['oss[]'] = $oss instanceof DateTime + ? $oss->format(DATE_ATOM) + : ($oss); + } + } + + // query params + if ($ossMode !== null) { + if ('form' === 'form' && is_array($ossMode)) { + foreach ($ossMode as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['oss_mode'] = $ossMode instanceof DateTime + ? $ossMode->format(DATE_ATOM) + : ($ossMode); + } + } + + // query params + if ($distributionCost !== null) { + if ('form' === 'form' && is_array($distributionCost)) { + foreach ($distributionCost as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['distribution_cost'] = $distributionCost instanceof DateTime + ? $distributionCost->format(DATE_ATOM) + : ($distributionCost); + } + } + + // path params + + if ($projectId !== null) { + $resourcePath = str_replace( + '{' . 'projectId' . '}', + ObjectSerializer::toPathValue($projectId), + $resourcePath + ); + } + // path params + + if ($environmentId !== null) { + $resourcePath = str_replace( + '{' . 'environmentId' . '}', + ObjectSerializer::toPathValue($environmentId), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + '', + $multipart + ); + + // for model (json/xml) + if ($formParams !== []) { + 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 ($this->headerSelector->isJsonMime($headers['Content-Type'])) { + $httpBody = json_encode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if ($this->config->getAccessToken() !== null) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + if ($this->config->getUpsunClientHeader()) { + $defaultHeaders['X-Upsun-Client'] = $this->config->getUpsunClientHeader(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + + $uri = $this->createUri($operationHost, $resourcePath, $queryParams); + + return $this->createRequest('GET', $uri, $headers, $httpBody); + } +} diff --git a/src/Api/BlackfireProfilingApi.php b/src/Api/BlackfireProfilingApi.php new file mode 100644 index 00000000..2958592e --- /dev/null +++ b/src/Api/BlackfireProfilingApi.php @@ -0,0 +1,1557 @@ +config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + + $this->headerSelector = $selector ?? new ApiHeaderSelector(); + } + + /** + * Get profile call graph + * + * Returns the call graph data for a Blackfire profile, showing function calls and their performance metrics. + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param string $uuid (required) + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + * @see https://docs.upsun.com/api/#tag/Blackfire-Profiling/operation/blackfire_profile_graph + */ + public function blackfireProfileGraph( + string $projectId, + string $environmentId, + string $uuid + ): BlackfireProfileGraph200Response { + return $this->blackfireProfileGraphWithHttpInfo( + $projectId, + $environmentId, + $uuid + ); + } + + /** + * Get profile call graph with HTTP Info + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param string $uuid (required) + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + */ + private function blackfireProfileGraphWithHttpInfo( + string $projectId, + string $environmentId, + string $uuid + ): BlackfireProfileGraph200Response { + $request = $this->blackfireProfileGraphRequest( + $projectId, + $environmentId, + $uuid + ); + + try { + $response = $this->sendAuthenticatedRequest( + $request->getMethod(), + (string) $request->getUri(), + $request->getHeaders(), + $request->getBody() + ); + + return $this->handleResponseWithDataType( + '\Upsun\Model\BlackfireProfileGraph200Response', + $request, + $response + ); + } catch (Exception $exception) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $exception->getCode(), + '/projects/{projectId}/environments/{environmentId}/observability/profiles/{uuid}/graph' + ), + $request, + $response ?? null, + $exception + ); + } + } + + /** + * Create request for operation 'blackfireProfileGraph' + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param string $uuid (required) + * + * @throws InvalidArgumentException + */ + private function blackfireProfileGraphRequest( + string $projectId, + string $environmentId, + string $uuid + ): RequestInterface { + // verify the required parameter 'projectId' is set + if (empty($projectId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $projectId + when calling blackfireProfileGraph' + ); + } + + if (!preg_match("/[a-z0-9]+/", $projectId)) { + throw new InvalidArgumentException( + "invalid value for \"projectId\" when calling BlackfireProfilingApi.blackfireProfileGraph, + must conform to the pattern /[a-z0-9]+/." + ); + } + + // verify the required parameter 'environmentId' is set + if (empty($environmentId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $environmentId + when calling blackfireProfileGraph' + ); + } + + if (!preg_match("/.+/", $environmentId)) { + throw new InvalidArgumentException( + "invalid value for \"environmentId\" when calling BlackfireProfilingApi.blackfireProfileGraph, + must conform to the pattern /.+/." + ); + } + + // verify the required parameter 'uuid' is set + if (empty($uuid)) { + throw new InvalidArgumentException( + 'Missing the required parameter $uuid + when calling blackfireProfileGraph' + ); + } + + if (!preg_match("/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/", $uuid)) { + throw new InvalidArgumentException( + "invalid value for \"uuid\" when calling BlackfireProfilingApi.blackfireProfileGraph, + must conform to the pattern /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/." + ); + } + + $resourcePath = '/projects/{projectId}/environments/{environmentId}/observability/profiles/{uuid}/graph'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = null; + $multipart = false; + + // path params + + if ($projectId !== null) { + $resourcePath = str_replace( + '{' . 'projectId' . '}', + ObjectSerializer::toPathValue($projectId), + $resourcePath + ); + } + // path params + + if ($environmentId !== null) { + $resourcePath = str_replace( + '{' . 'environmentId' . '}', + ObjectSerializer::toPathValue($environmentId), + $resourcePath + ); + } + // path params + + if ($uuid !== null) { + $resourcePath = str_replace( + '{' . 'uuid' . '}', + ObjectSerializer::toPathValue($uuid), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + '', + $multipart + ); + + // for model (json/xml) + if ($formParams !== []) { + 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 ($this->headerSelector->isJsonMime($headers['Content-Type'])) { + $httpBody = json_encode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if ($this->config->getAccessToken() !== null) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + if ($this->config->getUpsunClientHeader()) { + $defaultHeaders['X-Upsun-Client'] = $this->config->getUpsunClientHeader(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + + $uri = $this->createUri($operationHost, $resourcePath, $queryParams); + + return $this->createRequest('GET', $uri, $headers, $httpBody); + } + + /** + * Get profile details + * + * Returns full profile data including metrics, metadata, and recommendations. + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param string $uuid (required) + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + * @see https://docs.upsun.com/api/#tag/Blackfire-Profiling/operation/blackfire_profile_profile + */ + public function blackfireProfileProfile( + string $projectId, + string $environmentId, + string $uuid + ): BlackfireProfileProfile200Response { + return $this->blackfireProfileProfileWithHttpInfo( + $projectId, + $environmentId, + $uuid + ); + } + + /** + * Get profile details with HTTP Info + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param string $uuid (required) + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + */ + private function blackfireProfileProfileWithHttpInfo( + string $projectId, + string $environmentId, + string $uuid + ): BlackfireProfileProfile200Response { + $request = $this->blackfireProfileProfileRequest( + $projectId, + $environmentId, + $uuid + ); + + try { + $response = $this->sendAuthenticatedRequest( + $request->getMethod(), + (string) $request->getUri(), + $request->getHeaders(), + $request->getBody() + ); + + return $this->handleResponseWithDataType( + '\Upsun\Model\BlackfireProfileProfile200Response', + $request, + $response + ); + } catch (Exception $exception) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $exception->getCode(), + '/projects/{projectId}/environments/{environmentId}/observability/profiles/{uuid}/profile' + ), + $request, + $response ?? null, + $exception + ); + } + } + + /** + * Create request for operation 'blackfireProfileProfile' + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param string $uuid (required) + * + * @throws InvalidArgumentException + */ + private function blackfireProfileProfileRequest( + string $projectId, + string $environmentId, + string $uuid + ): RequestInterface { + // verify the required parameter 'projectId' is set + if (empty($projectId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $projectId + when calling blackfireProfileProfile' + ); + } + + if (!preg_match("/[a-z0-9]+/", $projectId)) { + throw new InvalidArgumentException( + "invalid value for \"projectId\" when calling BlackfireProfilingApi.blackfireProfileProfile, + must conform to the pattern /[a-z0-9]+/." + ); + } + + // verify the required parameter 'environmentId' is set + if (empty($environmentId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $environmentId + when calling blackfireProfileProfile' + ); + } + + if (!preg_match("/.+/", $environmentId)) { + throw new InvalidArgumentException( + "invalid value for \"environmentId\" when calling BlackfireProfilingApi.blackfireProfileProfile, + must conform to the pattern /.+/." + ); + } + + // verify the required parameter 'uuid' is set + if (empty($uuid)) { + throw new InvalidArgumentException( + 'Missing the required parameter $uuid + when calling blackfireProfileProfile' + ); + } + + if (!preg_match("/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/", $uuid)) { + throw new InvalidArgumentException( + "invalid value for \"uuid\" when calling BlackfireProfilingApi.blackfireProfileProfile, + must conform to the pattern /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/." + ); + } + + $resourcePath = '/projects/{projectId}/environments/{environmentId}/observability/profiles/{uuid}/profile'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = null; + $multipart = false; + + // path params + + if ($projectId !== null) { + $resourcePath = str_replace( + '{' . 'projectId' . '}', + ObjectSerializer::toPathValue($projectId), + $resourcePath + ); + } + // path params + + if ($environmentId !== null) { + $resourcePath = str_replace( + '{' . 'environmentId' . '}', + ObjectSerializer::toPathValue($environmentId), + $resourcePath + ); + } + // path params + + if ($uuid !== null) { + $resourcePath = str_replace( + '{' . 'uuid' . '}', + ObjectSerializer::toPathValue($uuid), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + '', + $multipart + ); + + // for model (json/xml) + if ($formParams !== []) { + 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 ($this->headerSelector->isJsonMime($headers['Content-Type'])) { + $httpBody = json_encode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if ($this->config->getAccessToken() !== null) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + if ($this->config->getUpsunClientHeader()) { + $defaultHeaders['X-Upsun-Client'] = $this->config->getUpsunClientHeader(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + + $uri = $this->createUri($operationHost, $resourcePath, $queryParams); + + return $this->createRequest('GET', $uri, $headers, $httpBody); + } + + /** + * Get profile subprofiles + * + * Returns subprofiles (child profiles) associated with a Blackfire profile. + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param string $uuid (required) + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + * @see https://docs.upsun.com/api/#tag/Blackfire-Profiling/operation/blackfire_profile_subprofiles + */ + public function blackfireProfileSubprofiles( + string $projectId, + string $environmentId, + string $uuid + ): BlackfireProfileSubprofiles200Response { + return $this->blackfireProfileSubprofilesWithHttpInfo( + $projectId, + $environmentId, + $uuid + ); + } + + /** + * Get profile subprofiles with HTTP Info + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param string $uuid (required) + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + */ + private function blackfireProfileSubprofilesWithHttpInfo( + string $projectId, + string $environmentId, + string $uuid + ): BlackfireProfileSubprofiles200Response { + $request = $this->blackfireProfileSubprofilesRequest( + $projectId, + $environmentId, + $uuid + ); + + try { + $response = $this->sendAuthenticatedRequest( + $request->getMethod(), + (string) $request->getUri(), + $request->getHeaders(), + $request->getBody() + ); + + return $this->handleResponseWithDataType( + '\Upsun\Model\BlackfireProfileSubprofiles200Response', + $request, + $response + ); + } catch (Exception $exception) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $exception->getCode(), + '/projects/{projectId}/environments/{environmentId}/observability/profiles/{uuid}/subprofiles' + ), + $request, + $response ?? null, + $exception + ); + } + } + + /** + * Create request for operation 'blackfireProfileSubprofiles' + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param string $uuid (required) + * + * @throws InvalidArgumentException + */ + private function blackfireProfileSubprofilesRequest( + string $projectId, + string $environmentId, + string $uuid + ): RequestInterface { + // verify the required parameter 'projectId' is set + if (empty($projectId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $projectId + when calling blackfireProfileSubprofiles' + ); + } + + if (!preg_match("/[a-z0-9]+/", $projectId)) { + throw new InvalidArgumentException( + "invalid value for \"projectId\" when calling BlackfireProfilingApi.blackfireProfileSubprofiles, + must conform to the pattern /[a-z0-9]+/." + ); + } + + // verify the required parameter 'environmentId' is set + if (empty($environmentId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $environmentId + when calling blackfireProfileSubprofiles' + ); + } + + if (!preg_match("/.+/", $environmentId)) { + throw new InvalidArgumentException( + "invalid value for \"environmentId\" when calling BlackfireProfilingApi.blackfireProfileSubprofiles, + must conform to the pattern /.+/." + ); + } + + // verify the required parameter 'uuid' is set + if (empty($uuid)) { + throw new InvalidArgumentException( + 'Missing the required parameter $uuid + when calling blackfireProfileSubprofiles' + ); + } + + if (!preg_match("/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/", $uuid)) { + throw new InvalidArgumentException( + "invalid value for \"uuid\" when calling BlackfireProfilingApi.blackfireProfileSubprofiles, + must conform to the pattern /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/." + ); + } + + $resourcePath = '/projects/{projectId}/environments/{environmentId}/observability/profiles/{uuid}/subprofiles'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = null; + $multipart = false; + + // path params + + if ($projectId !== null) { + $resourcePath = str_replace( + '{' . 'projectId' . '}', + ObjectSerializer::toPathValue($projectId), + $resourcePath + ); + } + // path params + + if ($environmentId !== null) { + $resourcePath = str_replace( + '{' . 'environmentId' . '}', + ObjectSerializer::toPathValue($environmentId), + $resourcePath + ); + } + // path params + + if ($uuid !== null) { + $resourcePath = str_replace( + '{' . 'uuid' . '}', + ObjectSerializer::toPathValue($uuid), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + '', + $multipart + ); + + // for model (json/xml) + if ($formParams !== []) { + 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 ($this->headerSelector->isJsonMime($headers['Content-Type'])) { + $httpBody = json_encode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if ($this->config->getAccessToken() !== null) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + if ($this->config->getUpsunClientHeader()) { + $defaultHeaders['X-Upsun-Client'] = $this->config->getUpsunClientHeader(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + + $uri = $this->createUri($operationHost, $resourcePath, $queryParams); + + return $this->createRequest('GET', $uri, $headers, $httpBody); + } + + /** + * Get profile timeline data + * + * Returns timeline visualization data for a Blackfire profile, showing the execution flow over time. + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param string $uuid (required) + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + * @see https://docs.upsun.com/api/#tag/Blackfire-Profiling/operation/blackfire_profile_timeline + */ + public function blackfireProfileTimeline( + string $projectId, + string $environmentId, + string $uuid + ): BlackfireProfileTimeline200Response { + return $this->blackfireProfileTimelineWithHttpInfo( + $projectId, + $environmentId, + $uuid + ); + } + + /** + * Get profile timeline data with HTTP Info + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param string $uuid (required) + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + */ + private function blackfireProfileTimelineWithHttpInfo( + string $projectId, + string $environmentId, + string $uuid + ): BlackfireProfileTimeline200Response { + $request = $this->blackfireProfileTimelineRequest( + $projectId, + $environmentId, + $uuid + ); + + try { + $response = $this->sendAuthenticatedRequest( + $request->getMethod(), + (string) $request->getUri(), + $request->getHeaders(), + $request->getBody() + ); + + return $this->handleResponseWithDataType( + '\Upsun\Model\BlackfireProfileTimeline200Response', + $request, + $response + ); + } catch (Exception $exception) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $exception->getCode(), + '/projects/{projectId}/environments/{environmentId}/observability/profiles/{uuid}/timeline' + ), + $request, + $response ?? null, + $exception + ); + } + } + + /** + * Create request for operation 'blackfireProfileTimeline' + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param string $uuid (required) + * + * @throws InvalidArgumentException + */ + private function blackfireProfileTimelineRequest( + string $projectId, + string $environmentId, + string $uuid + ): RequestInterface { + // verify the required parameter 'projectId' is set + if (empty($projectId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $projectId + when calling blackfireProfileTimeline' + ); + } + + if (!preg_match("/[a-z0-9]+/", $projectId)) { + throw new InvalidArgumentException( + "invalid value for \"projectId\" when calling BlackfireProfilingApi.blackfireProfileTimeline, + must conform to the pattern /[a-z0-9]+/." + ); + } + + // verify the required parameter 'environmentId' is set + if (empty($environmentId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $environmentId + when calling blackfireProfileTimeline' + ); + } + + if (!preg_match("/.+/", $environmentId)) { + throw new InvalidArgumentException( + "invalid value for \"environmentId\" when calling BlackfireProfilingApi.blackfireProfileTimeline, + must conform to the pattern /.+/." + ); + } + + // verify the required parameter 'uuid' is set + if (empty($uuid)) { + throw new InvalidArgumentException( + 'Missing the required parameter $uuid + when calling blackfireProfileTimeline' + ); + } + + if (!preg_match("/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/", $uuid)) { + throw new InvalidArgumentException( + "invalid value for \"uuid\" when calling BlackfireProfilingApi.blackfireProfileTimeline, + must conform to the pattern /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/." + ); + } + + $resourcePath = '/projects/{projectId}/environments/{environmentId}/observability/profiles/{uuid}/timeline'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = null; + $multipart = false; + + // path params + + if ($projectId !== null) { + $resourcePath = str_replace( + '{' . 'projectId' . '}', + ObjectSerializer::toPathValue($projectId), + $resourcePath + ); + } + // path params + + if ($environmentId !== null) { + $resourcePath = str_replace( + '{' . 'environmentId' . '}', + ObjectSerializer::toPathValue($environmentId), + $resourcePath + ); + } + // path params + + if ($uuid !== null) { + $resourcePath = str_replace( + '{' . 'uuid' . '}', + ObjectSerializer::toPathValue($uuid), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + '', + $multipart + ); + + // for model (json/xml) + if ($formParams !== []) { + 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 ($this->headerSelector->isJsonMime($headers['Content-Type'])) { + $httpBody = json_encode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if ($this->config->getAccessToken() !== null) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + if ($this->config->getUpsunClientHeader()) { + $defaultHeaders['X-Upsun-Client'] = $this->config->getUpsunClientHeader(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + + $uri = $this->createUri($operationHost, $resourcePath, $queryParams); + + return $this->createRequest('GET', $uri, $headers, $httpBody); + } + + /** + * List automatic profiling results + * + * Returns a paginated list of automatic (APM-triggered) profiles for the environment, optionally filtered by + * transaction name. Proxied from the Blackfire API. + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param string|null $transaction (optional) + * @param int|null $page (optional) + * @param int|null $limit (optional) + * @param string|null $url (optional) + * @param string|null $isPublic (optional) + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + * @see https://docs.upsun.com/api/#tag/Blackfire-Profiling/operation/blackfire_profiles_list_automatic + */ + public function blackfireProfilesListAutomatic( + string $projectId, + string $environmentId, + ?string $transaction = null, + ?int $page = null, + ?int $limit = null, + ?string $url = null, + ?string $isPublic = null + ): BlackfireProfilesListAutomatic200Response { + return $this->blackfireProfilesListAutomaticWithHttpInfo( + $projectId, + $environmentId, + $transaction, + $page, + $limit, + $url, + $isPublic + ); + } + + /** + * List automatic profiling results with HTTP Info + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param string|null $transaction (optional) + * @param int|null $page (optional) + * @param int|null $limit (optional) + * @param string|null $url (optional) + * @param string|null $isPublic (optional) + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + */ + private function blackfireProfilesListAutomaticWithHttpInfo( + string $projectId, + string $environmentId, + ?string $transaction = null, + ?int $page = null, + ?int $limit = null, + ?string $url = null, + ?string $isPublic = null + ): BlackfireProfilesListAutomatic200Response { + $request = $this->blackfireProfilesListAutomaticRequest( + $projectId, + $environmentId, + $transaction, + $page, + $limit, + $url, + $isPublic + ); + + try { + $response = $this->sendAuthenticatedRequest( + $request->getMethod(), + (string) $request->getUri(), + $request->getHeaders(), + $request->getBody() + ); + + return $this->handleResponseWithDataType( + '\Upsun\Model\BlackfireProfilesListAutomatic200Response', + $request, + $response + ); + } catch (Exception $exception) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $exception->getCode(), + '/projects/{projectId}/environments/{environmentId}/observability/profiles/automatic' + ), + $request, + $response ?? null, + $exception + ); + } + } + + /** + * Create request for operation 'blackfireProfilesListAutomatic' + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param string|null $transaction (optional) + * @param int|null $page (optional) + * @param int|null $limit (optional) + * @param string|null $url (optional) + * @param string|null $isPublic (optional) + * + * @throws InvalidArgumentException + */ + private function blackfireProfilesListAutomaticRequest( + string $projectId, + string $environmentId, + ?string $transaction = null, + ?int $page = null, + ?int $limit = null, + ?string $url = null, + ?string $isPublic = null + ): RequestInterface { + // verify the required parameter 'projectId' is set + if (empty($projectId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $projectId + when calling blackfireProfilesListAutomatic' + ); + } + + if (!preg_match("/[a-z0-9]+/", $projectId)) { + throw new InvalidArgumentException( + "invalid value for \"projectId\" when calling BlackfireProfilingApi.blackfireProfilesListAutomatic, + must conform to the pattern /[a-z0-9]+/." + ); + } + + // verify the required parameter 'environmentId' is set + if (empty($environmentId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $environmentId + when calling blackfireProfilesListAutomatic' + ); + } + + if (!preg_match("/.+/", $environmentId)) { + throw new InvalidArgumentException( + "invalid value for \"environmentId\" when calling BlackfireProfilingApi.blackfireProfilesListAutomatic, + must conform to the pattern /.+/." + ); + } + + if ($page !== null && $page < 1) { + throw new InvalidArgumentException( + 'invalid value for "$page" when calling BlackfireProfilingApi.blackfireProfilesListAutomatic, + must be bigger than or equal to 1.' + ); + } + + if ($limit !== null && $limit > 100) { + throw new InvalidArgumentException( + 'invalid value for "$limit" when calling BlackfireProfilingApi.blackfireProfilesListAutomatic, + must be smaller than or equal to 100.' + ); + } + + if ($limit !== null && $limit < 1) { + throw new InvalidArgumentException( + 'invalid value for "$limit" when calling BlackfireProfilingApi.blackfireProfilesListAutomatic, + must be bigger than or equal to 1.' + ); + } + + $resourcePath = '/projects/{projectId}/environments/{environmentId}/observability/profiles/automatic'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = null; + $multipart = false; + + // query params + if ($transaction !== null) { + if ('form' === 'form' && is_array($transaction)) { + foreach ($transaction as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['transaction'] = $transaction instanceof DateTime + ? $transaction->format(DATE_ATOM) + : ($transaction); + } + } + + // query params + if ($page !== null) { + if ('form' === 'form' && is_array($page)) { + foreach ($page as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['page'] = $page instanceof DateTime + ? $page->format(DATE_ATOM) + : ($page); + } + } + + // query params + if ($limit !== null) { + if ('form' === 'form' && is_array($limit)) { + foreach ($limit as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['limit'] = $limit instanceof DateTime + ? $limit->format(DATE_ATOM) + : ($limit); + } + } + + // query params + if ($url !== null) { + if ('form' === 'form' && is_array($url)) { + foreach ($url as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['url'] = $url instanceof DateTime + ? $url->format(DATE_ATOM) + : ($url); + } + } + + // query params + if ($isPublic !== null) { + if ('form' === 'form' && is_array($isPublic)) { + foreach ($isPublic as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['is_public'] = $isPublic instanceof DateTime + ? $isPublic->format(DATE_ATOM) + : ($isPublic); + } + } + + // path params + + if ($projectId !== null) { + $resourcePath = str_replace( + '{' . 'projectId' . '}', + ObjectSerializer::toPathValue($projectId), + $resourcePath + ); + } + // path params + + if ($environmentId !== null) { + $resourcePath = str_replace( + '{' . 'environmentId' . '}', + ObjectSerializer::toPathValue($environmentId), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + '', + $multipart + ); + + // for model (json/xml) + if ($formParams !== []) { + 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 ($this->headerSelector->isJsonMime($headers['Content-Type'])) { + $httpBody = json_encode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if ($this->config->getAccessToken() !== null) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + if ($this->config->getUpsunClientHeader()) { + $defaultHeaders['X-Upsun-Client'] = $this->config->getUpsunClientHeader(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + + $uri = $this->createUri($operationHost, $resourcePath, $queryParams); + + return $this->createRequest('GET', $uri, $headers, $httpBody); + } + + /** + * Get recommendation statistics + * + * Returns recommendation statistics for the environment, optionally filtered by transaction. Proxied from the + * Blackfire API. Each recommendation includes the constraint details, occurrence count, and links to the latest + * profile and documentation. + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param int|null $from (optional) + * @param int|null $to (optional) + * @param string|null $transaction (optional) + * @param int|null $limit (optional) + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + * @see https://docs.upsun.com/api/#tag/Blackfire-Profiling/operation/blackfire_profiles_recommendations + */ + public function blackfireProfilesRecommendations( + string $projectId, + string $environmentId, + ?int $from = null, + ?int $to = null, + ?string $transaction = null, + ?int $limit = null + ): BlackfireProfilesRecommendations200Response { + return $this->blackfireProfilesRecommendationsWithHttpInfo( + $projectId, + $environmentId, + $from, + $to, + $transaction, + $limit + ); + } + + /** + * Get recommendation statistics with HTTP Info + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param int|null $from (optional) + * @param int|null $to (optional) + * @param string|null $transaction (optional) + * @param int|null $limit (optional) + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + */ + private function blackfireProfilesRecommendationsWithHttpInfo( + string $projectId, + string $environmentId, + ?int $from = null, + ?int $to = null, + ?string $transaction = null, + ?int $limit = null + ): BlackfireProfilesRecommendations200Response { + $request = $this->blackfireProfilesRecommendationsRequest( + $projectId, + $environmentId, + $from, + $to, + $transaction, + $limit + ); + + try { + $response = $this->sendAuthenticatedRequest( + $request->getMethod(), + (string) $request->getUri(), + $request->getHeaders(), + $request->getBody() + ); + + return $this->handleResponseWithDataType( + '\Upsun\Model\BlackfireProfilesRecommendations200Response', + $request, + $response + ); + } catch (Exception $exception) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $exception->getCode(), + '/projects/{projectId}/environments/{environmentId}/observability/profiles/recommendations' + ), + $request, + $response ?? null, + $exception + ); + } + } + + /** + * Create request for operation 'blackfireProfilesRecommendations' + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param int|null $from (optional) + * @param int|null $to (optional) + * @param string|null $transaction (optional) + * @param int|null $limit (optional) + * + * @throws InvalidArgumentException + */ + private function blackfireProfilesRecommendationsRequest( + string $projectId, + string $environmentId, + ?int $from = null, + ?int $to = null, + ?string $transaction = null, + ?int $limit = null + ): RequestInterface { + // verify the required parameter 'projectId' is set + if (empty($projectId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $projectId + when calling blackfireProfilesRecommendations' + ); + } + + if (!preg_match("/[a-z0-9]+/", $projectId)) { + throw new InvalidArgumentException( + "invalid value for \"projectId\" when calling BlackfireProfilingApi.blackfireProfilesRecommendations, + must conform to the pattern /[a-z0-9]+/." + ); + } + + // verify the required parameter 'environmentId' is set + if (empty($environmentId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $environmentId + when calling blackfireProfilesRecommendations' + ); + } + + if (!preg_match("/.+/", $environmentId)) { + throw new InvalidArgumentException( + "invalid value for \"environmentId\" when calling BlackfireProfilingApi.blackfireProfilesRecommendations, + must conform to the pattern /.+/." + ); + } + + if ($limit !== null && $limit > 200) { + throw new InvalidArgumentException( + 'invalid value for "$limit" when calling BlackfireProfilingApi.blackfireProfilesRecommendations, + must be smaller than or equal to 200.' + ); + } + + if ($limit !== null && $limit < 10) { + throw new InvalidArgumentException( + 'invalid value for "$limit" when calling BlackfireProfilingApi.blackfireProfilesRecommendations, + must be bigger than or equal to 10.' + ); + } + + $resourcePath = '/projects/{projectId}/environments/{environmentId}/observability/profiles/recommendations'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = null; + $multipart = false; + + // query params + if ($from !== null) { + if ('form' === 'form' && is_array($from)) { + foreach ($from as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['from'] = $from instanceof DateTime + ? $from->format(DATE_ATOM) + : ($from); + } + } + + // query params + if ($to !== null) { + if ('form' === 'form' && is_array($to)) { + foreach ($to as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['to'] = $to instanceof DateTime + ? $to->format(DATE_ATOM) + : ($to); + } + } + + // query params + if ($transaction !== null) { + if ('form' === 'form' && is_array($transaction)) { + foreach ($transaction as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['transaction'] = $transaction instanceof DateTime + ? $transaction->format(DATE_ATOM) + : ($transaction); + } + } + + // query params + if ($limit !== null) { + if ('form' === 'form' && is_array($limit)) { + foreach ($limit as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['limit'] = $limit instanceof DateTime + ? $limit->format(DATE_ATOM) + : ($limit); + } + } + + // path params + + if ($projectId !== null) { + $resourcePath = str_replace( + '{' . 'projectId' . '}', + ObjectSerializer::toPathValue($projectId), + $resourcePath + ); + } + // path params + + if ($environmentId !== null) { + $resourcePath = str_replace( + '{' . 'environmentId' . '}', + ObjectSerializer::toPathValue($environmentId), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + '', + $multipart + ); + + // for model (json/xml) + if ($formParams !== []) { + 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 ($this->headerSelector->isJsonMime($headers['Content-Type'])) { + $httpBody = json_encode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if ($this->config->getAccessToken() !== null) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + if ($this->config->getUpsunClientHeader()) { + $defaultHeaders['X-Upsun-Client'] = $this->config->getUpsunClientHeader(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + + $uri = $this->createUri($operationHost, $resourcePath, $queryParams); + + return $this->createRequest('GET', $uri, $headers, $httpBody); + } +} diff --git a/src/Api/DiffApi.php b/src/Api/DiffApi.php new file mode 100644 index 00000000..8dbd7bb2 --- /dev/null +++ b/src/Api/DiffApi.php @@ -0,0 +1,240 @@ +config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + + $this->headerSelector = $selector ?? new ApiHeaderSelector(); + } + + /** + * + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + * + * @return \Upsun\Model\Diff[] + * @see https://docs.upsun.com/api/#tag/Diff/operation/list-projects-git-diffs + */ + public function listProjectsGitDiffs( + string $projectId, + string $diffBaseId, + string $diffTargetId + ): array { + return $this->listProjectsGitDiffsWithHttpInfo( + $projectId, + $diffBaseId, + $diffTargetId + ); + } + + /** + * + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + * + * @return \Upsun\Model\Diff[] + */ + private function listProjectsGitDiffsWithHttpInfo( + string $projectId, + string $diffBaseId, + string $diffTargetId + ): array { + $request = $this->listProjectsGitDiffsRequest( + $projectId, + $diffBaseId, + $diffTargetId + ); + + try { + $response = $this->sendAuthenticatedRequest( + $request->getMethod(), + (string) $request->getUri(), + $request->getHeaders(), + $request->getBody() + ); + + return $this->handleResponseWithDataType( + '\Upsun\Model\Diff[]', + $request, + $response + ); + } catch (Exception $exception) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $exception->getCode(), + '/projects/{projectId}/git/diffs/{diffBaseId}/{diffTargetId}' + ), + $request, + $response ?? null, + $exception + ); + } + } + + /** + * Create request for operation 'listProjectsGitDiffs' + * + * + * @throws InvalidArgumentException + */ + private function listProjectsGitDiffsRequest( + string $projectId, + string $diffBaseId, + string $diffTargetId + ): RequestInterface { + // verify the required parameter 'projectId' is set + if (empty($projectId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $projectId + when calling listProjectsGitDiffs' + ); + } + // verify the required parameter 'diffBaseId' is set + if (empty($diffBaseId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $diffBaseId + when calling listProjectsGitDiffs' + ); + } + // verify the required parameter 'diffTargetId' is set + if (empty($diffTargetId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $diffTargetId + when calling listProjectsGitDiffs' + ); + } + + $resourcePath = '/projects/{projectId}/git/diffs/{diffBaseId}/{diffTargetId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = null; + $multipart = false; + + // path params + + if ($projectId !== null) { + $resourcePath = str_replace( + '{' . 'projectId' . '}', + ObjectSerializer::toPathValue($projectId), + $resourcePath + ); + } + // path params + + if ($diffBaseId !== null) { + $resourcePath = str_replace( + '{' . 'diffBaseId' . '}', + ObjectSerializer::toPathValue($diffBaseId), + $resourcePath + ); + } + // path params + + if ($diffTargetId !== null) { + $resourcePath = str_replace( + '{' . 'diffTargetId' . '}', + ObjectSerializer::toPathValue($diffTargetId), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + '', + $multipart + ); + + // for model (json/xml) + if ($formParams !== []) { + 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 ($this->headerSelector->isJsonMime($headers['Content-Type'])) { + $httpBody = json_encode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if ($this->config->getAccessToken() !== null) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + if ($this->config->getUpsunClientHeader()) { + $defaultHeaders['X-Upsun-Client'] = $this->config->getUpsunClientHeader(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + + $uri = $this->createUri($operationHost, $resourcePath, $queryParams); + + return $this->createRequest('GET', $uri, $headers, $httpBody); + } +} diff --git a/src/Api/DomainClaimApi.php b/src/Api/DomainClaimApi.php new file mode 100644 index 00000000..488b67a7 --- /dev/null +++ b/src/Api/DomainClaimApi.php @@ -0,0 +1,889 @@ +config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + + $this->headerSelector = $selector ?? new ApiHeaderSelector(); + } + + /** + * + * @param object $body (required) + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + * @see https://docs.upsun.com/api/#tag/DomainClaim/operation/create-projects-domain-claims + */ + public function createProjectsDomainClaims( + string $projectId, + object $body + ): AcceptedResponse { + return $this->createProjectsDomainClaimsWithHttpInfo( + $projectId, + $body + ); + } + + /** + * + * @param object $body (required) + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + */ + private function createProjectsDomainClaimsWithHttpInfo( + string $projectId, + object $body + ): AcceptedResponse { + $request = $this->createProjectsDomainClaimsRequest( + $projectId, + $body + ); + + try { + $response = $this->sendAuthenticatedRequest( + $request->getMethod(), + (string) $request->getUri(), + $request->getHeaders(), + $request->getBody() + ); + + return $this->handleResponseWithDataType( + '\Upsun\Model\AcceptedResponse', + $request, + $response + ); + } catch (Exception $exception) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $exception->getCode(), + '/projects/{projectId}/domain-claims' + ), + $request, + $response ?? null, + $exception + ); + } + } + + /** + * Create request for operation 'createProjectsDomainClaims' + * + * @param object $body (required) + * + * @throws InvalidArgumentException + */ + private function createProjectsDomainClaimsRequest( + string $projectId, + object $body + ): RequestInterface { + // verify the required parameter 'projectId' is set + if (empty($projectId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $projectId + when calling createProjectsDomainClaims' + ); + } + // verify the required parameter 'body' is set + if (empty($body)) { + throw new InvalidArgumentException( + 'Missing the required parameter $body + when calling createProjectsDomainClaims' + ); + } + + $resourcePath = '/projects/{projectId}/domain-claims'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = null; + $multipart = false; + + // path params + + if ($projectId !== null) { + $resourcePath = str_replace( + '{' . 'projectId' . '}', + ObjectSerializer::toPathValue($projectId), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + 'application/json', + $multipart + ); + + // for model (json/xml) + if (isset($body)) { + if ($this->headerSelector->isJsonMime($headers['Content-Type'])) { + $httpBody = json_encode( + ObjectSerializer::sanitizeForSerialization($body) + ); + } else { + $httpBody = $body; + } + } elseif ($formParams !== []) { + 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 ($this->headerSelector->isJsonMime($headers['Content-Type'])) { + $httpBody = json_encode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if ($this->config->getAccessToken() !== null) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + if ($this->config->getUpsunClientHeader()) { + $defaultHeaders['X-Upsun-Client'] = $this->config->getUpsunClientHeader(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + + $uri = $this->createUri($operationHost, $resourcePath, $queryParams); + + return $this->createRequest('POST', $uri, $headers, $httpBody); + } + + /** + * + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + * @see https://docs.upsun.com/api/#tag/DomainClaim/operation/delete-projects-domain-claims + */ + public function deleteProjectsDomainClaims( + string $projectId, + string $domainClaimId + ): AcceptedResponse { + return $this->deleteProjectsDomainClaimsWithHttpInfo( + $projectId, + $domainClaimId + ); + } + + /** + * + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + */ + private function deleteProjectsDomainClaimsWithHttpInfo( + string $projectId, + string $domainClaimId + ): AcceptedResponse { + $request = $this->deleteProjectsDomainClaimsRequest( + $projectId, + $domainClaimId + ); + + try { + $response = $this->sendAuthenticatedRequest( + $request->getMethod(), + (string) $request->getUri(), + $request->getHeaders(), + $request->getBody() + ); + + return $this->handleResponseWithDataType( + '\Upsun\Model\AcceptedResponse', + $request, + $response + ); + } catch (Exception $exception) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $exception->getCode(), + '/projects/{projectId}/domain-claims/{domainClaimId}' + ), + $request, + $response ?? null, + $exception + ); + } + } + + /** + * Create request for operation 'deleteProjectsDomainClaims' + * + * + * @throws InvalidArgumentException + */ + private function deleteProjectsDomainClaimsRequest( + string $projectId, + string $domainClaimId + ): RequestInterface { + // verify the required parameter 'projectId' is set + if (empty($projectId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $projectId + when calling deleteProjectsDomainClaims' + ); + } + // verify the required parameter 'domainClaimId' is set + if (empty($domainClaimId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $domainClaimId + when calling deleteProjectsDomainClaims' + ); + } + + $resourcePath = '/projects/{projectId}/domain-claims/{domainClaimId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = null; + $multipart = false; + + // path params + + if ($projectId !== null) { + $resourcePath = str_replace( + '{' . 'projectId' . '}', + ObjectSerializer::toPathValue($projectId), + $resourcePath + ); + } + // path params + + if ($domainClaimId !== null) { + $resourcePath = str_replace( + '{' . 'domainClaimId' . '}', + ObjectSerializer::toPathValue($domainClaimId), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + '', + $multipart + ); + + // for model (json/xml) + if ($formParams !== []) { + 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 ($this->headerSelector->isJsonMime($headers['Content-Type'])) { + $httpBody = json_encode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if ($this->config->getAccessToken() !== null) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + if ($this->config->getUpsunClientHeader()) { + $defaultHeaders['X-Upsun-Client'] = $this->config->getUpsunClientHeader(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + + $uri = $this->createUri($operationHost, $resourcePath, $queryParams); + + return $this->createRequest('DELETE', $uri, $headers, $httpBody); + } + + /** + * + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + * @see https://docs.upsun.com/api/#tag/DomainClaim/operation/get-projects-domain-claims + */ + public function getProjectsDomainClaims( + string $projectId, + string $domainClaimId + ): DomainClaim { + return $this->getProjectsDomainClaimsWithHttpInfo( + $projectId, + $domainClaimId + ); + } + + /** + * + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + */ + private function getProjectsDomainClaimsWithHttpInfo( + string $projectId, + string $domainClaimId + ): DomainClaim { + $request = $this->getProjectsDomainClaimsRequest( + $projectId, + $domainClaimId + ); + + try { + $response = $this->sendAuthenticatedRequest( + $request->getMethod(), + (string) $request->getUri(), + $request->getHeaders(), + $request->getBody() + ); + + return $this->handleResponseWithDataType( + '\Upsun\Model\DomainClaim', + $request, + $response + ); + } catch (Exception $exception) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $exception->getCode(), + '/projects/{projectId}/domain-claims/{domainClaimId}' + ), + $request, + $response ?? null, + $exception + ); + } + } + + /** + * Create request for operation 'getProjectsDomainClaims' + * + * + * @throws InvalidArgumentException + */ + private function getProjectsDomainClaimsRequest( + string $projectId, + string $domainClaimId + ): RequestInterface { + // verify the required parameter 'projectId' is set + if (empty($projectId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $projectId + when calling getProjectsDomainClaims' + ); + } + // verify the required parameter 'domainClaimId' is set + if (empty($domainClaimId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $domainClaimId + when calling getProjectsDomainClaims' + ); + } + + $resourcePath = '/projects/{projectId}/domain-claims/{domainClaimId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = null; + $multipart = false; + + // path params + + if ($projectId !== null) { + $resourcePath = str_replace( + '{' . 'projectId' . '}', + ObjectSerializer::toPathValue($projectId), + $resourcePath + ); + } + // path params + + if ($domainClaimId !== null) { + $resourcePath = str_replace( + '{' . 'domainClaimId' . '}', + ObjectSerializer::toPathValue($domainClaimId), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + '', + $multipart + ); + + // for model (json/xml) + if ($formParams !== []) { + 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 ($this->headerSelector->isJsonMime($headers['Content-Type'])) { + $httpBody = json_encode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if ($this->config->getAccessToken() !== null) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + if ($this->config->getUpsunClientHeader()) { + $defaultHeaders['X-Upsun-Client'] = $this->config->getUpsunClientHeader(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + + $uri = $this->createUri($operationHost, $resourcePath, $queryParams); + + return $this->createRequest('GET', $uri, $headers, $httpBody); + } + + /** + * + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + * + * @return \Upsun\Model\DomainClaim[] + * @see https://docs.upsun.com/api/#tag/DomainClaim/operation/list-projects-domain-claims + */ + public function listProjectsDomainClaims( + string $projectId + ): array { + return $this->listProjectsDomainClaimsWithHttpInfo( + $projectId + ); + } + + /** + * + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + * + * @return \Upsun\Model\DomainClaim[] + */ + private function listProjectsDomainClaimsWithHttpInfo( + string $projectId + ): array { + $request = $this->listProjectsDomainClaimsRequest( + $projectId + ); + + try { + $response = $this->sendAuthenticatedRequest( + $request->getMethod(), + (string) $request->getUri(), + $request->getHeaders(), + $request->getBody() + ); + + return $this->handleResponseWithDataType( + '\Upsun\Model\DomainClaim[]', + $request, + $response + ); + } catch (Exception $exception) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $exception->getCode(), + '/projects/{projectId}/domain-claims' + ), + $request, + $response ?? null, + $exception + ); + } + } + + /** + * Create request for operation 'listProjectsDomainClaims' + * + * + * @throws InvalidArgumentException + */ + private function listProjectsDomainClaimsRequest( + string $projectId + ): RequestInterface { + // verify the required parameter 'projectId' is set + if (empty($projectId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $projectId + when calling listProjectsDomainClaims' + ); + } + + $resourcePath = '/projects/{projectId}/domain-claims'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = null; + $multipart = false; + + // path params + + if ($projectId !== null) { + $resourcePath = str_replace( + '{' . 'projectId' . '}', + ObjectSerializer::toPathValue($projectId), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + '', + $multipart + ); + + // for model (json/xml) + if ($formParams !== []) { + 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 ($this->headerSelector->isJsonMime($headers['Content-Type'])) { + $httpBody = json_encode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if ($this->config->getAccessToken() !== null) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + if ($this->config->getUpsunClientHeader()) { + $defaultHeaders['X-Upsun-Client'] = $this->config->getUpsunClientHeader(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + + $uri = $this->createUri($operationHost, $resourcePath, $queryParams); + + return $this->createRequest('GET', $uri, $headers, $httpBody); + } + + /** + * + * @param object $body (required) + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + * @see https://docs.upsun.com/api/#tag/DomainClaim/operation/update-projects-domain-claims + */ + public function updateProjectsDomainClaims( + string $projectId, + string $domainClaimId, + object $body + ): AcceptedResponse { + return $this->updateProjectsDomainClaimsWithHttpInfo( + $projectId, + $domainClaimId, + $body + ); + } + + /** + * + * @param object $body (required) + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + */ + private function updateProjectsDomainClaimsWithHttpInfo( + string $projectId, + string $domainClaimId, + object $body + ): AcceptedResponse { + $request = $this->updateProjectsDomainClaimsRequest( + $projectId, + $domainClaimId, + $body + ); + + try { + $response = $this->sendAuthenticatedRequest( + $request->getMethod(), + (string) $request->getUri(), + $request->getHeaders(), + $request->getBody() + ); + + return $this->handleResponseWithDataType( + '\Upsun\Model\AcceptedResponse', + $request, + $response + ); + } catch (Exception $exception) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $exception->getCode(), + '/projects/{projectId}/domain-claims/{domainClaimId}' + ), + $request, + $response ?? null, + $exception + ); + } + } + + /** + * Create request for operation 'updateProjectsDomainClaims' + * + * @param object $body (required) + * + * @throws InvalidArgumentException + */ + private function updateProjectsDomainClaimsRequest( + string $projectId, + string $domainClaimId, + object $body + ): RequestInterface { + // verify the required parameter 'projectId' is set + if (empty($projectId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $projectId + when calling updateProjectsDomainClaims' + ); + } + // verify the required parameter 'domainClaimId' is set + if (empty($domainClaimId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $domainClaimId + when calling updateProjectsDomainClaims' + ); + } + // verify the required parameter 'body' is set + if (empty($body)) { + throw new InvalidArgumentException( + 'Missing the required parameter $body + when calling updateProjectsDomainClaims' + ); + } + + $resourcePath = '/projects/{projectId}/domain-claims/{domainClaimId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = null; + $multipart = false; + + // path params + + if ($projectId !== null) { + $resourcePath = str_replace( + '{' . 'projectId' . '}', + ObjectSerializer::toPathValue($projectId), + $resourcePath + ); + } + // path params + + if ($domainClaimId !== null) { + $resourcePath = str_replace( + '{' . 'domainClaimId' . '}', + ObjectSerializer::toPathValue($domainClaimId), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + 'application/json', + $multipart + ); + + // for model (json/xml) + if (isset($body)) { + if ($this->headerSelector->isJsonMime($headers['Content-Type'])) { + $httpBody = json_encode( + ObjectSerializer::sanitizeForSerialization($body) + ); + } else { + $httpBody = $body; + } + } elseif ($formParams !== []) { + 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 ($this->headerSelector->isJsonMime($headers['Content-Type'])) { + $httpBody = json_encode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if ($this->config->getAccessToken() !== null) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + if ($this->config->getUpsunClientHeader()) { + $defaultHeaders['X-Upsun-Client'] = $this->config->getUpsunClientHeader(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + + $uri = $this->createUri($operationHost, $resourcePath, $queryParams); + + return $this->createRequest('PATCH', $uri, $headers, $httpBody); + } +} diff --git a/src/Api/EntrypointApi.php b/src/Api/EntrypointApi.php new file mode 100644 index 00000000..a872c526 --- /dev/null +++ b/src/Api/EntrypointApi.php @@ -0,0 +1,244 @@ +config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + + $this->headerSelector = $selector ?? new ApiHeaderSelector(); + } + + /** + * Get observability entrypoint + * + * Returns API entrypoint with hypermedia links to all observability endpoints (resources, logs, HTTP traffic, + * continuous profiling, server metrics) following HATEOAS principles. Includes data retention policies per metric + * type (retention_period, max_range, recommended_default_range in minutes), environment metadata (project_id, + * environment_id, environment_type, vendor), and per-service resource links. Use _links for API navigation. + * + * @param string $projectId (required) + * @param string $environmentId (required) + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + * @see https://docs.upsun.com/api/#tag/Entrypoint/operation/observability_entrypoint + */ + public function observabilityEntrypoint( + string $projectId, + string $environmentId + ): ObservabilityEntrypoint200Response { + return $this->observabilityEntrypointWithHttpInfo( + $projectId, + $environmentId + ); + } + + /** + * Get observability entrypoint with HTTP Info + * + * @param string $projectId (required) + * @param string $environmentId (required) + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + */ + private function observabilityEntrypointWithHttpInfo( + string $projectId, + string $environmentId + ): ObservabilityEntrypoint200Response { + $request = $this->observabilityEntrypointRequest( + $projectId, + $environmentId + ); + + try { + $response = $this->sendAuthenticatedRequest( + $request->getMethod(), + (string) $request->getUri(), + $request->getHeaders(), + $request->getBody() + ); + + return $this->handleResponseWithDataType( + '\Upsun\Model\ObservabilityEntrypoint200Response', + $request, + $response + ); + } catch (Exception $exception) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $exception->getCode(), + '/projects/{projectId}/environments/{environmentId}/observability' + ), + $request, + $response ?? null, + $exception + ); + } + } + + /** + * Create request for operation 'observabilityEntrypoint' + * + * @param string $projectId (required) + * @param string $environmentId (required) + * + * @throws InvalidArgumentException + */ + private function observabilityEntrypointRequest( + string $projectId, + string $environmentId + ): RequestInterface { + // verify the required parameter 'projectId' is set + if (empty($projectId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $projectId + when calling observabilityEntrypoint' + ); + } + + if (!preg_match("/[a-z0-9]+/", $projectId)) { + throw new InvalidArgumentException( + "invalid value for \"projectId\" when calling EntrypointApi.observabilityEntrypoint, + must conform to the pattern /[a-z0-9]+/." + ); + } + + // verify the required parameter 'environmentId' is set + if (empty($environmentId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $environmentId + when calling observabilityEntrypoint' + ); + } + + if (!preg_match("/.+/", $environmentId)) { + throw new InvalidArgumentException( + "invalid value for \"environmentId\" when calling EntrypointApi.observabilityEntrypoint, + must conform to the pattern /.+/." + ); + } + + $resourcePath = '/projects/{projectId}/environments/{environmentId}/observability'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = null; + $multipart = false; + + // path params + + if ($projectId !== null) { + $resourcePath = str_replace( + '{' . 'projectId' . '}', + ObjectSerializer::toPathValue($projectId), + $resourcePath + ); + } + // path params + + if ($environmentId !== null) { + $resourcePath = str_replace( + '{' . 'environmentId' . '}', + ObjectSerializer::toPathValue($environmentId), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + '', + $multipart + ); + + // for model (json/xml) + if ($formParams !== []) { + 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 ($this->headerSelector->isJsonMime($headers['Content-Type'])) { + $httpBody = json_encode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if ($this->config->getAccessToken() !== null) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + if ($this->config->getUpsunClientHeader()) { + $defaultHeaders['X-Upsun-Client'] = $this->config->getUpsunClientHeader(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + + $uri = $this->createUri($operationHost, $resourcePath, $queryParams); + + return $this->createRequest('GET', $uri, $headers, $httpBody); + } +} diff --git a/src/Api/EnvironmentApi.php b/src/Api/EnvironmentApi.php index fb12f652..55e56cb5 100644 --- a/src/Api/EnvironmentApi.php +++ b/src/Api/EnvironmentApi.php @@ -21,9 +21,6 @@ use Upsun\Model\EnvironmentMergeInput; use Upsun\Model\EnvironmentPatch; use Upsun\Model\EnvironmentSynchronizeInput; -use Upsun\Model\Version; -use Upsun\Model\VersionCreateInput; -use Upsun\Model\VersionPatch; /** * Low level EnvironmentApi (auto-generated) @@ -445,201 +442,6 @@ private function branchEnvironmentRequest( return $this->createRequest('POST', $uri, $headers, $httpBody); } - /** - * Create versions associated with the environment - * - * Create versions associated with the `{environmentId}` environment. At least one version always exists. When - * multiple versions exist, it means that multiple versions of an app are deployed. The deployment target type - * denotes whether staged deployment is supported. - * - * @param \Upsun\Model\VersionCreateInput $versionCreateInput (required) - * - * @throws ApiException on non-2xx response or if the response body is not in the expected format - * @throws ClientExceptionInterface - * @see https://docs.upsun.com/api/#tag/Environment/operation/create-projects-environments-versions - */ - public function createProjectsEnvironmentsVersions( - string $projectId, - string $environmentId, - VersionCreateInput $versionCreateInput - ): AcceptedResponse { - return $this->createProjectsEnvironmentsVersionsWithHttpInfo( - $projectId, - $environmentId, - $versionCreateInput - ); - } - - /** - * Create versions associated with the environment with HTTP Info - * - * @param \Upsun\Model\VersionCreateInput $versionCreateInput (required) - * - * @throws ApiException on non-2xx response or if the response body is not in the expected format - * @throws ClientExceptionInterface - */ - private function createProjectsEnvironmentsVersionsWithHttpInfo( - string $projectId, - string $environmentId, - VersionCreateInput $versionCreateInput - ): AcceptedResponse { - $request = $this->createProjectsEnvironmentsVersionsRequest( - $projectId, - $environmentId, - $versionCreateInput - ); - - try { - $response = $this->sendAuthenticatedRequest( - $request->getMethod(), - (string) $request->getUri(), - $request->getHeaders(), - $request->getBody() - ); - - return $this->handleResponseWithDataType( - '\Upsun\Model\AcceptedResponse', - $request, - $response - ); - } catch (Exception $exception) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $exception->getCode(), - '/projects/{projectId}/environments/{environmentId}/versions' - ), - $request, - $response ?? null, - $exception - ); - } - } - - /** - * Create request for operation 'createProjectsEnvironmentsVersions' - * - * @param \Upsun\Model\VersionCreateInput $versionCreateInput (required) - * - * @throws InvalidArgumentException - */ - private function createProjectsEnvironmentsVersionsRequest( - string $projectId, - string $environmentId, - VersionCreateInput $versionCreateInput - ): RequestInterface { - // verify the required parameter 'projectId' is set - if (empty($projectId)) { - throw new InvalidArgumentException( - 'Missing the required parameter $projectId - when calling createProjectsEnvironmentsVersions' - ); - } - // verify the required parameter 'environmentId' is set - if (empty($environmentId)) { - throw new InvalidArgumentException( - 'Missing the required parameter $environmentId - when calling createProjectsEnvironmentsVersions' - ); - } - // verify the required parameter 'versionCreateInput' is set - if (empty($versionCreateInput)) { - throw new InvalidArgumentException( - 'Missing the required parameter $versionCreateInput - when calling createProjectsEnvironmentsVersions' - ); - } - - $resourcePath = '/projects/{projectId}/environments/{environmentId}/versions'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = null; - $multipart = false; - - // path params - - if ($projectId !== null) { - $resourcePath = str_replace( - '{' . 'projectId' . '}', - ObjectSerializer::toPathValue($projectId), - $resourcePath - ); - } - // path params - - if ($environmentId !== null) { - $resourcePath = str_replace( - '{' . 'environmentId' . '}', - ObjectSerializer::toPathValue($environmentId), - $resourcePath - ); - } - - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - 'application/json', - $multipart - ); - - // for model (json/xml) - if (isset($versionCreateInput)) { - if ($this->headerSelector->isJsonMime($headers['Content-Type'])) { - $httpBody = json_encode( - ObjectSerializer::sanitizeForSerialization($versionCreateInput) - ); - } else { - $httpBody = $versionCreateInput; - } - } elseif ($formParams !== []) { - 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 ($this->headerSelector->isJsonMime($headers['Content-Type'])) { - $httpBody = json_encode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } - - // this endpoint requires Bearer authentication (access token) - if ($this->config->getAccessToken() !== null) { - $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - if ($this->config->getUpsunClientHeader()) { - $defaultHeaders['X-Upsun-Client'] = $this->config->getUpsunClientHeader(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHost = $this->config->getHost(); - - $uri = $this->createUri($operationHost, $resourcePath, $queryParams); - - return $this->createRequest('POST', $uri, $headers, $httpBody); - } - /** * Deactivate an environment * @@ -983,44 +785,47 @@ private function deleteEnvironmentRequest( } /** - * Delete the version + * Deploy an environment * - * Delete the `{versionId}` version. A routing percentage for this version may be specified for staged rollouts (if - * the deployment target supports it). + * Trigger a controlled [manual + * deployment](https://docs.upsun.com/learn/overview/build-deploy.html#manual-deployment) to release all the staged + * changes * + * @param \Upsun\Model\EnvironmentDeployInput $environmentDeployInput (required) * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws ClientExceptionInterface - * @see https://docs.upsun.com/api/#tag/Environment/operation/delete-projects-environments-versions + * @see https://docs.upsun.com/api/#tag/Environment/operation/deploy-environment */ - public function deleteProjectsEnvironmentsVersions( + public function deployEnvironment( string $projectId, string $environmentId, - string $versionId + EnvironmentDeployInput $environmentDeployInput ): AcceptedResponse { - return $this->deleteProjectsEnvironmentsVersionsWithHttpInfo( + return $this->deployEnvironmentWithHttpInfo( $projectId, $environmentId, - $versionId + $environmentDeployInput ); } /** - * Delete the version with HTTP Info + * Deploy an environment with HTTP Info * + * @param \Upsun\Model\EnvironmentDeployInput $environmentDeployInput (required) * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws ClientExceptionInterface */ - private function deleteProjectsEnvironmentsVersionsWithHttpInfo( + private function deployEnvironmentWithHttpInfo( string $projectId, string $environmentId, - string $versionId + EnvironmentDeployInput $environmentDeployInput ): AcceptedResponse { - $request = $this->deleteProjectsEnvironmentsVersionsRequest( + $request = $this->deployEnvironmentRequest( $projectId, $environmentId, - $versionId + $environmentDeployInput ); try { @@ -1041,389 +846,7 @@ private function deleteProjectsEnvironmentsVersionsWithHttpInfo( sprintf( '[%d] Error connecting to the API (%s)', $exception->getCode(), - '/projects/{projectId}/environments/{environmentId}/versions/{versionId}' - ), - $request, - $response ?? null, - $exception - ); - } - } - - /** - * Create request for operation 'deleteProjectsEnvironmentsVersions' - * - * - * @throws InvalidArgumentException - */ - private function deleteProjectsEnvironmentsVersionsRequest( - string $projectId, - string $environmentId, - string $versionId - ): RequestInterface { - // verify the required parameter 'projectId' is set - if (empty($projectId)) { - throw new InvalidArgumentException( - 'Missing the required parameter $projectId - when calling deleteProjectsEnvironmentsVersions' - ); - } - // verify the required parameter 'environmentId' is set - if (empty($environmentId)) { - throw new InvalidArgumentException( - 'Missing the required parameter $environmentId - when calling deleteProjectsEnvironmentsVersions' - ); - } - // verify the required parameter 'versionId' is set - if (empty($versionId)) { - throw new InvalidArgumentException( - 'Missing the required parameter $versionId - when calling deleteProjectsEnvironmentsVersions' - ); - } - - $resourcePath = '/projects/{projectId}/environments/{environmentId}/versions/{versionId}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = null; - $multipart = false; - - // path params - - if ($projectId !== null) { - $resourcePath = str_replace( - '{' . 'projectId' . '}', - ObjectSerializer::toPathValue($projectId), - $resourcePath - ); - } - // path params - - if ($environmentId !== null) { - $resourcePath = str_replace( - '{' . 'environmentId' . '}', - ObjectSerializer::toPathValue($environmentId), - $resourcePath - ); - } - // path params - - if ($versionId !== null) { - $resourcePath = str_replace( - '{' . 'versionId' . '}', - ObjectSerializer::toPathValue($versionId), - $resourcePath - ); - } - - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - '', - $multipart - ); - - // for model (json/xml) - if ($formParams !== []) { - 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 ($this->headerSelector->isJsonMime($headers['Content-Type'])) { - $httpBody = json_encode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } - - // this endpoint requires Bearer authentication (access token) - if ($this->config->getAccessToken() !== null) { - $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - if ($this->config->getUpsunClientHeader()) { - $defaultHeaders['X-Upsun-Client'] = $this->config->getUpsunClientHeader(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHost = $this->config->getHost(); - - $uri = $this->createUri($operationHost, $resourcePath, $queryParams); - - return $this->createRequest('DELETE', $uri, $headers, $httpBody); - } - - /** - * Deploy an environment - * - * Trigger a controlled [manual - * deployment](https://docs.upsun.com/learn/overview/build-deploy.html#manual-deployment) to release all the staged - * changes - * - * @param \Upsun\Model\EnvironmentDeployInput $environmentDeployInput (required) - * - * @throws ApiException on non-2xx response or if the response body is not in the expected format - * @throws ClientExceptionInterface - * @see https://docs.upsun.com/api/#tag/Environment/operation/deploy-environment - */ - public function deployEnvironment( - string $projectId, - string $environmentId, - EnvironmentDeployInput $environmentDeployInput - ): AcceptedResponse { - return $this->deployEnvironmentWithHttpInfo( - $projectId, - $environmentId, - $environmentDeployInput - ); - } - - /** - * Deploy an environment with HTTP Info - * - * @param \Upsun\Model\EnvironmentDeployInput $environmentDeployInput (required) - * - * @throws ApiException on non-2xx response or if the response body is not in the expected format - * @throws ClientExceptionInterface - */ - private function deployEnvironmentWithHttpInfo( - string $projectId, - string $environmentId, - EnvironmentDeployInput $environmentDeployInput - ): AcceptedResponse { - $request = $this->deployEnvironmentRequest( - $projectId, - $environmentId, - $environmentDeployInput - ); - - try { - $response = $this->sendAuthenticatedRequest( - $request->getMethod(), - (string) $request->getUri(), - $request->getHeaders(), - $request->getBody() - ); - - return $this->handleResponseWithDataType( - '\Upsun\Model\AcceptedResponse', - $request, - $response - ); - } catch (Exception $exception) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $exception->getCode(), - '/projects/{projectId}/environments/{environmentId}/deploy' - ), - $request, - $response ?? null, - $exception - ); - } - } - - /** - * Create request for operation 'deployEnvironment' - * - * @param \Upsun\Model\EnvironmentDeployInput $environmentDeployInput (required) - * - * @throws InvalidArgumentException - */ - private function deployEnvironmentRequest( - string $projectId, - string $environmentId, - EnvironmentDeployInput $environmentDeployInput - ): RequestInterface { - // verify the required parameter 'projectId' is set - if (empty($projectId)) { - throw new InvalidArgumentException( - 'Missing the required parameter $projectId - when calling deployEnvironment' - ); - } - // verify the required parameter 'environmentId' is set - if (empty($environmentId)) { - throw new InvalidArgumentException( - 'Missing the required parameter $environmentId - when calling deployEnvironment' - ); - } - // verify the required parameter 'environmentDeployInput' is set - if (empty($environmentDeployInput)) { - throw new InvalidArgumentException( - 'Missing the required parameter $environmentDeployInput - when calling deployEnvironment' - ); - } - - $resourcePath = '/projects/{projectId}/environments/{environmentId}/deploy'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = null; - $multipart = false; - - // path params - - if ($projectId !== null) { - $resourcePath = str_replace( - '{' . 'projectId' . '}', - ObjectSerializer::toPathValue($projectId), - $resourcePath - ); - } - // path params - - if ($environmentId !== null) { - $resourcePath = str_replace( - '{' . 'environmentId' . '}', - ObjectSerializer::toPathValue($environmentId), - $resourcePath - ); - } - - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - 'application/json', - $multipart - ); - - // for model (json/xml) - if (isset($environmentDeployInput)) { - if ($this->headerSelector->isJsonMime($headers['Content-Type'])) { - $httpBody = json_encode( - ObjectSerializer::sanitizeForSerialization($environmentDeployInput) - ); - } else { - $httpBody = $environmentDeployInput; - } - } elseif ($formParams !== []) { - 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 ($this->headerSelector->isJsonMime($headers['Content-Type'])) { - $httpBody = json_encode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } - - // this endpoint requires Bearer authentication (access token) - if ($this->config->getAccessToken() !== null) { - $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - if ($this->config->getUpsunClientHeader()) { - $defaultHeaders['X-Upsun-Client'] = $this->config->getUpsunClientHeader(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHost = $this->config->getHost(); - - $uri = $this->createUri($operationHost, $resourcePath, $queryParams); - - return $this->createRequest('POST', $uri, $headers, $httpBody); - } - - /** - * Get an environment - * - * Retrieve the details of a single existing environment. - * - * - * @throws ApiException on non-2xx response or if the response body is not in the expected format - * @throws ClientExceptionInterface - * @see https://docs.upsun.com/api/#tag/Environment/operation/get-environment - */ - public function getEnvironment( - string $projectId, - string $environmentId - ): Environment { - return $this->getEnvironmentWithHttpInfo( - $projectId, - $environmentId - ); - } - - /** - * Get an environment with HTTP Info - * - * - * @throws ApiException on non-2xx response or if the response body is not in the expected format - * @throws ClientExceptionInterface - */ - private function getEnvironmentWithHttpInfo( - string $projectId, - string $environmentId - ): Environment { - $request = $this->getEnvironmentRequest( - $projectId, - $environmentId - ); - - try { - $response = $this->sendAuthenticatedRequest( - $request->getMethod(), - (string) $request->getUri(), - $request->getHeaders(), - $request->getBody() - ); - - return $this->handleResponseWithDataType( - '\Upsun\Model\Environment', - $request, - $response - ); - } catch (Exception $exception) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $exception->getCode(), - '/projects/{projectId}/environments/{environmentId}' + '/projects/{projectId}/environments/{environmentId}/deploy' ), $request, $response ?? null, @@ -1433,31 +856,40 @@ private function getEnvironmentWithHttpInfo( } /** - * Create request for operation 'getEnvironment' + * Create request for operation 'deployEnvironment' * + * @param \Upsun\Model\EnvironmentDeployInput $environmentDeployInput (required) * * @throws InvalidArgumentException */ - private function getEnvironmentRequest( + private function deployEnvironmentRequest( string $projectId, - string $environmentId + string $environmentId, + EnvironmentDeployInput $environmentDeployInput ): RequestInterface { // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( 'Missing the required parameter $projectId - when calling getEnvironment' + when calling deployEnvironment' ); } // verify the required parameter 'environmentId' is set if (empty($environmentId)) { throw new InvalidArgumentException( 'Missing the required parameter $environmentId - when calling getEnvironment' + when calling deployEnvironment' + ); + } + // verify the required parameter 'environmentDeployInput' is set + if (empty($environmentDeployInput)) { + throw new InvalidArgumentException( + 'Missing the required parameter $environmentDeployInput + when calling deployEnvironment' ); } - $resourcePath = '/projects/{projectId}/environments/{environmentId}'; + $resourcePath = '/projects/{projectId}/environments/{environmentId}/deploy'; $formParams = []; $queryParams = []; $headerParams = []; @@ -1485,12 +917,20 @@ private function getEnvironmentRequest( $headers = $this->headerSelector->selectHeaders( ['application/json'], - '', + 'application/json', $multipart ); // for model (json/xml) - if ($formParams !== []) { + if (isset($environmentDeployInput)) { + if ($this->headerSelector->isJsonMime($headers['Content-Type'])) { + $httpBody = json_encode( + ObjectSerializer::sanitizeForSerialization($environmentDeployInput) + ); + } else { + $httpBody = $environmentDeployInput; + } + } elseif ($formParams !== []) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -1536,48 +976,43 @@ private function getEnvironmentRequest( $uri = $this->createUri($operationHost, $resourcePath, $queryParams); - return $this->createRequest('GET', $uri, $headers, $httpBody); + return $this->createRequest('POST', $uri, $headers, $httpBody); } /** - * List the version + * Get an environment * - * List the `{versionId}` version. A routing percentage for this version may be specified for staged rollouts (if - * the deployment target supports it). + * Retrieve the details of a single existing environment. * * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws ClientExceptionInterface - * @see https://docs.upsun.com/api/#tag/Environment/operation/get-projects-environments-versions + * @see https://docs.upsun.com/api/#tag/Environment/operation/get-environment */ - public function getProjectsEnvironmentsVersions( + public function getEnvironment( string $projectId, - string $environmentId, - string $versionId - ): Version { - return $this->getProjectsEnvironmentsVersionsWithHttpInfo( + string $environmentId + ): Environment { + return $this->getEnvironmentWithHttpInfo( $projectId, - $environmentId, - $versionId + $environmentId ); } /** - * List the version with HTTP Info + * Get an environment with HTTP Info * * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws ClientExceptionInterface */ - private function getProjectsEnvironmentsVersionsWithHttpInfo( + private function getEnvironmentWithHttpInfo( string $projectId, - string $environmentId, - string $versionId - ): Version { - $request = $this->getProjectsEnvironmentsVersionsRequest( + string $environmentId + ): Environment { + $request = $this->getEnvironmentRequest( $projectId, - $environmentId, - $versionId + $environmentId ); try { @@ -1589,7 +1024,7 @@ private function getProjectsEnvironmentsVersionsWithHttpInfo( ); return $this->handleResponseWithDataType( - '\Upsun\Model\Version', + '\Upsun\Model\Environment', $request, $response ); @@ -1598,7 +1033,7 @@ private function getProjectsEnvironmentsVersionsWithHttpInfo( sprintf( '[%d] Error connecting to the API (%s)', $exception->getCode(), - '/projects/{projectId}/environments/{environmentId}/versions/{versionId}' + '/projects/{projectId}/environments/{environmentId}' ), $request, $response ?? null, @@ -1608,39 +1043,31 @@ private function getProjectsEnvironmentsVersionsWithHttpInfo( } /** - * Create request for operation 'getProjectsEnvironmentsVersions' + * Create request for operation 'getEnvironment' * * * @throws InvalidArgumentException */ - private function getProjectsEnvironmentsVersionsRequest( + private function getEnvironmentRequest( string $projectId, - string $environmentId, - string $versionId + string $environmentId ): RequestInterface { // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( 'Missing the required parameter $projectId - when calling getProjectsEnvironmentsVersions' + when calling getEnvironment' ); } // verify the required parameter 'environmentId' is set if (empty($environmentId)) { throw new InvalidArgumentException( 'Missing the required parameter $environmentId - when calling getProjectsEnvironmentsVersions' - ); - } - // verify the required parameter 'versionId' is set - if (empty($versionId)) { - throw new InvalidArgumentException( - 'Missing the required parameter $versionId - when calling getProjectsEnvironmentsVersions' + when calling getEnvironment' ); } - $resourcePath = '/projects/{projectId}/environments/{environmentId}/versions/{versionId}'; + $resourcePath = '/projects/{projectId}/environments/{environmentId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -1665,15 +1092,6 @@ private function getProjectsEnvironmentsVersionsRequest( $resourcePath ); } - // path params - - if ($versionId !== null) { - $resourcePath = str_replace( - '{' . 'versionId' . '}', - ObjectSerializer::toPathValue($versionId), - $resourcePath - ); - } $headers = $this->headerSelector->selectHeaders( ['application/json'], @@ -2084,43 +1502,33 @@ private function listProjectsEnvironmentsRequest( } /** - * List versions associated with the environment - * - * List versions associated with the `{environmentId}` environment. At least one version always exists. When - * multiple versions exist, it means that multiple versions of an app are deployed. The deployment target type - * denotes whether staged deployment is supported. * * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws ClientExceptionInterface - * - * @return \Upsun\Model\Version[] - * @see https://docs.upsun.com/api/#tag/Environment/operation/list-projects-environments-versions + * @see https://docs.upsun.com/api/#tag/Environment/operation/maintenance-redeploy-environment */ - public function listProjectsEnvironmentsVersions( + public function maintenanceRedeployEnvironment( string $projectId, string $environmentId - ): array { - return $this->listProjectsEnvironmentsVersionsWithHttpInfo( + ): AcceptedResponse { + return $this->maintenanceRedeployEnvironmentWithHttpInfo( $projectId, $environmentId ); } /** - * List versions associated with the environment with HTTP Info * * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws ClientExceptionInterface - * - * @return \Upsun\Model\Version[] */ - private function listProjectsEnvironmentsVersionsWithHttpInfo( + private function maintenanceRedeployEnvironmentWithHttpInfo( string $projectId, string $environmentId - ): array { - $request = $this->listProjectsEnvironmentsVersionsRequest( + ): AcceptedResponse { + $request = $this->maintenanceRedeployEnvironmentRequest( $projectId, $environmentId ); @@ -2134,7 +1542,7 @@ private function listProjectsEnvironmentsVersionsWithHttpInfo( ); return $this->handleResponseWithDataType( - '\Upsun\Model\Version[]', + '\Upsun\Model\AcceptedResponse', $request, $response ); @@ -2143,7 +1551,7 @@ private function listProjectsEnvironmentsVersionsWithHttpInfo( sprintf( '[%d] Error connecting to the API (%s)', $exception->getCode(), - '/projects/{projectId}/environments/{environmentId}/versions' + '/projects/{projectId}/environments/{environmentId}/maintenance-redeploy' ), $request, $response ?? null, @@ -2153,12 +1561,12 @@ private function listProjectsEnvironmentsVersionsWithHttpInfo( } /** - * Create request for operation 'listProjectsEnvironmentsVersions' + * Create request for operation 'maintenanceRedeployEnvironment' * * * @throws InvalidArgumentException */ - private function listProjectsEnvironmentsVersionsRequest( + private function maintenanceRedeployEnvironmentRequest( string $projectId, string $environmentId ): RequestInterface { @@ -2166,18 +1574,18 @@ private function listProjectsEnvironmentsVersionsRequest( if (empty($projectId)) { throw new InvalidArgumentException( 'Missing the required parameter $projectId - when calling listProjectsEnvironmentsVersions' + when calling maintenanceRedeployEnvironment' ); } // verify the required parameter 'environmentId' is set if (empty($environmentId)) { throw new InvalidArgumentException( 'Missing the required parameter $environmentId - when calling listProjectsEnvironmentsVersions' + when calling maintenanceRedeployEnvironment' ); } - $resourcePath = '/projects/{projectId}/environments/{environmentId}/versions'; + $resourcePath = '/projects/{projectId}/environments/{environmentId}/maintenance-redeploy'; $formParams = []; $queryParams = []; $headerParams = []; @@ -2256,7 +1664,7 @@ private function listProjectsEnvironmentsVersionsRequest( $uri = $this->createUri($operationHost, $resourcePath, $queryParams); - return $this->createRequest('GET', $uri, $headers, $httpBody); + return $this->createRequest('POST', $uri, $headers, $httpBody); } /** @@ -3358,219 +2766,4 @@ private function updateEnvironmentRequest( return $this->createRequest('PATCH', $uri, $headers, $httpBody); } - - /** - * Update the version - * - * Update the `{versionId}` version. A routing percentage for this version may be specified for staged rollouts (if - * the deployment target supports it). - * - * @param \Upsun\Model\VersionPatch $versionPatch (required) - * - * @throws ApiException on non-2xx response or if the response body is not in the expected format - * @throws ClientExceptionInterface - * @see https://docs.upsun.com/api/#tag/Environment/operation/update-projects-environments-versions - */ - public function updateProjectsEnvironmentsVersions( - string $projectId, - string $environmentId, - string $versionId, - VersionPatch $versionPatch - ): AcceptedResponse { - return $this->updateProjectsEnvironmentsVersionsWithHttpInfo( - $projectId, - $environmentId, - $versionId, - $versionPatch - ); - } - - /** - * Update the version with HTTP Info - * - * @param \Upsun\Model\VersionPatch $versionPatch (required) - * - * @throws ApiException on non-2xx response or if the response body is not in the expected format - * @throws ClientExceptionInterface - */ - private function updateProjectsEnvironmentsVersionsWithHttpInfo( - string $projectId, - string $environmentId, - string $versionId, - VersionPatch $versionPatch - ): AcceptedResponse { - $request = $this->updateProjectsEnvironmentsVersionsRequest( - $projectId, - $environmentId, - $versionId, - $versionPatch - ); - - try { - $response = $this->sendAuthenticatedRequest( - $request->getMethod(), - (string) $request->getUri(), - $request->getHeaders(), - $request->getBody() - ); - - return $this->handleResponseWithDataType( - '\Upsun\Model\AcceptedResponse', - $request, - $response - ); - } catch (Exception $exception) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $exception->getCode(), - '/projects/{projectId}/environments/{environmentId}/versions/{versionId}' - ), - $request, - $response ?? null, - $exception - ); - } - } - - /** - * Create request for operation 'updateProjectsEnvironmentsVersions' - * - * @param \Upsun\Model\VersionPatch $versionPatch (required) - * - * @throws InvalidArgumentException - */ - private function updateProjectsEnvironmentsVersionsRequest( - string $projectId, - string $environmentId, - string $versionId, - VersionPatch $versionPatch - ): RequestInterface { - // verify the required parameter 'projectId' is set - if (empty($projectId)) { - throw new InvalidArgumentException( - 'Missing the required parameter $projectId - when calling updateProjectsEnvironmentsVersions' - ); - } - // verify the required parameter 'environmentId' is set - if (empty($environmentId)) { - throw new InvalidArgumentException( - 'Missing the required parameter $environmentId - when calling updateProjectsEnvironmentsVersions' - ); - } - // verify the required parameter 'versionId' is set - if (empty($versionId)) { - throw new InvalidArgumentException( - 'Missing the required parameter $versionId - when calling updateProjectsEnvironmentsVersions' - ); - } - // verify the required parameter 'versionPatch' is set - if (empty($versionPatch)) { - throw new InvalidArgumentException( - 'Missing the required parameter $versionPatch - when calling updateProjectsEnvironmentsVersions' - ); - } - - $resourcePath = '/projects/{projectId}/environments/{environmentId}/versions/{versionId}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = null; - $multipart = false; - - // path params - - if ($projectId !== null) { - $resourcePath = str_replace( - '{' . 'projectId' . '}', - ObjectSerializer::toPathValue($projectId), - $resourcePath - ); - } - // path params - - if ($environmentId !== null) { - $resourcePath = str_replace( - '{' . 'environmentId' . '}', - ObjectSerializer::toPathValue($environmentId), - $resourcePath - ); - } - // path params - - if ($versionId !== null) { - $resourcePath = str_replace( - '{' . 'versionId' . '}', - ObjectSerializer::toPathValue($versionId), - $resourcePath - ); - } - - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - 'application/json', - $multipart - ); - - // for model (json/xml) - if (isset($versionPatch)) { - if ($this->headerSelector->isJsonMime($headers['Content-Type'])) { - $httpBody = json_encode( - ObjectSerializer::sanitizeForSerialization($versionPatch) - ); - } else { - $httpBody = $versionPatch; - } - } elseif ($formParams !== []) { - 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 ($this->headerSelector->isJsonMime($headers['Content-Type'])) { - $httpBody = json_encode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } - - // this endpoint requires Bearer authentication (access token) - if ($this->config->getAccessToken() !== null) { - $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - if ($this->config->getUpsunClientHeader()) { - $defaultHeaders['X-Upsun-Client'] = $this->config->getUpsunClientHeader(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHost = $this->config->getHost(); - - $uri = $this->createUri($operationHost, $resourcePath, $queryParams); - - return $this->createRequest('PATCH', $uri, $headers, $httpBody); - } } diff --git a/src/Api/HttpTrafficApi.php b/src/Api/HttpTrafficApi.php new file mode 100644 index 00000000..e15d83a3 --- /dev/null +++ b/src/Api/HttpTrafficApi.php @@ -0,0 +1,1935 @@ +config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + + $this->headerSelector = $selector ?? new ApiHeaderSelector(); + } + + /** + * Get HTTP traffic overview + * + * Returns HTTP traffic analytics with top URLs ranked by impact (response time × request count), aggregated + * metrics (average, median, p96 response times in milliseconds), status code distributions, and time-series data. + * Use top_urls_count parameter to control result size (default: 10, max: 100). Response includes per-URL metrics + * grouped by "METHOD-URL" keys (e.g., "GET-https://example.com/api/products") and timestamped traffic data with + * request/response sizes in bytes. + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param int $from (required) + * @param int $to (required) + * @param int|null $topUrlsCount (optional) + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + * @see https://docs.upsun.com/api/#tag/Http-Traffic/operation/http_metrics_overview + */ + public function httpMetricsOverview( + string $projectId, + string $environmentId, + int $from, + int $to, + ?int $topUrlsCount = null + ): HttpMetricsOverview200Response { + return $this->httpMetricsOverviewWithHttpInfo( + $projectId, + $environmentId, + $from, + $to, + $topUrlsCount + ); + } + + /** + * Get HTTP traffic overview with HTTP Info + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param int $from (required) + * @param int $to (required) + * @param int|null $topUrlsCount (optional) + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + */ + private function httpMetricsOverviewWithHttpInfo( + string $projectId, + string $environmentId, + int $from, + int $to, + ?int $topUrlsCount = null + ): HttpMetricsOverview200Response { + $request = $this->httpMetricsOverviewRequest( + $projectId, + $environmentId, + $from, + $to, + $topUrlsCount + ); + + try { + $response = $this->sendAuthenticatedRequest( + $request->getMethod(), + (string) $request->getUri(), + $request->getHeaders(), + $request->getBody() + ); + + return $this->handleResponseWithDataType( + '\Upsun\Model\HttpMetricsOverview200Response', + $request, + $response + ); + } catch (Exception $exception) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $exception->getCode(), + '/projects/{projectId}/environments/{environmentId}/observability/http-metrics/overview' + ), + $request, + $response ?? null, + $exception + ); + } + } + + /** + * Create request for operation 'httpMetricsOverview' + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param int $from (required) + * @param int $to (required) + * @param int|null $topUrlsCount (optional) + * + * @throws InvalidArgumentException + */ + private function httpMetricsOverviewRequest( + string $projectId, + string $environmentId, + int $from, + int $to, + ?int $topUrlsCount = null + ): RequestInterface { + // verify the required parameter 'projectId' is set + if (empty($projectId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $projectId + when calling httpMetricsOverview' + ); + } + + if (!preg_match("/[a-z0-9]+/", $projectId)) { + throw new InvalidArgumentException( + "invalid value for \"projectId\" when calling HttpTrafficApi.httpMetricsOverview, + must conform to the pattern /[a-z0-9]+/." + ); + } + + // verify the required parameter 'environmentId' is set + if (empty($environmentId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $environmentId + when calling httpMetricsOverview' + ); + } + + if (!preg_match("/.+/", $environmentId)) { + throw new InvalidArgumentException( + "invalid value for \"environmentId\" when calling HttpTrafficApi.httpMetricsOverview, + must conform to the pattern /.+/." + ); + } + + // verify the required parameter 'from' is set + if (empty($from)) { + throw new InvalidArgumentException( + 'Missing the required parameter $from + when calling httpMetricsOverview' + ); + } + // verify the required parameter 'to' is set + if (empty($to)) { + throw new InvalidArgumentException( + 'Missing the required parameter $to + when calling httpMetricsOverview' + ); + } + + if ($topUrlsCount !== null && $topUrlsCount > 100) { + throw new InvalidArgumentException( + 'invalid value for "$topUrlsCount" when calling HttpTrafficApi.httpMetricsOverview, + must be smaller than or equal to 100.' + ); + } + + if ($topUrlsCount !== null && $topUrlsCount < 1) { + throw new InvalidArgumentException( + 'invalid value for "$topUrlsCount" when calling HttpTrafficApi.httpMetricsOverview, + must be bigger than or equal to 1.' + ); + } + + $resourcePath = '/projects/{projectId}/environments/{environmentId}/observability/http-metrics/overview'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = null; + $multipart = false; + + // query params + if ($from !== null) { + if ('form' === 'form' && is_array($from)) { + foreach ($from as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['from'] = $from instanceof DateTime + ? $from->format(DATE_ATOM) + : ($from); + } + } + + // query params + if ($to !== null) { + if ('form' === 'form' && is_array($to)) { + foreach ($to as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['to'] = $to instanceof DateTime + ? $to->format(DATE_ATOM) + : ($to); + } + } + + // query params + if ($topUrlsCount !== null) { + if ('form' === 'form' && is_array($topUrlsCount)) { + foreach ($topUrlsCount as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['top_urls_count'] = $topUrlsCount instanceof DateTime + ? $topUrlsCount->format(DATE_ATOM) + : ($topUrlsCount); + } + } + + // path params + + if ($projectId !== null) { + $resourcePath = str_replace( + '{' . 'projectId' . '}', + ObjectSerializer::toPathValue($projectId), + $resourcePath + ); + } + // path params + + if ($environmentId !== null) { + $resourcePath = str_replace( + '{' . 'environmentId' . '}', + ObjectSerializer::toPathValue($environmentId), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + '', + $multipart + ); + + // for model (json/xml) + if ($formParams !== []) { + 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 ($this->headerSelector->isJsonMime($headers['Content-Type'])) { + $httpBody = json_encode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if ($this->config->getAccessToken() !== null) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + if ($this->config->getUpsunClientHeader()) { + $defaultHeaders['X-Upsun-Client'] = $this->config->getUpsunClientHeader(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + + $uri = $this->createUri($operationHost, $resourcePath, $queryParams); + + return $this->createRequest('GET', $uri, $headers, $httpBody); + } + + /** + * Get HTTP traffic timeline by IP + * + * Returns HTTP traffic analytics grouped by IP address with IPs ranked by impact (response time × request count). + * Use limit parameter to control total items returned (default: 200, max: 300) and top_hits_count to control how + * many are tracked in timelines (default: 15, max: 15). Items have a top_hit boolean indicating whether they appear + * in timeline data. + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param int $from (required) + * @param int $to (required) + * @param int|null $limit (optional) + * @param int|null $topHitsCount (optional) + * @param string[]|null $methods (optional) + * @param string|null $methodsMode (optional) + * @param string[]|null $domains (optional) + * @param string|null $domainsMode (optional) + * @param string[]|null $codeSlots (optional) + * @param string|null $codeSlotsMode (optional) + * @param string[]|null $codes (optional) + * @param string|null $codesMode (optional) + * @param string[]|null $requestDurationSlots (optional) + * @param string|null $requestDurationSlotsMode (optional) + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + * @see https://docs.upsun.com/api/#tag/Http-Traffic/operation/http_metrics_timeline_ips + */ + public function httpMetricsTimelineIps( + string $projectId, + string $environmentId, + int $from, + int $to, + ?int $limit = null, + ?int $topHitsCount = null, + ?array $methods = null, + ?string $methodsMode = null, + ?array $domains = null, + ?string $domainsMode = null, + ?array $codeSlots = null, + ?string $codeSlotsMode = null, + ?array $codes = null, + ?string $codesMode = null, + ?array $requestDurationSlots = null, + ?string $requestDurationSlotsMode = null + ): HttpMetricsTimelineIps200Response { + return $this->httpMetricsTimelineIpsWithHttpInfo( + $projectId, + $environmentId, + $from, + $to, + $limit, + $topHitsCount, + $methods, + $methodsMode, + $domains, + $domainsMode, + $codeSlots, + $codeSlotsMode, + $codes, + $codesMode, + $requestDurationSlots, + $requestDurationSlotsMode + ); + } + + /** + * Get HTTP traffic timeline by IP with HTTP Info + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param int $from (required) + * @param int $to (required) + * @param int|null $limit (optional) + * @param int|null $topHitsCount (optional) + * @param string[]|null $methods (optional) + * @param string|null $methodsMode (optional) + * @param string[]|null $domains (optional) + * @param string|null $domainsMode (optional) + * @param string[]|null $codeSlots (optional) + * @param string|null $codeSlotsMode (optional) + * @param string[]|null $codes (optional) + * @param string|null $codesMode (optional) + * @param string[]|null $requestDurationSlots (optional) + * @param string|null $requestDurationSlotsMode (optional) + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + */ + private function httpMetricsTimelineIpsWithHttpInfo( + string $projectId, + string $environmentId, + int $from, + int $to, + ?int $limit = null, + ?int $topHitsCount = null, + ?array $methods = null, + ?string $methodsMode = null, + ?array $domains = null, + ?string $domainsMode = null, + ?array $codeSlots = null, + ?string $codeSlotsMode = null, + ?array $codes = null, + ?string $codesMode = null, + ?array $requestDurationSlots = null, + ?string $requestDurationSlotsMode = null + ): HttpMetricsTimelineIps200Response { + $request = $this->httpMetricsTimelineIpsRequest( + $projectId, + $environmentId, + $from, + $to, + $limit, + $topHitsCount, + $methods, + $methodsMode, + $domains, + $domainsMode, + $codeSlots, + $codeSlotsMode, + $codes, + $codesMode, + $requestDurationSlots, + $requestDurationSlotsMode + ); + + try { + $response = $this->sendAuthenticatedRequest( + $request->getMethod(), + (string) $request->getUri(), + $request->getHeaders(), + $request->getBody() + ); + + return $this->handleResponseWithDataType( + '\Upsun\Model\HttpMetricsTimelineIps200Response', + $request, + $response + ); + } catch (Exception $exception) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $exception->getCode(), + '/projects/{projectId}/environments/{environmentId}/observability/http/breakdown/ips' + ), + $request, + $response ?? null, + $exception + ); + } + } + + /** + * Create request for operation 'httpMetricsTimelineIps' + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param int $from (required) + * @param int $to (required) + * @param int|null $limit (optional) + * @param int|null $topHitsCount (optional) + * @param string[]|null $methods (optional) + * @param string|null $methodsMode (optional) + * @param string[]|null $domains (optional) + * @param string|null $domainsMode (optional) + * @param string[]|null $codeSlots (optional) + * @param string|null $codeSlotsMode (optional) + * @param string[]|null $codes (optional) + * @param string|null $codesMode (optional) + * @param string[]|null $requestDurationSlots (optional) + * @param string|null $requestDurationSlotsMode (optional) + * + * @throws InvalidArgumentException + */ + private function httpMetricsTimelineIpsRequest( + string $projectId, + string $environmentId, + int $from, + int $to, + ?int $limit = null, + ?int $topHitsCount = null, + ?array $methods = null, + ?string $methodsMode = null, + ?array $domains = null, + ?string $domainsMode = null, + ?array $codeSlots = null, + ?string $codeSlotsMode = null, + ?array $codes = null, + ?string $codesMode = null, + ?array $requestDurationSlots = null, + ?string $requestDurationSlotsMode = null + ): RequestInterface { + // verify the required parameter 'projectId' is set + if (empty($projectId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $projectId + when calling httpMetricsTimelineIps' + ); + } + + if (!preg_match("/[a-z0-9]+/", $projectId)) { + throw new InvalidArgumentException( + "invalid value for \"projectId\" when calling HttpTrafficApi.httpMetricsTimelineIps, + must conform to the pattern /[a-z0-9]+/." + ); + } + + // verify the required parameter 'environmentId' is set + if (empty($environmentId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $environmentId + when calling httpMetricsTimelineIps' + ); + } + + if (!preg_match("/.+/", $environmentId)) { + throw new InvalidArgumentException( + "invalid value for \"environmentId\" when calling HttpTrafficApi.httpMetricsTimelineIps, + must conform to the pattern /.+/." + ); + } + + // verify the required parameter 'from' is set + if (empty($from)) { + throw new InvalidArgumentException( + 'Missing the required parameter $from + when calling httpMetricsTimelineIps' + ); + } + // verify the required parameter 'to' is set + if (empty($to)) { + throw new InvalidArgumentException( + 'Missing the required parameter $to + when calling httpMetricsTimelineIps' + ); + } + + if ($limit !== null && $limit > 300) { + throw new InvalidArgumentException( + 'invalid value for "$limit" when calling HttpTrafficApi.httpMetricsTimelineIps, + must be smaller than or equal to 300.' + ); + } + + if ($limit !== null && $limit < 1) { + throw new InvalidArgumentException( + 'invalid value for "$limit" when calling HttpTrafficApi.httpMetricsTimelineIps, + must be bigger than or equal to 1.' + ); + } + + if ($topHitsCount !== null && $topHitsCount > 15) { + throw new InvalidArgumentException( + 'invalid value for "$topHitsCount" when calling HttpTrafficApi.httpMetricsTimelineIps, + must be smaller than or equal to 15.' + ); + } + + if ($topHitsCount !== null && $topHitsCount < 1) { + throw new InvalidArgumentException( + 'invalid value for "$topHitsCount" when calling HttpTrafficApi.httpMetricsTimelineIps, + must be bigger than or equal to 1.' + ); + } + + $resourcePath = '/projects/{projectId}/environments/{environmentId}/observability/http/breakdown/ips'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = null; + $multipart = false; + + // query params + if ($from !== null) { + if ('form' === 'form' && is_array($from)) { + foreach ($from as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['from'] = $from instanceof DateTime + ? $from->format(DATE_ATOM) + : ($from); + } + } + + // query params + if ($to !== null) { + if ('form' === 'form' && is_array($to)) { + foreach ($to as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['to'] = $to instanceof DateTime + ? $to->format(DATE_ATOM) + : ($to); + } + } + + // query params + if ($limit !== null) { + if ('form' === 'form' && is_array($limit)) { + foreach ($limit as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['limit'] = $limit instanceof DateTime + ? $limit->format(DATE_ATOM) + : ($limit); + } + } + + // query params + if ($topHitsCount !== null) { + if ('form' === 'form' && is_array($topHitsCount)) { + foreach ($topHitsCount as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['top_hits_count'] = $topHitsCount instanceof DateTime + ? $topHitsCount->format(DATE_ATOM) + : ($topHitsCount); + } + } + + // query params + if ($methods !== null) { + if ('form' === 'form' && is_array($methods)) { + foreach ($methods as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['methods[]'] = $methods instanceof DateTime + ? $methods->format(DATE_ATOM) + : ($methods); + } + } + + // query params + if ($methodsMode !== null) { + if ('form' === 'form' && is_array($methodsMode)) { + foreach ($methodsMode as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['methods_mode'] = $methodsMode instanceof DateTime + ? $methodsMode->format(DATE_ATOM) + : ($methodsMode); + } + } + + // query params + if ($domains !== null) { + if ('form' === 'form' && is_array($domains)) { + foreach ($domains as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['domains[]'] = $domains instanceof DateTime + ? $domains->format(DATE_ATOM) + : ($domains); + } + } + + // query params + if ($domainsMode !== null) { + if ('form' === 'form' && is_array($domainsMode)) { + foreach ($domainsMode as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['domains_mode'] = $domainsMode instanceof DateTime + ? $domainsMode->format(DATE_ATOM) + : ($domainsMode); + } + } + + // query params + if ($codeSlots !== null) { + if ('form' === 'form' && is_array($codeSlots)) { + foreach ($codeSlots as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['code_slots[]'] = $codeSlots instanceof DateTime + ? $codeSlots->format(DATE_ATOM) + : ($codeSlots); + } + } + + // query params + if ($codeSlotsMode !== null) { + if ('form' === 'form' && is_array($codeSlotsMode)) { + foreach ($codeSlotsMode as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['code_slots_mode'] = $codeSlotsMode instanceof DateTime + ? $codeSlotsMode->format(DATE_ATOM) + : ($codeSlotsMode); + } + } + + // query params + if ($codes !== null) { + if ('form' === 'form' && is_array($codes)) { + foreach ($codes as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['codes[]'] = $codes instanceof DateTime + ? $codes->format(DATE_ATOM) + : ($codes); + } + } + + // query params + if ($codesMode !== null) { + if ('form' === 'form' && is_array($codesMode)) { + foreach ($codesMode as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['codes_mode'] = $codesMode instanceof DateTime + ? $codesMode->format(DATE_ATOM) + : ($codesMode); + } + } + + // query params + if ($requestDurationSlots !== null) { + if ('form' === 'form' && is_array($requestDurationSlots)) { + foreach ($requestDurationSlots as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['request_duration_slots[]'] = $requestDurationSlots instanceof DateTime + ? $requestDurationSlots->format(DATE_ATOM) + : ($requestDurationSlots); + } + } + + // query params + if ($requestDurationSlotsMode !== null) { + if ('form' === 'form' && is_array($requestDurationSlotsMode)) { + foreach ($requestDurationSlotsMode as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['request_duration_slots_mode'] = $requestDurationSlotsMode instanceof DateTime + ? $requestDurationSlotsMode->format(DATE_ATOM) + : ($requestDurationSlotsMode); + } + } + + // path params + + if ($projectId !== null) { + $resourcePath = str_replace( + '{' . 'projectId' . '}', + ObjectSerializer::toPathValue($projectId), + $resourcePath + ); + } + // path params + + if ($environmentId !== null) { + $resourcePath = str_replace( + '{' . 'environmentId' . '}', + ObjectSerializer::toPathValue($environmentId), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + '', + $multipart + ); + + // for model (json/xml) + if ($formParams !== []) { + 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 ($this->headerSelector->isJsonMime($headers['Content-Type'])) { + $httpBody = json_encode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if ($this->config->getAccessToken() !== null) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + if ($this->config->getUpsunClientHeader()) { + $defaultHeaders['X-Upsun-Client'] = $this->config->getUpsunClientHeader(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + + $uri = $this->createUri($operationHost, $resourcePath, $queryParams); + + return $this->createRequest('GET', $uri, $headers, $httpBody); + } + + /** + * Get HTTP traffic timeline by URL + * + * Returns HTTP traffic analytics with URLs ranked by impact (response time × request count), aggregated metrics + * (average, median, p96 response times in milliseconds), status code distributions, and time-series data. Use limit + * parameter to control total items returned (default: 200, max: 300) and top_hits_count to control how many are + * tracked in timelines (default: 15, max: 15). Items have a top_hit boolean indicating whether they appear in + * timeline data. + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param int $from (required) + * @param int $to (required) + * @param int|null $limit (optional) + * @param int|null $topHitsCount (optional) + * @param string[]|null $methods (optional) + * @param string|null $methodsMode (optional) + * @param string[]|null $domains (optional) + * @param string|null $domainsMode (optional) + * @param string[]|null $codeSlots (optional) + * @param string|null $codeSlotsMode (optional) + * @param string[]|null $codes (optional) + * @param string|null $codesMode (optional) + * @param string[]|null $requestDurationSlots (optional) + * @param string|null $requestDurationSlotsMode (optional) + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + * @see https://docs.upsun.com/api/#tag/Http-Traffic/operation/http_metrics_timeline_urls + */ + public function httpMetricsTimelineUrls( + string $projectId, + string $environmentId, + int $from, + int $to, + ?int $limit = null, + ?int $topHitsCount = null, + ?array $methods = null, + ?string $methodsMode = null, + ?array $domains = null, + ?string $domainsMode = null, + ?array $codeSlots = null, + ?string $codeSlotsMode = null, + ?array $codes = null, + ?string $codesMode = null, + ?array $requestDurationSlots = null, + ?string $requestDurationSlotsMode = null + ): HttpMetricsTimelineUrls200Response { + return $this->httpMetricsTimelineUrlsWithHttpInfo( + $projectId, + $environmentId, + $from, + $to, + $limit, + $topHitsCount, + $methods, + $methodsMode, + $domains, + $domainsMode, + $codeSlots, + $codeSlotsMode, + $codes, + $codesMode, + $requestDurationSlots, + $requestDurationSlotsMode + ); + } + + /** + * Get HTTP traffic timeline by URL with HTTP Info + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param int $from (required) + * @param int $to (required) + * @param int|null $limit (optional) + * @param int|null $topHitsCount (optional) + * @param string[]|null $methods (optional) + * @param string|null $methodsMode (optional) + * @param string[]|null $domains (optional) + * @param string|null $domainsMode (optional) + * @param string[]|null $codeSlots (optional) + * @param string|null $codeSlotsMode (optional) + * @param string[]|null $codes (optional) + * @param string|null $codesMode (optional) + * @param string[]|null $requestDurationSlots (optional) + * @param string|null $requestDurationSlotsMode (optional) + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + */ + private function httpMetricsTimelineUrlsWithHttpInfo( + string $projectId, + string $environmentId, + int $from, + int $to, + ?int $limit = null, + ?int $topHitsCount = null, + ?array $methods = null, + ?string $methodsMode = null, + ?array $domains = null, + ?string $domainsMode = null, + ?array $codeSlots = null, + ?string $codeSlotsMode = null, + ?array $codes = null, + ?string $codesMode = null, + ?array $requestDurationSlots = null, + ?string $requestDurationSlotsMode = null + ): HttpMetricsTimelineUrls200Response { + $request = $this->httpMetricsTimelineUrlsRequest( + $projectId, + $environmentId, + $from, + $to, + $limit, + $topHitsCount, + $methods, + $methodsMode, + $domains, + $domainsMode, + $codeSlots, + $codeSlotsMode, + $codes, + $codesMode, + $requestDurationSlots, + $requestDurationSlotsMode + ); + + try { + $response = $this->sendAuthenticatedRequest( + $request->getMethod(), + (string) $request->getUri(), + $request->getHeaders(), + $request->getBody() + ); + + return $this->handleResponseWithDataType( + '\Upsun\Model\HttpMetricsTimelineUrls200Response', + $request, + $response + ); + } catch (Exception $exception) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $exception->getCode(), + '/projects/{projectId}/environments/{environmentId}/observability/http/breakdown/urls' + ), + $request, + $response ?? null, + $exception + ); + } + } + + /** + * Create request for operation 'httpMetricsTimelineUrls' + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param int $from (required) + * @param int $to (required) + * @param int|null $limit (optional) + * @param int|null $topHitsCount (optional) + * @param string[]|null $methods (optional) + * @param string|null $methodsMode (optional) + * @param string[]|null $domains (optional) + * @param string|null $domainsMode (optional) + * @param string[]|null $codeSlots (optional) + * @param string|null $codeSlotsMode (optional) + * @param string[]|null $codes (optional) + * @param string|null $codesMode (optional) + * @param string[]|null $requestDurationSlots (optional) + * @param string|null $requestDurationSlotsMode (optional) + * + * @throws InvalidArgumentException + */ + private function httpMetricsTimelineUrlsRequest( + string $projectId, + string $environmentId, + int $from, + int $to, + ?int $limit = null, + ?int $topHitsCount = null, + ?array $methods = null, + ?string $methodsMode = null, + ?array $domains = null, + ?string $domainsMode = null, + ?array $codeSlots = null, + ?string $codeSlotsMode = null, + ?array $codes = null, + ?string $codesMode = null, + ?array $requestDurationSlots = null, + ?string $requestDurationSlotsMode = null + ): RequestInterface { + // verify the required parameter 'projectId' is set + if (empty($projectId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $projectId + when calling httpMetricsTimelineUrls' + ); + } + + if (!preg_match("/[a-z0-9]+/", $projectId)) { + throw new InvalidArgumentException( + "invalid value for \"projectId\" when calling HttpTrafficApi.httpMetricsTimelineUrls, + must conform to the pattern /[a-z0-9]+/." + ); + } + + // verify the required parameter 'environmentId' is set + if (empty($environmentId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $environmentId + when calling httpMetricsTimelineUrls' + ); + } + + if (!preg_match("/.+/", $environmentId)) { + throw new InvalidArgumentException( + "invalid value for \"environmentId\" when calling HttpTrafficApi.httpMetricsTimelineUrls, + must conform to the pattern /.+/." + ); + } + + // verify the required parameter 'from' is set + if (empty($from)) { + throw new InvalidArgumentException( + 'Missing the required parameter $from + when calling httpMetricsTimelineUrls' + ); + } + // verify the required parameter 'to' is set + if (empty($to)) { + throw new InvalidArgumentException( + 'Missing the required parameter $to + when calling httpMetricsTimelineUrls' + ); + } + + if ($limit !== null && $limit > 300) { + throw new InvalidArgumentException( + 'invalid value for "$limit" when calling HttpTrafficApi.httpMetricsTimelineUrls, + must be smaller than or equal to 300.' + ); + } + + if ($limit !== null && $limit < 1) { + throw new InvalidArgumentException( + 'invalid value for "$limit" when calling HttpTrafficApi.httpMetricsTimelineUrls, + must be bigger than or equal to 1.' + ); + } + + if ($topHitsCount !== null && $topHitsCount > 15) { + throw new InvalidArgumentException( + 'invalid value for "$topHitsCount" when calling HttpTrafficApi.httpMetricsTimelineUrls, + must be smaller than or equal to 15.' + ); + } + + if ($topHitsCount !== null && $topHitsCount < 1) { + throw new InvalidArgumentException( + 'invalid value for "$topHitsCount" when calling HttpTrafficApi.httpMetricsTimelineUrls, + must be bigger than or equal to 1.' + ); + } + + $resourcePath = '/projects/{projectId}/environments/{environmentId}/observability/http/breakdown/urls'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = null; + $multipart = false; + + // query params + if ($from !== null) { + if ('form' === 'form' && is_array($from)) { + foreach ($from as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['from'] = $from instanceof DateTime + ? $from->format(DATE_ATOM) + : ($from); + } + } + + // query params + if ($to !== null) { + if ('form' === 'form' && is_array($to)) { + foreach ($to as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['to'] = $to instanceof DateTime + ? $to->format(DATE_ATOM) + : ($to); + } + } + + // query params + if ($limit !== null) { + if ('form' === 'form' && is_array($limit)) { + foreach ($limit as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['limit'] = $limit instanceof DateTime + ? $limit->format(DATE_ATOM) + : ($limit); + } + } + + // query params + if ($topHitsCount !== null) { + if ('form' === 'form' && is_array($topHitsCount)) { + foreach ($topHitsCount as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['top_hits_count'] = $topHitsCount instanceof DateTime + ? $topHitsCount->format(DATE_ATOM) + : ($topHitsCount); + } + } + + // query params + if ($methods !== null) { + if ('form' === 'form' && is_array($methods)) { + foreach ($methods as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['methods[]'] = $methods instanceof DateTime + ? $methods->format(DATE_ATOM) + : ($methods); + } + } + + // query params + if ($methodsMode !== null) { + if ('form' === 'form' && is_array($methodsMode)) { + foreach ($methodsMode as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['methods_mode'] = $methodsMode instanceof DateTime + ? $methodsMode->format(DATE_ATOM) + : ($methodsMode); + } + } + + // query params + if ($domains !== null) { + if ('form' === 'form' && is_array($domains)) { + foreach ($domains as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['domains[]'] = $domains instanceof DateTime + ? $domains->format(DATE_ATOM) + : ($domains); + } + } + + // query params + if ($domainsMode !== null) { + if ('form' === 'form' && is_array($domainsMode)) { + foreach ($domainsMode as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['domains_mode'] = $domainsMode instanceof DateTime + ? $domainsMode->format(DATE_ATOM) + : ($domainsMode); + } + } + + // query params + if ($codeSlots !== null) { + if ('form' === 'form' && is_array($codeSlots)) { + foreach ($codeSlots as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['code_slots[]'] = $codeSlots instanceof DateTime + ? $codeSlots->format(DATE_ATOM) + : ($codeSlots); + } + } + + // query params + if ($codeSlotsMode !== null) { + if ('form' === 'form' && is_array($codeSlotsMode)) { + foreach ($codeSlotsMode as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['code_slots_mode'] = $codeSlotsMode instanceof DateTime + ? $codeSlotsMode->format(DATE_ATOM) + : ($codeSlotsMode); + } + } + + // query params + if ($codes !== null) { + if ('form' === 'form' && is_array($codes)) { + foreach ($codes as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['codes[]'] = $codes instanceof DateTime + ? $codes->format(DATE_ATOM) + : ($codes); + } + } + + // query params + if ($codesMode !== null) { + if ('form' === 'form' && is_array($codesMode)) { + foreach ($codesMode as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['codes_mode'] = $codesMode instanceof DateTime + ? $codesMode->format(DATE_ATOM) + : ($codesMode); + } + } + + // query params + if ($requestDurationSlots !== null) { + if ('form' === 'form' && is_array($requestDurationSlots)) { + foreach ($requestDurationSlots as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['request_duration_slots[]'] = $requestDurationSlots instanceof DateTime + ? $requestDurationSlots->format(DATE_ATOM) + : ($requestDurationSlots); + } + } + + // query params + if ($requestDurationSlotsMode !== null) { + if ('form' === 'form' && is_array($requestDurationSlotsMode)) { + foreach ($requestDurationSlotsMode as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['request_duration_slots_mode'] = $requestDurationSlotsMode instanceof DateTime + ? $requestDurationSlotsMode->format(DATE_ATOM) + : ($requestDurationSlotsMode); + } + } + + // path params + + if ($projectId !== null) { + $resourcePath = str_replace( + '{' . 'projectId' . '}', + ObjectSerializer::toPathValue($projectId), + $resourcePath + ); + } + // path params + + if ($environmentId !== null) { + $resourcePath = str_replace( + '{' . 'environmentId' . '}', + ObjectSerializer::toPathValue($environmentId), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + '', + $multipart + ); + + // for model (json/xml) + if ($formParams !== []) { + 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 ($this->headerSelector->isJsonMime($headers['Content-Type'])) { + $httpBody = json_encode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if ($this->config->getAccessToken() !== null) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + if ($this->config->getUpsunClientHeader()) { + $defaultHeaders['X-Upsun-Client'] = $this->config->getUpsunClientHeader(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + + $uri = $this->createUri($operationHost, $resourcePath, $queryParams); + + return $this->createRequest('GET', $uri, $headers, $httpBody); + } + + /** + * Get HTTP traffic timeline by user agent + * + * Returns HTTP traffic analytics grouped by User Agent with User Agents ranked by impact (response time × request + * count). Use limit parameter to control total items returned (default: 200, max: 300) and top_hits_count to + * control how many are tracked in timelines (default: 15, max: 15). Items have a top_hit boolean indicating whether + * they appear in timeline data. + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param int $from (required) + * @param int $to (required) + * @param int|null $limit (optional) + * @param int|null $topHitsCount (optional) + * @param string[]|null $methods (optional) + * @param string|null $methodsMode (optional) + * @param string[]|null $domains (optional) + * @param string|null $domainsMode (optional) + * @param string[]|null $codeSlots (optional) + * @param string|null $codeSlotsMode (optional) + * @param string[]|null $codes (optional) + * @param string|null $codesMode (optional) + * @param string[]|null $requestDurationSlots (optional) + * @param string|null $requestDurationSlotsMode (optional) + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + * @see https://docs.upsun.com/api/#tag/Http-Traffic/operation/http_metrics_timeline_user_agents + */ + public function httpMetricsTimelineUserAgents( + string $projectId, + string $environmentId, + int $from, + int $to, + ?int $limit = null, + ?int $topHitsCount = null, + ?array $methods = null, + ?string $methodsMode = null, + ?array $domains = null, + ?string $domainsMode = null, + ?array $codeSlots = null, + ?string $codeSlotsMode = null, + ?array $codes = null, + ?string $codesMode = null, + ?array $requestDurationSlots = null, + ?string $requestDurationSlotsMode = null + ): HttpMetricsTimelineUserAgents200Response { + return $this->httpMetricsTimelineUserAgentsWithHttpInfo( + $projectId, + $environmentId, + $from, + $to, + $limit, + $topHitsCount, + $methods, + $methodsMode, + $domains, + $domainsMode, + $codeSlots, + $codeSlotsMode, + $codes, + $codesMode, + $requestDurationSlots, + $requestDurationSlotsMode + ); + } + + /** + * Get HTTP traffic timeline by user agent with HTTP Info + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param int $from (required) + * @param int $to (required) + * @param int|null $limit (optional) + * @param int|null $topHitsCount (optional) + * @param string[]|null $methods (optional) + * @param string|null $methodsMode (optional) + * @param string[]|null $domains (optional) + * @param string|null $domainsMode (optional) + * @param string[]|null $codeSlots (optional) + * @param string|null $codeSlotsMode (optional) + * @param string[]|null $codes (optional) + * @param string|null $codesMode (optional) + * @param string[]|null $requestDurationSlots (optional) + * @param string|null $requestDurationSlotsMode (optional) + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + */ + private function httpMetricsTimelineUserAgentsWithHttpInfo( + string $projectId, + string $environmentId, + int $from, + int $to, + ?int $limit = null, + ?int $topHitsCount = null, + ?array $methods = null, + ?string $methodsMode = null, + ?array $domains = null, + ?string $domainsMode = null, + ?array $codeSlots = null, + ?string $codeSlotsMode = null, + ?array $codes = null, + ?string $codesMode = null, + ?array $requestDurationSlots = null, + ?string $requestDurationSlotsMode = null + ): HttpMetricsTimelineUserAgents200Response { + $request = $this->httpMetricsTimelineUserAgentsRequest( + $projectId, + $environmentId, + $from, + $to, + $limit, + $topHitsCount, + $methods, + $methodsMode, + $domains, + $domainsMode, + $codeSlots, + $codeSlotsMode, + $codes, + $codesMode, + $requestDurationSlots, + $requestDurationSlotsMode + ); + + try { + $response = $this->sendAuthenticatedRequest( + $request->getMethod(), + (string) $request->getUri(), + $request->getHeaders(), + $request->getBody() + ); + + return $this->handleResponseWithDataType( + '\Upsun\Model\HttpMetricsTimelineUserAgents200Response', + $request, + $response + ); + } catch (Exception $exception) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $exception->getCode(), + '/projects/{projectId}/environments/{environmentId}/observability/http/breakdown/user-agents' + ), + $request, + $response ?? null, + $exception + ); + } + } + + /** + * Create request for operation 'httpMetricsTimelineUserAgents' + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param int $from (required) + * @param int $to (required) + * @param int|null $limit (optional) + * @param int|null $topHitsCount (optional) + * @param string[]|null $methods (optional) + * @param string|null $methodsMode (optional) + * @param string[]|null $domains (optional) + * @param string|null $domainsMode (optional) + * @param string[]|null $codeSlots (optional) + * @param string|null $codeSlotsMode (optional) + * @param string[]|null $codes (optional) + * @param string|null $codesMode (optional) + * @param string[]|null $requestDurationSlots (optional) + * @param string|null $requestDurationSlotsMode (optional) + * + * @throws InvalidArgumentException + */ + private function httpMetricsTimelineUserAgentsRequest( + string $projectId, + string $environmentId, + int $from, + int $to, + ?int $limit = null, + ?int $topHitsCount = null, + ?array $methods = null, + ?string $methodsMode = null, + ?array $domains = null, + ?string $domainsMode = null, + ?array $codeSlots = null, + ?string $codeSlotsMode = null, + ?array $codes = null, + ?string $codesMode = null, + ?array $requestDurationSlots = null, + ?string $requestDurationSlotsMode = null + ): RequestInterface { + // verify the required parameter 'projectId' is set + if (empty($projectId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $projectId + when calling httpMetricsTimelineUserAgents' + ); + } + + if (!preg_match("/[a-z0-9]+/", $projectId)) { + throw new InvalidArgumentException( + "invalid value for \"projectId\" when calling HttpTrafficApi.httpMetricsTimelineUserAgents, + must conform to the pattern /[a-z0-9]+/." + ); + } + + // verify the required parameter 'environmentId' is set + if (empty($environmentId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $environmentId + when calling httpMetricsTimelineUserAgents' + ); + } + + if (!preg_match("/.+/", $environmentId)) { + throw new InvalidArgumentException( + "invalid value for \"environmentId\" when calling HttpTrafficApi.httpMetricsTimelineUserAgents, + must conform to the pattern /.+/." + ); + } + + // verify the required parameter 'from' is set + if (empty($from)) { + throw new InvalidArgumentException( + 'Missing the required parameter $from + when calling httpMetricsTimelineUserAgents' + ); + } + // verify the required parameter 'to' is set + if (empty($to)) { + throw new InvalidArgumentException( + 'Missing the required parameter $to + when calling httpMetricsTimelineUserAgents' + ); + } + + if ($limit !== null && $limit > 300) { + throw new InvalidArgumentException( + 'invalid value for "$limit" when calling HttpTrafficApi.httpMetricsTimelineUserAgents, + must be smaller than or equal to 300.' + ); + } + + if ($limit !== null && $limit < 1) { + throw new InvalidArgumentException( + 'invalid value for "$limit" when calling HttpTrafficApi.httpMetricsTimelineUserAgents, + must be bigger than or equal to 1.' + ); + } + + if ($topHitsCount !== null && $topHitsCount > 15) { + throw new InvalidArgumentException( + 'invalid value for "$topHitsCount" when calling HttpTrafficApi.httpMetricsTimelineUserAgents, + must be smaller than or equal to 15.' + ); + } + + if ($topHitsCount !== null && $topHitsCount < 1) { + throw new InvalidArgumentException( + 'invalid value for "$topHitsCount" when calling HttpTrafficApi.httpMetricsTimelineUserAgents, + must be bigger than or equal to 1.' + ); + } + + $resourcePath = '/projects/{projectId}/environments/{environmentId}/observability/http/breakdown/user-agents'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = null; + $multipart = false; + + // query params + if ($from !== null) { + if ('form' === 'form' && is_array($from)) { + foreach ($from as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['from'] = $from instanceof DateTime + ? $from->format(DATE_ATOM) + : ($from); + } + } + + // query params + if ($to !== null) { + if ('form' === 'form' && is_array($to)) { + foreach ($to as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['to'] = $to instanceof DateTime + ? $to->format(DATE_ATOM) + : ($to); + } + } + + // query params + if ($limit !== null) { + if ('form' === 'form' && is_array($limit)) { + foreach ($limit as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['limit'] = $limit instanceof DateTime + ? $limit->format(DATE_ATOM) + : ($limit); + } + } + + // query params + if ($topHitsCount !== null) { + if ('form' === 'form' && is_array($topHitsCount)) { + foreach ($topHitsCount as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['top_hits_count'] = $topHitsCount instanceof DateTime + ? $topHitsCount->format(DATE_ATOM) + : ($topHitsCount); + } + } + + // query params + if ($methods !== null) { + if ('form' === 'form' && is_array($methods)) { + foreach ($methods as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['methods[]'] = $methods instanceof DateTime + ? $methods->format(DATE_ATOM) + : ($methods); + } + } + + // query params + if ($methodsMode !== null) { + if ('form' === 'form' && is_array($methodsMode)) { + foreach ($methodsMode as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['methods_mode'] = $methodsMode instanceof DateTime + ? $methodsMode->format(DATE_ATOM) + : ($methodsMode); + } + } + + // query params + if ($domains !== null) { + if ('form' === 'form' && is_array($domains)) { + foreach ($domains as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['domains[]'] = $domains instanceof DateTime + ? $domains->format(DATE_ATOM) + : ($domains); + } + } + + // query params + if ($domainsMode !== null) { + if ('form' === 'form' && is_array($domainsMode)) { + foreach ($domainsMode as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['domains_mode'] = $domainsMode instanceof DateTime + ? $domainsMode->format(DATE_ATOM) + : ($domainsMode); + } + } + + // query params + if ($codeSlots !== null) { + if ('form' === 'form' && is_array($codeSlots)) { + foreach ($codeSlots as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['code_slots[]'] = $codeSlots instanceof DateTime + ? $codeSlots->format(DATE_ATOM) + : ($codeSlots); + } + } + + // query params + if ($codeSlotsMode !== null) { + if ('form' === 'form' && is_array($codeSlotsMode)) { + foreach ($codeSlotsMode as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['code_slots_mode'] = $codeSlotsMode instanceof DateTime + ? $codeSlotsMode->format(DATE_ATOM) + : ($codeSlotsMode); + } + } + + // query params + if ($codes !== null) { + if ('form' === 'form' && is_array($codes)) { + foreach ($codes as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['codes[]'] = $codes instanceof DateTime + ? $codes->format(DATE_ATOM) + : ($codes); + } + } + + // query params + if ($codesMode !== null) { + if ('form' === 'form' && is_array($codesMode)) { + foreach ($codesMode as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['codes_mode'] = $codesMode instanceof DateTime + ? $codesMode->format(DATE_ATOM) + : ($codesMode); + } + } + + // query params + if ($requestDurationSlots !== null) { + if ('form' === 'form' && is_array($requestDurationSlots)) { + foreach ($requestDurationSlots as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['request_duration_slots[]'] = $requestDurationSlots instanceof DateTime + ? $requestDurationSlots->format(DATE_ATOM) + : ($requestDurationSlots); + } + } + + // query params + if ($requestDurationSlotsMode !== null) { + if ('form' === 'form' && is_array($requestDurationSlotsMode)) { + foreach ($requestDurationSlotsMode as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['request_duration_slots_mode'] = $requestDurationSlotsMode instanceof DateTime + ? $requestDurationSlotsMode->format(DATE_ATOM) + : ($requestDurationSlotsMode); + } + } + + // path params + + if ($projectId !== null) { + $resourcePath = str_replace( + '{' . 'projectId' . '}', + ObjectSerializer::toPathValue($projectId), + $resourcePath + ); + } + // path params + + if ($environmentId !== null) { + $resourcePath = str_replace( + '{' . 'environmentId' . '}', + ObjectSerializer::toPathValue($environmentId), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + '', + $multipart + ); + + // for model (json/xml) + if ($formParams !== []) { + 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 ($this->headerSelector->isJsonMime($headers['Content-Type'])) { + $httpBody = json_encode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if ($this->config->getAccessToken() !== null) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + if ($this->config->getUpsunClientHeader()) { + $defaultHeaders['X-Upsun-Client'] = $this->config->getUpsunClientHeader(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + + $uri = $this->createUri($operationHost, $resourcePath, $queryParams); + + return $this->createRequest('GET', $uri, $headers, $httpBody); + } +} diff --git a/src/Api/OrganizationProjectsApi.php b/src/Api/OrganizationProjectsApi.php index 5408f9ff..16e2f2fa 100644 --- a/src/Api/OrganizationProjectsApi.php +++ b/src/Api/OrganizationProjectsApi.php @@ -596,8 +596,10 @@ private function getOrgProjectRequest( * @param string $organizationId * The ID of the organization. (required) * @param \Upsun\Model\StringFilter|null $filterId (optional) - * @param \Upsun\Model\StringFilter|null $filterTitle (optional) - * @param \Upsun\Model\StringFilter|null $filterStatus (optional) + * @param \Upsun\Model\StringFilter|null $filterTitle + * Allows filtering by project `title` using one or more operators. (optional) + * @param \Upsun\Model\StringFilter|null $filterStatus + * Allows filtering by project `status` using one or more operators. (optional) * @param \Upsun\Model\DateTimeFilter|null $filterUpdatedAt * Allows filtering by `updated_at` using one or more operators. (optional) * @param \Upsun\Model\DateTimeFilter|null $filterCreatedAt @@ -648,8 +650,10 @@ public function listOrgProjects( * @param string $organizationId * The ID of the organization. (required) * @param \Upsun\Model\StringFilter|null $filterId (optional) - * @param \Upsun\Model\StringFilter|null $filterTitle (optional) - * @param \Upsun\Model\StringFilter|null $filterStatus (optional) + * @param \Upsun\Model\StringFilter|null $filterTitle + * Allows filtering by project `title` using one or more operators. (optional) + * @param \Upsun\Model\StringFilter|null $filterStatus + * Allows filtering by project `status` using one or more operators. (optional) * @param \Upsun\Model\DateTimeFilter|null $filterUpdatedAt * Allows filtering by `updated_at` using one or more operators. (optional) * @param \Upsun\Model\DateTimeFilter|null $filterCreatedAt @@ -725,8 +729,10 @@ private function listOrgProjectsWithHttpInfo( * @param string $organizationId * The ID of the organization. (required) * @param \Upsun\Model\StringFilter|null $filterId (optional) - * @param \Upsun\Model\StringFilter|null $filterTitle (optional) - * @param \Upsun\Model\StringFilter|null $filterStatus (optional) + * @param \Upsun\Model\StringFilter|null $filterTitle + * Allows filtering by project `title` using one or more operators. (optional) + * @param \Upsun\Model\StringFilter|null $filterStatus + * Allows filtering by project `status` using one or more operators. (optional) * @param \Upsun\Model\DateTimeFilter|null $filterUpdatedAt * Allows filtering by `updated_at` using one or more operators. (optional) * @param \Upsun\Model\DateTimeFilter|null $filterCreatedAt diff --git a/src/Api/OrganizationsApi.php b/src/Api/OrganizationsApi.php index ae5e2ecb..dcc8e1b2 100644 --- a/src/Api/OrganizationsApi.php +++ b/src/Api/OrganizationsApi.php @@ -520,6 +520,7 @@ private function getOrgRequest( * @param \Upsun\Model\StringFilter|null $filterOwnerId (optional) * @param \Upsun\Model\StringFilter|null $filterName (optional) * @param \Upsun\Model\StringFilter|null $filterLabel (optional) + * @param \Upsun\Model\StringFilter|null $filterBillingProfileId (optional) * @param \Upsun\Model\StringFilter|null $filterVendor (optional) * @param \Upsun\Model\ArrayFilter|null $filterCapabilities (optional) * @param \Upsun\Model\StringFilter|null $filterStatus (optional) @@ -539,6 +540,7 @@ public function listOrgs( ?StringFilter $filterOwnerId = null, ?StringFilter $filterName = null, ?StringFilter $filterLabel = null, + ?StringFilter $filterBillingProfileId = null, ?StringFilter $filterVendor = null, ?ArrayFilter $filterCapabilities = null, ?StringFilter $filterStatus = null, @@ -554,6 +556,7 @@ public function listOrgs( $filterOwnerId, $filterName, $filterLabel, + $filterBillingProfileId, $filterVendor, $filterCapabilities, $filterStatus, @@ -573,6 +576,7 @@ public function listOrgs( * @param \Upsun\Model\StringFilter|null $filterOwnerId (optional) * @param \Upsun\Model\StringFilter|null $filterName (optional) * @param \Upsun\Model\StringFilter|null $filterLabel (optional) + * @param \Upsun\Model\StringFilter|null $filterBillingProfileId (optional) * @param \Upsun\Model\StringFilter|null $filterVendor (optional) * @param \Upsun\Model\ArrayFilter|null $filterCapabilities (optional) * @param \Upsun\Model\StringFilter|null $filterStatus (optional) @@ -591,6 +595,7 @@ private function listOrgsWithHttpInfo( ?StringFilter $filterOwnerId = null, ?StringFilter $filterName = null, ?StringFilter $filterLabel = null, + ?StringFilter $filterBillingProfileId = null, ?StringFilter $filterVendor = null, ?ArrayFilter $filterCapabilities = null, ?StringFilter $filterStatus = null, @@ -606,6 +611,7 @@ private function listOrgsWithHttpInfo( $filterOwnerId, $filterName, $filterLabel, + $filterBillingProfileId, $filterVendor, $filterCapabilities, $filterStatus, @@ -651,6 +657,7 @@ private function listOrgsWithHttpInfo( * @param \Upsun\Model\StringFilter|null $filterOwnerId (optional) * @param \Upsun\Model\StringFilter|null $filterName (optional) * @param \Upsun\Model\StringFilter|null $filterLabel (optional) + * @param \Upsun\Model\StringFilter|null $filterBillingProfileId (optional) * @param \Upsun\Model\StringFilter|null $filterVendor (optional) * @param \Upsun\Model\ArrayFilter|null $filterCapabilities (optional) * @param \Upsun\Model\StringFilter|null $filterStatus (optional) @@ -668,6 +675,7 @@ private function listOrgsRequest( ?StringFilter $filterOwnerId = null, ?StringFilter $filterName = null, ?StringFilter $filterLabel = null, + ?StringFilter $filterBillingProfileId = null, ?StringFilter $filterVendor = null, ?ArrayFilter $filterCapabilities = null, ?StringFilter $filterStatus = null, @@ -763,6 +771,19 @@ private function listOrgsRequest( } } + // query params + if ($filterBillingProfileId !== null) { + if ('form' === 'deepObject' && is_array($filterBillingProfileId)) { + foreach ($filterBillingProfileId as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['filter[billing_profile_id]'] = $filterBillingProfileId instanceof DateTime + ? $filterBillingProfileId->format(DATE_ATOM) + : ($filterBillingProfileId->getEq()); + } + } + // query params if ($filterVendor !== null) { if ('form' === 'deepObject' && is_array($filterVendor)) { diff --git a/src/Api/ProjectApi.php b/src/Api/ProjectApi.php index 8667df9b..552d1ab8 100644 --- a/src/Api/ProjectApi.php +++ b/src/Api/ProjectApi.php @@ -501,6 +501,151 @@ private function getProjectsCapabilitiesRequest( return $this->createRequest('GET', $uri, $headers, $httpBody); } + /** + * + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + * @see https://docs.upsun.com/api/#tag/Project/operation/maintenance-redeploy-project + */ + public function maintenanceRedeployProject( + string $projectId + ): AcceptedResponse { + return $this->maintenanceRedeployProjectWithHttpInfo( + $projectId + ); + } + + /** + * + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + */ + private function maintenanceRedeployProjectWithHttpInfo( + string $projectId + ): AcceptedResponse { + $request = $this->maintenanceRedeployProjectRequest( + $projectId + ); + + try { + $response = $this->sendAuthenticatedRequest( + $request->getMethod(), + (string) $request->getUri(), + $request->getHeaders(), + $request->getBody() + ); + + return $this->handleResponseWithDataType( + '\Upsun\Model\AcceptedResponse', + $request, + $response + ); + } catch (Exception $exception) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $exception->getCode(), + '/projects/{projectId}/maintenance-redeploy' + ), + $request, + $response ?? null, + $exception + ); + } + } + + /** + * Create request for operation 'maintenanceRedeployProject' + * + * + * @throws InvalidArgumentException + */ + private function maintenanceRedeployProjectRequest( + string $projectId + ): RequestInterface { + // verify the required parameter 'projectId' is set + if (empty($projectId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $projectId + when calling maintenanceRedeployProject' + ); + } + + $resourcePath = '/projects/{projectId}/maintenance-redeploy'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = null; + $multipart = false; + + // path params + + if ($projectId !== null) { + $resourcePath = str_replace( + '{' . 'projectId' . '}', + ObjectSerializer::toPathValue($projectId), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + '', + $multipart + ); + + // for model (json/xml) + if ($formParams !== []) { + 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 ($this->headerSelector->isJsonMime($headers['Content-Type'])) { + $httpBody = json_encode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if ($this->config->getAccessToken() !== null) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + if ($this->config->getUpsunClientHeader()) { + $defaultHeaders['X-Upsun-Client'] = $this->config->getUpsunClientHeader(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + + $uri = $this->createUri($operationHost, $resourcePath, $queryParams); + + return $this->createRequest('POST', $uri, $headers, $httpBody); + } + /** * Update a project * diff --git a/src/Api/ResourcesApi.php b/src/Api/ResourcesApi.php new file mode 100644 index 00000000..414cff48 --- /dev/null +++ b/src/Api/ResourcesApi.php @@ -0,0 +1,1019 @@ +config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + + $this->headerSelector = $selector ?? new ApiHeaderSelector(); + } + + /** + * Get resource metrics by service + * + * Returns time-series resource data for one service. Each timestamp contains per-instance metrics. Filter results + * using aggs[] (min, max, avg, stddev, p50, p95-p99) and types[] (cpu, memory, swap, disk, inodes, pressure + * metrics). Response grouped by timestamp then instance ID (e.g., "app.0"). All aggregations nullable when + * insufficient data exists. + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param string $service (required) + * @param int $from (required) + * @param int $to (required) + * @param string[]|null $aggs (optional) + * @param string[]|null $types (optional) + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + * @see https://docs.upsun.com/api/#tag/Resources/operation/resources_by_service + */ + public function resourcesByService( + string $projectId, + string $environmentId, + string $service, + int $from, + int $to, + ?array $aggs = null, + ?array $types = null + ): ResourcesByService200Response { + return $this->resourcesByServiceWithHttpInfo( + $projectId, + $environmentId, + $service, + $from, + $to, + $aggs, + $types + ); + } + + /** + * Get resource metrics by service with HTTP Info + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param string $service (required) + * @param int $from (required) + * @param int $to (required) + * @param string[]|null $aggs (optional) + * @param string[]|null $types (optional) + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + */ + private function resourcesByServiceWithHttpInfo( + string $projectId, + string $environmentId, + string $service, + int $from, + int $to, + ?array $aggs = null, + ?array $types = null + ): ResourcesByService200Response { + $request = $this->resourcesByServiceRequest( + $projectId, + $environmentId, + $service, + $from, + $to, + $aggs, + $types + ); + + try { + $response = $this->sendAuthenticatedRequest( + $request->getMethod(), + (string) $request->getUri(), + $request->getHeaders(), + $request->getBody() + ); + + return $this->handleResponseWithDataType( + '\Upsun\Model\ResourcesByService200Response', + $request, + $response + ); + } catch (Exception $exception) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $exception->getCode(), + '/projects/{projectId}/environments/{environmentId}/observability/resources/service/{service}' + ), + $request, + $response ?? null, + $exception + ); + } + } + + /** + * Create request for operation 'resourcesByService' + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param string $service (required) + * @param int $from (required) + * @param int $to (required) + * @param string[]|null $aggs (optional) + * @param string[]|null $types (optional) + * + * @throws InvalidArgumentException + */ + private function resourcesByServiceRequest( + string $projectId, + string $environmentId, + string $service, + int $from, + int $to, + ?array $aggs = null, + ?array $types = null + ): RequestInterface { + // verify the required parameter 'projectId' is set + if (empty($projectId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $projectId + when calling resourcesByService' + ); + } + + if (!preg_match("/[a-z0-9]+/", $projectId)) { + throw new InvalidArgumentException( + "invalid value for \"projectId\" when calling ResourcesApi.resourcesByService, + must conform to the pattern /[a-z0-9]+/." + ); + } + + // verify the required parameter 'environmentId' is set + if (empty($environmentId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $environmentId + when calling resourcesByService' + ); + } + + if (!preg_match("/.+/", $environmentId)) { + throw new InvalidArgumentException( + "invalid value for \"environmentId\" when calling ResourcesApi.resourcesByService, + must conform to the pattern /.+/." + ); + } + + // verify the required parameter 'service' is set + if (empty($service)) { + throw new InvalidArgumentException( + 'Missing the required parameter $service + when calling resourcesByService' + ); + } + // verify the required parameter 'from' is set + if (empty($from)) { + throw new InvalidArgumentException( + 'Missing the required parameter $from + when calling resourcesByService' + ); + } + // verify the required parameter 'to' is set + if (empty($to)) { + throw new InvalidArgumentException( + 'Missing the required parameter $to + when calling resourcesByService' + ); + } + + $resourcePath = '/projects/{projectId}/environments/{environmentId}/observability/resources/service/{service}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = null; + $multipart = false; + + // query params + if ($from !== null) { + if ('form' === 'form' && is_array($from)) { + foreach ($from as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['from'] = $from instanceof DateTime + ? $from->format(DATE_ATOM) + : ($from); + } + } + + // query params + if ($to !== null) { + if ('form' === 'form' && is_array($to)) { + foreach ($to as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['to'] = $to instanceof DateTime + ? $to->format(DATE_ATOM) + : ($to); + } + } + + // query params + if ($aggs !== null) { + if ('form' === 'form' && is_array($aggs)) { + foreach ($aggs as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['aggs[]'] = $aggs instanceof DateTime + ? $aggs->format(DATE_ATOM) + : ($aggs); + } + } + + // query params + if ($types !== null) { + if ('form' === 'form' && is_array($types)) { + foreach ($types as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['types[]'] = $types instanceof DateTime + ? $types->format(DATE_ATOM) + : ($types); + } + } + + // path params + + if ($projectId !== null) { + $resourcePath = str_replace( + '{' . 'projectId' . '}', + ObjectSerializer::toPathValue($projectId), + $resourcePath + ); + } + // path params + + if ($environmentId !== null) { + $resourcePath = str_replace( + '{' . 'environmentId' . '}', + ObjectSerializer::toPathValue($environmentId), + $resourcePath + ); + } + // path params + + if ($service !== null) { + $resourcePath = str_replace( + '{' . 'service' . '}', + ObjectSerializer::toPathValue($service), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + '', + $multipart + ); + + // for model (json/xml) + if ($formParams !== []) { + 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 ($this->headerSelector->isJsonMime($headers['Content-Type'])) { + $httpBody = json_encode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if ($this->config->getAccessToken() !== null) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + if ($this->config->getUpsunClientHeader()) { + $defaultHeaders['X-Upsun-Client'] = $this->config->getUpsunClientHeader(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + + $uri = $this->createUri($operationHost, $resourcePath, $queryParams); + + return $this->createRequest('GET', $uri, $headers, $httpBody); + } + + /** + * Get resource metrics overview + * + * Returns time-series resource utilization data for all services. Each timestamp includes per-service metrics: CPU + * (cores), memory (bytes), swap (bytes), pressure indicators (0.0-1.0), and per-mountpoint disk/inode usage. All + * metrics include statistical aggregations: min, max, avg, stddev, and percentiles (p50, p95-p99). Service names + * and mountpoint paths are dynamic. Aggregation values are nullable when insufficient data exists. + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param int $from (required) + * @param int $to (required) + * @param string|null $service (optional) + * @param string[]|null $services (optional) + * @param string|null $servicesMode (optional) + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + * @see https://docs.upsun.com/api/#tag/Resources/operation/resources_overview + */ + public function resourcesOverview( + string $projectId, + string $environmentId, + int $from, + int $to, + ?string $service = null, + ?array $services = null, + ?string $servicesMode = null + ): ResourcesOverview200Response { + return $this->resourcesOverviewWithHttpInfo( + $projectId, + $environmentId, + $from, + $to, + $service, + $services, + $servicesMode + ); + } + + /** + * Get resource metrics overview with HTTP Info + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param int $from (required) + * @param int $to (required) + * @param string|null $service (optional) + * @param string[]|null $services (optional) + * @param string|null $servicesMode (optional) + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + */ + private function resourcesOverviewWithHttpInfo( + string $projectId, + string $environmentId, + int $from, + int $to, + ?string $service = null, + ?array $services = null, + ?string $servicesMode = null + ): ResourcesOverview200Response { + $request = $this->resourcesOverviewRequest( + $projectId, + $environmentId, + $from, + $to, + $service, + $services, + $servicesMode + ); + + try { + $response = $this->sendAuthenticatedRequest( + $request->getMethod(), + (string) $request->getUri(), + $request->getHeaders(), + $request->getBody() + ); + + return $this->handleResponseWithDataType( + '\Upsun\Model\ResourcesOverview200Response', + $request, + $response + ); + } catch (Exception $exception) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $exception->getCode(), + '/projects/{projectId}/environments/{environmentId}/observability/resources/overview' + ), + $request, + $response ?? null, + $exception + ); + } + } + + /** + * Create request for operation 'resourcesOverview' + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param int $from (required) + * @param int $to (required) + * @param string|null $service (optional) + * @param string[]|null $services (optional) + * @param string|null $servicesMode (optional) + * + * @throws InvalidArgumentException + */ + private function resourcesOverviewRequest( + string $projectId, + string $environmentId, + int $from, + int $to, + ?string $service = null, + ?array $services = null, + ?string $servicesMode = null + ): RequestInterface { + // verify the required parameter 'projectId' is set + if (empty($projectId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $projectId + when calling resourcesOverview' + ); + } + + if (!preg_match("/[a-z0-9]+/", $projectId)) { + throw new InvalidArgumentException( + "invalid value for \"projectId\" when calling ResourcesApi.resourcesOverview, + must conform to the pattern /[a-z0-9]+/." + ); + } + + // verify the required parameter 'environmentId' is set + if (empty($environmentId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $environmentId + when calling resourcesOverview' + ); + } + + if (!preg_match("/.+/", $environmentId)) { + throw new InvalidArgumentException( + "invalid value for \"environmentId\" when calling ResourcesApi.resourcesOverview, + must conform to the pattern /.+/." + ); + } + + // verify the required parameter 'from' is set + if (empty($from)) { + throw new InvalidArgumentException( + 'Missing the required parameter $from + when calling resourcesOverview' + ); + } + // verify the required parameter 'to' is set + if (empty($to)) { + throw new InvalidArgumentException( + 'Missing the required parameter $to + when calling resourcesOverview' + ); + } + + $resourcePath = '/projects/{projectId}/environments/{environmentId}/observability/resources/overview'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = null; + $multipart = false; + + // query params + if ($from !== null) { + if ('form' === 'form' && is_array($from)) { + foreach ($from as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['from'] = $from instanceof DateTime + ? $from->format(DATE_ATOM) + : ($from); + } + } + + // query params + if ($to !== null) { + if ('form' === 'form' && is_array($to)) { + foreach ($to as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['to'] = $to instanceof DateTime + ? $to->format(DATE_ATOM) + : ($to); + } + } + + // query params + if ($service !== null) { + if ('form' === 'form' && is_array($service)) { + foreach ($service as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['service'] = $service instanceof DateTime + ? $service->format(DATE_ATOM) + : ($service); + } + } + + // query params + if ($services !== null) { + if ('form' === 'form' && is_array($services)) { + foreach ($services as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['services[]'] = $services instanceof DateTime + ? $services->format(DATE_ATOM) + : ($services); + } + } + + // query params + if ($servicesMode !== null) { + if ('form' === 'form' && is_array($servicesMode)) { + foreach ($servicesMode as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['services_mode'] = $servicesMode instanceof DateTime + ? $servicesMode->format(DATE_ATOM) + : ($servicesMode); + } + } + + // path params + + if ($projectId !== null) { + $resourcePath = str_replace( + '{' . 'projectId' . '}', + ObjectSerializer::toPathValue($projectId), + $resourcePath + ); + } + // path params + + if ($environmentId !== null) { + $resourcePath = str_replace( + '{' . 'environmentId' . '}', + ObjectSerializer::toPathValue($environmentId), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + '', + $multipart + ); + + // for model (json/xml) + if ($formParams !== []) { + 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 ($this->headerSelector->isJsonMime($headers['Content-Type'])) { + $httpBody = json_encode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if ($this->config->getAccessToken() !== null) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + if ($this->config->getUpsunClientHeader()) { + $defaultHeaders['X-Upsun-Client'] = $this->config->getUpsunClientHeader(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + + $uri = $this->createUri($operationHost, $resourcePath, $queryParams); + + return $this->createRequest('GET', $uri, $headers, $httpBody); + } + + /** + * Get resource metrics summary + * + * Returns per-instance resource statistics aggregated over the time range. Filter results using aggs[] (min, max, + * avg, stddev, p50, p95-p99) and types[] (cpu, memory, swap, disk, inodes, pressure metrics). Response grouped by + * service name then instance ID (e.g., "app.0", "database.1"). All aggregations nullable when insufficient data + * exists. + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param int $from (required) + * @param int $to (required) + * @param string[]|null $aggs (optional) + * @param string[]|null $types (optional) + * @param string[]|null $services (optional) + * @param string|null $servicesMode (optional) + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + * @see https://docs.upsun.com/api/#tag/Resources/operation/resources_summary + */ + public function resourcesSummary( + string $projectId, + string $environmentId, + int $from, + int $to, + ?array $aggs = null, + ?array $types = null, + ?array $services = null, + ?string $servicesMode = null + ): ResourcesSummary200Response { + return $this->resourcesSummaryWithHttpInfo( + $projectId, + $environmentId, + $from, + $to, + $aggs, + $types, + $services, + $servicesMode + ); + } + + /** + * Get resource metrics summary with HTTP Info + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param int $from (required) + * @param int $to (required) + * @param string[]|null $aggs (optional) + * @param string[]|null $types (optional) + * @param string[]|null $services (optional) + * @param string|null $servicesMode (optional) + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + */ + private function resourcesSummaryWithHttpInfo( + string $projectId, + string $environmentId, + int $from, + int $to, + ?array $aggs = null, + ?array $types = null, + ?array $services = null, + ?string $servicesMode = null + ): ResourcesSummary200Response { + $request = $this->resourcesSummaryRequest( + $projectId, + $environmentId, + $from, + $to, + $aggs, + $types, + $services, + $servicesMode + ); + + try { + $response = $this->sendAuthenticatedRequest( + $request->getMethod(), + (string) $request->getUri(), + $request->getHeaders(), + $request->getBody() + ); + + return $this->handleResponseWithDataType( + '\Upsun\Model\ResourcesSummary200Response', + $request, + $response + ); + } catch (Exception $exception) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $exception->getCode(), + '/projects/{projectId}/environments/{environmentId}/observability/resources/summary' + ), + $request, + $response ?? null, + $exception + ); + } + } + + /** + * Create request for operation 'resourcesSummary' + * + * @param string $projectId (required) + * @param string $environmentId (required) + * @param int $from (required) + * @param int $to (required) + * @param string[]|null $aggs (optional) + * @param string[]|null $types (optional) + * @param string[]|null $services (optional) + * @param string|null $servicesMode (optional) + * + * @throws InvalidArgumentException + */ + private function resourcesSummaryRequest( + string $projectId, + string $environmentId, + int $from, + int $to, + ?array $aggs = null, + ?array $types = null, + ?array $services = null, + ?string $servicesMode = null + ): RequestInterface { + // verify the required parameter 'projectId' is set + if (empty($projectId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $projectId + when calling resourcesSummary' + ); + } + + if (!preg_match("/[a-z0-9]+/", $projectId)) { + throw new InvalidArgumentException( + "invalid value for \"projectId\" when calling ResourcesApi.resourcesSummary, + must conform to the pattern /[a-z0-9]+/." + ); + } + + // verify the required parameter 'environmentId' is set + if (empty($environmentId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $environmentId + when calling resourcesSummary' + ); + } + + if (!preg_match("/.+/", $environmentId)) { + throw new InvalidArgumentException( + "invalid value for \"environmentId\" when calling ResourcesApi.resourcesSummary, + must conform to the pattern /.+/." + ); + } + + // verify the required parameter 'from' is set + if (empty($from)) { + throw new InvalidArgumentException( + 'Missing the required parameter $from + when calling resourcesSummary' + ); + } + // verify the required parameter 'to' is set + if (empty($to)) { + throw new InvalidArgumentException( + 'Missing the required parameter $to + when calling resourcesSummary' + ); + } + + $resourcePath = '/projects/{projectId}/environments/{environmentId}/observability/resources/summary'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = null; + $multipart = false; + + // query params + if ($from !== null) { + if ('form' === 'form' && is_array($from)) { + foreach ($from as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['from'] = $from instanceof DateTime + ? $from->format(DATE_ATOM) + : ($from); + } + } + + // query params + if ($to !== null) { + if ('form' === 'form' && is_array($to)) { + foreach ($to as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['to'] = $to instanceof DateTime + ? $to->format(DATE_ATOM) + : ($to); + } + } + + // query params + if ($aggs !== null) { + if ('form' === 'form' && is_array($aggs)) { + foreach ($aggs as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['aggs[]'] = $aggs instanceof DateTime + ? $aggs->format(DATE_ATOM) + : ($aggs); + } + } + + // query params + if ($types !== null) { + if ('form' === 'form' && is_array($types)) { + foreach ($types as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['types[]'] = $types instanceof DateTime + ? $types->format(DATE_ATOM) + : ($types); + } + } + + // query params + if ($services !== null) { + if ('form' === 'form' && is_array($services)) { + foreach ($services as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['services[]'] = $services instanceof DateTime + ? $services->format(DATE_ATOM) + : ($services); + } + } + + // query params + if ($servicesMode !== null) { + if ('form' === 'form' && is_array($servicesMode)) { + foreach ($servicesMode as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['services_mode'] = $servicesMode instanceof DateTime + ? $servicesMode->format(DATE_ATOM) + : ($servicesMode); + } + } + + // path params + + if ($projectId !== null) { + $resourcePath = str_replace( + '{' . 'projectId' . '}', + ObjectSerializer::toPathValue($projectId), + $resourcePath + ); + } + // path params + + if ($environmentId !== null) { + $resourcePath = str_replace( + '{' . 'environmentId' . '}', + ObjectSerializer::toPathValue($environmentId), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + '', + $multipart + ); + + // for model (json/xml) + if ($formParams !== []) { + 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 ($this->headerSelector->isJsonMime($headers['Content-Type'])) { + $httpBody = json_encode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if ($this->config->getAccessToken() !== null) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + if ($this->config->getUpsunClientHeader()) { + $defaultHeaders['X-Upsun-Client'] = $this->config->getUpsunClientHeader(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + + $uri = $this->createUri($operationHost, $resourcePath, $queryParams); + + return $this->createRequest('GET', $uri, $headers, $httpBody); + } +} diff --git a/src/Api/SbomApi.php b/src/Api/SbomApi.php new file mode 100644 index 00000000..4b676e12 --- /dev/null +++ b/src/Api/SbomApi.php @@ -0,0 +1,449 @@ +config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + + $this->headerSelector = $selector ?? new ApiHeaderSelector(); + } + + /** + * + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + * @see https://docs.upsun.com/api/#tag/Sbom/operation/get-projects-environments-deployments-sboms + */ + public function getProjectsEnvironmentsDeploymentsSboms( + string $projectId, + string $environmentId, + string $deploymentId, + string $sbomServiceId + ): Sbom { + return $this->getProjectsEnvironmentsDeploymentsSbomsWithHttpInfo( + $projectId, + $environmentId, + $deploymentId, + $sbomServiceId + ); + } + + /** + * + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + */ + private function getProjectsEnvironmentsDeploymentsSbomsWithHttpInfo( + string $projectId, + string $environmentId, + string $deploymentId, + string $sbomServiceId + ): Sbom { + $request = $this->getProjectsEnvironmentsDeploymentsSbomsRequest( + $projectId, + $environmentId, + $deploymentId, + $sbomServiceId + ); + + try { + $response = $this->sendAuthenticatedRequest( + $request->getMethod(), + (string) $request->getUri(), + $request->getHeaders(), + $request->getBody() + ); + + return $this->handleResponseWithDataType( + 'object', + $request, + $response + ); + } catch (Exception $exception) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $exception->getCode(), + '/projects/{projectId}/environments/{environmentId}/deployments/{deploymentId}/sboms/{sbomServiceId}' + ), + $request, + $response ?? null, + $exception + ); + } + } + + /** + * Create request for operation 'getProjectsEnvironmentsDeploymentsSboms' + * + * + * @throws InvalidArgumentException + */ + private function getProjectsEnvironmentsDeploymentsSbomsRequest( + string $projectId, + string $environmentId, + string $deploymentId, + string $sbomServiceId + ): RequestInterface { + // verify the required parameter 'projectId' is set + if (empty($projectId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $projectId + when calling getProjectsEnvironmentsDeploymentsSboms' + ); + } + // verify the required parameter 'environmentId' is set + if (empty($environmentId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $environmentId + when calling getProjectsEnvironmentsDeploymentsSboms' + ); + } + // verify the required parameter 'deploymentId' is set + if (empty($deploymentId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $deploymentId + when calling getProjectsEnvironmentsDeploymentsSboms' + ); + } + // verify the required parameter 'sbomServiceId' is set + if (empty($sbomServiceId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $sbomServiceId + when calling getProjectsEnvironmentsDeploymentsSboms' + ); + } + + $resourcePath = '/projects/{projectId}/environments/{environmentId}/deployments/{deploymentId}/sboms/{sbomServiceId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = null; + $multipart = false; + + // path params + + if ($projectId !== null) { + $resourcePath = str_replace( + '{' . 'projectId' . '}', + ObjectSerializer::toPathValue($projectId), + $resourcePath + ); + } + // path params + + if ($environmentId !== null) { + $resourcePath = str_replace( + '{' . 'environmentId' . '}', + ObjectSerializer::toPathValue($environmentId), + $resourcePath + ); + } + // path params + + if ($deploymentId !== null) { + $resourcePath = str_replace( + '{' . 'deploymentId' . '}', + ObjectSerializer::toPathValue($deploymentId), + $resourcePath + ); + } + // path params + + if ($sbomServiceId !== null) { + $resourcePath = str_replace( + '{' . 'sbomServiceId' . '}', + ObjectSerializer::toPathValue($sbomServiceId), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + '', + $multipart + ); + + // for model (json/xml) + if ($formParams !== []) { + 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 ($this->headerSelector->isJsonMime($headers['Content-Type'])) { + $httpBody = json_encode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if ($this->config->getAccessToken() !== null) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + if ($this->config->getUpsunClientHeader()) { + $defaultHeaders['X-Upsun-Client'] = $this->config->getUpsunClientHeader(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + + $uri = $this->createUri($operationHost, $resourcePath, $queryParams); + + return $this->createRequest('GET', $uri, $headers, $httpBody); + } + + /** + * + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + * + * @return object[] + * @see https://docs.upsun.com/api/#tag/Sbom/operation/list-projects-environments-deployments-sboms + */ + public function listProjectsEnvironmentsDeploymentsSboms( + string $projectId, + string $environmentId, + string $deploymentId + ): array { + return $this->listProjectsEnvironmentsDeploymentsSbomsWithHttpInfo( + $projectId, + $environmentId, + $deploymentId + ); + } + + /** + * + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + * + * @return object[] + */ + private function listProjectsEnvironmentsDeploymentsSbomsWithHttpInfo( + string $projectId, + string $environmentId, + string $deploymentId + ): array { + $request = $this->listProjectsEnvironmentsDeploymentsSbomsRequest( + $projectId, + $environmentId, + $deploymentId + ); + + try { + $response = $this->sendAuthenticatedRequest( + $request->getMethod(), + (string) $request->getUri(), + $request->getHeaders(), + $request->getBody() + ); + + return $this->handleResponseWithDataType( + 'object[]', + $request, + $response + ); + } catch (Exception $exception) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $exception->getCode(), + '/projects/{projectId}/environments/{environmentId}/deployments/{deploymentId}/sboms' + ), + $request, + $response ?? null, + $exception + ); + } + } + + /** + * Create request for operation 'listProjectsEnvironmentsDeploymentsSboms' + * + * + * @throws InvalidArgumentException + */ + private function listProjectsEnvironmentsDeploymentsSbomsRequest( + string $projectId, + string $environmentId, + string $deploymentId + ): RequestInterface { + // verify the required parameter 'projectId' is set + if (empty($projectId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $projectId + when calling listProjectsEnvironmentsDeploymentsSboms' + ); + } + // verify the required parameter 'environmentId' is set + if (empty($environmentId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $environmentId + when calling listProjectsEnvironmentsDeploymentsSboms' + ); + } + // verify the required parameter 'deploymentId' is set + if (empty($deploymentId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $deploymentId + when calling listProjectsEnvironmentsDeploymentsSboms' + ); + } + + $resourcePath = '/projects/{projectId}/environments/{environmentId}/deployments/{deploymentId}/sboms'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = null; + $multipart = false; + + // path params + + if ($projectId !== null) { + $resourcePath = str_replace( + '{' . 'projectId' . '}', + ObjectSerializer::toPathValue($projectId), + $resourcePath + ); + } + // path params + + if ($environmentId !== null) { + $resourcePath = str_replace( + '{' . 'environmentId' . '}', + ObjectSerializer::toPathValue($environmentId), + $resourcePath + ); + } + // path params + + if ($deploymentId !== null) { + $resourcePath = str_replace( + '{' . 'deploymentId' . '}', + ObjectSerializer::toPathValue($deploymentId), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + '', + $multipart + ); + + // for model (json/xml) + if ($formParams !== []) { + 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 ($this->headerSelector->isJsonMime($headers['Content-Type'])) { + $httpBody = json_encode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if ($this->config->getAccessToken() !== null) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + if ($this->config->getUpsunClientHeader()) { + $defaultHeaders['X-Upsun-Client'] = $this->config->getUpsunClientHeader(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + + $uri = $this->createUri($operationHost, $resourcePath, $queryParams); + + return $this->createRequest('GET', $uri, $headers, $httpBody); + } +} diff --git a/src/Api/Serializer/ApiObjectAttributesMapper.php b/src/Api/Serializer/ApiObjectAttributesMapper.php index 15e24ac6..4d119515 100644 --- a/src/Api/Serializer/ApiObjectAttributesMapper.php +++ b/src/Api/Serializer/ApiObjectAttributesMapper.php @@ -41,6 +41,7 @@ public static function attributeMap(string $classname): array 'project' => 'project', 'state' => 'state', 'result' => 'result', + 'failureReason' => 'failure_reason', 'startedAt' => 'started_at', 'completedAt' => 'completed_at', 'completionPercent' => 'completion_percent', @@ -217,6 +218,7 @@ public static function attributeMap(string $classname): array 'createdAt' => 'created_at', 'updatedAt' => 'updated_at', 'type' => 'type', + 'role' => 'role', 'fetchBranches' => 'fetch_branches', 'pruneBranches' => 'prune_branches', 'environmentInitResources' => 'environment_init_resources', @@ -260,6 +262,7 @@ public static function attributeMap(string $classname): array 'createdAt' => 'created_at', 'updatedAt' => 'updated_at', 'type' => 'type', + 'role' => 'role', 'fetchBranches' => 'fetch_branches', 'pruneBranches' => 'prune_branches', 'environmentInitResources' => 'environment_init_resources', @@ -305,6 +308,7 @@ public static function attributeMap(string $classname): array 'createdAt' => 'created_at', 'updatedAt' => 'updated_at', 'type' => 'type', + 'role' => 'role', 'environmentsCredentials' => 'environments_credentials', 'continuousProfiling' => 'continuous_profiling', 'id' => 'id' @@ -315,6 +319,344 @@ public static function attributeMap(string $classname): array 'Upsun\Model\BlackfireIntegrationPatch' => [ 'type' => 'type' ], + 'Upsun\Model\BlackfirePhpServerCaches200Response' => [ + 'grain' => '_grain', + 'from' => '_from', + 'to' => '_to', + 'agent' => '_agent', + 'projectId' => '_project_id', + 'environmentId' => '_environment_id', + 'branchMachineName' => '_branch_machine_name', + 'distributionCost' => '_distribution_cost', + 'data' => 'data', + 'contexts' => '_contexts', + 'contextsMode' => '_contexts_mode' + ], + 'Upsun\Model\BlackfirePhpServerCaches200ResponseDataInner' => [ + 'timestamp' => 'timestamp', + 'opcacheUsage' => 'opcache_usage', + 'opcacheIsbUsage' => 'opcache_isb_usage', + 'apcuUsage' => 'apcu_usage', + 'realpathUsage' => 'realpath_usage', + 'pcreUsage' => 'pcre_usage', + 'apcuHitrate' => 'apcu_hitrate', + 'opcacheHitrate' => 'opcache_hitrate' + ], + 'Upsun\Model\BlackfireProfileGraph200Response' => [ + 'projectId' => '_project_id', + 'environmentId' => '_environment_id', + 'branchMachineName' => '_branch_machine_name', + 'agent' => '_agent', + 'uuid' => '_uuid', + 'dimensions' => 'dimensions', + 'root' => 'root', + 'nodes' => 'nodes', + 'edges' => 'edges', + 'comparison' => 'comparison', + 'language' => 'language', + 'peaks' => 'peaks', + 'arguments' => 'arguments', + 'layers' => 'layers', + 'labels' => 'labels', + 'spans' => 'spans', + 'spansOt' => 'spans-ot', + 'hierarchy' => 'hierarchy' + ], + 'Upsun\Model\BlackfireProfileProfile200Response' => [ + 'projectId' => '_project_id', + 'environmentId' => '_environment_id', + 'branchMachineName' => '_branch_machine_name', + 'agent' => '_agent', + 'uuid' => '_uuid', + 'profile' => 'profile' + ], + 'Upsun\Model\BlackfireProfileSubprofiles200Response' => [ + 'projectId' => '_project_id', + 'environmentId' => '_environment_id', + 'branchMachineName' => '_branch_machine_name', + 'agent' => '_agent', + 'uuid' => '_uuid', + 'subprofiles' => 'subprofiles' + ], + 'Upsun\Model\BlackfireProfileTimeline200Response' => [ + 'projectId' => '_project_id', + 'environmentId' => '_environment_id', + 'branchMachineName' => '_branch_machine_name', + 'agent' => '_agent', + 'uuid' => '_uuid', + 'timeline' => 'timeline', + 'dimension' => 'dimension', + 'time' => 'time', + 'language' => 'language' + ], + 'Upsun\Model\BlackfireProfilesListAutomatic200Response' => [ + 'projectId' => '_project_id', + 'environmentId' => '_environment_id', + 'branchMachineName' => '_branch_machine_name', + 'agent' => '_agent', + 'profiles' => 'profiles', + 'page' => 'page', + 'pages' => 'pages', + 'total' => 'total' + ], + 'Upsun\Model\BlackfireProfilesListAutomatic200ResponseProfilesInner' => [ + 'uuid' => 'uuid', + 'name' => 'name', + 'links' => '_links', + 'metadata' => 'metadata' + ], + 'Upsun\Model\BlackfireProfilesListAutomatic200ResponseProfilesInnerLinks' => [ + 'apiSubprofiles' => 'api_subprofiles', + 'apiProfile' => 'api_profile', + 'apiGraph' => 'api_graph', + 'graphUrl' => 'graph_url', + 'apiTimeline' => 'api_timeline' + ], + 'Upsun\Model\BlackfireProfilesListAutomatic200ResponseProfilesInnerLinksGraphUrl' => [ + 'href' => 'href', + 'type' => 'type' + ], + 'Upsun\Model\BlackfireProfilesRecommendations200Response' => [ + 'projectId' => '_project_id', + 'environmentId' => '_environment_id', + 'branchMachineName' => '_branch_machine_name', + 'agent' => '_agent', + 'from' => '_from', + 'to' => '_to', + 'recommendations' => 'recommendations', + 'total' => 'total', + 'transaction' => '_transaction', + 'testedTransactions' => 'tested_transactions', + 'untestedTopTransactions' => 'untested_top_transactions' + ], + 'Upsun\Model\BlackfireProfilesRecommendations200ResponseRecommendationsInner' => [ + 'name' => 'name', + 'total' => 'total', + 'constraint' => 'constraint', + 'links' => '_links' + ], + 'Upsun\Model\BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinks' => [ + 'apiSubprofiles' => 'api_subprofiles', + 'apiProfile' => 'api_profile', + 'apiGraph' => 'api_graph', + 'apiTimeline' => 'api_timeline' + ], + 'Upsun\Model\BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiGraph' => [ + 'href' => 'href', + 'type' => 'type' + ], + 'Upsun\Model\BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiProfile' => [ + 'href' => 'href', + 'type' => 'type' + ], + 'Upsun\Model\BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiSubprofiles' => [ + 'href' => 'href', + 'type' => 'type' + ], + 'Upsun\Model\BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiTimeline' => [ + 'href' => 'href', + 'type' => 'type' + ], + 'Upsun\Model\BlackfireProfilesRecommendations400Response' => [ + 'type' => 'type', + 'title' => 'title', + 'status' => 'status', + 'violations' => 'violations' + ], + 'Upsun\Model\BlackfireServerGlobal200Response' => [ + 'quota' => '_quota', + 'grain' => '_grain', + 'from' => '_from', + 'to' => '_to', + 'keys' => '_keys', + 'agent' => '_agent', + 'contexts' => '_contexts', + 'contextsMode' => '_contexts_mode', + 'projectId' => '_project_id', + 'environmentId' => '_environment_id', + 'branchMachineName' => '_branch_machine_name', + 'alertEvaluations' => 'alert_evaluations', + 'server' => 'server', + 'distributionCost' => '_distribution_cost' + ], + 'Upsun\Model\BlackfireServerGlobal200ResponseAlertEvaluationsInner' => [ + 'timestamp' => 'timestamp', + 'alertRuleUuid' => 'alert_rule_uuid', + 'value' => 'value', + 'state' => 'state' + ], + 'Upsun\Model\BlackfireServerGlobal200ResponseQuota' => [ + 'allowed' => 'allowed', + 'used' => 'used', + 'exceeded' => 'exceeded', + 'periodStartedAt' => 'period_started_at', + 'periodEndsAt' => 'period_ends_at' + ], + 'Upsun\Model\BlackfireServerGlobal200ResponseServer' => [ + 'total' => 'total', + 'data' => 'data' + ], + 'Upsun\Model\BlackfireServerGlobal200ResponseServerDataInner' => [ + 'timestamp' => 'timestamp', + 'wt' => 'wt', + 'mu' => 'mu', + 'pmu' => 'pmu', + 'load' => 'load', + 'stdout' => 'stdout', + 'rpms' => 'rpms' + ], + 'Upsun\Model\BlackfireServerTopSpans200Response' => [ + 'grain' => '_grain', + 'from' => '_from', + 'to' => '_to', + 'agent' => '_agent', + 'projectId' => '_project_id', + 'environmentId' => '_environment_id', + 'branchMachineName' => '_branch_machine_name', + 'sort' => '_sort', + 'topSpans' => 'top_spans', + 'advancedFilters' => 'advanced_filters', + 'contexts' => '_contexts', + 'contextsMode' => '_contexts_mode', + 'transactions' => '_transactions', + 'transactionsMode' => '_transactions_mode', + 'wtSlot' => '_wt_slot', + 'wtSlotMode' => '_wt_slot_mode', + 'pmuSlot' => '_pmu_slot', + 'pmuSlotMode' => '_pmu_slot_mode', + 'httpStatusCodes' => '_http_status_codes', + 'httpStatusCodesMode' => '_http_status_codes_mode', + 'httpHosts' => '_http_hosts', + 'httpHostsMode' => '_http_hosts_mode', + 'hosts' => '_hosts', + 'hostsMode' => '_hosts_mode', + 'frameworks' => '_frameworks', + 'frameworksMode' => '_frameworks_mode', + 'languages' => '_languages', + 'languagesMode' => '_languages_mode', + 'methods' => '_methods', + 'methodsMode' => '_methods_mode', + 'runtimes' => '_runtimes', + 'runtimesMode' => '_runtimes_mode', + 'oss' => '_oss', + 'ossMode' => '_oss_mode', + 'distributionCost' => '_distribution_cost' + ], + 'Upsun\Model\BlackfireServerTopSpans200ResponseAdvancedFilters' => [ + 'fields' => 'fields', + 'maxApplicableFilters' => 'max_applicable_filters' + ], + 'Upsun\Model\BlackfireServerTopSpans200ResponseAdvancedFiltersFieldsValue' => [ + 'distinctValues' => 'distinct_values', + 'type' => 'type', + 'values' => 'values' + ], + 'Upsun\Model\BlackfireServerTopSpans200ResponseAdvancedFiltersFieldsValueValuesInner' => [ + 'value' => 'value', + 'count' => 'count' + ], + 'Upsun\Model\BlackfireServerTopSpans200ResponseTopSpans' => [ + 'data' => 'data' + ], + 'Upsun\Model\BlackfireServerTopSpans200ResponseTopSpansDataInner' => [ + 'id' => 'id', + 'label' => 'label', + 'percentage' => 'percentage', + 'wt' => 'wt', + 'p96' => 'p_96', + 'count' => 'count', + 'requestWt' => 'request_wt', + 'metrics' => 'metrics', + 'serviceName' => 'service_name', + 'impact' => 'impact' + ], + 'Upsun\Model\BlackfireServerTransactionsBreakdown200Response' => [ + 'grain' => '_grain', + 'from' => '_from', + 'to' => '_to', + 'agent' => '_agent', + 'projectId' => '_project_id', + 'environmentId' => '_environment_id', + 'branchMachineName' => '_branch_machine_name', + 'breakdownDimension' => '_breakdown_dimension', + 'sort' => '_sort', + 'breakdownLimit' => '_breakdown_limit', + 'breakdownTopHits' => '_breakdown_top_hits', + 'transactions' => 'transactions', + 'topHitsTimeline' => 'top_hits_timeline', + 'contexts' => '_contexts', + 'contextsMode' => '_contexts_mode', + 'transactions' => '_transactions', + 'transactionsMode' => '_transactions_mode', + 'wtSlot' => '_wt_slot', + 'wtSlotMode' => '_wt_slot_mode', + 'pmuSlot' => '_pmu_slot', + 'pmuSlotMode' => '_pmu_slot_mode', + 'httpStatusCodes' => '_http_status_codes', + 'httpStatusCodesMode' => '_http_status_codes_mode', + 'httpHosts' => '_http_hosts', + 'httpHostsMode' => '_http_hosts_mode', + 'hosts' => '_hosts', + 'hostsMode' => '_hosts_mode', + 'frameworks' => '_frameworks', + 'frameworksMode' => '_frameworks_mode', + 'languages' => '_languages', + 'languagesMode' => '_languages_mode', + 'methods' => '_methods', + 'methodsMode' => '_methods_mode', + 'runtimes' => '_runtimes', + 'runtimesMode' => '_runtimes_mode', + 'oss' => '_oss', + 'ossMode' => '_oss_mode', + 'distributionCost' => '_distribution_cost' + ], + 'Upsun\Model\BlackfireServerTransactionsBreakdown200ResponseBreakdownTopHits' => [ + 'maxQuantity' => 'max_quantity', + 'maxPercentage' => 'max_percentage' + ], + 'Upsun\Model\BlackfireServerTransactionsBreakdown200ResponseTopHitsTimeline' => [ + 'data' => 'data' + ], + 'Upsun\Model\BlackfireServerTransactionsBreakdown200ResponseTopHitsTimelineDataInner' => [ + 'timestamp' => 'timestamp', + 'totalConsumed' => '_total_consumed', + 'totalCount' => '_total_count', + 'transactions' => '_transactions' + ], + 'Upsun\Model\BlackfireServerTransactionsBreakdown200ResponseTopHitsTimelineDataInnerTransactionsValue' => [ + 'average' => 'average', + 'count' => 'count' + ], + 'Upsun\Model\BlackfireServerTransactionsBreakdown200ResponseTransactions' => [ + 'data' => 'data' + ], + 'Upsun\Model\BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInner' => [ + 'transaction' => 'transaction', + 'wt96thPercentile' => 'wt_96th_percentile', + 'avgWt' => 'avg_wt', + 'avgPmu' => 'avg_pmu', + 'avgStdout' => 'avg_stdout', + 'totalRequests' => 'total_requests', + 'totalRequestsUnnamed' => 'total_requests_unnamed', + 'totalErrors' => 'total_errors', + 'impact' => 'impact', + 'topHit' => 'top_hit', + 'links' => '_links' + ], + 'Upsun\Model\BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinks' => [ + 'topSpans' => 'top_spans', + 'recommendations' => 'recommendations', + 'automaticProfiles' => 'automatic_profiles' + ], + 'Upsun\Model\BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksAutomaticProfiles' => [ + 'href' => 'href' + ], + 'Upsun\Model\BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksRecommendations' => [ + 'href' => 'href' + ], + 'Upsun\Model\BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksTopSpans' => [ + 'href' => 'href' + ], 'Upsun\Model\Blob' => [ 'id' => 'id', 'sha' => 'sha', @@ -361,7 +703,9 @@ public static function attributeMap(string $classname): array ], 'Upsun\Model\CanCreateNewOrgSubscription200ResponseRequiredAction' => [ 'action' => 'action', - 'type' => 'type' + 'type' => 'type', + 'credentials' => 'credentials', + 'reference' => 'reference' ], 'Upsun\Model\CanUpdateSubscription200Response' => [ 'canUpdate' => 'can_update', @@ -438,9 +782,15 @@ public static function attributeMap(string $classname): array 'name' => 'name', 'email' => 'email' ], + 'Upsun\Model\CommunityPackagesInner' => [ + ], 'Upsun\Model\Components' => [ 'voucherVatBaseprice' => 'voucher/vat/baseprice' ], + 'Upsun\Model\ComposableImages' => [ + 'runtimes' => 'runtimes', + 'packages' => 'packages' + ], 'Upsun\Model\Config' => [ 'newrelic' => 'newrelic', 'sumologic' => 'sumologic', @@ -729,10 +1079,14 @@ public static function attributeMap(string $classname): array 'services' => 'services' ], 'Upsun\Model\DeploymentState' => [ + 'lastStateUpdateSuccessful' => 'last_state_update_successful', 'lastDeploymentSuccessful' => 'last_deployment_successful', + 'lastDeploymentFailureReason' => 'last_deployment_failure_reason', + 'lastDeploymentCommands' => 'last_deployment_commands', 'lastDeploymentAt' => 'last_deployment_at', 'lastAutoscaleUpAt' => 'last_autoscale_up_at', 'lastAutoscaleDownAt' => 'last_autoscale_down_at', + 'lastMaintenanceAt' => 'last_maintenance_at', 'crons' => 'crons' ], 'Upsun\Model\DeploymentTarget' => [ @@ -752,6 +1106,9 @@ public static function attributeMap(string $classname): array 'docroots' => 'docroots', 'siteUrls' => 'site_urls', 'sshHosts' => 'ssh_hosts', + 'k8sConfig' => 'k8s_config', + 'bastionNodesUser' => 'bastion_nodes_user', + 'bastionNodesHost' => 'bastion_nodes_host', 'useDedicatedGrid' => 'use_dedicated_grid', 'storageType' => 'storage_type', 'id' => 'id', @@ -783,6 +1140,14 @@ public static function attributeMap(string $classname): array 'maxMemory' => 'max_memory', 'maxEnvironments' => 'max_environments' ], + 'Upsun\Model\Diff' => [ + 'id' => 'id', + 'diff' => 'diff', + 'newPath' => 'new_path', + 'newId' => 'new_id', + 'oldPath' => 'old_path', + 'oldId' => 'old_id' + ], 'Upsun\Model\Discount' => [ 'id' => 'id', 'organizationId' => 'organization_id', @@ -837,6 +1202,13 @@ public static function attributeMap(string $classname): array 'isDefault' => 'is_default', 'replacementFor' => 'replacement_for' ], + 'Upsun\Model\DomainClaim' => [ + 'id' => 'id', + 'createdAt' => 'created_at', + 'updatedAt' => 'updated_at', + 'name' => 'name', + 'count' => 'count' + ], 'Upsun\Model\DomainCreateInput' => [ 'name' => 'name', 'attributes' => 'attributes', @@ -851,6 +1223,7 @@ public static function attributeMap(string $classname): array 'createdAt' => 'created_at', 'updatedAt' => 'updated_at', 'type' => 'type', + 'role' => 'role', 'fromAddress' => 'from_address', 'recipients' => 'recipients', 'id' => 'id' @@ -1082,12 +1455,14 @@ public static function attributeMap(string $classname): array 'createdAt' => 'created_at', 'updatedAt' => 'updated_at', 'type' => 'type', + 'role' => 'role', 'events' => 'events', 'environments' => 'environments', 'excludedEnvironments' => 'excluded_environments', 'states' => 'states', 'result' => 'result', 'serviceId' => 'service_id', + 'tlsCertificates' => 'tls_certificates', 'id' => 'id' ], 'Upsun\Model\FastlyIntegrationCreateInput' => [ @@ -1098,7 +1473,8 @@ public static function attributeMap(string $classname): array 'environments' => 'environments', 'excludedEnvironments' => 'excluded_environments', 'states' => 'states', - 'result' => 'result' + 'result' => 'result', + 'tlsCertificates' => 'tls_certificates' ], 'Upsun\Model\FastlyIntegrationPatch' => [ 'type' => 'type', @@ -1108,7 +1484,8 @@ public static function attributeMap(string $classname): array 'environments' => 'environments', 'excludedEnvironments' => 'excluded_environments', 'states' => 'states', - 'result' => 'result' + 'result' => 'result', + 'tlsCertificates' => 'tls_certificates' ], 'Upsun\Model\FilesInner' => [ 'path' => 'path', @@ -1238,6 +1615,7 @@ public static function attributeMap(string $classname): array 'createdAt' => 'created_at', 'updatedAt' => 'updated_at', 'type' => 'type', + 'role' => 'role', 'fetchBranches' => 'fetch_branches', 'pruneBranches' => 'prune_branches', 'environmentInitResources' => 'environment_init_resources', @@ -1286,6 +1664,7 @@ public static function attributeMap(string $classname): array 'createdAt' => 'created_at', 'updatedAt' => 'updated_at', 'type' => 'type', + 'role' => 'role', 'fetchBranches' => 'fetch_branches', 'pruneBranches' => 'prune_branches', 'environmentInitResources' => 'environment_init_resources', @@ -1388,6 +1767,7 @@ public static function attributeMap(string $classname): array 'createdAt' => 'created_at', 'updatedAt' => 'updated_at', 'type' => 'type', + 'role' => 'role', 'url' => 'url', 'id' => 'id' ], @@ -1406,6 +1786,10 @@ public static function attributeMap(string $classname): array 'deploy' => 'deploy', 'postDeploy' => 'post_deploy' ], + 'Upsun\Model\Hooks1' => [ + 'build' => 'build', + 'deploy' => 'deploy' + ], 'Upsun\Model\HostsInner' => [ 'id' => 'id', 'type' => 'type', @@ -1430,6 +1814,7 @@ public static function attributeMap(string $classname): array 'createdAt' => 'created_at', 'updatedAt' => 'updated_at', 'type' => 'type', + 'role' => 'role', 'extra' => 'extra', 'url' => 'url', 'headers' => 'headers', @@ -1453,6 +1838,221 @@ public static function attributeMap(string $classname): array 'tlsVerify' => 'tls_verify', 'excludedServices' => 'excluded_services' ], + 'Upsun\Model\HttpMetricsOverview200Response' => [ + 'grain' => '_grain', + 'from' => '_from', + 'to' => '_to', + 'projectId' => '_project_id', + 'environmentId' => '_environment_id', + 'environmentType' => '_environment_type', + 'branchMachineName' => '_branch_machine_name', + 'topUrlsCount' => '_top_urls_count', + 'data' => 'data' + ], + 'Upsun\Model\HttpMetricsOverview200ResponseData' => [ + 'urls' => 'urls', + 'timelines' => 'timelines' + ], + 'Upsun\Model\HttpMetricsOverview200ResponseDataTimelinesInner' => [ + 'timestamp' => 'timestamp', + 'requestSize' => 'request_size', + 'responseSize' => 'response_size', + 'urls' => 'urls', + 'codes' => 'codes' + ], + 'Upsun\Model\HttpMetricsOverview200ResponseDataTimelinesInnerCodes' => [ + 'uNKNOWN' => 'UNKNOWN', + '_1xX' => '1XX', + '_2xX' => '2XX', + '_3xX' => '3XX', + '_4xX' => '4XX', + '_5xX' => '5XX' + ], + 'Upsun\Model\HttpMetricsOverview200ResponseDataTimelinesInnerUrlsValue' => [ + 'count' => 'count', + 'impact' => 'impact' + ], + 'Upsun\Model\HttpMetricsOverview200ResponseDataUrlsValue' => [ + 'url' => 'url', + 'method' => 'method', + 'impact' => 'impact', + 'average' => 'average', + 'p50' => 'p_50', + 'p96' => 'p_96', + 'count' => 'count' + ], + 'Upsun\Model\HttpMetricsOverview499Response' => [ + 'error' => 'error', + 'message' => 'message' + ], + 'Upsun\Model\HttpMetricsTimelineIps200Response' => [ + 'grain' => '_grain', + 'from' => '_from', + 'to' => '_to', + 'projectId' => '_project_id', + 'environmentId' => '_environment_id', + 'environmentType' => '_environment_type', + 'branchMachineName' => '_branch_machine_name', + 'breakdownLimit' => '_breakdown_limit', + 'breakdownTopHits' => '_breakdown_top_hits', + 'breakdown' => 'breakdown', + 'topHitsTimeline' => 'top_hits_timeline', + 'methods' => '_methods', + 'methodsMode' => '_methods_mode', + 'domains' => '_domains', + 'domainsMode' => '_domains_mode', + 'codeSlots' => '_code_slots', + 'codeSlotsMode' => '_code_slots_mode', + 'codes' => '_codes', + 'codesMode' => '_codes_mode', + 'requestDurationSlots' => '_request_duration_slots', + 'requestDurationSlotsMode' => '_request_duration_slots_mode' + ], + 'Upsun\Model\HttpMetricsTimelineIps200ResponseBreakdown' => [ + 'kind' => 'kind', + 'total' => 'total', + 'data' => 'data' + ], + 'Upsun\Model\HttpMetricsTimelineIps200ResponseBreakdownDataInner' => [ + 'name' => 'name', + 'impact' => 'impact', + 'average' => 'average', + 'p50' => 'p_50', + 'p96' => 'p_96', + 'count' => 'count', + 'topHit' => 'top_hit' + ], + 'Upsun\Model\HttpMetricsTimelineIps200ResponseBreakdownTopHits' => [ + 'maxQuantity' => 'max_quantity', + 'maxPercentage' => 'max_percentage' + ], + 'Upsun\Model\HttpMetricsTimelineIps200ResponseTopHitsTimeline' => [ + 'data' => 'data' + ], + 'Upsun\Model\HttpMetricsTimelineIps200ResponseTopHitsTimelineDataInner' => [ + 'timestamp' => 'timestamp', + 'totalConsumed' => '_total_consumed', + 'totalCount' => '_total_count', + 'data' => 'data' + ], + 'Upsun\Model\HttpMetricsTimelineIps200ResponseTopHitsTimelineDataInnerDataValue' => [ + 'count' => 'count', + 'impact' => 'impact' + ], + 'Upsun\Model\HttpMetricsTimelineUrls200Response' => [ + 'grain' => '_grain', + 'from' => '_from', + 'to' => '_to', + 'projectId' => '_project_id', + 'environmentId' => '_environment_id', + 'environmentType' => '_environment_type', + 'branchMachineName' => '_branch_machine_name', + 'breakdownLimit' => '_breakdown_limit', + 'breakdownTopHits' => '_breakdown_top_hits', + 'breakdown' => 'breakdown', + 'topHitsTimeline' => 'top_hits_timeline', + 'filters' => 'filters', + 'methods' => '_methods', + 'methodsMode' => '_methods_mode', + 'domains' => '_domains', + 'domainsMode' => '_domains_mode', + 'codeSlots' => '_code_slots', + 'codeSlotsMode' => '_code_slots_mode', + 'codes' => '_codes', + 'codesMode' => '_codes_mode', + 'requestDurationSlots' => '_request_duration_slots', + 'requestDurationSlotsMode' => '_request_duration_slots_mode' + ], + 'Upsun\Model\HttpMetricsTimelineUrls200ResponseBreakdown' => [ + 'kind' => 'kind', + 'total' => 'total', + 'data' => 'data' + ], + 'Upsun\Model\HttpMetricsTimelineUrls200ResponseBreakdownDataInner' => [ + 'url' => 'url', + 'method' => 'method', + 'impact' => 'impact', + 'average' => 'average', + 'p50' => 'p_50', + 'p96' => 'p_96', + 'count' => 'count', + 'topHit' => 'top_hit' + ], + 'Upsun\Model\HttpMetricsTimelineUrls200ResponseFilters' => [ + 'maxApplicableFilters' => 'max_applicable_filters', + 'fields' => 'fields' + ], + 'Upsun\Model\HttpMetricsTimelineUrls200ResponseFiltersFieldsValue' => [ + 'distinctValues' => 'distinct_values', + 'type' => 'type', + 'values' => 'values' + ], + 'Upsun\Model\HttpMetricsTimelineUrls200ResponseFiltersFieldsValueValuesInner' => [ + 'value' => 'value', + 'count' => 'count' + ], + 'Upsun\Model\HttpMetricsTimelineUrls200ResponseTopHitsTimeline' => [ + 'data' => 'data' + ], + 'Upsun\Model\HttpMetricsTimelineUrls200ResponseTopHitsTimelineDataInner' => [ + 'timestamp' => 'timestamp', + 'totalConsumed' => '_total_consumed', + 'totalCount' => '_total_count', + 'requestSize' => 'request_size', + 'responseSize' => 'response_size', + 'urls' => 'urls', + 'codes' => 'codes' + ], + 'Upsun\Model\HttpMetricsTimelineUserAgents200Response' => [ + 'grain' => '_grain', + 'from' => '_from', + 'to' => '_to', + 'projectId' => '_project_id', + 'environmentId' => '_environment_id', + 'environmentType' => '_environment_type', + 'branchMachineName' => '_branch_machine_name', + 'breakdownLimit' => '_breakdown_limit', + 'breakdownTopHits' => '_breakdown_top_hits', + 'breakdown' => 'breakdown', + 'topHitsTimeline' => 'top_hits_timeline', + 'methods' => '_methods', + 'methodsMode' => '_methods_mode', + 'domains' => '_domains', + 'domainsMode' => '_domains_mode', + 'codeSlots' => '_code_slots', + 'codeSlotsMode' => '_code_slots_mode', + 'codes' => '_codes', + 'codesMode' => '_codes_mode', + 'requestDurationSlots' => '_request_duration_slots', + 'requestDurationSlotsMode' => '_request_duration_slots_mode' + ], + 'Upsun\Model\HttpMetricsTimelineUserAgents200ResponseBreakdown' => [ + 'kind' => 'kind', + 'total' => 'total', + 'data' => 'data' + ], + 'Upsun\Model\HttpMetricsTimelineUserAgents200ResponseBreakdownDataInner' => [ + 'name' => 'name', + 'impact' => 'impact', + 'average' => 'average', + 'p50' => 'p_50', + 'p96' => 'p_96', + 'count' => 'count', + 'topHit' => 'top_hit' + ], + 'Upsun\Model\HttpMetricsTimelineUserAgents200ResponseTopHitsTimeline' => [ + 'data' => 'data' + ], + 'Upsun\Model\HttpMetricsTimelineUserAgents200ResponseTopHitsTimelineDataInner' => [ + 'timestamp' => 'timestamp', + 'totalConsumed' => '_total_consumed', + 'totalCount' => '_total_count', + 'data' => 'data' + ], + 'Upsun\Model\HttpMetricsTimelineUserAgents200ResponseTopHitsTimelineDataInnerDataValue' => [ + 'count' => 'count', + 'impact' => 'impact' + ], 'Upsun\Model\ImageTypeRestrictions' => [ 'only' => 'only', 'exclude' => 'exclude' @@ -1464,6 +2064,7 @@ public static function attributeMap(string $classname): array 'createdAt' => 'created_at', 'updatedAt' => 'updated_at', 'type' => 'type', + 'role' => 'role', 'fetchBranches' => 'fetch_branches', 'pruneBranches' => 'prune_branches', 'environmentInitResources' => 'environment_init_resources', @@ -1482,6 +2083,7 @@ public static function attributeMap(string $classname): array 'states' => 'states', 'result' => 'result', 'serviceId' => 'service_id', + 'tlsCertificates' => 'tls_certificates', 'baseUrl' => 'base_url', 'buildDraftPullRequests' => 'build_draft_pull_requests', 'buildPullRequestsPostMerge' => 'build_pull_requests_post_merge', @@ -1541,6 +2143,7 @@ public static function attributeMap(string $classname): array 'excludedEnvironments' => 'excluded_environments', 'states' => 'states', 'result' => 'result', + 'tlsCertificates' => 'tls_certificates', 'baseUrl' => 'base_url', 'buildDraftPullRequests' => 'build_draft_pull_requests', 'buildPullRequestsPostMerge' => 'build_pull_requests_post_merge', @@ -1592,6 +2195,7 @@ public static function attributeMap(string $classname): array 'excludedEnvironments' => 'excluded_environments', 'states' => 'states', 'result' => 'result', + 'tlsCertificates' => 'tls_certificates', 'baseUrl' => 'base_url', 'buildDraftPullRequests' => 'build_draft_pull_requests', 'buildPullRequestsPostMerge' => 'build_pull_requests_post_merge', @@ -1648,6 +2252,27 @@ public static function attributeMap(string $classname): array 'alias' => 'alias', 'value' => 'value' ], + 'Upsun\Model\KubernetesDeploymentTargetStorage' => [ + 'type' => 'type', + 'name' => 'name', + 'k8sConfig' => 'k8s_config', + 'bastionNodesUser' => 'bastion_nodes_user', + 'bastionNodesHost' => 'bastion_nodes_host', + 'id' => 'id' + ], + 'Upsun\Model\KubernetesDeploymentTargetStorageCreateInput' => [ + 'type' => 'type', + 'name' => 'name' + ], + 'Upsun\Model\KubernetesDeploymentTargetStoragePatch' => [ + 'type' => 'type', + 'name' => 'name' + ], + 'Upsun\Model\LastDeploymentCommandsInner' => [ + 'app' => 'app', + 'type' => 'type', + 'exitCode' => 'exit_code' + ], 'Upsun\Model\LineItem' => [ 'type' => 'type', 'licenseId' => 'license_id', @@ -1798,6 +2423,12 @@ public static function attributeMap(string $classname): array 'Upsun\Model\LogsForwarding' => [ 'maxExtraPayloadSize' => 'max_extra_payload_size' ], + 'Upsun\Model\Maintenance' => [ + 'nextMaintenance' => 'next_maintenance' + ], + 'Upsun\Model\MaintenanceWindowConfiguration' => [ + 'recurrence' => 'recurrence' + ], 'Upsun\Model\MergeInfo' => [ 'commitsAhead' => 'commits_ahead', 'commitsBehind' => 'commits_behind', @@ -1836,6 +2467,7 @@ public static function attributeMap(string $classname): array 'createdAt' => 'created_at', 'updatedAt' => 'updated_at', 'type' => 'type', + 'role' => 'role', 'extra' => 'extra', 'url' => 'url', 'tlsVerify' => 'tls_verify', @@ -1869,6 +2501,133 @@ public static function attributeMap(string $classname): array 'type' => 'type', 'sha' => 'sha' ], + 'Upsun\Model\ObservabilityEntrypoint200Response' => [ + 'message' => 'message', + 'projectId' => 'project_id', + 'branchMachineName' => 'branch_machine_name', + 'environmentId' => 'environment_id', + 'environmentType' => 'environment_type', + 'vendor' => 'vendor', + 'pshUserIdentifier' => 'psh_user_identifier', + 'links' => '_links', + 'retention' => 'retention', + 'dataRetention' => 'data_retention' + ], + 'Upsun\Model\ObservabilityEntrypoint200ResponseDataRetention' => [ + 'unit' => '_unit', + 'unitInSeconds' => '_unit_in_seconds', + 'resources' => 'resources', + 'serverMonitoring' => 'server_monitoring', + 'logs' => 'logs', + 'httpTraffic' => 'http_traffic', + 'continuousProfiling' => 'continuous_profiling' + ], + 'Upsun\Model\ObservabilityEntrypoint200ResponseDataRetentionContinuousProfiling' => [ + 'retentionPeriod' => 'retention_period', + 'maxRange' => 'max_range', + 'recommendedDefaultRange' => 'recommended_default_range' + ], + 'Upsun\Model\ObservabilityEntrypoint200ResponseDataRetentionHttpTraffic' => [ + 'retentionPeriod' => 'retention_period', + 'maxRange' => 'max_range', + 'recommendedDefaultRange' => 'recommended_default_range' + ], + 'Upsun\Model\ObservabilityEntrypoint200ResponseDataRetentionLogs' => [ + 'retentionPeriod' => 'retention_period', + 'maxRange' => 'max_range', + 'recommendedDefaultRange' => 'recommended_default_range' + ], + 'Upsun\Model\ObservabilityEntrypoint200ResponseDataRetentionResources' => [ + 'retentionPeriod' => 'retention_period', + 'maxRange' => 'max_range', + 'recommendedDefaultRange' => 'recommended_default_range' + ], + 'Upsun\Model\ObservabilityEntrypoint200ResponseDataRetentionServerMonitoring' => [ + 'retentionPeriod' => 'retention_period', + 'maxRange' => 'max_range', + 'recommendedDefaultRange' => 'recommended_default_range' + ], + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinks' => [ + 'self' => '_self', + 'resourcesByService' => 'resources_by_service', + 'resourcesOverview' => 'resources_overview', + 'resourcesSummary' => 'resources_summary', + 'blackfirePhpServerCaches' => 'blackfire_php_server_caches', + 'blackfireServerGlobal' => 'blackfire_server_global', + 'blackfireServerTransactionsBreakdown' => 'blackfire_server_transactions_breakdown', + 'logsQuery' => 'logs_query', + 'logsOverview' => 'logs_overview', + 'httpMetricsOverview' => 'http_metrics_overview', + 'httpMetricsTimelineUrls' => 'http_metrics_timeline_urls', + 'httpMetricsTimelineIps' => 'http_metrics_timeline_ips', + 'httpMetricsTimelineUserAgents' => 'http_metrics_timeline_user_agents', + 'consoleSandboxAccess' => 'console_sandbox_access', + 'conprofApplications' => 'conprof_applications', + 'conprofApplicationFilters' => 'conprof_application_filters', + 'conprofTimeline' => 'conprof_timeline', + 'conprofFlamegraph' => 'conprof_flamegraph' + ], + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksBlackfirePhpServerCaches' => [ + 'href' => 'href' + ], + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksBlackfireServerGlobal' => [ + 'href' => 'href' + ], + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksBlackfireServerTransactionsBreakdown' => [ + 'href' => 'href' + ], + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksConprofApplicationFilters' => [ + 'href' => 'href' + ], + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksConprofApplications' => [ + 'href' => 'href' + ], + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksConprofFlamegraph' => [ + 'href' => 'href' + ], + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksConprofTimeline' => [ + 'href' => 'href' + ], + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksConsoleSandboxAccess' => [ + 'href' => 'href' + ], + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksHttpMetricsOverview' => [ + 'href' => 'href' + ], + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineIps' => [ + 'href' => 'href' + ], + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineUrls' => [ + 'href' => 'href' + ], + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineUserAgents' => [ + 'href' => 'href' + ], + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksLogsOverview' => [ + 'href' => 'href' + ], + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksLogsQuery' => [ + 'href' => 'href' + ], + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksResourcesByServiceValue' => [ + 'name' => 'name', + 'href' => 'href' + ], + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksResourcesOverview' => [ + 'href' => 'href' + ], + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksResourcesSummary' => [ + 'href' => 'href' + ], + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksSelf' => [ + 'href' => 'href' + ], + 'Upsun\Model\ObservabilityEntrypoint200ResponseRetention' => [ + 'resources' => 'resources', + 'logs' => 'logs', + 'httpTraffic' => 'http_traffic', + 'continuousProfiling' => 'continuous_profiling' + ], 'Upsun\Model\OpenTelemetry' => [ 'enabled' => 'enabled', 'role' => 'role' @@ -2160,9 +2919,11 @@ public static function attributeMap(string $classname): array 'status' => 'status', 'trialPlan' => 'trial_plan', 'projectUi' => 'project_ui', + 'dedicatedTag' => 'dedicated_tag', 'createdAt' => 'created_at', 'updatedAt' => 'updated_at', 'activities' => 'activities', + 'fastlyServiceIds' => 'fastly_service_ids', 'projectOptions' => 'project_options', 'links' => '_links' ], @@ -2234,6 +2995,34 @@ public static function attributeMap(string $classname): array 'createdAt' => 'created_at', 'updatedAt' => 'updated_at' ], + 'Upsun\Model\OtlpLogIntegration' => [ + 'createdAt' => 'created_at', + 'updatedAt' => 'updated_at', + 'type' => 'type', + 'role' => 'role', + 'extra' => 'extra', + 'url' => 'url', + 'headers' => 'headers', + 'tlsVerify' => 'tls_verify', + 'excludedServices' => 'excluded_services', + 'id' => 'id' + ], + 'Upsun\Model\OtlpLogIntegrationCreateInput' => [ + 'type' => 'type', + 'url' => 'url', + 'extra' => 'extra', + 'headers' => 'headers', + 'tlsVerify' => 'tls_verify', + 'excludedServices' => 'excluded_services' + ], + 'Upsun\Model\OtlpLogIntegrationPatch' => [ + 'type' => 'type', + 'url' => 'url', + 'extra' => 'extra', + 'headers' => 'headers', + 'tlsVerify' => 'tls_verify', + 'excludedServices' => 'excluded_services' + ], 'Upsun\Model\OutboundFirewall' => [ 'enabled' => 'enabled' ], @@ -2252,6 +3041,7 @@ public static function attributeMap(string $classname): array 'createdAt' => 'created_at', 'updatedAt' => 'updated_at', 'type' => 'type', + 'role' => 'role', 'routingKey' => 'routing_key', 'id' => 'id' ], @@ -2370,7 +3160,8 @@ public static function attributeMap(string $classname): array 'updatedAt' => 'updated_at', 'billingContact' => 'billing_contact', 'invoiced' => 'invoiced', - 'customerType' => 'customer_type' + 'customerType' => 'customer_type', + 'legalEntityName' => 'legal_entity_name' ], 'Upsun\Model\Project' => [ 'id' => 'id', @@ -2388,7 +3179,8 @@ public static function attributeMap(string $classname): array 'region' => 'region', 'repository' => 'repository', 'defaultDomain' => 'default_domain', - 'subscription' => 'subscription' + 'subscription' => 'subscription', + 'maintenance' => 'maintenance' ], 'Upsun\Model\ProjectAddon' => [ 'id' => 'id', @@ -2443,6 +3235,7 @@ public static function attributeMap(string $classname): array 'sku' => 'sku' ], 'Upsun\Model\ProjectCapabilities' => [ + 'tasks' => 'tasks', 'metrics' => 'metrics', 'logsForwarding' => 'logs_forwarding', 'guaranteedResources' => 'guaranteed_resources', @@ -2602,6 +3395,7 @@ public static function attributeMap(string $classname): array 'enableDiskHealthMonitoring' => 'enable_disk_health_monitoring', 'enablePausedEnvironments' => 'enable_paused_environments', 'enableUnifiedConfiguration' => 'enable_unified_configuration', + 'enableExplicitEmptyRoutes' => 'enable_explicit_empty_routes', 'enableRoutesTracing' => 'enable_routes_tracing', 'imageDeploymentValidation' => 'image_deployment_validation', 'supportGenericImages' => 'support_generic_images', @@ -2614,13 +3408,18 @@ public static function attributeMap(string $classname): array 'activityLogsMaxSize' => 'activity_logs_max_size', 'allowManualDeployments' => 'allow_manual_deployments', 'allowRollingDeployments' => 'allow_rolling_deployments', + 'maintenanceWindow' => 'maintenance_window', + 'allowActivityReschedule' => 'allow_activity_reschedule', 'allowBurst' => 'allow_burst', - 'routerResources' => 'router_resources' + 'routerResources' => 'router_resources', + 'allowScalingToZero' => 'allow_scaling_to_zero', + 'saveApplicationsVendors' => 'save_applications_vendors' ], 'Upsun\Model\ProjectSettingsPatch' => [ 'initialize' => 'initialize', 'dataRetention' => 'data_retention', - 'buildResources' => 'build_resources' + 'buildResources' => 'build_resources', + 'maintenanceWindow' => 'maintenance_window' ], 'Upsun\Model\ProjectStatus' => [ ], @@ -2673,6 +3472,11 @@ public static function attributeMap(string $classname): array 'upstream' => 'upstream', 'sticky' => 'sticky' ], + 'Upsun\Model\Recurrence' => [ + 'interval' => 'interval', + 'dayOfWeek' => 'day_of_week', + 'time' => 'time' + ], 'Upsun\Model\RedirectConfiguration' => [ 'expires' => 'expires', 'paths' => 'paths' @@ -2714,11 +3518,6 @@ public static function attributeMap(string $classname): array 'Upsun\Model\RegionCompliance' => [ 'hipaa' => 'hipaa' ], - 'Upsun\Model\RegionDataCenter' => [ - 'name' => 'name', - 'label' => 'label', - 'location' => 'location' - ], 'Upsun\Model\RegionDatacenter' => [ 'name' => 'name', 'label' => 'label', @@ -2816,6 +3615,160 @@ public static function attributeMap(string $classname): array 'Upsun\Model\Resources6' => [ 'init' => 'init' ], + 'Upsun\Model\ResourcesByService200Response' => [ + 'grain' => '_grain', + 'from' => '_from', + 'to' => '_to', + 'projectId' => '_project_id', + 'environmentId' => '_environment_id', + 'branchMachineName' => '_branch_machine_name', + 'service' => '_service', + 'data' => 'data', + 'dg2HostTypesMapping' => '_dg2_host_types_mapping' + ], + 'Upsun\Model\ResourcesByService200ResponseDataInner' => [ + 'timestamp' => 'timestamp', + 'instances' => 'instances' + ], + 'Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValue' => [ + 'cpuUsed' => 'cpu_used', + 'cpuLimit' => 'cpu_limit', + 'memoryUsed' => 'memory_used', + 'memoryLimit' => 'memory_limit', + 'swapUsed' => 'swap_used', + 'swapLimit' => 'swap_limit', + 'memoryPressure' => 'memory_pressure', + 'cpuPressure' => 'cpu_pressure', + 'ioPressure' => 'io_pressure', + 'irqPressure' => 'irq_pressure', + 'mountpoints' => 'mountpoints' + ], + 'Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueCpuLimit' => [ + 'max' => 'max' + ], + 'Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueCpuPressure' => [ + 'min' => 'min', + 'max' => 'max', + 'avg' => 'avg', + 'stddev' => 'stddev', + 'p50' => 'p50', + 'p95' => 'p95', + 'p96' => 'p96', + 'p97' => 'p97', + 'p98' => 'p98', + 'p99' => 'p99' + ], + 'Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueCpuUsed' => [ + 'min' => 'min', + 'max' => 'max', + 'avg' => 'avg', + 'stddev' => 'stddev', + 'p50' => 'p50', + 'p95' => 'p95', + 'p96' => 'p96', + 'p97' => 'p97', + 'p98' => 'p98', + 'p99' => 'p99' + ], + 'Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueIoPressure' => [ + 'min' => 'min', + 'max' => 'max', + 'avg' => 'avg', + 'stddev' => 'stddev', + 'p50' => 'p50', + 'p95' => 'p95', + 'p96' => 'p96', + 'p97' => 'p97', + 'p98' => 'p98', + 'p99' => 'p99' + ], + 'Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueIrqPressure' => [ + 'min' => 'min', + 'max' => 'max', + 'avg' => 'avg', + 'stddev' => 'stddev', + 'p50' => 'p50', + 'p95' => 'p95', + 'p96' => 'p96', + 'p97' => 'p97', + 'p98' => 'p98', + 'p99' => 'p99' + ], + 'Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueMemoryLimit' => [ + 'max' => 'max' + ], + 'Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueMemoryPressure' => [ + 'min' => 'min', + 'max' => 'max', + 'avg' => 'avg', + 'stddev' => 'stddev', + 'p50' => 'p50', + 'p95' => 'p95', + 'p96' => 'p96', + 'p97' => 'p97', + 'p98' => 'p98', + 'p99' => 'p99' + ], + 'Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueMemoryUsed' => [ + 'min' => 'min', + 'max' => 'max', + 'avg' => 'avg', + 'stddev' => 'stddev', + 'p50' => 'p50', + 'p95' => 'p95', + 'p96' => 'p96', + 'p97' => 'p97', + 'p98' => 'p98', + 'p99' => 'p99' + ], + 'Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueMountpointsValue' => [ + 'diskUsed' => 'disk_used', + 'diskLimit' => 'disk_limit', + 'inodesUsed' => 'inodes_used', + 'inodesLimit' => 'inodes_limit' + ], + 'Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueDiskLimit' => [ + 'max' => 'max' + ], + 'Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueDiskUsed' => [ + 'min' => 'min', + 'max' => 'max', + 'avg' => 'avg', + 'stddev' => 'stddev', + 'p50' => 'p50', + 'p95' => 'p95', + 'p96' => 'p96', + 'p97' => 'p97', + 'p98' => 'p98', + 'p99' => 'p99' + ], + 'Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueInodesLimit' => [ + 'max' => 'max' + ], + 'Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueInodesUsed' => [ + 'min' => 'min', + 'max' => 'max', + 'avg' => 'avg', + 'stddev' => 'stddev', + 'p50' => 'p50', + 'p95' => 'p95', + 'p96' => 'p96', + 'p97' => 'p97', + 'p98' => 'p98', + 'p99' => 'p99' + ], + 'Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueSwapUsed' => [ + 'min' => 'min', + 'max' => 'max', + 'avg' => 'avg', + 'stddev' => 'stddev', + 'p50' => 'p50', + 'p95' => 'p95', + 'p96' => 'p96', + 'p97' => 'p97', + 'p98' => 'p98', + 'p99' => 'p99' + ], 'Upsun\Model\ResourcesLimits' => [ 'containerProfiles' => 'container_profiles', 'production' => 'production', @@ -2828,6 +3781,305 @@ public static function attributeMap(string $classname): array 'redeployedStart' => 'redeployed_start', 'redeployedEnd' => 'redeployed_end' ], + 'Upsun\Model\ResourcesOverview200Response' => [ + 'grain' => '_grain', + 'from' => '_from', + 'to' => '_to', + 'projectId' => '_project_id', + 'environmentId' => '_environment_id', + 'branchMachineName' => '_branch_machine_name', + 'data' => 'data' + ], + 'Upsun\Model\ResourcesOverview200ResponseDataInner' => [ + 'timestamp' => 'timestamp', + 'services' => 'services' + ], + 'Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValue' => [ + 'cpuUsed' => 'cpu_used', + 'cpuLimit' => 'cpu_limit', + 'memoryUsed' => 'memory_used', + 'memoryLimit' => 'memory_limit', + 'swapUsed' => 'swap_used', + 'swapLimit' => 'swap_limit', + 'memoryPressure' => 'memory_pressure', + 'cpuPressure' => 'cpu_pressure', + 'ioPressure' => 'io_pressure', + 'irqPressure' => 'irq_pressure', + 'mountpoints' => 'mountpoints' + ], + 'Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueCpuLimit' => [ + 'max' => 'max' + ], + 'Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueCpuPressure' => [ + 'min' => 'min', + 'max' => 'max', + 'avg' => 'avg', + 'stddev' => 'stddev', + 'p50' => 'p50', + 'p95' => 'p95', + 'p96' => 'p96', + 'p97' => 'p97', + 'p98' => 'p98', + 'p99' => 'p99' + ], + 'Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueCpuUsed' => [ + 'min' => 'min', + 'max' => 'max', + 'avg' => 'avg', + 'stddev' => 'stddev', + 'p50' => 'p50', + 'p95' => 'p95', + 'p96' => 'p96', + 'p97' => 'p97', + 'p98' => 'p98', + 'p99' => 'p99' + ], + 'Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueIoPressure' => [ + 'min' => 'min', + 'max' => 'max', + 'avg' => 'avg', + 'stddev' => 'stddev', + 'p50' => 'p50', + 'p95' => 'p95', + 'p96' => 'p96', + 'p97' => 'p97', + 'p98' => 'p98', + 'p99' => 'p99' + ], + 'Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueIrqPressure' => [ + 'min' => 'min', + 'max' => 'max', + 'avg' => 'avg', + 'stddev' => 'stddev', + 'p50' => 'p50', + 'p95' => 'p95', + 'p96' => 'p96', + 'p97' => 'p97', + 'p98' => 'p98', + 'p99' => 'p99' + ], + 'Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueMemoryLimit' => [ + 'max' => 'max' + ], + 'Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueMemoryPressure' => [ + 'min' => 'min', + 'max' => 'max', + 'avg' => 'avg', + 'stddev' => 'stddev', + 'p50' => 'p50', + 'p95' => 'p95', + 'p96' => 'p96', + 'p97' => 'p97', + 'p98' => 'p98', + 'p99' => 'p99' + ], + 'Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueMemoryUsed' => [ + 'min' => 'min', + 'max' => 'max', + 'avg' => 'avg', + 'stddev' => 'stddev', + 'p50' => 'p50', + 'p95' => 'p95', + 'p96' => 'p96', + 'p97' => 'p97', + 'p98' => 'p98', + 'p99' => 'p99' + ], + 'Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueMountpointsValue' => [ + 'diskUsed' => 'disk_used', + 'diskLimit' => 'disk_limit', + 'inodesUsed' => 'inodes_used', + 'inodesLimit' => 'inodes_limit' + ], + 'Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueDiskLimit' => [ + 'max' => 'max' + ], + 'Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueDiskUsed' => [ + 'min' => 'min', + 'max' => 'max', + 'avg' => 'avg', + 'stddev' => 'stddev', + 'p50' => 'p50', + 'p95' => 'p95', + 'p96' => 'p96', + 'p97' => 'p97', + 'p98' => 'p98', + 'p99' => 'p99' + ], + 'Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueInodesLimit' => [ + 'max' => 'max' + ], + 'Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueInodesUsed' => [ + 'min' => 'min', + 'max' => 'max', + 'avg' => 'avg', + 'stddev' => 'stddev', + 'p50' => 'p50', + 'p95' => 'p95', + 'p96' => 'p96', + 'p97' => 'p97', + 'p98' => 'p98', + 'p99' => 'p99' + ], + 'Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueSwapLimit' => [ + 'max' => 'max' + ], + 'Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueSwapUsed' => [ + 'min' => 'min', + 'max' => 'max', + 'avg' => 'avg', + 'stddev' => 'stddev', + 'p50' => 'p50', + 'p95' => 'p95', + 'p96' => 'p96', + 'p97' => 'p97', + 'p98' => 'p98', + 'p99' => 'p99' + ], + 'Upsun\Model\ResourcesSummary200Response' => [ + 'from' => '_from', + 'to' => '_to', + 'projectId' => '_project_id', + 'environmentId' => '_environment_id', + 'branchMachineName' => '_branch_machine_name', + 'data' => 'data' + ], + 'Upsun\Model\ResourcesSummary200ResponseData' => [ + 'services' => 'services' + ], + 'Upsun\Model\ResourcesSummary200ResponseDataServicesValueValue' => [ + 'cpuUsed' => 'cpu_used', + 'cpuLimit' => 'cpu_limit', + 'memoryUsed' => 'memory_used', + 'memoryLimit' => 'memory_limit', + 'swapUsed' => 'swap_used', + 'swapLimit' => 'swap_limit', + 'memoryPressure' => 'memory_pressure', + 'cpuPressure' => 'cpu_pressure', + 'ioPressure' => 'io_pressure', + 'irqPressure' => 'irq_pressure', + 'mountpoints' => 'mountpoints' + ], + 'Upsun\Model\ResourcesSummary200ResponseDataServicesValueValueCpuPressure' => [ + 'min' => 'min', + 'max' => 'max', + 'avg' => 'avg', + 'stddev' => 'stddev', + 'p50' => 'p50', + 'p95' => 'p95', + 'p96' => 'p96', + 'p97' => 'p97', + 'p98' => 'p98', + 'p99' => 'p99' + ], + 'Upsun\Model\ResourcesSummary200ResponseDataServicesValueValueCpuUsed' => [ + 'min' => 'min', + 'max' => 'max', + 'avg' => 'avg', + 'stddev' => 'stddev', + 'p50' => 'p50', + 'p95' => 'p95', + 'p96' => 'p96', + 'p97' => 'p97', + 'p98' => 'p98', + 'p99' => 'p99' + ], + 'Upsun\Model\ResourcesSummary200ResponseDataServicesValueValueIoPressure' => [ + 'min' => 'min', + 'max' => 'max', + 'avg' => 'avg', + 'stddev' => 'stddev', + 'p50' => 'p50', + 'p95' => 'p95', + 'p96' => 'p96', + 'p97' => 'p97', + 'p98' => 'p98', + 'p99' => 'p99' + ], + 'Upsun\Model\ResourcesSummary200ResponseDataServicesValueValueIrqPressure' => [ + 'min' => 'min', + 'max' => 'max', + 'avg' => 'avg', + 'stddev' => 'stddev', + 'p50' => 'p50', + 'p95' => 'p95', + 'p96' => 'p96', + 'p97' => 'p97', + 'p98' => 'p98', + 'p99' => 'p99' + ], + 'Upsun\Model\ResourcesSummary200ResponseDataServicesValueValueMemoryPressure' => [ + 'min' => 'min', + 'max' => 'max', + 'avg' => 'avg', + 'stddev' => 'stddev', + 'p50' => 'p50', + 'p95' => 'p95', + 'p96' => 'p96', + 'p97' => 'p97', + 'p98' => 'p98', + 'p99' => 'p99' + ], + 'Upsun\Model\ResourcesSummary200ResponseDataServicesValueValueMemoryUsed' => [ + 'min' => 'min', + 'max' => 'max', + 'avg' => 'avg', + 'stddev' => 'stddev', + 'p50' => 'p50', + 'p95' => 'p95', + 'p96' => 'p96', + 'p97' => 'p97', + 'p98' => 'p98', + 'p99' => 'p99' + ], + 'Upsun\Model\ResourcesSummary200ResponseDataServicesValueValueMountpointsValue' => [ + 'diskUsed' => 'disk_used', + 'diskLimit' => 'disk_limit', + 'inodesUsed' => 'inodes_used', + 'inodesLimit' => 'inodes_limit' + ], + 'Upsun\Model\ResourcesSummary200ResponseDataServicesValueValueMountpointsValueDiskUsed' => [ + 'min' => 'min', + 'max' => 'max', + 'avg' => 'avg', + 'stddev' => 'stddev', + 'p50' => 'p50', + 'p95' => 'p95', + 'p96' => 'p96', + 'p97' => 'p97', + 'p98' => 'p98', + 'p99' => 'p99' + ], + 'Upsun\Model\ResourcesSummary200ResponseDataServicesValueValueMountpointsValueInodesUsed' => [ + 'min' => 'min', + 'max' => 'max', + 'avg' => 'avg', + 'stddev' => 'stddev', + 'p50' => 'p50', + 'p95' => 'p95', + 'p96' => 'p96', + 'p97' => 'p97', + 'p98' => 'p98', + 'p99' => 'p99' + ], + 'Upsun\Model\ResourcesSummary200ResponseDataServicesValueValueSwapUsed' => [ + 'min' => 'min', + 'max' => 'max', + 'avg' => 'avg', + 'stddev' => 'stddev', + 'p50' => 'p50', + 'p95' => 'p95', + 'p96' => 'p96', + 'p97' => 'p97', + 'p98' => 'p98', + 'p99' => 'p99' + ], + 'Upsun\Model\ResourcesSummary400Response' => [ + 'type' => 'type', + 'title' => 'title', + 'status' => 'status', + 'violations' => 'violations' + ], 'Upsun\Model\Route' => [ 'attributes' => 'attributes', 'type' => 'type', @@ -2862,11 +4114,9 @@ public static function attributeMap(string $classname): array 'upstream' => 'upstream', 'sticky' => 'sticky' ], - 'Upsun\Model\Routing' => [ - 'percentage' => 'percentage' - ], - 'Upsun\Model\Routing1' => [ - 'percentage' => 'percentage' + 'Upsun\Model\RunConfiguration' => [ + 'command' => 'command', + 'timeout' => 'timeout' ], 'Upsun\Model\RuntimeOperations' => [ 'enabled' => 'enabled' @@ -2886,6 +4136,7 @@ public static function attributeMap(string $classname): array 'createdAt' => 'created_at', 'updatedAt' => 'updated_at', 'type' => 'type', + 'role' => 'role', 'events' => 'events', 'environments' => 'environments', 'excludedEnvironments' => 'excluded_environments', @@ -2934,7 +4185,8 @@ public static function attributeMap(string $classname): array 'resources' => 'resources', 'containerProfile' => 'container_profile', 'endpoints' => 'endpoints', - 'instanceCount' => 'instance_count' + 'instanceCount' => 'instance_count', + 'supportsHorizontalScaling' => 'supports_horizontal_scaling' ], 'Upsun\Model\ServicesValue1' => [ 'resources' => 'resources', @@ -2950,6 +4202,7 @@ public static function attributeMap(string $classname): array 'createdAt' => 'created_at', 'updatedAt' => 'updated_at', 'type' => 'type', + 'role' => 'role', 'channel' => 'channel', 'id' => 'id' ], @@ -2967,6 +4220,9 @@ public static function attributeMap(string $classname): array 'root' => 'root', 'operations' => 'operations' ], + 'Upsun\Model\SourceCodeConfiguration1' => [ + 'root' => 'root' + ], 'Upsun\Model\SourceOperations' => [ 'enabled' => 'enabled' ], @@ -2988,6 +4244,7 @@ public static function attributeMap(string $classname): array 'createdAt' => 'created_at', 'updatedAt' => 'updated_at', 'type' => 'type', + 'role' => 'role', 'extra' => 'extra', 'url' => 'url', 'index' => 'index', @@ -3140,6 +4397,7 @@ public static function attributeMap(string $classname): array 'createdAt' => 'created_at', 'updatedAt' => 'updated_at', 'type' => 'type', + 'role' => 'role', 'extra' => 'extra', 'url' => 'url', 'category' => 'category', @@ -3171,6 +4429,7 @@ public static function attributeMap(string $classname): array 'createdAt' => 'created_at', 'updatedAt' => 'updated_at', 'type' => 'type', + 'role' => 'role', 'extra' => 'extra', 'host' => 'host', 'port' => 'port', @@ -3218,6 +4477,23 @@ public static function attributeMap(string $classname): array 'clientAuthentication' => 'client_authentication', 'clientCertificateAuthorities' => 'client_certificate_authorities' ], + 'Upsun\Model\Task' => [ + 'id' => 'id', + 'type' => 'type', + 'source' => 'source', + 'hooks' => 'hooks', + 'relationships' => 'relationships', + 'mounts' => 'mounts', + 'variables' => 'variables', + 'run' => 'run', + 'name' => 'name' + ], + 'Upsun\Model\TaskTriggerInput' => [ + 'variables' => 'variables' + ], + 'Upsun\Model\Tasks' => [ + 'enabled' => 'enabled' + ], 'Upsun\Model\Team' => [ 'id' => 'id', 'organizationId' => 'organization_id', @@ -3346,6 +4622,7 @@ public static function attributeMap(string $classname): array 'defaultCatalog' => 'default_catalog', 'projectOptionsUrl' => 'project_options_url', 'companyName' => 'company_name', + 'legalEntityName' => 'legal_entity_name', 'customerType' => 'customer_type', 'vatNumber' => 'vat_number', 'billingContact' => 'billing_contact' @@ -3359,6 +4636,7 @@ public static function attributeMap(string $classname): array 'name' => 'name', 'label' => 'label', 'country' => 'country', + 'billingProfileId' => 'billing_profile_id', 'securityContact' => 'security_contact' ], 'Upsun\Model\UpdateOrgSubscriptionRequest' => [ @@ -3558,18 +4836,6 @@ public static function attributeMap(string $classname): array 'channel' => 'channel', 'phoneNumber' => 'phone_number' ], - 'Upsun\Model\Version' => [ - 'id' => 'id', - 'commit' => 'commit', - 'locked' => 'locked', - 'routing' => 'routing' - ], - 'Upsun\Model\VersionCreateInput' => [ - 'routing' => 'routing' - ], - 'Upsun\Model\VersionPatch' => [ - 'routing' => 'routing' - ], 'Upsun\Model\Vouchers' => [ 'uuid' => 'uuid', 'vouchersTotal' => 'vouchers_total', @@ -3630,7 +4896,8 @@ public static function attributeMap(string $classname): array 'isAcrossSubmodule' => 'is_across_submodule', 'instanceCount' => 'instance_count', 'configId' => 'config_id', - 'slugId' => 'slug_id' + 'slugId' => 'slug_id', + 'supportsHorizontalScaling' => 'supports_horizontal_scaling' ], 'Upsun\Model\WebConfiguration' => [ 'locations' => 'locations', @@ -3648,6 +4915,7 @@ public static function attributeMap(string $classname): array 'createdAt' => 'created_at', 'updatedAt' => 'updated_at', 'type' => 'type', + 'role' => 'role', 'events' => 'events', 'environments' => 'environments', 'excludedEnvironments' => 'excluded_environments', @@ -3720,7 +4988,8 @@ public static function attributeMap(string $classname): array 'app' => 'app', 'stack' => 'stack', 'instanceCount' => 'instance_count', - 'slugId' => 'slug_id' + 'slugId' => 'slug_id', + 'supportsHorizontalScaling' => 'supports_horizontal_scaling' ], ]; } diff --git a/src/Api/Serializer/ApiObjectFormatsMapper.php b/src/Api/Serializer/ApiObjectFormatsMapper.php index 0b0839a7..dd242b43 100644 --- a/src/Api/Serializer/ApiObjectFormatsMapper.php +++ b/src/Api/Serializer/ApiObjectFormatsMapper.php @@ -45,6 +45,7 @@ public static function openApiFormats(string $classname) 'project' => null, 'state' => null, 'result' => null, + 'failureReason' => null, 'startedAt' => 'date-time', 'completedAt' => 'date-time', 'completionPercent' => null, @@ -252,6 +253,7 @@ public static function openApiFormats(string $classname) 'createdAt' => 'date-time', 'updatedAt' => 'date-time', 'type' => null, + 'role' => null, 'fetchBranches' => null, 'pruneBranches' => null, 'environmentInitResources' => null, @@ -299,6 +301,7 @@ public static function openApiFormats(string $classname) 'createdAt' => 'date-time', 'updatedAt' => 'date-time', 'type' => null, + 'role' => null, 'fetchBranches' => null, 'pruneBranches' => null, 'environmentInitResources' => null, @@ -348,6 +351,7 @@ public static function openApiFormats(string $classname) 'createdAt' => 'date-time', 'updatedAt' => 'date-time', 'type' => null, + 'role' => null, 'environmentsCredentials' => null, 'continuousProfiling' => null, 'id' => null @@ -361,6 +365,384 @@ public static function openApiFormats(string $classname) 'type' => null ], + 'Upsun\Model\BlackfirePhpServerCaches200Response' => [ + 'grain' => null, + 'from' => null, + 'to' => null, + 'agent' => 'uuid', + 'projectId' => null, + 'environmentId' => null, + 'branchMachineName' => null, + 'distributionCost' => null, + 'data' => null, + 'contexts' => null, + 'contextsMode' => null + ], + + 'Upsun\Model\BlackfirePhpServerCaches200ResponseDataInner' => [ + 'timestamp' => null, + 'opcacheUsage' => 'float', + 'opcacheIsbUsage' => 'float', + 'apcuUsage' => 'float', + 'realpathUsage' => 'float', + 'pcreUsage' => 'float', + 'apcuHitrate' => 'float', + 'opcacheHitrate' => 'float' + ], + + 'Upsun\Model\BlackfireProfileGraph200Response' => [ + 'projectId' => null, + 'environmentId' => null, + 'branchMachineName' => null, + 'agent' => 'uuid', + 'uuid' => 'uuid', + 'dimensions' => null, + 'root' => null, + 'nodes' => null, + 'edges' => null, + 'comparison' => null, + 'language' => null, + 'peaks' => null, + 'arguments' => null, + 'layers' => null, + 'labels' => null, + 'spans' => null, + 'spansOt' => null, + 'hierarchy' => null + ], + + 'Upsun\Model\BlackfireProfileProfile200Response' => [ + 'projectId' => null, + 'environmentId' => null, + 'branchMachineName' => null, + 'agent' => 'uuid', + 'uuid' => 'uuid', + 'profile' => null + ], + + 'Upsun\Model\BlackfireProfileSubprofiles200Response' => [ + 'projectId' => null, + 'environmentId' => null, + 'branchMachineName' => null, + 'agent' => 'uuid', + 'uuid' => 'uuid', + 'subprofiles' => null + ], + + 'Upsun\Model\BlackfireProfileTimeline200Response' => [ + 'projectId' => null, + 'environmentId' => null, + 'branchMachineName' => null, + 'agent' => 'uuid', + 'uuid' => 'uuid', + 'timeline' => null, + 'dimension' => null, + 'time' => null, + 'language' => null + ], + + 'Upsun\Model\BlackfireProfilesListAutomatic200Response' => [ + 'projectId' => null, + 'environmentId' => null, + 'branchMachineName' => null, + 'agent' => 'uuid', + 'profiles' => null, + 'page' => null, + 'pages' => null, + 'total' => null + ], + + 'Upsun\Model\BlackfireProfilesListAutomatic200ResponseProfilesInner' => [ + 'uuid' => 'uuid', + 'name' => null, + 'links' => null, + 'metadata' => null + ], + + 'Upsun\Model\BlackfireProfilesListAutomatic200ResponseProfilesInnerLinks' => [ + 'apiSubprofiles' => null, + 'apiProfile' => null, + 'apiGraph' => null, + 'graphUrl' => null, + 'apiTimeline' => null + ], + + 'Upsun\Model\BlackfireProfilesListAutomatic200ResponseProfilesInnerLinksGraphUrl' => [ + 'href' => 'uri', + 'type' => null + ], + + 'Upsun\Model\BlackfireProfilesRecommendations200Response' => [ + 'projectId' => null, + 'environmentId' => null, + 'branchMachineName' => null, + 'agent' => 'uuid', + 'from' => null, + 'to' => null, + 'recommendations' => null, + 'total' => null, + 'transaction' => null, + 'testedTransactions' => null, + 'untestedTopTransactions' => null + ], + + 'Upsun\Model\BlackfireProfilesRecommendations200ResponseRecommendationsInner' => [ + 'name' => null, + 'total' => null, + 'constraint' => null, + 'links' => null + ], + + 'Upsun\Model\BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinks' => [ + 'apiSubprofiles' => null, + 'apiProfile' => null, + 'apiGraph' => null, + 'apiTimeline' => null + ], + + 'Upsun\Model\BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiGraph' => [ + 'href' => 'uri', + 'type' => null + ], + + 'Upsun\Model\BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiProfile' => [ + 'href' => 'uri', + 'type' => null + ], + + 'Upsun\Model\BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiSubprofiles' => [ + 'href' => 'uri', + 'type' => null + ], + + 'Upsun\Model\BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiTimeline' => [ + 'href' => 'uri', + 'type' => null + ], + + 'Upsun\Model\BlackfireProfilesRecommendations400Response' => [ + 'type' => 'uri', + 'title' => null, + 'status' => null, + 'violations' => null + ], + + 'Upsun\Model\BlackfireServerGlobal200Response' => [ + 'quota' => null, + 'grain' => null, + 'from' => null, + 'to' => null, + 'keys' => null, + 'agent' => 'uuid', + 'contexts' => null, + 'contextsMode' => null, + 'projectId' => null, + 'environmentId' => null, + 'branchMachineName' => null, + 'alertEvaluations' => null, + 'server' => null, + 'distributionCost' => null + ], + + 'Upsun\Model\BlackfireServerGlobal200ResponseAlertEvaluationsInner' => [ + 'timestamp' => null, + 'alertRuleUuid' => 'uuid', + 'value' => 'float', + 'state' => null + ], + + 'Upsun\Model\BlackfireServerGlobal200ResponseQuota' => [ + 'allowed' => null, + 'used' => null, + 'exceeded' => null, + 'periodStartedAt' => 'date-time', + 'periodEndsAt' => 'date-time' + ], + + 'Upsun\Model\BlackfireServerGlobal200ResponseServer' => [ + 'total' => 'float', + 'data' => null + ], + + 'Upsun\Model\BlackfireServerGlobal200ResponseServerDataInner' => [ + 'timestamp' => null, + 'wt' => 'float', + 'mu' => 'float', + 'pmu' => 'float', + 'load' => 'float', + 'stdout' => 'float', + 'rpms' => 'float' + ], + + 'Upsun\Model\BlackfireServerTopSpans200Response' => [ + 'grain' => null, + 'from' => null, + 'to' => null, + 'agent' => 'uuid', + 'projectId' => null, + 'environmentId' => null, + 'branchMachineName' => null, + 'sort' => null, + 'topSpans' => null, + 'advancedFilters' => null, + 'contexts' => null, + 'contextsMode' => null, + 'transactions' => null, + 'transactionsMode' => null, + 'wtSlot' => null, + 'wtSlotMode' => null, + 'pmuSlot' => null, + 'pmuSlotMode' => null, + 'httpStatusCodes' => null, + 'httpStatusCodesMode' => null, + 'httpHosts' => null, + 'httpHostsMode' => null, + 'hosts' => null, + 'hostsMode' => null, + 'frameworks' => null, + 'frameworksMode' => null, + 'languages' => null, + 'languagesMode' => null, + 'methods' => null, + 'methodsMode' => null, + 'runtimes' => null, + 'runtimesMode' => null, + 'oss' => null, + 'ossMode' => null, + 'distributionCost' => null + ], + + 'Upsun\Model\BlackfireServerTopSpans200ResponseAdvancedFilters' => [ + 'fields' => null, + 'maxApplicableFilters' => null + ], + + 'Upsun\Model\BlackfireServerTopSpans200ResponseAdvancedFiltersFieldsValue' => [ + 'distinctValues' => null, + 'type' => null, + 'values' => null + ], + + 'Upsun\Model\BlackfireServerTopSpans200ResponseAdvancedFiltersFieldsValueValuesInner' => [ + 'value' => null, + 'count' => null + ], + + 'Upsun\Model\BlackfireServerTopSpans200ResponseTopSpans' => [ + 'data' => null + ], + + 'Upsun\Model\BlackfireServerTopSpans200ResponseTopSpansDataInner' => [ + 'id' => null, + 'label' => null, + 'percentage' => 'float', + 'wt' => null, + 'p96' => null, + 'count' => null, + 'requestWt' => null, + 'metrics' => null, + 'serviceName' => null, + 'impact' => 'float' + ], + + 'Upsun\Model\BlackfireServerTransactionsBreakdown200Response' => [ + 'grain' => null, + 'from' => null, + 'to' => null, + 'agent' => 'uuid', + 'projectId' => null, + 'environmentId' => null, + 'branchMachineName' => null, + 'breakdownDimension' => null, + 'sort' => null, + 'breakdownLimit' => null, + 'breakdownTopHits' => null, + 'transactions' => null, + 'topHitsTimeline' => null, + 'contexts' => null, + 'contextsMode' => null, + 'transactions' => null, + 'transactionsMode' => null, + 'wtSlot' => null, + 'wtSlotMode' => null, + 'pmuSlot' => null, + 'pmuSlotMode' => null, + 'httpStatusCodes' => null, + 'httpStatusCodesMode' => null, + 'httpHosts' => null, + 'httpHostsMode' => null, + 'hosts' => null, + 'hostsMode' => null, + 'frameworks' => null, + 'frameworksMode' => null, + 'languages' => null, + 'languagesMode' => null, + 'methods' => null, + 'methodsMode' => null, + 'runtimes' => null, + 'runtimesMode' => null, + 'oss' => null, + 'ossMode' => null, + 'distributionCost' => null + ], + + 'Upsun\Model\BlackfireServerTransactionsBreakdown200ResponseBreakdownTopHits' => [ + 'maxQuantity' => null, + 'maxPercentage' => 'float' + ], + + 'Upsun\Model\BlackfireServerTransactionsBreakdown200ResponseTopHitsTimeline' => [ + 'data' => null + ], + + 'Upsun\Model\BlackfireServerTransactionsBreakdown200ResponseTopHitsTimelineDataInner' => [ + 'timestamp' => null, + 'totalConsumed' => 'float', + 'totalCount' => 'float', + 'transactions' => null + ], + + 'Upsun\Model\BlackfireServerTransactionsBreakdown200ResponseTopHitsTimelineDataInnerTransactionsValue' => [ + 'average' => 'float', + 'count' => 'float' + ], + + 'Upsun\Model\BlackfireServerTransactionsBreakdown200ResponseTransactions' => [ + 'data' => null + ], + + 'Upsun\Model\BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInner' => [ + 'transaction' => null, + 'wt96thPercentile' => 'float', + 'avgWt' => 'float', + 'avgPmu' => 'float', + 'avgStdout' => 'float', + 'totalRequests' => 'float', + 'totalRequestsUnnamed' => 'float', + 'totalErrors' => 'float', + 'impact' => 'float', + 'topHit' => null, + 'links' => null + ], + + 'Upsun\Model\BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinks' => [ + 'topSpans' => null, + 'recommendations' => null, + 'automaticProfiles' => null + ], + + 'Upsun\Model\BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksAutomaticProfiles' => [ + 'href' => 'uri' + ], + + 'Upsun\Model\BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksRecommendations' => [ + 'href' => 'uri' + ], + + 'Upsun\Model\BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksTopSpans' => [ + 'href' => 'uri' + ], + 'Upsun\Model\Blob' => [ 'id' => null, 'sha' => null, @@ -416,7 +798,9 @@ public static function openApiFormats(string $classname) 'Upsun\Model\CanCreateNewOrgSubscription200ResponseRequiredAction' => [ 'action' => null, - 'type' => null + 'type' => null, + 'credentials' => null, + 'reference' => null ], 'Upsun\Model\CanUpdateSubscription200Response' => [ @@ -506,10 +890,18 @@ public static function openApiFormats(string $classname) 'email' => null ], + 'Upsun\Model\CommunityPackagesInner' => [ + ], + 'Upsun\Model\Components' => [ 'voucherVatBaseprice' => null ], + 'Upsun\Model\ComposableImages' => [ + 'runtimes' => null, + 'packages' => null + ], + 'Upsun\Model\Config' => [ 'newrelic' => null, 'sumologic' => null, @@ -840,10 +1232,14 @@ public static function openApiFormats(string $classname) ], 'Upsun\Model\DeploymentState' => [ + 'lastStateUpdateSuccessful' => null, 'lastDeploymentSuccessful' => null, + 'lastDeploymentFailureReason' => null, + 'lastDeploymentCommands' => null, 'lastDeploymentAt' => 'date-time', 'lastAutoscaleUpAt' => 'date-time', 'lastAutoscaleDownAt' => 'date-time', + 'lastMaintenanceAt' => 'date-time', 'crons' => null ], @@ -864,6 +1260,9 @@ public static function openApiFormats(string $classname) 'docroots' => null, 'siteUrls' => null, 'sshHosts' => null, + 'k8sConfig' => null, + 'bastionNodesUser' => null, + 'bastionNodesHost' => null, 'useDedicatedGrid' => null, 'storageType' => null, 'id' => null, @@ -899,6 +1298,15 @@ public static function openApiFormats(string $classname) 'maxEnvironments' => null ], + 'Upsun\Model\Diff' => [ + 'id' => null, + 'diff' => null, + 'newPath' => null, + 'newId' => null, + 'oldPath' => null, + 'oldId' => null + ], + 'Upsun\Model\Discount' => [ 'id' => null, 'organizationId' => null, @@ -961,6 +1369,14 @@ public static function openApiFormats(string $classname) 'replacementFor' => null ], + 'Upsun\Model\DomainClaim' => [ + 'id' => null, + 'createdAt' => 'date-time', + 'updatedAt' => 'date-time', + 'name' => null, + 'count' => null + ], + 'Upsun\Model\DomainCreateInput' => [ 'name' => null, 'attributes' => null, @@ -977,6 +1393,7 @@ public static function openApiFormats(string $classname) 'createdAt' => 'date-time', 'updatedAt' => 'date-time', 'type' => null, + 'role' => null, 'fromAddress' => null, 'recipients' => null, 'id' => null @@ -1237,12 +1654,14 @@ public static function openApiFormats(string $classname) 'createdAt' => 'date-time', 'updatedAt' => 'date-time', 'type' => null, + 'role' => null, 'events' => null, 'environments' => null, 'excludedEnvironments' => null, 'states' => null, 'result' => null, 'serviceId' => null, + 'tlsCertificates' => null, 'id' => null ], @@ -1254,7 +1673,8 @@ public static function openApiFormats(string $classname) 'environments' => null, 'excludedEnvironments' => null, 'states' => null, - 'result' => null + 'result' => null, + 'tlsCertificates' => null ], 'Upsun\Model\FastlyIntegrationPatch' => [ @@ -1265,7 +1685,8 @@ public static function openApiFormats(string $classname) 'environments' => null, 'excludedEnvironments' => null, 'states' => null, - 'result' => null + 'result' => null, + 'tlsCertificates' => null ], 'Upsun\Model\FilesInner' => [ @@ -1420,6 +1841,7 @@ public static function openApiFormats(string $classname) 'createdAt' => 'date-time', 'updatedAt' => 'date-time', 'type' => null, + 'role' => null, 'fetchBranches' => null, 'pruneBranches' => null, 'environmentInitResources' => null, @@ -1472,6 +1894,7 @@ public static function openApiFormats(string $classname) 'createdAt' => 'date-time', 'updatedAt' => 'date-time', 'type' => null, + 'role' => null, 'fetchBranches' => null, 'pruneBranches' => null, 'environmentInitResources' => null, @@ -1592,6 +2015,7 @@ public static function openApiFormats(string $classname) 'createdAt' => 'date-time', 'updatedAt' => 'date-time', 'type' => null, + 'role' => null, 'url' => null, 'id' => null ], @@ -1614,6 +2038,11 @@ public static function openApiFormats(string $classname) 'postDeploy' => null ], + 'Upsun\Model\Hooks1' => [ + 'build' => null, + 'deploy' => null + ], + 'Upsun\Model\HostsInner' => [ 'id' => null, 'type' => null, @@ -1642,6 +2071,7 @@ public static function openApiFormats(string $classname) 'createdAt' => 'date-time', 'updatedAt' => 'date-time', 'type' => null, + 'role' => null, 'extra' => null, 'url' => null, 'headers' => null, @@ -1668,6 +2098,249 @@ public static function openApiFormats(string $classname) 'excludedServices' => null ], + 'Upsun\Model\HttpMetricsOverview200Response' => [ + 'grain' => null, + 'from' => null, + 'to' => null, + 'projectId' => null, + 'environmentId' => null, + 'environmentType' => null, + 'branchMachineName' => null, + 'topUrlsCount' => null, + 'data' => null + ], + + 'Upsun\Model\HttpMetricsOverview200ResponseData' => [ + 'urls' => null, + 'timelines' => null + ], + + 'Upsun\Model\HttpMetricsOverview200ResponseDataTimelinesInner' => [ + 'timestamp' => null, + 'requestSize' => null, + 'responseSize' => null, + 'urls' => null, + 'codes' => null + ], + + 'Upsun\Model\HttpMetricsOverview200ResponseDataTimelinesInnerCodes' => [ + 'uNKNOWN' => null, + '_1xX' => null, + '_2xX' => null, + '_3xX' => null, + '_4xX' => null, + '_5xX' => null + ], + + 'Upsun\Model\HttpMetricsOverview200ResponseDataTimelinesInnerUrlsValue' => [ + 'count' => null, + 'impact' => 'float' + ], + + 'Upsun\Model\HttpMetricsOverview200ResponseDataUrlsValue' => [ + 'url' => null, + 'method' => null, + 'impact' => 'float', + 'average' => 'float', + 'p50' => 'float', + 'p96' => 'float', + 'count' => null + ], + + 'Upsun\Model\HttpMetricsOverview499Response' => [ + 'error' => null, + 'message' => null + ], + + 'Upsun\Model\HttpMetricsTimelineIps200Response' => [ + 'grain' => null, + 'from' => null, + 'to' => null, + 'projectId' => null, + 'environmentId' => null, + 'environmentType' => null, + 'branchMachineName' => null, + 'breakdownLimit' => null, + 'breakdownTopHits' => null, + 'breakdown' => null, + 'topHitsTimeline' => null, + 'methods' => null, + 'methodsMode' => null, + 'domains' => null, + 'domainsMode' => null, + 'codeSlots' => null, + 'codeSlotsMode' => null, + 'codes' => null, + 'codesMode' => null, + 'requestDurationSlots' => null, + 'requestDurationSlotsMode' => null + ], + + 'Upsun\Model\HttpMetricsTimelineIps200ResponseBreakdown' => [ + 'kind' => null, + 'total' => null, + 'data' => null + ], + + 'Upsun\Model\HttpMetricsTimelineIps200ResponseBreakdownDataInner' => [ + 'name' => null, + 'impact' => 'float', + 'average' => 'float', + 'p50' => 'float', + 'p96' => 'float', + 'count' => null, + 'topHit' => null + ], + + 'Upsun\Model\HttpMetricsTimelineIps200ResponseBreakdownTopHits' => [ + 'maxQuantity' => null, + 'maxPercentage' => 'float' + ], + + 'Upsun\Model\HttpMetricsTimelineIps200ResponseTopHitsTimeline' => [ + 'data' => null + ], + + 'Upsun\Model\HttpMetricsTimelineIps200ResponseTopHitsTimelineDataInner' => [ + 'timestamp' => null, + 'totalConsumed' => 'float', + 'totalCount' => null, + 'data' => null + ], + + 'Upsun\Model\HttpMetricsTimelineIps200ResponseTopHitsTimelineDataInnerDataValue' => [ + 'count' => null, + 'impact' => 'float' + ], + + 'Upsun\Model\HttpMetricsTimelineUrls200Response' => [ + 'grain' => null, + 'from' => null, + 'to' => null, + 'projectId' => null, + 'environmentId' => null, + 'environmentType' => null, + 'branchMachineName' => null, + 'breakdownLimit' => null, + 'breakdownTopHits' => null, + 'breakdown' => null, + 'topHitsTimeline' => null, + 'filters' => null, + 'methods' => null, + 'methodsMode' => null, + 'domains' => null, + 'domainsMode' => null, + 'codeSlots' => null, + 'codeSlotsMode' => null, + 'codes' => null, + 'codesMode' => null, + 'requestDurationSlots' => null, + 'requestDurationSlotsMode' => null + ], + + 'Upsun\Model\HttpMetricsTimelineUrls200ResponseBreakdown' => [ + 'kind' => null, + 'total' => null, + 'data' => null + ], + + 'Upsun\Model\HttpMetricsTimelineUrls200ResponseBreakdownDataInner' => [ + 'url' => null, + 'method' => null, + 'impact' => 'float', + 'average' => 'float', + 'p50' => 'float', + 'p96' => 'float', + 'count' => null, + 'topHit' => null + ], + + 'Upsun\Model\HttpMetricsTimelineUrls200ResponseFilters' => [ + 'maxApplicableFilters' => null, + 'fields' => null + ], + + 'Upsun\Model\HttpMetricsTimelineUrls200ResponseFiltersFieldsValue' => [ + 'distinctValues' => null, + 'type' => null, + 'values' => null + ], + + 'Upsun\Model\HttpMetricsTimelineUrls200ResponseFiltersFieldsValueValuesInner' => [ + 'value' => null, + 'count' => null + ], + + 'Upsun\Model\HttpMetricsTimelineUrls200ResponseTopHitsTimeline' => [ + 'data' => null + ], + + 'Upsun\Model\HttpMetricsTimelineUrls200ResponseTopHitsTimelineDataInner' => [ + 'timestamp' => null, + 'totalConsumed' => 'float', + 'totalCount' => null, + 'requestSize' => null, + 'responseSize' => null, + 'urls' => null, + 'codes' => null + ], + + 'Upsun\Model\HttpMetricsTimelineUserAgents200Response' => [ + 'grain' => null, + 'from' => null, + 'to' => null, + 'projectId' => null, + 'environmentId' => null, + 'environmentType' => null, + 'branchMachineName' => null, + 'breakdownLimit' => null, + 'breakdownTopHits' => null, + 'breakdown' => null, + 'topHitsTimeline' => null, + 'methods' => null, + 'methodsMode' => null, + 'domains' => null, + 'domainsMode' => null, + 'codeSlots' => null, + 'codeSlotsMode' => null, + 'codes' => null, + 'codesMode' => null, + 'requestDurationSlots' => null, + 'requestDurationSlotsMode' => null + ], + + 'Upsun\Model\HttpMetricsTimelineUserAgents200ResponseBreakdown' => [ + 'kind' => null, + 'total' => null, + 'data' => null + ], + + 'Upsun\Model\HttpMetricsTimelineUserAgents200ResponseBreakdownDataInner' => [ + 'name' => null, + 'impact' => 'float', + 'average' => 'float', + 'p50' => 'float', + 'p96' => 'float', + 'count' => null, + 'topHit' => null + ], + + 'Upsun\Model\HttpMetricsTimelineUserAgents200ResponseTopHitsTimeline' => [ + 'data' => null + ], + + 'Upsun\Model\HttpMetricsTimelineUserAgents200ResponseTopHitsTimelineDataInner' => [ + 'timestamp' => null, + 'totalConsumed' => 'float', + 'totalCount' => null, + 'data' => null + ], + + 'Upsun\Model\HttpMetricsTimelineUserAgents200ResponseTopHitsTimelineDataInnerDataValue' => [ + 'count' => null, + 'impact' => 'float' + ], + 'Upsun\Model\ImageTypeRestrictions' => [ 'only' => null, 'exclude' => null @@ -1681,6 +2354,7 @@ public static function openApiFormats(string $classname) 'createdAt' => 'date-time', 'updatedAt' => 'date-time', 'type' => null, + 'role' => null, 'fetchBranches' => null, 'pruneBranches' => null, 'environmentInitResources' => null, @@ -1699,6 +2373,7 @@ public static function openApiFormats(string $classname) 'states' => null, 'result' => null, 'serviceId' => null, + 'tlsCertificates' => null, 'baseUrl' => null, 'buildDraftPullRequests' => null, 'buildPullRequestsPostMerge' => null, @@ -1759,6 +2434,7 @@ public static function openApiFormats(string $classname) 'excludedEnvironments' => null, 'states' => null, 'result' => null, + 'tlsCertificates' => null, 'baseUrl' => null, 'buildDraftPullRequests' => null, 'buildPullRequestsPostMerge' => null, @@ -1811,6 +2487,7 @@ public static function openApiFormats(string $classname) 'excludedEnvironments' => null, 'states' => null, 'result' => null, + 'tlsCertificates' => null, 'baseUrl' => null, 'buildDraftPullRequests' => null, 'buildPullRequestsPostMerge' => null, @@ -1872,6 +2549,31 @@ public static function openApiFormats(string $classname) 'value' => null ], + 'Upsun\Model\KubernetesDeploymentTargetStorage' => [ + 'type' => null, + 'name' => null, + 'k8sConfig' => null, + 'bastionNodesUser' => null, + 'bastionNodesHost' => null, + 'id' => null + ], + + 'Upsun\Model\KubernetesDeploymentTargetStorageCreateInput' => [ + 'type' => null, + 'name' => null + ], + + 'Upsun\Model\KubernetesDeploymentTargetStoragePatch' => [ + 'type' => null, + 'name' => null + ], + + 'Upsun\Model\LastDeploymentCommandsInner' => [ + 'app' => null, + 'type' => null, + 'exitCode' => null + ], + 'Upsun\Model\LineItem' => [ 'type' => null, 'licenseId' => null, @@ -2054,6 +2756,14 @@ public static function openApiFormats(string $classname) 'maxExtraPayloadSize' => null ], + 'Upsun\Model\Maintenance' => [ + 'nextMaintenance' => 'date-time' + ], + + 'Upsun\Model\MaintenanceWindowConfiguration' => [ + 'recurrence' => null + ], + 'Upsun\Model\MergeInfo' => [ 'commitsAhead' => null, 'commitsBehind' => null, @@ -2099,6 +2809,7 @@ public static function openApiFormats(string $classname) 'createdAt' => 'date-time', 'updatedAt' => 'date-time', 'type' => null, + 'role' => null, 'extra' => null, 'url' => null, 'tlsVerify' => null, @@ -2138,6 +2849,160 @@ public static function openApiFormats(string $classname) 'sha' => null ], + 'Upsun\Model\ObservabilityEntrypoint200Response' => [ + 'message' => null, + 'projectId' => null, + 'branchMachineName' => null, + 'environmentId' => null, + 'environmentType' => null, + 'vendor' => null, + 'pshUserIdentifier' => null, + 'links' => null, + 'retention' => null, + 'dataRetention' => null + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseDataRetention' => [ + 'unit' => null, + 'unitInSeconds' => null, + 'resources' => null, + 'serverMonitoring' => null, + 'logs' => null, + 'httpTraffic' => null, + 'continuousProfiling' => null + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseDataRetentionContinuousProfiling' => [ + 'retentionPeriod' => null, + 'maxRange' => null, + 'recommendedDefaultRange' => null + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseDataRetentionHttpTraffic' => [ + 'retentionPeriod' => null, + 'maxRange' => null, + 'recommendedDefaultRange' => null + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseDataRetentionLogs' => [ + 'retentionPeriod' => null, + 'maxRange' => null, + 'recommendedDefaultRange' => null + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseDataRetentionResources' => [ + 'retentionPeriod' => null, + 'maxRange' => null, + 'recommendedDefaultRange' => null + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseDataRetentionServerMonitoring' => [ + 'retentionPeriod' => null, + 'maxRange' => null, + 'recommendedDefaultRange' => null + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinks' => [ + 'self' => null, + 'resourcesByService' => null, + 'resourcesOverview' => null, + 'resourcesSummary' => null, + 'blackfirePhpServerCaches' => null, + 'blackfireServerGlobal' => null, + 'blackfireServerTransactionsBreakdown' => null, + 'logsQuery' => null, + 'logsOverview' => null, + 'httpMetricsOverview' => null, + 'httpMetricsTimelineUrls' => null, + 'httpMetricsTimelineIps' => null, + 'httpMetricsTimelineUserAgents' => null, + 'consoleSandboxAccess' => null, + 'conprofApplications' => null, + 'conprofApplicationFilters' => null, + 'conprofTimeline' => null, + 'conprofFlamegraph' => null + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksBlackfirePhpServerCaches' => [ + 'href' => 'uri' + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksBlackfireServerGlobal' => [ + 'href' => 'uri' + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksBlackfireServerTransactionsBreakdown' => [ + 'href' => 'uri' + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksConprofApplicationFilters' => [ + 'href' => 'uri' + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksConprofApplications' => [ + 'href' => 'uri' + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksConprofFlamegraph' => [ + 'href' => 'uri' + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksConprofTimeline' => [ + 'href' => 'uri' + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksConsoleSandboxAccess' => [ + 'href' => 'uri' + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksHttpMetricsOverview' => [ + 'href' => 'uri' + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineIps' => [ + 'href' => 'uri' + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineUrls' => [ + 'href' => 'uri' + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineUserAgents' => [ + 'href' => 'uri' + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksLogsOverview' => [ + 'href' => 'uri' + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksLogsQuery' => [ + 'href' => 'uri' + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksResourcesByServiceValue' => [ + 'name' => null, + 'href' => 'uri' + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksResourcesOverview' => [ + 'href' => 'uri' + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksResourcesSummary' => [ + 'href' => 'uri' + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksSelf' => [ + 'href' => 'uri' + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseRetention' => [ + 'resources' => null, + 'logs' => null, + 'httpTraffic' => null, + 'continuousProfiling' => null + ], + 'Upsun\Model\OpenTelemetry' => [ 'enabled' => null, 'role' => null @@ -2481,9 +3346,11 @@ public static function openApiFormats(string $classname) 'status' => null, 'trialPlan' => null, 'projectUi' => null, + 'dedicatedTag' => null, 'createdAt' => 'date-time', 'updatedAt' => 'date-time', 'activities' => null, + 'fastlyServiceIds' => null, 'projectOptions' => null, 'links' => null ], @@ -2570,6 +3437,37 @@ public static function openApiFormats(string $classname) 'updatedAt' => 'date-time' ], + 'Upsun\Model\OtlpLogIntegration' => [ + 'createdAt' => 'date-time', + 'updatedAt' => 'date-time', + 'type' => null, + 'role' => null, + 'extra' => null, + 'url' => null, + 'headers' => null, + 'tlsVerify' => null, + 'excludedServices' => null, + 'id' => null + ], + + 'Upsun\Model\OtlpLogIntegrationCreateInput' => [ + 'type' => null, + 'url' => null, + 'extra' => null, + 'headers' => null, + 'tlsVerify' => null, + 'excludedServices' => null + ], + + 'Upsun\Model\OtlpLogIntegrationPatch' => [ + 'type' => null, + 'url' => null, + 'extra' => null, + 'headers' => null, + 'tlsVerify' => null, + 'excludedServices' => null + ], + 'Upsun\Model\OutboundFirewall' => [ 'enabled' => null ], @@ -2591,6 +3489,7 @@ public static function openApiFormats(string $classname) 'createdAt' => 'date-time', 'updatedAt' => 'date-time', 'type' => null, + 'role' => null, 'routingKey' => null, 'id' => null ], @@ -2725,7 +3624,8 @@ public static function openApiFormats(string $classname) 'updatedAt' => 'date-time', 'billingContact' => 'email', 'invoiced' => null, - 'customerType' => null + 'customerType' => null, + 'legalEntityName' => null ], 'Upsun\Model\Project' => [ @@ -2744,7 +3644,8 @@ public static function openApiFormats(string $classname) 'region' => null, 'repository' => null, 'defaultDomain' => null, - 'subscription' => null + 'subscription' => null, + 'maintenance' => null ], 'Upsun\Model\ProjectAddon' => [ @@ -2809,6 +3710,7 @@ public static function openApiFormats(string $classname) ], 'Upsun\Model\ProjectCapabilities' => [ + 'tasks' => null, 'metrics' => null, 'logsForwarding' => null, 'guaranteedResources' => null, @@ -2980,6 +3882,7 @@ public static function openApiFormats(string $classname) 'enableDiskHealthMonitoring' => null, 'enablePausedEnvironments' => null, 'enableUnifiedConfiguration' => null, + 'enableExplicitEmptyRoutes' => null, 'enableRoutesTracing' => null, 'imageDeploymentValidation' => null, 'supportGenericImages' => null, @@ -2992,14 +3895,19 @@ public static function openApiFormats(string $classname) 'activityLogsMaxSize' => null, 'allowManualDeployments' => null, 'allowRollingDeployments' => null, + 'maintenanceWindow' => null, + 'allowActivityReschedule' => null, 'allowBurst' => null, - 'routerResources' => null + 'routerResources' => null, + 'allowScalingToZero' => null, + 'saveApplicationsVendors' => null ], 'Upsun\Model\ProjectSettingsPatch' => [ 'initialize' => null, 'dataRetention' => null, - 'buildResources' => null + 'buildResources' => null, + 'maintenanceWindow' => null ], 'Upsun\Model\ProjectStatus' => [ @@ -3059,6 +3967,12 @@ public static function openApiFormats(string $classname) 'sticky' => null ], + 'Upsun\Model\Recurrence' => [ + 'interval' => null, + 'dayOfWeek' => null, + 'time' => null + ], + 'Upsun\Model\RedirectConfiguration' => [ 'expires' => null, 'paths' => null @@ -3105,12 +4019,6 @@ public static function openApiFormats(string $classname) 'hipaa' => null ], - 'Upsun\Model\RegionDataCenter' => [ - 'name' => null, - 'label' => null, - 'location' => null - ], - 'Upsun\Model\RegionDatacenter' => [ 'name' => null, 'label' => null, @@ -3227,6 +4135,177 @@ public static function openApiFormats(string $classname) 'init' => null ], + 'Upsun\Model\ResourcesByService200Response' => [ + 'grain' => null, + 'from' => null, + 'to' => null, + 'projectId' => null, + 'environmentId' => null, + 'branchMachineName' => null, + 'service' => null, + 'data' => null, + 'dg2HostTypesMapping' => null + ], + + 'Upsun\Model\ResourcesByService200ResponseDataInner' => [ + 'timestamp' => null, + 'instances' => null + ], + + 'Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValue' => [ + 'cpuUsed' => null, + 'cpuLimit' => null, + 'memoryUsed' => null, + 'memoryLimit' => null, + 'swapUsed' => null, + 'swapLimit' => null, + 'memoryPressure' => null, + 'cpuPressure' => null, + 'ioPressure' => null, + 'irqPressure' => null, + 'mountpoints' => null + ], + + 'Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueCpuLimit' => [ + 'max' => 'float' + ], + + 'Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueCpuPressure' => [ + 'min' => 'float', + 'max' => 'float', + 'avg' => 'float', + 'stddev' => 'float', + 'p50' => 'float', + 'p95' => 'float', + 'p96' => 'float', + 'p97' => 'float', + 'p98' => 'float', + 'p99' => 'float' + ], + + 'Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueCpuUsed' => [ + 'min' => 'float', + 'max' => 'float', + 'avg' => 'float', + 'stddev' => 'float', + 'p50' => 'float', + 'p95' => 'float', + 'p96' => 'float', + 'p97' => 'float', + 'p98' => 'float', + 'p99' => 'float' + ], + + 'Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueIoPressure' => [ + 'min' => 'float', + 'max' => 'float', + 'avg' => 'float', + 'stddev' => 'float', + 'p50' => 'float', + 'p95' => 'float', + 'p96' => 'float', + 'p97' => 'float', + 'p98' => 'float', + 'p99' => 'float' + ], + + 'Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueIrqPressure' => [ + 'min' => 'float', + 'max' => 'float', + 'avg' => 'float', + 'stddev' => 'float', + 'p50' => 'float', + 'p95' => 'float', + 'p96' => 'float', + 'p97' => 'float', + 'p98' => 'float', + 'p99' => 'float' + ], + + 'Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueMemoryLimit' => [ + 'max' => 'int64' + ], + + 'Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueMemoryPressure' => [ + 'min' => 'float', + 'max' => 'float', + 'avg' => 'float', + 'stddev' => 'float', + 'p50' => 'float', + 'p95' => 'float', + 'p96' => 'float', + 'p97' => 'float', + 'p98' => 'float', + 'p99' => 'float' + ], + + 'Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueMemoryUsed' => [ + 'min' => 'int64', + 'max' => 'int64', + 'avg' => 'float', + 'stddev' => 'float', + 'p50' => 'float', + 'p95' => 'float', + 'p96' => 'float', + 'p97' => 'float', + 'p98' => 'float', + 'p99' => 'float' + ], + + 'Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueMountpointsValue' => [ + 'diskUsed' => null, + 'diskLimit' => null, + 'inodesUsed' => null, + 'inodesLimit' => null + ], + + 'Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueDiskLimit' => [ + 'max' => 'int64' + ], + + 'Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueDiskUsed' => [ + 'min' => 'int64', + 'max' => 'int64', + 'avg' => 'float', + 'stddev' => 'float', + 'p50' => 'float', + 'p95' => 'float', + 'p96' => 'float', + 'p97' => 'float', + 'p98' => 'float', + 'p99' => 'float' + ], + + 'Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueInodesLimit' => [ + 'max' => null + ], + + 'Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueInodesUsed' => [ + 'min' => null, + 'max' => null, + 'avg' => 'float', + 'stddev' => 'float', + 'p50' => 'float', + 'p95' => 'float', + 'p96' => 'float', + 'p97' => 'float', + 'p98' => 'float', + 'p99' => 'float' + ], + + 'Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueSwapUsed' => [ + 'min' => 'int64', + 'max' => 'int64', + 'avg' => 'float', + 'stddev' => 'float', + 'p50' => 'float', + 'p95' => 'float', + 'p96' => 'float', + 'p97' => 'float', + 'p98' => 'float', + 'p99' => 'float' + ], + 'Upsun\Model\ResourcesLimits' => [ 'containerProfiles' => null, 'production' => null, @@ -3241,6 +4320,337 @@ public static function openApiFormats(string $classname) 'redeployedEnd' => null ], + 'Upsun\Model\ResourcesOverview200Response' => [ + 'grain' => null, + 'from' => null, + 'to' => null, + 'projectId' => null, + 'environmentId' => null, + 'branchMachineName' => null, + 'data' => null + ], + + 'Upsun\Model\ResourcesOverview200ResponseDataInner' => [ + 'timestamp' => null, + 'services' => null + ], + + 'Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValue' => [ + 'cpuUsed' => null, + 'cpuLimit' => null, + 'memoryUsed' => null, + 'memoryLimit' => null, + 'swapUsed' => null, + 'swapLimit' => null, + 'memoryPressure' => null, + 'cpuPressure' => null, + 'ioPressure' => null, + 'irqPressure' => null, + 'mountpoints' => null + ], + + 'Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueCpuLimit' => [ + 'max' => 'float' + ], + + 'Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueCpuPressure' => [ + 'min' => 'float', + 'max' => 'float', + 'avg' => 'float', + 'stddev' => 'float', + 'p50' => 'float', + 'p95' => 'float', + 'p96' => 'float', + 'p97' => 'float', + 'p98' => 'float', + 'p99' => 'float' + ], + + 'Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueCpuUsed' => [ + 'min' => 'float', + 'max' => 'float', + 'avg' => 'float', + 'stddev' => 'float', + 'p50' => 'float', + 'p95' => 'float', + 'p96' => 'float', + 'p97' => 'float', + 'p98' => 'float', + 'p99' => 'float' + ], + + 'Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueIoPressure' => [ + 'min' => 'float', + 'max' => 'float', + 'avg' => 'float', + 'stddev' => 'float', + 'p50' => 'float', + 'p95' => 'float', + 'p96' => 'float', + 'p97' => 'float', + 'p98' => 'float', + 'p99' => 'float' + ], + + 'Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueIrqPressure' => [ + 'min' => 'float', + 'max' => 'float', + 'avg' => 'float', + 'stddev' => 'float', + 'p50' => 'float', + 'p95' => 'float', + 'p96' => 'float', + 'p97' => 'float', + 'p98' => 'float', + 'p99' => 'float' + ], + + 'Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueMemoryLimit' => [ + 'max' => 'int64' + ], + + 'Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueMemoryPressure' => [ + 'min' => 'float', + 'max' => 'float', + 'avg' => 'float', + 'stddev' => 'float', + 'p50' => 'float', + 'p95' => 'float', + 'p96' => 'float', + 'p97' => 'float', + 'p98' => 'float', + 'p99' => 'float' + ], + + 'Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueMemoryUsed' => [ + 'min' => 'int64', + 'max' => 'int64', + 'avg' => 'float', + 'stddev' => 'float', + 'p50' => 'float', + 'p95' => 'float', + 'p96' => 'float', + 'p97' => 'float', + 'p98' => 'float', + 'p99' => 'float' + ], + + 'Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueMountpointsValue' => [ + 'diskUsed' => null, + 'diskLimit' => null, + 'inodesUsed' => null, + 'inodesLimit' => null + ], + + 'Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueDiskLimit' => [ + 'max' => 'int64' + ], + + 'Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueDiskUsed' => [ + 'min' => 'int64', + 'max' => 'int64', + 'avg' => 'float', + 'stddev' => 'float', + 'p50' => 'float', + 'p95' => 'float', + 'p96' => 'float', + 'p97' => 'float', + 'p98' => 'float', + 'p99' => 'float' + ], + + 'Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueInodesLimit' => [ + 'max' => null + ], + + 'Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueInodesUsed' => [ + 'min' => null, + 'max' => null, + 'avg' => 'float', + 'stddev' => 'float', + 'p50' => 'float', + 'p95' => 'float', + 'p96' => 'float', + 'p97' => 'float', + 'p98' => 'float', + 'p99' => 'float' + ], + + 'Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueSwapLimit' => [ + 'max' => 'int64' + ], + + 'Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueSwapUsed' => [ + 'min' => 'int64', + 'max' => 'int64', + 'avg' => 'float', + 'stddev' => 'float', + 'p50' => 'float', + 'p95' => 'float', + 'p96' => 'float', + 'p97' => 'float', + 'p98' => 'float', + 'p99' => 'float' + ], + + 'Upsun\Model\ResourcesSummary200Response' => [ + 'from' => null, + 'to' => null, + 'projectId' => null, + 'environmentId' => null, + 'branchMachineName' => null, + 'data' => null + ], + + 'Upsun\Model\ResourcesSummary200ResponseData' => [ + 'services' => null + ], + + 'Upsun\Model\ResourcesSummary200ResponseDataServicesValueValue' => [ + 'cpuUsed' => null, + 'cpuLimit' => null, + 'memoryUsed' => null, + 'memoryLimit' => null, + 'swapUsed' => null, + 'swapLimit' => null, + 'memoryPressure' => null, + 'cpuPressure' => null, + 'ioPressure' => null, + 'irqPressure' => null, + 'mountpoints' => null + ], + + 'Upsun\Model\ResourcesSummary200ResponseDataServicesValueValueCpuPressure' => [ + 'min' => 'float', + 'max' => 'float', + 'avg' => 'float', + 'stddev' => 'float', + 'p50' => 'float', + 'p95' => 'float', + 'p96' => 'float', + 'p97' => 'float', + 'p98' => 'float', + 'p99' => 'float' + ], + + 'Upsun\Model\ResourcesSummary200ResponseDataServicesValueValueCpuUsed' => [ + 'min' => 'float', + 'max' => 'float', + 'avg' => 'float', + 'stddev' => 'float', + 'p50' => 'float', + 'p95' => 'float', + 'p96' => 'float', + 'p97' => 'float', + 'p98' => 'float', + 'p99' => 'float' + ], + + 'Upsun\Model\ResourcesSummary200ResponseDataServicesValueValueIoPressure' => [ + 'min' => 'float', + 'max' => 'float', + 'avg' => 'float', + 'stddev' => 'float', + 'p50' => 'float', + 'p95' => 'float', + 'p96' => 'float', + 'p97' => 'float', + 'p98' => 'float', + 'p99' => 'float' + ], + + 'Upsun\Model\ResourcesSummary200ResponseDataServicesValueValueIrqPressure' => [ + 'min' => 'float', + 'max' => 'float', + 'avg' => 'float', + 'stddev' => 'float', + 'p50' => 'float', + 'p95' => 'float', + 'p96' => 'float', + 'p97' => 'float', + 'p98' => 'float', + 'p99' => 'float' + ], + + 'Upsun\Model\ResourcesSummary200ResponseDataServicesValueValueMemoryPressure' => [ + 'min' => 'float', + 'max' => 'float', + 'avg' => 'float', + 'stddev' => 'float', + 'p50' => 'float', + 'p95' => 'float', + 'p96' => 'float', + 'p97' => 'float', + 'p98' => 'float', + 'p99' => 'float' + ], + + 'Upsun\Model\ResourcesSummary200ResponseDataServicesValueValueMemoryUsed' => [ + 'min' => 'int64', + 'max' => 'int64', + 'avg' => 'float', + 'stddev' => 'float', + 'p50' => 'float', + 'p95' => 'float', + 'p96' => 'float', + 'p97' => 'float', + 'p98' => 'float', + 'p99' => 'float' + ], + + 'Upsun\Model\ResourcesSummary200ResponseDataServicesValueValueMountpointsValue' => [ + 'diskUsed' => null, + 'diskLimit' => null, + 'inodesUsed' => null, + 'inodesLimit' => null + ], + + 'Upsun\Model\ResourcesSummary200ResponseDataServicesValueValueMountpointsValueDiskUsed' => [ + 'min' => 'int64', + 'max' => 'int64', + 'avg' => 'float', + 'stddev' => 'float', + 'p50' => 'float', + 'p95' => 'float', + 'p96' => 'float', + 'p97' => 'float', + 'p98' => 'float', + 'p99' => 'float' + ], + + 'Upsun\Model\ResourcesSummary200ResponseDataServicesValueValueMountpointsValueInodesUsed' => [ + 'min' => null, + 'max' => null, + 'avg' => 'float', + 'stddev' => 'float', + 'p50' => 'float', + 'p95' => 'float', + 'p96' => 'float', + 'p97' => 'float', + 'p98' => 'float', + 'p99' => 'float' + ], + + 'Upsun\Model\ResourcesSummary200ResponseDataServicesValueValueSwapUsed' => [ + 'min' => 'int64', + 'max' => 'int64', + 'avg' => 'float', + 'stddev' => 'float', + 'p50' => 'float', + 'p95' => 'float', + 'p96' => 'float', + 'p97' => 'float', + 'p98' => 'float', + 'p99' => 'float' + ], + + 'Upsun\Model\ResourcesSummary400Response' => [ + 'type' => 'uri', + 'title' => null, + 'status' => null, + 'violations' => null + ], + 'Upsun\Model\Route' => [ 'attributes' => null, 'type' => null, @@ -3278,12 +4688,9 @@ public static function openApiFormats(string $classname) 'sticky' => null ], - 'Upsun\Model\Routing' => [ - 'percentage' => null - ], - - 'Upsun\Model\Routing1' => [ - 'percentage' => null + 'Upsun\Model\RunConfiguration' => [ + 'command' => null, + 'timeout' => null ], 'Upsun\Model\RuntimeOperations' => [ @@ -3308,6 +4715,7 @@ public static function openApiFormats(string $classname) 'createdAt' => 'date-time', 'updatedAt' => 'date-time', 'type' => null, + 'role' => null, 'events' => null, 'environments' => null, 'excludedEnvironments' => null, @@ -3362,7 +4770,8 @@ public static function openApiFormats(string $classname) 'resources' => null, 'containerProfile' => null, 'endpoints' => null, - 'instanceCount' => null + 'instanceCount' => null, + 'supportsHorizontalScaling' => null ], 'Upsun\Model\ServicesValue1' => [ @@ -3381,6 +4790,7 @@ public static function openApiFormats(string $classname) 'createdAt' => 'date-time', 'updatedAt' => 'date-time', 'type' => null, + 'role' => null, 'channel' => null, 'id' => null ], @@ -3402,6 +4812,10 @@ public static function openApiFormats(string $classname) 'operations' => null ], + 'Upsun\Model\SourceCodeConfiguration1' => [ + 'root' => null + ], + 'Upsun\Model\SourceOperations' => [ 'enabled' => null ], @@ -3427,6 +4841,7 @@ public static function openApiFormats(string $classname) 'createdAt' => 'date-time', 'updatedAt' => 'date-time', 'type' => null, + 'role' => null, 'extra' => null, 'url' => null, 'index' => null, @@ -3596,6 +5011,7 @@ public static function openApiFormats(string $classname) 'createdAt' => 'date-time', 'updatedAt' => 'date-time', 'type' => null, + 'role' => null, 'extra' => null, 'url' => null, 'category' => null, @@ -3631,6 +5047,7 @@ public static function openApiFormats(string $classname) 'createdAt' => 'date-time', 'updatedAt' => 'date-time', 'type' => null, + 'role' => null, 'extra' => null, 'host' => null, 'port' => null, @@ -3683,6 +5100,26 @@ public static function openApiFormats(string $classname) 'clientCertificateAuthorities' => null ], + 'Upsun\Model\Task' => [ + 'id' => null, + 'type' => null, + 'source' => null, + 'hooks' => null, + 'relationships' => null, + 'mounts' => null, + 'variables' => null, + 'run' => null, + 'name' => null + ], + + 'Upsun\Model\TaskTriggerInput' => [ + 'variables' => null + ], + + 'Upsun\Model\Tasks' => [ + 'enabled' => null + ], + 'Upsun\Model\Team' => [ 'id' => 'ulid', 'organizationId' => 'ulid', @@ -3828,6 +5265,7 @@ public static function openApiFormats(string $classname) 'defaultCatalog' => null, 'projectOptionsUrl' => 'uri', 'companyName' => null, + 'legalEntityName' => null, 'customerType' => null, 'vatNumber' => null, 'billingContact' => 'email' @@ -3843,6 +5281,7 @@ public static function openApiFormats(string $classname) 'name' => null, 'label' => null, 'country' => null, + 'billingProfileId' => null, 'securityContact' => 'email' ], @@ -4070,21 +5509,6 @@ public static function openApiFormats(string $classname) 'phoneNumber' => null ], - 'Upsun\Model\Version' => [ - 'id' => null, - 'commit' => null, - 'locked' => null, - 'routing' => null - ], - - 'Upsun\Model\VersionCreateInput' => [ - 'routing' => null - ], - - 'Upsun\Model\VersionPatch' => [ - 'routing' => null - ], - 'Upsun\Model\Vouchers' => [ 'uuid' => 'uuid', 'vouchersTotal' => null, @@ -4150,7 +5574,8 @@ public static function openApiFormats(string $classname) 'isAcrossSubmodule' => null, 'instanceCount' => null, 'configId' => null, - 'slugId' => null + 'slugId' => null, + 'supportsHorizontalScaling' => null ], 'Upsun\Model\WebConfiguration' => [ @@ -4170,6 +5595,7 @@ public static function openApiFormats(string $classname) 'createdAt' => 'date-time', 'updatedAt' => 'date-time', 'type' => null, + 'role' => null, 'events' => null, 'environments' => null, 'excludedEnvironments' => null, @@ -4248,7 +5674,8 @@ public static function openApiFormats(string $classname) 'app' => null, 'stack' => null, 'instanceCount' => null, - 'slugId' => null + 'slugId' => null, + 'supportsHorizontalScaling' => null ], ]; } diff --git a/src/Api/Serializer/ApiObjectTypesMapper.php b/src/Api/Serializer/ApiObjectTypesMapper.php index dcdf732b..93570b66 100644 --- a/src/Api/Serializer/ApiObjectTypesMapper.php +++ b/src/Api/Serializer/ApiObjectTypesMapper.php @@ -43,6 +43,7 @@ public static function openApiTypes(string $classname): array 'project' => 'string', 'state' => 'string', 'result' => '?string', + 'failure_reason' => '?string', 'started_at' => '?\DateTime', 'completed_at' => '?\DateTime', 'completion_percent' => 'int', @@ -250,6 +251,7 @@ public static function openApiTypes(string $classname): array 'created_at' => '?\DateTime', 'updated_at' => '?\DateTime', 'type' => 'string', + 'role' => 'string', 'fetch_branches' => 'bool', 'prune_branches' => 'bool', 'environment_init_resources' => 'string', @@ -297,6 +299,7 @@ public static function openApiTypes(string $classname): array 'created_at' => '?\DateTime', 'updated_at' => '?\DateTime', 'type' => 'string', + 'role' => 'string', 'fetch_branches' => 'bool', 'prune_branches' => 'bool', 'environment_init_resources' => 'string', @@ -346,6 +349,7 @@ public static function openApiTypes(string $classname): array 'created_at' => '?\DateTime', 'updated_at' => '?\DateTime', 'type' => 'string', + 'role' => 'string', 'environments_credentials' => '\Upsun\Model\EnvironmentsCredentialsValue[]', 'continuous_profiling' => 'bool', 'id' => '?string', @@ -359,6 +363,384 @@ public static function openApiTypes(string $classname): array 'type' => 'string', ], + 'Upsun\Model\BlackfirePhpServerCaches200Response' => [ + '_grain' => 'int', + '_from' => 'int', + '_to' => 'int', + '_agent' => 'string', + '_project_id' => 'string', + '_environment_id' => 'string', + '_branch_machine_name' => 'string', + '_distribution_cost' => 'string', + 'data' => '\Upsun\Model\BlackfirePhpServerCaches200ResponseDataInner[]', + '_contexts' => 'string[]', + '_contexts_mode' => '?string', + ], + + 'Upsun\Model\BlackfirePhpServerCaches200ResponseDataInner' => [ + 'timestamp' => 'int', + 'opcache_usage' => '?float', + 'opcache_isb_usage' => '?float', + 'apcu_usage' => '?float', + 'realpath_usage' => '?float', + 'pcre_usage' => '?float', + 'apcu_hitrate' => '?float', + 'opcache_hitrate' => '?float', + ], + + 'Upsun\Model\BlackfireProfileGraph200Response' => [ + '_project_id' => 'string', + '_environment_id' => 'string', + '_branch_machine_name' => 'string', + '_agent' => 'string', + '_uuid' => 'string', + 'dimensions' => 'object', + 'root' => 'string', + 'nodes' => 'object', + 'edges' => 'object', + 'comparison' => 'bool', + 'language' => 'string', + 'peaks' => '?object', + 'arguments' => '?object', + 'layers' => '?object', + 'labels' => '?object', + 'spans' => '?object', + 'spans-ot' => '?object', + 'hierarchy' => '?object', + ], + + 'Upsun\Model\BlackfireProfileProfile200Response' => [ + '_project_id' => 'string', + '_environment_id' => 'string', + '_branch_machine_name' => 'string', + '_agent' => 'string', + '_uuid' => 'string', + 'profile' => 'object', + ], + + 'Upsun\Model\BlackfireProfileSubprofiles200Response' => [ + '_project_id' => 'string', + '_environment_id' => 'string', + '_branch_machine_name' => 'string', + '_agent' => 'string', + '_uuid' => 'string', + 'subprofiles' => 'object', + ], + + 'Upsun\Model\BlackfireProfileTimeline200Response' => [ + '_project_id' => 'string', + '_environment_id' => 'string', + '_branch_machine_name' => 'string', + '_agent' => 'string', + '_uuid' => 'string', + 'timeline' => 'object', + 'dimension' => 'string', + 'time' => 'int', + 'language' => 'string', + ], + + 'Upsun\Model\BlackfireProfilesListAutomatic200Response' => [ + '_project_id' => 'string', + '_environment_id' => 'string', + '_branch_machine_name' => 'string', + '_agent' => 'string', + 'profiles' => '\Upsun\Model\BlackfireProfilesListAutomatic200ResponseProfilesInner[]', + 'page' => 'int', + 'pages' => 'int', + 'total' => 'int', + ], + + 'Upsun\Model\BlackfireProfilesListAutomatic200ResponseProfilesInner' => [ + 'uuid' => 'string', + 'name' => 'string', + '_links' => '\Upsun\Model\BlackfireProfilesListAutomatic200ResponseProfilesInnerLinks', + 'metadata' => '?object', + ], + + 'Upsun\Model\BlackfireProfilesListAutomatic200ResponseProfilesInnerLinks' => [ + 'api_subprofiles' => '\Upsun\Model\BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiSubprofiles', + 'api_profile' => '\Upsun\Model\BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiProfile', + 'api_graph' => '\Upsun\Model\BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiGraph', + 'graph_url' => '?\Upsun\Model\BlackfireProfilesListAutomatic200ResponseProfilesInnerLinksGraphUrl', + 'api_timeline' => '?\Upsun\Model\BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiTimeline', + ], + + 'Upsun\Model\BlackfireProfilesListAutomatic200ResponseProfilesInnerLinksGraphUrl' => [ + 'href' => 'string', + 'type' => 'string', + ], + + 'Upsun\Model\BlackfireProfilesRecommendations200Response' => [ + '_project_id' => 'string', + '_environment_id' => 'string', + '_branch_machine_name' => 'string', + '_agent' => 'string', + '_from' => 'int', + '_to' => 'int', + 'recommendations' => '\Upsun\Model\BlackfireProfilesRecommendations200ResponseRecommendationsInner[]', + 'total' => 'int', + '_transaction' => '?string', + 'tested_transactions' => 'string[]', + 'untested_top_transactions' => 'string[]', + ], + + 'Upsun\Model\BlackfireProfilesRecommendations200ResponseRecommendationsInner' => [ + 'name' => 'string', + 'total' => 'int', + 'constraint' => '?object', + '_links' => '?\Upsun\Model\BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinks', + ], + + 'Upsun\Model\BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinks' => [ + 'api_subprofiles' => '\Upsun\Model\BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiSubprofiles', + 'api_profile' => '\Upsun\Model\BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiProfile', + 'api_graph' => '\Upsun\Model\BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiGraph', + 'api_timeline' => '?\Upsun\Model\BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiTimeline', + ], + + 'Upsun\Model\BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiGraph' => [ + 'href' => 'string', + 'type' => 'string', + ], + + 'Upsun\Model\BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiProfile' => [ + 'href' => 'string', + 'type' => 'string', + ], + + 'Upsun\Model\BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiSubprofiles' => [ + 'href' => 'string', + 'type' => 'string', + ], + + 'Upsun\Model\BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiTimeline' => [ + 'href' => 'string', + 'type' => 'string', + ], + + 'Upsun\Model\BlackfireProfilesRecommendations400Response' => [ + 'type' => 'string', + 'title' => 'string', + 'status' => 'int', + 'violations' => 'string[][]', + ], + + 'Upsun\Model\BlackfireServerGlobal200Response' => [ + '_quota' => '\Upsun\Model\BlackfireServerGlobal200ResponseQuota', + '_grain' => 'int', + '_from' => 'int', + '_to' => 'int', + '_keys' => 'string[]', + '_agent' => 'string', + '_contexts' => 'string[]', + '_contexts_mode' => '?string', + '_project_id' => 'string', + '_environment_id' => 'string', + '_branch_machine_name' => 'string', + 'alert_evaluations' => '\Upsun\Model\BlackfireServerGlobal200ResponseAlertEvaluationsInner[]', + 'server' => '\Upsun\Model\BlackfireServerGlobal200ResponseServer', + '_distribution_cost' => '?string', + ], + + 'Upsun\Model\BlackfireServerGlobal200ResponseAlertEvaluationsInner' => [ + 'timestamp' => 'int', + 'alert_rule_uuid' => 'string', + 'value' => 'float', + 'state' => 'string', + ], + + 'Upsun\Model\BlackfireServerGlobal200ResponseQuota' => [ + 'allowed' => 'int', + 'used' => 'int', + 'exceeded' => 'bool', + 'period_started_at' => '?\DateTime', + 'period_ends_at' => '?\DateTime', + ], + + 'Upsun\Model\BlackfireServerGlobal200ResponseServer' => [ + 'total' => 'float', + 'data' => '\Upsun\Model\BlackfireServerGlobal200ResponseServerDataInner[]', + ], + + 'Upsun\Model\BlackfireServerGlobal200ResponseServerDataInner' => [ + 'timestamp' => 'int', + 'wt' => '?float', + 'mu' => '?float', + 'pmu' => '?float', + 'load' => '?float', + 'stdout' => '?float', + 'rpms' => '?float', + ], + + 'Upsun\Model\BlackfireServerTopSpans200Response' => [ + '_grain' => 'int', + '_from' => 'int', + '_to' => 'int', + '_agent' => 'string', + '_project_id' => 'string', + '_environment_id' => 'string', + '_branch_machine_name' => 'string', + '_sort' => '?string', + 'top_spans' => '\Upsun\Model\BlackfireServerTopSpans200ResponseTopSpans', + 'advanced_filters' => '\Upsun\Model\BlackfireServerTopSpans200ResponseAdvancedFilters', + '_contexts' => 'string[]', + '_contexts_mode' => '?string', + '_transactions' => 'string[]', + '_transactions_mode' => '?string', + '_wt_slot' => 'string[]', + '_wt_slot_mode' => '?string', + '_pmu_slot' => 'string[]', + '_pmu_slot_mode' => '?string', + '_http_status_codes' => 'string[]', + '_http_status_codes_mode' => '?string', + '_http_hosts' => 'string[]', + '_http_hosts_mode' => '?string', + '_hosts' => 'string[]', + '_hosts_mode' => '?string', + '_frameworks' => 'string[]', + '_frameworks_mode' => '?string', + '_languages' => 'string[]', + '_languages_mode' => '?string', + '_methods' => 'string[]', + '_methods_mode' => '?string', + '_runtimes' => 'string[]', + '_runtimes_mode' => '?string', + '_oss' => 'string[]', + '_oss_mode' => '?string', + '_distribution_cost' => '?string', + ], + + 'Upsun\Model\BlackfireServerTopSpans200ResponseAdvancedFilters' => [ + 'fields' => '\Upsun\Model\BlackfireServerTopSpans200ResponseAdvancedFiltersFieldsValue[]', + 'max_applicable_filters' => 'int', + ], + + 'Upsun\Model\BlackfireServerTopSpans200ResponseAdvancedFiltersFieldsValue' => [ + 'distinct_values' => 'int', + 'type' => 'string', + 'values' => '\Upsun\Model\BlackfireServerTopSpans200ResponseAdvancedFiltersFieldsValueValuesInner[]', + ], + + 'Upsun\Model\BlackfireServerTopSpans200ResponseAdvancedFiltersFieldsValueValuesInner' => [ + 'value' => 'string', + 'count' => 'int', + ], + + 'Upsun\Model\BlackfireServerTopSpans200ResponseTopSpans' => [ + 'data' => '\Upsun\Model\BlackfireServerTopSpans200ResponseTopSpansDataInner[]', + ], + + 'Upsun\Model\BlackfireServerTopSpans200ResponseTopSpansDataInner' => [ + 'id' => 'string', + 'label' => 'string', + 'percentage' => '?float', + 'wt' => 'float', + 'p_96' => 'float', + 'count' => 'int', + 'request_wt' => 'float', + 'metrics' => 'string[]', + 'service_name' => 'string', + 'impact' => 'float', + ], + + 'Upsun\Model\BlackfireServerTransactionsBreakdown200Response' => [ + '_grain' => 'int', + '_from' => 'int', + '_to' => 'int', + '_agent' => 'string', + '_project_id' => 'string', + '_environment_id' => 'string', + '_branch_machine_name' => 'string', + '_breakdown_dimension' => 'string', + '_sort' => '?string', + '_breakdown_limit' => 'int', + '_breakdown_top_hits' => '\Upsun\Model\BlackfireServerTransactionsBreakdown200ResponseBreakdownTopHits', + 'transactions' => '\Upsun\Model\BlackfireServerTransactionsBreakdown200ResponseTransactions', + 'top_hits_timeline' => '\Upsun\Model\BlackfireServerTransactionsBreakdown200ResponseTopHitsTimeline', + '_contexts' => 'string[]', + '_contexts_mode' => '?string', + '_transactions' => 'string[]', + '_transactions_mode' => '?string', + '_wt_slot' => 'string[]', + '_wt_slot_mode' => '?string', + '_pmu_slot' => 'string[]', + '_pmu_slot_mode' => '?string', + '_http_status_codes' => 'string[]', + '_http_status_codes_mode' => '?string', + '_http_hosts' => 'string[]', + '_http_hosts_mode' => '?string', + '_hosts' => 'string[]', + '_hosts_mode' => '?string', + '_frameworks' => 'string[]', + '_frameworks_mode' => '?string', + '_languages' => 'string[]', + '_languages_mode' => '?string', + '_methods' => 'string[]', + '_methods_mode' => '?string', + '_runtimes' => 'string[]', + '_runtimes_mode' => '?string', + '_oss' => 'string[]', + '_oss_mode' => '?string', + '_distribution_cost' => '?string', + ], + + 'Upsun\Model\BlackfireServerTransactionsBreakdown200ResponseBreakdownTopHits' => [ + 'max_quantity' => 'int', + 'max_percentage' => 'float', + ], + + 'Upsun\Model\BlackfireServerTransactionsBreakdown200ResponseTopHitsTimeline' => [ + 'data' => '\Upsun\Model\BlackfireServerTransactionsBreakdown200ResponseTopHitsTimelineDataInner[]', + ], + + 'Upsun\Model\BlackfireServerTransactionsBreakdown200ResponseTopHitsTimelineDataInner' => [ + 'timestamp' => 'int', + '_total_consumed' => '?float', + '_total_count' => '?float', + '_transactions' => '\Upsun\Model\BlackfireServerTransactionsBreakdown200ResponseTopHitsTimelineDataInnerTransactionsValue[]', + ], + + 'Upsun\Model\BlackfireServerTransactionsBreakdown200ResponseTopHitsTimelineDataInnerTransactionsValue' => [ + 'average' => 'float', + 'count' => 'float', + ], + + 'Upsun\Model\BlackfireServerTransactionsBreakdown200ResponseTransactions' => [ + 'data' => '\Upsun\Model\BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInner[]', + ], + + 'Upsun\Model\BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInner' => [ + 'transaction' => 'string', + 'wt_96th_percentile' => 'float', + 'avg_wt' => 'float', + 'avg_pmu' => 'float', + 'avg_stdout' => 'float', + 'total_requests' => 'float', + 'total_requests_unnamed' => 'float', + 'total_errors' => 'float', + 'impact' => '?float', + 'top_hit' => 'bool', + '_links' => '\Upsun\Model\BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinks', + ], + + 'Upsun\Model\BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinks' => [ + 'top_spans' => '\Upsun\Model\BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksTopSpans', + 'recommendations' => '\Upsun\Model\BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksRecommendations', + 'automatic_profiles' => '\Upsun\Model\BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksAutomaticProfiles', + ], + + 'Upsun\Model\BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksAutomaticProfiles' => [ + 'href' => 'string', + ], + + 'Upsun\Model\BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksRecommendations' => [ + 'href' => 'string', + ], + + 'Upsun\Model\BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksTopSpans' => [ + 'href' => 'string', + ], + 'Upsun\Model\Blob' => [ 'id' => 'string', 'sha' => 'string', @@ -415,6 +797,8 @@ public static function openApiTypes(string $classname): array 'Upsun\Model\CanCreateNewOrgSubscription200ResponseRequiredAction' => [ 'action' => '?string', 'type' => '?string', + 'credentials' => '?object', + 'reference' => '?string', ], 'Upsun\Model\CanUpdateSubscription200Response' => [ @@ -504,10 +888,18 @@ public static function openApiTypes(string $classname): array 'email' => 'string', ], + 'Upsun\Model\CommunityPackagesInner' => [ + ], + 'Upsun\Model\Components' => [ 'voucher/vat/baseprice' => '?object', ], + 'Upsun\Model\ComposableImages' => [ + 'runtimes' => 'object[]', + 'packages' => '\Upsun\Model\CommunityPackagesInner[]', + ], + 'Upsun\Model\Config' => [ 'newrelic' => '?\Upsun\Model\NewRelic', 'sumologic' => '?\Upsun\Model\SumoLogic', @@ -838,10 +1230,14 @@ public static function openApiTypes(string $classname): array ], 'Upsun\Model\DeploymentState' => [ + 'last_state_update_successful' => 'bool', 'last_deployment_successful' => 'bool', + 'last_deployment_failure_reason' => '?string', + 'last_deployment_commands' => '\Upsun\Model\LastDeploymentCommandsInner[]', 'last_deployment_at' => '?\DateTime', 'last_autoscale_up_at' => '?\DateTime', 'last_autoscale_down_at' => '?\DateTime', + 'last_maintenance_at' => '?\DateTime', 'crons' => '\Upsun\Model\CronsDeploymentState', ], @@ -862,6 +1258,9 @@ public static function openApiTypes(string $classname): array 'docroots' => '\Upsun\Model\DocrootsValue[]', 'site_urls' => 'object', 'ssh_hosts' => 'string[]', + 'k8s_config' => 'string', + 'bastion_nodes_user' => '?string', + 'bastion_nodes_host' => '?string', 'use_dedicated_grid' => 'bool', 'storage_type' => '?string', 'id' => '?string', @@ -897,6 +1296,15 @@ public static function openApiTypes(string $classname): array 'max_environments' => '?int', ], + 'Upsun\Model\Diff' => [ + 'id' => 'string', + 'diff' => 'string', + 'new_path' => '?string', + 'new_id' => '?string', + 'old_path' => '?string', + 'old_id' => 'string[]', + ], + 'Upsun\Model\Discount' => [ 'id' => '?int', 'organization_id' => '?string', @@ -959,6 +1367,14 @@ public static function openApiTypes(string $classname): array 'replacement_for' => '?string', ], + 'Upsun\Model\DomainClaim' => [ + 'id' => 'string', + 'created_at' => '?\DateTime', + 'updated_at' => '?\DateTime', + 'name' => 'string', + 'count' => 'string', + ], + 'Upsun\Model\DomainCreateInput' => [ 'name' => 'string', 'attributes' => 'string[]', @@ -975,6 +1391,7 @@ public static function openApiTypes(string $classname): array 'created_at' => '?\DateTime', 'updated_at' => '?\DateTime', 'type' => 'string', + 'role' => 'string', 'from_address' => '?string', 'recipients' => 'string[]', 'id' => '?string', @@ -1065,19 +1482,19 @@ public static function openApiTypes(string $classname): array ], 'Upsun\Model\EnvironmentBackupInput' => [ - 'safe' => 'bool', + 'safe' => '?bool', ], 'Upsun\Model\EnvironmentBranchInput' => [ 'title' => 'string', 'name' => 'string', - 'clone_parent' => 'bool', - 'type' => 'string', + 'clone_parent' => '?bool', + 'type' => '?string', 'resources' => '?\Upsun\Model\Resources3', ], 'Upsun\Model\EnvironmentDeployInput' => [ - 'strategy' => 'string', + 'strategy' => '?string', ], 'Upsun\Model\EnvironmentInfo' => [ @@ -1125,8 +1542,8 @@ public static function openApiTypes(string $classname): array 'Upsun\Model\EnvironmentRestoreInput' => [ 'environment_name' => '?string', 'branch_from' => '?string', - 'restore_code' => 'bool', - 'restore_resources' => 'bool', + 'restore_code' => '?bool', + 'restore_resources' => '?bool', 'resources' => '?\Upsun\Model\Resources6', ], @@ -1143,10 +1560,10 @@ public static function openApiTypes(string $classname): array ], 'Upsun\Model\EnvironmentSynchronizeInput' => [ - 'synchronize_code' => 'bool', - 'rebase' => 'bool', - 'synchronize_data' => 'bool', - 'synchronize_resources' => 'bool', + 'synchronize_code' => '?bool', + 'rebase' => '?bool', + 'synchronize_data' => '?bool', + 'synchronize_resources' => '?bool', ], 'Upsun\Model\EnvironmentType' => [ @@ -1235,12 +1652,14 @@ public static function openApiTypes(string $classname): array 'created_at' => '?\DateTime', 'updated_at' => '?\DateTime', 'type' => 'string', + 'role' => 'string', 'events' => 'string[]', 'environments' => 'string[]', 'excluded_environments' => 'string[]', 'states' => 'string[]', 'result' => 'string', 'service_id' => 'string', + 'tls_certificates' => 'bool', 'id' => '?string', ], @@ -1253,6 +1672,7 @@ public static function openApiTypes(string $classname): array 'excluded_environments' => 'string[]', 'states' => 'string[]', 'result' => '?string', + 'tls_certificates' => '?bool', ], 'Upsun\Model\FastlyIntegrationPatch' => [ @@ -1264,12 +1684,13 @@ public static function openApiTypes(string $classname): array 'excluded_environments' => 'string[]', 'states' => 'string[]', 'result' => '?string', + 'tls_certificates' => '?bool', ], 'Upsun\Model\FilesInner' => [ 'path' => 'string', - 'mode' => 'int', - 'contents' => 'string', + 'mode' => '?int', + 'contents' => '?string', ], 'Upsun\Model\Firewall' => [ @@ -1418,6 +1839,7 @@ public static function openApiTypes(string $classname): array 'created_at' => '?\DateTime', 'updated_at' => '?\DateTime', 'type' => 'string', + 'role' => 'string', 'fetch_branches' => 'bool', 'prune_branches' => 'bool', 'environment_init_resources' => 'string', @@ -1470,6 +1892,7 @@ public static function openApiTypes(string $classname): array 'created_at' => '?\DateTime', 'updated_at' => '?\DateTime', 'type' => 'string', + 'role' => 'string', 'fetch_branches' => 'bool', 'prune_branches' => 'bool', 'environment_init_resources' => 'string', @@ -1590,6 +2013,7 @@ public static function openApiTypes(string $classname): array 'created_at' => '?\DateTime', 'updated_at' => '?\DateTime', 'type' => 'string', + 'role' => 'string', 'url' => 'string', 'id' => '?string', ], @@ -1612,6 +2036,11 @@ public static function openApiTypes(string $classname): array 'post_deploy' => '?string', ], + 'Upsun\Model\Hooks1' => [ + 'build' => '?string', + 'deploy' => '?string', + ], + 'Upsun\Model\HostsInner' => [ 'id' => '?string', 'type' => 'string', @@ -1640,6 +2069,7 @@ public static function openApiTypes(string $classname): array 'created_at' => '?\DateTime', 'updated_at' => '?\DateTime', 'type' => 'string', + 'role' => 'string', 'extra' => 'string[]', 'url' => 'string', 'headers' => 'string[]', @@ -1666,6 +2096,249 @@ public static function openApiTypes(string $classname): array 'excluded_services' => '?string', ], + 'Upsun\Model\HttpMetricsOverview200Response' => [ + '_grain' => 'int', + '_from' => 'int', + '_to' => 'int', + '_project_id' => 'string', + '_environment_id' => 'string', + '_environment_type' => 'string', + '_branch_machine_name' => 'string', + '_top_urls_count' => 'int', + 'data' => '\Upsun\Model\HttpMetricsOverview200ResponseData', + ], + + 'Upsun\Model\HttpMetricsOverview200ResponseData' => [ + 'urls' => '\Upsun\Model\HttpMetricsOverview200ResponseDataUrlsValue[]', + 'timelines' => '\Upsun\Model\HttpMetricsOverview200ResponseDataTimelinesInner[]', + ], + + 'Upsun\Model\HttpMetricsOverview200ResponseDataTimelinesInner' => [ + 'timestamp' => 'int', + 'request_size' => '?int', + 'response_size' => '?int', + 'urls' => '\Upsun\Model\HttpMetricsOverview200ResponseDataTimelinesInnerUrlsValue[]', + 'codes' => '?\Upsun\Model\HttpMetricsOverview200ResponseDataTimelinesInnerCodes', + ], + + 'Upsun\Model\HttpMetricsOverview200ResponseDataTimelinesInnerCodes' => [ + 'UNKNOWN' => 'int', + '1XX' => 'int', + '2XX' => 'int', + '3XX' => 'int', + '4XX' => 'int', + '5XX' => 'int', + ], + + 'Upsun\Model\HttpMetricsOverview200ResponseDataTimelinesInnerUrlsValue' => [ + 'count' => 'int', + 'impact' => '?float', + ], + + 'Upsun\Model\HttpMetricsOverview200ResponseDataUrlsValue' => [ + 'url' => 'string', + 'method' => 'string', + 'impact' => '?float', + 'average' => 'float', + 'p_50' => 'float', + 'p_96' => 'float', + 'count' => 'int', + ], + + 'Upsun\Model\HttpMetricsOverview499Response' => [ + 'error' => 'string', + 'message' => 'string', + ], + + 'Upsun\Model\HttpMetricsTimelineIps200Response' => [ + '_grain' => 'int', + '_from' => 'int', + '_to' => 'int', + '_project_id' => 'string', + '_environment_id' => 'string', + '_environment_type' => 'string', + '_branch_machine_name' => 'string', + '_breakdown_limit' => 'int', + '_breakdown_top_hits' => '\Upsun\Model\HttpMetricsTimelineIps200ResponseBreakdownTopHits', + 'breakdown' => '\Upsun\Model\HttpMetricsTimelineIps200ResponseBreakdown', + 'top_hits_timeline' => '\Upsun\Model\HttpMetricsTimelineIps200ResponseTopHitsTimeline', + '_methods' => 'string[]', + '_methods_mode' => '?string', + '_domains' => 'string[]', + '_domains_mode' => '?string', + '_code_slots' => 'string[]', + '_code_slots_mode' => '?string', + '_codes' => 'string[]', + '_codes_mode' => '?string', + '_request_duration_slots' => 'string[]', + '_request_duration_slots_mode' => '?string', + ], + + 'Upsun\Model\HttpMetricsTimelineIps200ResponseBreakdown' => [ + 'kind' => 'string', + 'total' => 'int', + 'data' => '\Upsun\Model\HttpMetricsTimelineIps200ResponseBreakdownDataInner[]', + ], + + 'Upsun\Model\HttpMetricsTimelineIps200ResponseBreakdownDataInner' => [ + 'name' => 'string', + 'impact' => 'float', + 'average' => 'float', + 'p_50' => 'float', + 'p_96' => 'float', + 'count' => 'int', + 'top_hit' => 'bool', + ], + + 'Upsun\Model\HttpMetricsTimelineIps200ResponseBreakdownTopHits' => [ + 'max_quantity' => 'int', + 'max_percentage' => 'float', + ], + + 'Upsun\Model\HttpMetricsTimelineIps200ResponseTopHitsTimeline' => [ + 'data' => '\Upsun\Model\HttpMetricsTimelineIps200ResponseTopHitsTimelineDataInner[]', + ], + + 'Upsun\Model\HttpMetricsTimelineIps200ResponseTopHitsTimelineDataInner' => [ + 'timestamp' => 'int', + '_total_consumed' => '?float', + '_total_count' => '?int', + 'data' => '\Upsun\Model\HttpMetricsTimelineIps200ResponseTopHitsTimelineDataInnerDataValue[]', + ], + + 'Upsun\Model\HttpMetricsTimelineIps200ResponseTopHitsTimelineDataInnerDataValue' => [ + 'count' => 'int', + 'impact' => '?float', + ], + + 'Upsun\Model\HttpMetricsTimelineUrls200Response' => [ + '_grain' => 'int', + '_from' => 'int', + '_to' => 'int', + '_project_id' => 'string', + '_environment_id' => 'string', + '_environment_type' => 'string', + '_branch_machine_name' => 'string', + '_breakdown_limit' => 'int', + '_breakdown_top_hits' => '\Upsun\Model\HttpMetricsTimelineIps200ResponseBreakdownTopHits', + 'breakdown' => '\Upsun\Model\HttpMetricsTimelineUrls200ResponseBreakdown', + 'top_hits_timeline' => '\Upsun\Model\HttpMetricsTimelineUrls200ResponseTopHitsTimeline', + 'filters' => '\Upsun\Model\HttpMetricsTimelineUrls200ResponseFilters', + '_methods' => 'string[]', + '_methods_mode' => '?string', + '_domains' => 'string[]', + '_domains_mode' => '?string', + '_code_slots' => 'string[]', + '_code_slots_mode' => '?string', + '_codes' => 'string[]', + '_codes_mode' => '?string', + '_request_duration_slots' => 'string[]', + '_request_duration_slots_mode' => '?string', + ], + + 'Upsun\Model\HttpMetricsTimelineUrls200ResponseBreakdown' => [ + 'kind' => 'string', + 'total' => 'int', + 'data' => '\Upsun\Model\HttpMetricsTimelineUrls200ResponseBreakdownDataInner[]', + ], + + 'Upsun\Model\HttpMetricsTimelineUrls200ResponseBreakdownDataInner' => [ + 'url' => 'string', + 'method' => 'string', + 'impact' => '?float', + 'average' => 'float', + 'p_50' => 'float', + 'p_96' => 'float', + 'count' => 'int', + 'top_hit' => 'bool', + ], + + 'Upsun\Model\HttpMetricsTimelineUrls200ResponseFilters' => [ + 'max_applicable_filters' => 'int', + 'fields' => '\Upsun\Model\HttpMetricsTimelineUrls200ResponseFiltersFieldsValue[]', + ], + + 'Upsun\Model\HttpMetricsTimelineUrls200ResponseFiltersFieldsValue' => [ + 'distinct_values' => 'int', + 'type' => 'string', + 'values' => '\Upsun\Model\HttpMetricsTimelineUrls200ResponseFiltersFieldsValueValuesInner[]', + ], + + 'Upsun\Model\HttpMetricsTimelineUrls200ResponseFiltersFieldsValueValuesInner' => [ + 'value' => 'string', + 'count' => 'int', + ], + + 'Upsun\Model\HttpMetricsTimelineUrls200ResponseTopHitsTimeline' => [ + 'data' => '\Upsun\Model\HttpMetricsTimelineUrls200ResponseTopHitsTimelineDataInner[]', + ], + + 'Upsun\Model\HttpMetricsTimelineUrls200ResponseTopHitsTimelineDataInner' => [ + 'timestamp' => 'int', + '_total_consumed' => '?float', + '_total_count' => '?int', + 'request_size' => '?int', + 'response_size' => '?int', + 'urls' => '\Upsun\Model\HttpMetricsOverview200ResponseDataTimelinesInnerUrlsValue[]', + 'codes' => '?\Upsun\Model\HttpMetricsOverview200ResponseDataTimelinesInnerCodes', + ], + + 'Upsun\Model\HttpMetricsTimelineUserAgents200Response' => [ + '_grain' => 'int', + '_from' => 'int', + '_to' => 'int', + '_project_id' => 'string', + '_environment_id' => 'string', + '_environment_type' => 'string', + '_branch_machine_name' => 'string', + '_breakdown_limit' => 'int', + '_breakdown_top_hits' => '\Upsun\Model\HttpMetricsTimelineIps200ResponseBreakdownTopHits', + 'breakdown' => '\Upsun\Model\HttpMetricsTimelineUserAgents200ResponseBreakdown', + 'top_hits_timeline' => '\Upsun\Model\HttpMetricsTimelineUserAgents200ResponseTopHitsTimeline', + '_methods' => 'string[]', + '_methods_mode' => '?string', + '_domains' => 'string[]', + '_domains_mode' => '?string', + '_code_slots' => 'string[]', + '_code_slots_mode' => '?string', + '_codes' => 'string[]', + '_codes_mode' => '?string', + '_request_duration_slots' => 'string[]', + '_request_duration_slots_mode' => '?string', + ], + + 'Upsun\Model\HttpMetricsTimelineUserAgents200ResponseBreakdown' => [ + 'kind' => 'string', + 'total' => 'int', + 'data' => '\Upsun\Model\HttpMetricsTimelineUserAgents200ResponseBreakdownDataInner[]', + ], + + 'Upsun\Model\HttpMetricsTimelineUserAgents200ResponseBreakdownDataInner' => [ + 'name' => 'string', + 'impact' => 'float', + 'average' => 'float', + 'p_50' => 'float', + 'p_96' => 'float', + 'count' => 'int', + 'top_hit' => 'bool', + ], + + 'Upsun\Model\HttpMetricsTimelineUserAgents200ResponseTopHitsTimeline' => [ + 'data' => '\Upsun\Model\HttpMetricsTimelineUserAgents200ResponseTopHitsTimelineDataInner[]', + ], + + 'Upsun\Model\HttpMetricsTimelineUserAgents200ResponseTopHitsTimelineDataInner' => [ + 'timestamp' => 'int', + '_total_consumed' => '?float', + '_total_count' => '?int', + 'data' => '\Upsun\Model\HttpMetricsTimelineUserAgents200ResponseTopHitsTimelineDataInnerDataValue[]', + ], + + 'Upsun\Model\HttpMetricsTimelineUserAgents200ResponseTopHitsTimelineDataInnerDataValue' => [ + 'count' => 'int', + 'impact' => '?float', + ], + 'Upsun\Model\ImageTypeRestrictions' => [ 'only' => 'string[]', 'exclude' => 'string[]', @@ -1679,6 +2352,7 @@ public static function openApiTypes(string $classname): array 'created_at' => '?\DateTime', 'updated_at' => '?\DateTime', 'type' => 'string', + 'role' => 'string', 'fetch_branches' => 'bool', 'prune_branches' => 'bool', 'environment_init_resources' => 'string', @@ -1697,6 +2371,7 @@ public static function openApiTypes(string $classname): array 'states' => 'string[]', 'result' => 'string', 'service_id' => 'string', + 'tls_certificates' => 'bool', 'base_url' => 'string', 'build_draft_pull_requests' => 'bool', 'build_pull_requests_post_merge' => 'bool', @@ -1757,6 +2432,7 @@ public static function openApiTypes(string $classname): array 'excluded_environments' => 'string[]', 'states' => 'string[]', 'result' => '?string', + 'tls_certificates' => '?bool', 'base_url' => '?string', 'build_draft_pull_requests' => '?bool', 'build_pull_requests_post_merge' => '?bool', @@ -1809,6 +2485,7 @@ public static function openApiTypes(string $classname): array 'excluded_environments' => 'string[]', 'states' => 'string[]', 'result' => '?string', + 'tls_certificates' => '?bool', 'base_url' => '?string', 'build_draft_pull_requests' => '?bool', 'build_pull_requests_post_merge' => '?bool', @@ -1870,6 +2547,31 @@ public static function openApiTypes(string $classname): array 'value' => 'string', ], + 'Upsun\Model\KubernetesDeploymentTargetStorage' => [ + 'type' => 'string', + 'name' => 'string', + 'k8s_config' => 'string', + 'bastion_nodes_user' => '?string', + 'bastion_nodes_host' => '?string', + 'id' => '?string', + ], + + 'Upsun\Model\KubernetesDeploymentTargetStorageCreateInput' => [ + 'type' => 'string', + 'name' => 'string', + ], + + 'Upsun\Model\KubernetesDeploymentTargetStoragePatch' => [ + 'type' => 'string', + 'name' => 'string', + ], + + 'Upsun\Model\LastDeploymentCommandsInner' => [ + 'app' => 'string', + 'type' => 'string', + 'exit_code' => 'int', + ], + 'Upsun\Model\LineItem' => [ 'type' => '?string', 'license_id' => '?float', @@ -2052,6 +2754,14 @@ public static function openApiTypes(string $classname): array 'max_extra_payload_size' => 'int', ], + 'Upsun\Model\Maintenance' => [ + 'next_maintenance' => '\DateTime', + ], + + 'Upsun\Model\MaintenanceWindowConfiguration' => [ + 'recurrence' => '\Upsun\Model\Recurrence', + ], + 'Upsun\Model\MergeInfo' => [ 'commits_ahead' => '?int', 'commits_behind' => '?int', @@ -2097,6 +2807,7 @@ public static function openApiTypes(string $classname): array 'created_at' => '?\DateTime', 'updated_at' => '?\DateTime', 'type' => 'string', + 'role' => 'string', 'extra' => 'string[]', 'url' => 'string', 'tls_verify' => 'bool', @@ -2136,6 +2847,160 @@ public static function openApiTypes(string $classname): array 'sha' => 'string', ], + 'Upsun\Model\ObservabilityEntrypoint200Response' => [ + 'message' => 'string', + 'project_id' => 'string', + 'branch_machine_name' => 'string', + 'environment_id' => 'string', + 'environment_type' => 'string', + 'vendor' => 'string', + 'psh_user_identifier' => 'string', + '_links' => '\Upsun\Model\ObservabilityEntrypoint200ResponseLinks', + 'retention' => '\Upsun\Model\ObservabilityEntrypoint200ResponseRetention', + 'data_retention' => '\Upsun\Model\ObservabilityEntrypoint200ResponseDataRetention', + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseDataRetention' => [ + '_unit' => 'string', + '_unit_in_seconds' => 'int', + 'resources' => '\Upsun\Model\ObservabilityEntrypoint200ResponseDataRetentionResources', + 'server_monitoring' => '\Upsun\Model\ObservabilityEntrypoint200ResponseDataRetentionServerMonitoring', + 'logs' => '\Upsun\Model\ObservabilityEntrypoint200ResponseDataRetentionLogs', + 'http_traffic' => '\Upsun\Model\ObservabilityEntrypoint200ResponseDataRetentionHttpTraffic', + 'continuous_profiling' => '\Upsun\Model\ObservabilityEntrypoint200ResponseDataRetentionContinuousProfiling', + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseDataRetentionContinuousProfiling' => [ + 'retention_period' => 'int', + 'max_range' => 'int', + 'recommended_default_range' => 'int', + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseDataRetentionHttpTraffic' => [ + 'retention_period' => 'int', + 'max_range' => 'int', + 'recommended_default_range' => 'int', + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseDataRetentionLogs' => [ + 'retention_period' => 'int', + 'max_range' => 'int', + 'recommended_default_range' => 'int', + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseDataRetentionResources' => [ + 'retention_period' => 'int', + 'max_range' => 'int', + 'recommended_default_range' => 'int', + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseDataRetentionServerMonitoring' => [ + 'retention_period' => 'int', + 'max_range' => 'int', + 'recommended_default_range' => 'int', + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinks' => [ + '_self' => '\Upsun\Model\ObservabilityEntrypoint200ResponseLinksSelf', + 'resources_by_service' => '\Upsun\Model\ObservabilityEntrypoint200ResponseLinksResourcesByServiceValue[]', + 'resources_overview' => '\Upsun\Model\ObservabilityEntrypoint200ResponseLinksResourcesOverview', + 'resources_summary' => '\Upsun\Model\ObservabilityEntrypoint200ResponseLinksResourcesSummary', + 'blackfire_php_server_caches' => '\Upsun\Model\ObservabilityEntrypoint200ResponseLinksBlackfirePhpServerCaches', + 'blackfire_server_global' => '\Upsun\Model\ObservabilityEntrypoint200ResponseLinksBlackfireServerGlobal', + 'blackfire_server_transactions_breakdown' => '\Upsun\Model\ObservabilityEntrypoint200ResponseLinksBlackfireServerTransactionsBreakdown', + 'logs_query' => '\Upsun\Model\ObservabilityEntrypoint200ResponseLinksLogsQuery', + 'logs_overview' => '\Upsun\Model\ObservabilityEntrypoint200ResponseLinksLogsOverview', + 'http_metrics_overview' => '\Upsun\Model\ObservabilityEntrypoint200ResponseLinksHttpMetricsOverview', + 'http_metrics_timeline_urls' => '\Upsun\Model\ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineUrls', + 'http_metrics_timeline_ips' => '\Upsun\Model\ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineIps', + 'http_metrics_timeline_user_agents' => '\Upsun\Model\ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineUserAgents', + 'console_sandbox_access' => '\Upsun\Model\ObservabilityEntrypoint200ResponseLinksConsoleSandboxAccess', + 'conprof_applications' => '\Upsun\Model\ObservabilityEntrypoint200ResponseLinksConprofApplications', + 'conprof_application_filters' => '\Upsun\Model\ObservabilityEntrypoint200ResponseLinksConprofApplicationFilters', + 'conprof_timeline' => '\Upsun\Model\ObservabilityEntrypoint200ResponseLinksConprofTimeline', + 'conprof_flamegraph' => '\Upsun\Model\ObservabilityEntrypoint200ResponseLinksConprofFlamegraph', + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksBlackfirePhpServerCaches' => [ + 'href' => 'string', + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksBlackfireServerGlobal' => [ + 'href' => 'string', + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksBlackfireServerTransactionsBreakdown' => [ + 'href' => 'string', + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksConprofApplicationFilters' => [ + 'href' => 'string', + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksConprofApplications' => [ + 'href' => 'string', + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksConprofFlamegraph' => [ + 'href' => 'string', + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksConprofTimeline' => [ + 'href' => 'string', + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksConsoleSandboxAccess' => [ + 'href' => 'string', + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksHttpMetricsOverview' => [ + 'href' => 'string', + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineIps' => [ + 'href' => 'string', + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineUrls' => [ + 'href' => 'string', + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineUserAgents' => [ + 'href' => 'string', + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksLogsOverview' => [ + 'href' => 'string', + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksLogsQuery' => [ + 'href' => 'string', + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksResourcesByServiceValue' => [ + 'name' => 'string', + 'href' => 'string', + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksResourcesOverview' => [ + 'href' => 'string', + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksResourcesSummary' => [ + 'href' => 'string', + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseLinksSelf' => [ + 'href' => 'string', + ], + + 'Upsun\Model\ObservabilityEntrypoint200ResponseRetention' => [ + 'resources' => 'int', + 'logs' => 'int', + 'http_traffic' => 'int', + 'continuous_profiling' => 'int', + ], + 'Upsun\Model\OpenTelemetry' => [ 'enabled' => '?bool', 'role' => '?string', @@ -2479,9 +3344,11 @@ public static function openApiTypes(string $classname): array 'status' => '?\Upsun\Model\ProjectStatus', 'trial_plan' => '?bool', 'project_ui' => '?string', + 'dedicated_tag' => '?string', 'created_at' => '?\DateTime', 'updated_at' => '?\DateTime', 'activities' => '\Upsun\Model\Activity[]', + 'fastly_service_ids' => 'string[]', 'project_options' => '?\Upsun\Model\ProjectOptionsAggregated', '_links' => '?\Upsun\Model\OrganizationProjectLinks', ], @@ -2568,6 +3435,37 @@ public static function openApiTypes(string $classname): array 'updated_at' => '?\DateTime', ], + 'Upsun\Model\OtlpLogIntegration' => [ + 'created_at' => '?\DateTime', + 'updated_at' => '?\DateTime', + 'type' => 'string', + 'role' => 'string', + 'extra' => 'string[]', + 'url' => 'string', + 'headers' => 'string[]', + 'tls_verify' => 'bool', + 'excluded_services' => 'string[]', + 'id' => '?string', + ], + + 'Upsun\Model\OtlpLogIntegrationCreateInput' => [ + 'type' => 'string', + 'url' => 'string', + 'extra' => 'string[]', + 'headers' => 'string[]', + 'tls_verify' => '?bool', + 'excluded_services' => 'string[]', + ], + + 'Upsun\Model\OtlpLogIntegrationPatch' => [ + 'type' => 'string', + 'url' => 'string', + 'extra' => 'string[]', + 'headers' => 'string[]', + 'tls_verify' => '?bool', + 'excluded_services' => 'string[]', + ], + 'Upsun\Model\OutboundFirewall' => [ 'enabled' => 'bool', ], @@ -2589,6 +3487,7 @@ public static function openApiTypes(string $classname): array 'created_at' => '?\DateTime', 'updated_at' => '?\DateTime', 'type' => 'string', + 'role' => 'string', 'routing_key' => 'string', 'id' => '?string', ], @@ -2724,6 +3623,7 @@ public static function openApiTypes(string $classname): array 'billing_contact' => '?string', 'invoiced' => '?bool', 'customer_type' => '?string', + 'legal_entity_name' => '?string', ], 'Upsun\Model\Project' => [ @@ -2743,6 +3643,7 @@ public static function openApiTypes(string $classname): array 'repository' => '\Upsun\Model\RepositoryInformation', 'default_domain' => '?string', 'subscription' => '\Upsun\Model\SubscriptionInformation', + 'maintenance' => '?\Upsun\Model\Maintenance', ], 'Upsun\Model\ProjectAddon' => [ @@ -2807,6 +3708,7 @@ public static function openApiTypes(string $classname): array ], 'Upsun\Model\ProjectCapabilities' => [ + 'tasks' => '\Upsun\Model\Tasks', 'metrics' => '\Upsun\Model\Metrics', 'logs_forwarding' => '\Upsun\Model\LogsForwarding', 'guaranteed_resources' => '\Upsun\Model\GuaranteedResources', @@ -2978,6 +3880,7 @@ public static function openApiTypes(string $classname): array 'enable_disk_health_monitoring' => 'bool', 'enable_paused_environments' => 'bool', 'enable_unified_configuration' => 'bool', + 'enable_explicit_empty_routes' => 'bool', 'enable_routes_tracing' => 'bool', 'image_deployment_validation' => 'bool', 'support_generic_images' => 'bool', @@ -2990,14 +3893,19 @@ public static function openApiTypes(string $classname): array 'activity_logs_max_size' => 'int', 'allow_manual_deployments' => 'bool', 'allow_rolling_deployments' => 'bool', + 'maintenance_window' => '?\Upsun\Model\MaintenanceWindowConfiguration', + 'allow_activity_reschedule' => 'bool', 'allow_burst' => 'bool', 'router_resources' => '\Upsun\Model\RouterResources', + 'allow_scaling_to_zero' => 'bool', + 'save_applications_vendors' => 'bool', ], 'Upsun\Model\ProjectSettingsPatch' => [ 'initialize' => '?object', 'data_retention' => '\Upsun\Model\DataRetentionConfigurationValue1[]', 'build_resources' => '?\Upsun\Model\BuildResources2', + 'maintenance_window' => '?\Upsun\Model\MaintenanceWindowConfiguration', ], 'Upsun\Model\ProjectStatus' => [ @@ -3057,6 +3965,12 @@ public static function openApiTypes(string $classname): array 'sticky' => '?\Upsun\Model\StickyConfiguration', ], + 'Upsun\Model\Recurrence' => [ + 'interval' => 'string', + 'day_of_week' => 'int', + 'time' => 'string', + ], + 'Upsun\Model\RedirectConfiguration' => [ 'expires' => 'string', 'paths' => '\Upsun\Model\PathValue[]', @@ -3103,12 +4017,6 @@ public static function openApiTypes(string $classname): array 'hipaa' => '?bool', ], - 'Upsun\Model\RegionDataCenter' => [ - 'name' => '?string', - 'label' => '?string', - 'location' => '?string', - ], - 'Upsun\Model\RegionDatacenter' => [ 'name' => '?string', 'label' => '?string', @@ -3143,7 +4051,7 @@ public static function openApiTypes(string $classname): array 'available' => 'bool', 'endpoint' => 'string', 'provider' => '\Upsun\Model\RegionProvider', - 'datacenter' => '\Upsun\Model\RegionDataCenter', + 'datacenter' => '\Upsun\Model\RegionDatacenter', 'compliance' => '\Upsun\Model\RegionCompliance', 'created_at' => '\DateTime', 'updated_at' => '\DateTime', @@ -3225,6 +4133,177 @@ public static function openApiTypes(string $classname): array 'init' => '?string', ], + 'Upsun\Model\ResourcesByService200Response' => [ + '_grain' => 'int', + '_from' => 'int', + '_to' => 'int', + '_project_id' => 'string', + '_environment_id' => 'string', + '_branch_machine_name' => 'string', + '_service' => 'string', + 'data' => '\Upsun\Model\ResourcesByService200ResponseDataInner[]', + '_dg2_host_types_mapping' => 'string[]', + ], + + 'Upsun\Model\ResourcesByService200ResponseDataInner' => [ + 'timestamp' => 'int', + 'instances' => '\Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValue[]', + ], + + 'Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValue' => [ + 'cpu_used' => '?\Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueCpuUsed', + 'cpu_limit' => '?\Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueCpuLimit', + 'memory_used' => '?\Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueMemoryUsed', + 'memory_limit' => '?\Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueMemoryLimit', + 'swap_used' => '?\Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueSwapUsed', + 'swap_limit' => '?\Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueSwapLimit', + 'memory_pressure' => '?\Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueMemoryPressure', + 'cpu_pressure' => '?\Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueCpuPressure', + 'io_pressure' => '?\Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueIoPressure', + 'irq_pressure' => '?\Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueIrqPressure', + 'mountpoints' => '\Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueMountpointsValue[]', + ], + + 'Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueCpuLimit' => [ + 'max' => '?float', + ], + + 'Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueCpuPressure' => [ + 'min' => '?float', + 'max' => '?float', + 'avg' => '?float', + 'stddev' => '?float', + 'p50' => '?float', + 'p95' => '?float', + 'p96' => '?float', + 'p97' => '?float', + 'p98' => '?float', + 'p99' => '?float', + ], + + 'Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueCpuUsed' => [ + 'min' => '?float', + 'max' => '?float', + 'avg' => '?float', + 'stddev' => '?float', + 'p50' => '?float', + 'p95' => '?float', + 'p96' => '?float', + 'p97' => '?float', + 'p98' => '?float', + 'p99' => '?float', + ], + + 'Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueIoPressure' => [ + 'min' => '?float', + 'max' => '?float', + 'avg' => '?float', + 'stddev' => '?float', + 'p50' => '?float', + 'p95' => '?float', + 'p96' => '?float', + 'p97' => '?float', + 'p98' => '?float', + 'p99' => '?float', + ], + + 'Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueIrqPressure' => [ + 'min' => '?float', + 'max' => '?float', + 'avg' => '?float', + 'stddev' => '?float', + 'p50' => '?float', + 'p95' => '?float', + 'p96' => '?float', + 'p97' => '?float', + 'p98' => '?float', + 'p99' => '?float', + ], + + 'Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueMemoryLimit' => [ + 'max' => '?int', + ], + + 'Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueMemoryPressure' => [ + 'min' => '?float', + 'max' => '?float', + 'avg' => '?float', + 'stddev' => '?float', + 'p50' => '?float', + 'p95' => '?float', + 'p96' => '?float', + 'p97' => '?float', + 'p98' => '?float', + 'p99' => '?float', + ], + + 'Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueMemoryUsed' => [ + 'min' => '?int', + 'max' => '?int', + 'avg' => '?float', + 'stddev' => '?float', + 'p50' => '?float', + 'p95' => '?float', + 'p96' => '?float', + 'p97' => '?float', + 'p98' => '?float', + 'p99' => '?float', + ], + + 'Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueMountpointsValue' => [ + 'disk_used' => '?\Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueDiskUsed', + 'disk_limit' => '?\Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueDiskLimit', + 'inodes_used' => '?\Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueInodesUsed', + 'inodes_limit' => '?\Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueInodesLimit', + ], + + 'Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueDiskLimit' => [ + 'max' => '?int', + ], + + 'Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueDiskUsed' => [ + 'min' => '?int', + 'max' => '?int', + 'avg' => '?float', + 'stddev' => '?float', + 'p50' => '?float', + 'p95' => '?float', + 'p96' => '?float', + 'p97' => '?float', + 'p98' => '?float', + 'p99' => '?float', + ], + + 'Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueInodesLimit' => [ + 'max' => '?int', + ], + + 'Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueInodesUsed' => [ + 'min' => '?int', + 'max' => '?int', + 'avg' => '?float', + 'stddev' => '?float', + 'p50' => '?float', + 'p95' => '?float', + 'p96' => '?float', + 'p97' => '?float', + 'p98' => '?float', + 'p99' => '?float', + ], + + 'Upsun\Model\ResourcesByService200ResponseDataInnerInstancesValueSwapUsed' => [ + 'min' => '?int', + 'max' => '?int', + 'avg' => '?float', + 'stddev' => '?float', + 'p50' => '?float', + 'p95' => '?float', + 'p96' => '?float', + 'p97' => '?float', + 'p98' => '?float', + 'p99' => '?float', + ], + 'Upsun\Model\ResourcesLimits' => [ 'container_profiles' => 'bool', 'production' => '\Upsun\Model\ProductionResources', @@ -3239,6 +4318,337 @@ public static function openApiTypes(string $classname): array 'redeployed_end' => 'bool', ], + 'Upsun\Model\ResourcesOverview200Response' => [ + '_grain' => 'int', + '_from' => 'int', + '_to' => 'int', + '_project_id' => 'string', + '_environment_id' => 'string', + '_branch_machine_name' => 'string', + 'data' => '\Upsun\Model\ResourcesOverview200ResponseDataInner[]', + ], + + 'Upsun\Model\ResourcesOverview200ResponseDataInner' => [ + 'timestamp' => 'int', + 'services' => '\Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValue[]', + ], + + 'Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValue' => [ + 'cpu_used' => '?\Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueCpuUsed', + 'cpu_limit' => '?\Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueCpuLimit', + 'memory_used' => '?\Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueMemoryUsed', + 'memory_limit' => '?\Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueMemoryLimit', + 'swap_used' => '?\Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueSwapUsed', + 'swap_limit' => '?\Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueSwapLimit', + 'memory_pressure' => '?\Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueMemoryPressure', + 'cpu_pressure' => '?\Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueCpuPressure', + 'io_pressure' => '?\Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueIoPressure', + 'irq_pressure' => '?\Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueIrqPressure', + 'mountpoints' => '\Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueMountpointsValue[]', + ], + + 'Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueCpuLimit' => [ + 'max' => '?float', + ], + + 'Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueCpuPressure' => [ + 'min' => '?float', + 'max' => '?float', + 'avg' => '?float', + 'stddev' => '?float', + 'p50' => '?float', + 'p95' => '?float', + 'p96' => '?float', + 'p97' => '?float', + 'p98' => '?float', + 'p99' => '?float', + ], + + 'Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueCpuUsed' => [ + 'min' => '?float', + 'max' => '?float', + 'avg' => '?float', + 'stddev' => '?float', + 'p50' => '?float', + 'p95' => '?float', + 'p96' => '?float', + 'p97' => '?float', + 'p98' => '?float', + 'p99' => '?float', + ], + + 'Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueIoPressure' => [ + 'min' => '?float', + 'max' => '?float', + 'avg' => '?float', + 'stddev' => '?float', + 'p50' => '?float', + 'p95' => '?float', + 'p96' => '?float', + 'p97' => '?float', + 'p98' => '?float', + 'p99' => '?float', + ], + + 'Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueIrqPressure' => [ + 'min' => '?float', + 'max' => '?float', + 'avg' => '?float', + 'stddev' => '?float', + 'p50' => '?float', + 'p95' => '?float', + 'p96' => '?float', + 'p97' => '?float', + 'p98' => '?float', + 'p99' => '?float', + ], + + 'Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueMemoryLimit' => [ + 'max' => '?int', + ], + + 'Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueMemoryPressure' => [ + 'min' => '?float', + 'max' => '?float', + 'avg' => '?float', + 'stddev' => '?float', + 'p50' => '?float', + 'p95' => '?float', + 'p96' => '?float', + 'p97' => '?float', + 'p98' => '?float', + 'p99' => '?float', + ], + + 'Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueMemoryUsed' => [ + 'min' => '?int', + 'max' => '?int', + 'avg' => '?float', + 'stddev' => '?float', + 'p50' => '?float', + 'p95' => '?float', + 'p96' => '?float', + 'p97' => '?float', + 'p98' => '?float', + 'p99' => '?float', + ], + + 'Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueMountpointsValue' => [ + 'disk_used' => '?\Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueDiskUsed', + 'disk_limit' => '?\Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueDiskLimit', + 'inodes_used' => '?\Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueInodesUsed', + 'inodes_limit' => '?\Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueInodesLimit', + ], + + 'Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueDiskLimit' => [ + 'max' => '?int', + ], + + 'Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueDiskUsed' => [ + 'min' => '?int', + 'max' => '?int', + 'avg' => '?float', + 'stddev' => '?float', + 'p50' => '?float', + 'p95' => '?float', + 'p96' => '?float', + 'p97' => '?float', + 'p98' => '?float', + 'p99' => '?float', + ], + + 'Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueInodesLimit' => [ + 'max' => '?int', + ], + + 'Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueInodesUsed' => [ + 'min' => '?int', + 'max' => '?int', + 'avg' => '?float', + 'stddev' => '?float', + 'p50' => '?float', + 'p95' => '?float', + 'p96' => '?float', + 'p97' => '?float', + 'p98' => '?float', + 'p99' => '?float', + ], + + 'Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueSwapLimit' => [ + 'max' => '?int', + ], + + 'Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueSwapUsed' => [ + 'min' => '?int', + 'max' => '?int', + 'avg' => '?float', + 'stddev' => '?float', + 'p50' => '?float', + 'p95' => '?float', + 'p96' => '?float', + 'p97' => '?float', + 'p98' => '?float', + 'p99' => '?float', + ], + + 'Upsun\Model\ResourcesSummary200Response' => [ + '_from' => 'int', + '_to' => 'int', + '_project_id' => 'string', + '_environment_id' => 'string', + '_branch_machine_name' => 'string', + 'data' => '\Upsun\Model\ResourcesSummary200ResponseData', + ], + + 'Upsun\Model\ResourcesSummary200ResponseData' => [ + 'services' => 'array<string,\Upsun\Model\ResourcesSummary200ResponseDataServicesValueValue>[]', + ], + + 'Upsun\Model\ResourcesSummary200ResponseDataServicesValueValue' => [ + 'cpu_used' => '?\Upsun\Model\ResourcesSummary200ResponseDataServicesValueValueCpuUsed', + 'cpu_limit' => '?\Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueCpuLimit', + 'memory_used' => '?\Upsun\Model\ResourcesSummary200ResponseDataServicesValueValueMemoryUsed', + 'memory_limit' => '?\Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueMemoryLimit', + 'swap_used' => '?\Upsun\Model\ResourcesSummary200ResponseDataServicesValueValueSwapUsed', + 'swap_limit' => '?\Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueSwapLimit', + 'memory_pressure' => '?\Upsun\Model\ResourcesSummary200ResponseDataServicesValueValueMemoryPressure', + 'cpu_pressure' => '?\Upsun\Model\ResourcesSummary200ResponseDataServicesValueValueCpuPressure', + 'io_pressure' => '?\Upsun\Model\ResourcesSummary200ResponseDataServicesValueValueIoPressure', + 'irq_pressure' => '?\Upsun\Model\ResourcesSummary200ResponseDataServicesValueValueIrqPressure', + 'mountpoints' => '\Upsun\Model\ResourcesSummary200ResponseDataServicesValueValueMountpointsValue[]', + ], + + 'Upsun\Model\ResourcesSummary200ResponseDataServicesValueValueCpuPressure' => [ + 'min' => '?float', + 'max' => '?float', + 'avg' => '?float', + 'stddev' => '?float', + 'p50' => '?float', + 'p95' => '?float', + 'p96' => '?float', + 'p97' => '?float', + 'p98' => '?float', + 'p99' => '?float', + ], + + 'Upsun\Model\ResourcesSummary200ResponseDataServicesValueValueCpuUsed' => [ + 'min' => '?float', + 'max' => '?float', + 'avg' => '?float', + 'stddev' => '?float', + 'p50' => '?float', + 'p95' => '?float', + 'p96' => '?float', + 'p97' => '?float', + 'p98' => '?float', + 'p99' => '?float', + ], + + 'Upsun\Model\ResourcesSummary200ResponseDataServicesValueValueIoPressure' => [ + 'min' => '?float', + 'max' => '?float', + 'avg' => '?float', + 'stddev' => '?float', + 'p50' => '?float', + 'p95' => '?float', + 'p96' => '?float', + 'p97' => '?float', + 'p98' => '?float', + 'p99' => '?float', + ], + + 'Upsun\Model\ResourcesSummary200ResponseDataServicesValueValueIrqPressure' => [ + 'min' => '?float', + 'max' => '?float', + 'avg' => '?float', + 'stddev' => '?float', + 'p50' => '?float', + 'p95' => '?float', + 'p96' => '?float', + 'p97' => '?float', + 'p98' => '?float', + 'p99' => '?float', + ], + + 'Upsun\Model\ResourcesSummary200ResponseDataServicesValueValueMemoryPressure' => [ + 'min' => '?float', + 'max' => '?float', + 'avg' => '?float', + 'stddev' => '?float', + 'p50' => '?float', + 'p95' => '?float', + 'p96' => '?float', + 'p97' => '?float', + 'p98' => '?float', + 'p99' => '?float', + ], + + 'Upsun\Model\ResourcesSummary200ResponseDataServicesValueValueMemoryUsed' => [ + 'min' => '?int', + 'max' => '?int', + 'avg' => '?float', + 'stddev' => '?float', + 'p50' => '?float', + 'p95' => '?float', + 'p96' => '?float', + 'p97' => '?float', + 'p98' => '?float', + 'p99' => '?float', + ], + + 'Upsun\Model\ResourcesSummary200ResponseDataServicesValueValueMountpointsValue' => [ + 'disk_used' => '?\Upsun\Model\ResourcesSummary200ResponseDataServicesValueValueMountpointsValueDiskUsed', + 'disk_limit' => '?\Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueDiskLimit', + 'inodes_used' => '?\Upsun\Model\ResourcesSummary200ResponseDataServicesValueValueMountpointsValueInodesUsed', + 'inodes_limit' => '?\Upsun\Model\ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueInodesLimit', + ], + + 'Upsun\Model\ResourcesSummary200ResponseDataServicesValueValueMountpointsValueDiskUsed' => [ + 'min' => '?int', + 'max' => '?int', + 'avg' => '?float', + 'stddev' => '?float', + 'p50' => '?float', + 'p95' => '?float', + 'p96' => '?float', + 'p97' => '?float', + 'p98' => '?float', + 'p99' => '?float', + ], + + 'Upsun\Model\ResourcesSummary200ResponseDataServicesValueValueMountpointsValueInodesUsed' => [ + 'min' => '?int', + 'max' => '?int', + 'avg' => '?float', + 'stddev' => '?float', + 'p50' => '?float', + 'p95' => '?float', + 'p96' => '?float', + 'p97' => '?float', + 'p98' => '?float', + 'p99' => '?float', + ], + + 'Upsun\Model\ResourcesSummary200ResponseDataServicesValueValueSwapUsed' => [ + 'min' => '?int', + 'max' => '?int', + 'avg' => '?float', + 'stddev' => '?float', + 'p50' => '?float', + 'p95' => '?float', + 'p96' => '?float', + 'p97' => '?float', + 'p98' => '?float', + 'p99' => '?float', + ], + + 'Upsun\Model\ResourcesSummary400Response' => [ + 'type' => 'string', + 'title' => 'string', + 'status' => 'int', + 'violations' => 'string[][]', + ], + 'Upsun\Model\Route' => [ 'attributes' => 'string[]', 'type' => 'string', @@ -3276,12 +4686,9 @@ public static function openApiTypes(string $classname): array 'sticky' => '?\Upsun\Model\StickyConfiguration', ], - 'Upsun\Model\Routing' => [ - 'percentage' => 'int', - ], - - 'Upsun\Model\Routing1' => [ - 'percentage' => '?int', + 'Upsun\Model\RunConfiguration' => [ + 'command' => 'string', + 'timeout' => 'int', ], 'Upsun\Model\RuntimeOperations' => [ @@ -3306,6 +4713,7 @@ public static function openApiTypes(string $classname): array 'created_at' => '?\DateTime', 'updated_at' => '?\DateTime', 'type' => 'string', + 'role' => 'string', 'events' => 'string[]', 'environments' => 'string[]', 'excluded_environments' => 'string[]', @@ -3361,6 +4769,7 @@ public static function openApiTypes(string $classname): array 'container_profile' => '?string', 'endpoints' => '?object', 'instance_count' => '?int', + 'supports_horizontal_scaling' => 'bool', ], 'Upsun\Model\ServicesValue1' => [ @@ -3379,6 +4788,7 @@ public static function openApiTypes(string $classname): array 'created_at' => '?\DateTime', 'updated_at' => '?\DateTime', 'type' => 'string', + 'role' => 'string', 'channel' => 'string', 'id' => '?string', ], @@ -3400,6 +4810,10 @@ public static function openApiTypes(string $classname): array 'operations' => '\Upsun\Model\SourceOperationsValue[]', ], + 'Upsun\Model\SourceCodeConfiguration1' => [ + 'root' => 'string', + ], + 'Upsun\Model\SourceOperations' => [ 'enabled' => 'bool', ], @@ -3425,6 +4839,7 @@ public static function openApiTypes(string $classname): array 'created_at' => '?\DateTime', 'updated_at' => '?\DateTime', 'type' => 'string', + 'role' => 'string', 'extra' => 'string[]', 'url' => 'string', 'index' => 'string', @@ -3594,6 +5009,7 @@ public static function openApiTypes(string $classname): array 'created_at' => '?\DateTime', 'updated_at' => '?\DateTime', 'type' => 'string', + 'role' => 'string', 'extra' => 'string[]', 'url' => 'string', 'category' => 'string', @@ -3629,6 +5045,7 @@ public static function openApiTypes(string $classname): array 'created_at' => '?\DateTime', 'updated_at' => '?\DateTime', 'type' => 'string', + 'role' => 'string', 'extra' => 'string[]', 'host' => 'string', 'port' => 'int', @@ -3681,6 +5098,26 @@ public static function openApiTypes(string $classname): array 'client_certificate_authorities' => 'string[]', ], + 'Upsun\Model\Task' => [ + 'id' => 'string', + 'type' => 'string', + 'source' => '\Upsun\Model\SourceCodeConfiguration1', + 'hooks' => '\Upsun\Model\Hooks1', + 'relationships' => '\Upsun\Model\ServiceRelationshipsValue[]', + 'mounts' => '\Upsun\Model\MountsValue[]', + 'variables' => 'array<string,mixed>[]', + 'run' => '\Upsun\Model\RunConfiguration', + 'name' => 'string', + ], + + 'Upsun\Model\TaskTriggerInput' => [ + 'variables' => 'array<string,mixed>[]', + ], + + 'Upsun\Model\Tasks' => [ + 'enabled' => 'bool', + ], + 'Upsun\Model\Team' => [ 'id' => '?string', 'organization_id' => '?string', @@ -3826,6 +5263,7 @@ public static function openApiTypes(string $classname): array 'default_catalog' => '?string', 'project_options_url' => '?string', 'company_name' => '?string', + 'legal_entity_name' => '?string', 'customer_type' => '?string', 'vat_number' => '?string', 'billing_contact' => '?string', @@ -3841,6 +5279,7 @@ public static function openApiTypes(string $classname): array 'name' => '?string', 'label' => '?string', 'country' => '?string', + 'billing_profile_id' => '?string', 'security_contact' => '?string', ], @@ -4068,21 +5507,6 @@ public static function openApiTypes(string $classname): array 'phone_number' => 'string', ], - 'Upsun\Model\Version' => [ - 'id' => 'string', - 'commit' => '?string', - 'locked' => 'bool', - 'routing' => '\Upsun\Model\Routing', - ], - - 'Upsun\Model\VersionCreateInput' => [ - 'routing' => '?\Upsun\Model\Routing1', - ], - - 'Upsun\Model\VersionPatch' => [ - 'routing' => '?\Upsun\Model\Routing1', - ], - 'Upsun\Model\Vouchers' => [ 'uuid' => '?string', 'vouchers_total' => '?string', @@ -4144,11 +5568,12 @@ public static function openApiTypes(string $classname): array 'source' => '\Upsun\Model\SourceCodeConfiguration', 'build' => '\Upsun\Model\BuildConfiguration', 'dependencies' => 'object[]', - 'stack' => 'object[]', + 'stack' => '\Upsun\Model\ComposableImages', 'is_across_submodule' => 'bool', 'instance_count' => '?int', 'config_id' => 'string', 'slug_id' => 'string', + 'supports_horizontal_scaling' => 'bool', ], 'Upsun\Model\WebConfiguration' => [ @@ -4168,6 +5593,7 @@ public static function openApiTypes(string $classname): array 'created_at' => '?\DateTime', 'updated_at' => '?\DateTime', 'type' => 'string', + 'role' => 'string', 'events' => 'string[]', 'environments' => 'string[]', 'excluded_environments' => 'string[]', @@ -4244,9 +5670,10 @@ public static function openApiTypes(string $classname): array 'runtime' => 'object', 'worker' => '\Upsun\Model\WorkerConfiguration', 'app' => 'string', - 'stack' => 'object[]', + 'stack' => '\Upsun\Model\ComposableImages', 'instance_count' => '?int', 'slug_id' => 'string', + 'supports_horizontal_scaling' => 'bool', ], ]; } diff --git a/src/Api/SubscriptionsApi.php b/src/Api/SubscriptionsApi.php index 21169a70..8ebcf93e 100644 --- a/src/Api/SubscriptionsApi.php +++ b/src/Api/SubscriptionsApi.php @@ -2160,9 +2160,11 @@ private function getSubscriptionUsageAlertsRequest( * The ID of the organization. (required) * @param string|null $filterStatus (optional) * @param \Upsun\Model\StringFilter|null $filterId (optional) - * @param \Upsun\Model\StringFilter|null $filterProjectId (optional) + * @param \Upsun\Model\StringFilter|null $filterProjectId + * Allows filtering by `project_id` using one or more operators. (optional) * @param \Upsun\Model\StringFilter|null $filterProjectTitle (optional) - * @param \Upsun\Model\StringFilter|null $filterRegion (optional) + * @param \Upsun\Model\StringFilter|null $filterRegion + * Allows filtering by `region` using one or more operators. (optional) * @param \Upsun\Model\DateTimeFilter|null $filterUpdatedAt * Allows filtering by `updated_at` using one or more operators. (optional) * @param int|null $pageSize @@ -2214,9 +2216,11 @@ public function listOrgSubscriptions( * The ID of the organization. (required) * @param string|null $filterStatus (optional) * @param \Upsun\Model\StringFilter|null $filterId (optional) - * @param \Upsun\Model\StringFilter|null $filterProjectId (optional) + * @param \Upsun\Model\StringFilter|null $filterProjectId + * Allows filtering by `project_id` using one or more operators. (optional) * @param \Upsun\Model\StringFilter|null $filterProjectTitle (optional) - * @param \Upsun\Model\StringFilter|null $filterRegion (optional) + * @param \Upsun\Model\StringFilter|null $filterRegion + * Allows filtering by `region` using one or more operators. (optional) * @param \Upsun\Model\DateTimeFilter|null $filterUpdatedAt * Allows filtering by `updated_at` using one or more operators. (optional) * @param int|null $pageSize @@ -2293,9 +2297,11 @@ private function listOrgSubscriptionsWithHttpInfo( * The ID of the organization. (required) * @param string|null $filterStatus (optional) * @param \Upsun\Model\StringFilter|null $filterId (optional) - * @param \Upsun\Model\StringFilter|null $filterProjectId (optional) + * @param \Upsun\Model\StringFilter|null $filterProjectId + * Allows filtering by `project_id` using one or more operators. (optional) * @param \Upsun\Model\StringFilter|null $filterProjectTitle (optional) - * @param \Upsun\Model\StringFilter|null $filterRegion (optional) + * @param \Upsun\Model\StringFilter|null $filterRegion + * Allows filtering by `region` using one or more operators. (optional) * @param \Upsun\Model\DateTimeFilter|null $filterUpdatedAt * Allows filtering by `updated_at` using one or more operators. (optional) * @param int|null $pageSize diff --git a/src/Api/TaskApi.php b/src/Api/TaskApi.php new file mode 100644 index 00000000..54e242f9 --- /dev/null +++ b/src/Api/TaskApi.php @@ -0,0 +1,619 @@ +config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + + $this->headerSelector = $selector ?? new ApiHeaderSelector(); + } + + /** + * + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + * @see https://docs.upsun.com/api/#tag/Task/operation/get-projects-environments-tasks + */ + public function getProjectsEnvironmentsTasks( + string $projectId, + string $environmentId, + string $taskId + ): Task { + return $this->getProjectsEnvironmentsTasksWithHttpInfo( + $projectId, + $environmentId, + $taskId + ); + } + + /** + * + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + */ + private function getProjectsEnvironmentsTasksWithHttpInfo( + string $projectId, + string $environmentId, + string $taskId + ): Task { + $request = $this->getProjectsEnvironmentsTasksRequest( + $projectId, + $environmentId, + $taskId + ); + + try { + $response = $this->sendAuthenticatedRequest( + $request->getMethod(), + (string) $request->getUri(), + $request->getHeaders(), + $request->getBody() + ); + + return $this->handleResponseWithDataType( + '\Upsun\Model\Task', + $request, + $response + ); + } catch (Exception $exception) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $exception->getCode(), + '/projects/{projectId}/environments/{environmentId}/tasks/{taskId}' + ), + $request, + $response ?? null, + $exception + ); + } + } + + /** + * Create request for operation 'getProjectsEnvironmentsTasks' + * + * + * @throws InvalidArgumentException + */ + private function getProjectsEnvironmentsTasksRequest( + string $projectId, + string $environmentId, + string $taskId + ): RequestInterface { + // verify the required parameter 'projectId' is set + if (empty($projectId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $projectId + when calling getProjectsEnvironmentsTasks' + ); + } + // verify the required parameter 'environmentId' is set + if (empty($environmentId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $environmentId + when calling getProjectsEnvironmentsTasks' + ); + } + // verify the required parameter 'taskId' is set + if (empty($taskId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $taskId + when calling getProjectsEnvironmentsTasks' + ); + } + + $resourcePath = '/projects/{projectId}/environments/{environmentId}/tasks/{taskId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = null; + $multipart = false; + + // path params + + if ($projectId !== null) { + $resourcePath = str_replace( + '{' . 'projectId' . '}', + ObjectSerializer::toPathValue($projectId), + $resourcePath + ); + } + // path params + + if ($environmentId !== null) { + $resourcePath = str_replace( + '{' . 'environmentId' . '}', + ObjectSerializer::toPathValue($environmentId), + $resourcePath + ); + } + // path params + + if ($taskId !== null) { + $resourcePath = str_replace( + '{' . 'taskId' . '}', + ObjectSerializer::toPathValue($taskId), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + '', + $multipart + ); + + // for model (json/xml) + if ($formParams !== []) { + 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 ($this->headerSelector->isJsonMime($headers['Content-Type'])) { + $httpBody = json_encode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if ($this->config->getAccessToken() !== null) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + if ($this->config->getUpsunClientHeader()) { + $defaultHeaders['X-Upsun-Client'] = $this->config->getUpsunClientHeader(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + + $uri = $this->createUri($operationHost, $resourcePath, $queryParams); + + return $this->createRequest('GET', $uri, $headers, $httpBody); + } + + /** + * + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + * + * @return \Upsun\Model\Task[] + * @see https://docs.upsun.com/api/#tag/Task/operation/list-projects-environments-tasks + */ + public function listProjectsEnvironmentsTasks( + string $projectId, + string $environmentId + ): array { + return $this->listProjectsEnvironmentsTasksWithHttpInfo( + $projectId, + $environmentId + ); + } + + /** + * + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + * + * @return \Upsun\Model\Task[] + */ + private function listProjectsEnvironmentsTasksWithHttpInfo( + string $projectId, + string $environmentId + ): array { + $request = $this->listProjectsEnvironmentsTasksRequest( + $projectId, + $environmentId + ); + + try { + $response = $this->sendAuthenticatedRequest( + $request->getMethod(), + (string) $request->getUri(), + $request->getHeaders(), + $request->getBody() + ); + + return $this->handleResponseWithDataType( + '\Upsun\Model\Task[]', + $request, + $response + ); + } catch (Exception $exception) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $exception->getCode(), + '/projects/{projectId}/environments/{environmentId}/tasks' + ), + $request, + $response ?? null, + $exception + ); + } + } + + /** + * Create request for operation 'listProjectsEnvironmentsTasks' + * + * + * @throws InvalidArgumentException + */ + private function listProjectsEnvironmentsTasksRequest( + string $projectId, + string $environmentId + ): RequestInterface { + // verify the required parameter 'projectId' is set + if (empty($projectId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $projectId + when calling listProjectsEnvironmentsTasks' + ); + } + // verify the required parameter 'environmentId' is set + if (empty($environmentId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $environmentId + when calling listProjectsEnvironmentsTasks' + ); + } + + $resourcePath = '/projects/{projectId}/environments/{environmentId}/tasks'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = null; + $multipart = false; + + // path params + + if ($projectId !== null) { + $resourcePath = str_replace( + '{' . 'projectId' . '}', + ObjectSerializer::toPathValue($projectId), + $resourcePath + ); + } + // path params + + if ($environmentId !== null) { + $resourcePath = str_replace( + '{' . 'environmentId' . '}', + ObjectSerializer::toPathValue($environmentId), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + '', + $multipart + ); + + // for model (json/xml) + if ($formParams !== []) { + 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 ($this->headerSelector->isJsonMime($headers['Content-Type'])) { + $httpBody = json_encode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if ($this->config->getAccessToken() !== null) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + if ($this->config->getUpsunClientHeader()) { + $defaultHeaders['X-Upsun-Client'] = $this->config->getUpsunClientHeader(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + + $uri = $this->createUri($operationHost, $resourcePath, $queryParams); + + return $this->createRequest('GET', $uri, $headers, $httpBody); + } + + /** + * + * @param \Upsun\Model\TaskTriggerInput $taskTriggerInput (required) + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + * @see https://docs.upsun.com/api/#tag/Task/operation/run-task + */ + public function runTask( + string $projectId, + string $environmentId, + string $taskId, + TaskTriggerInput $taskTriggerInput + ): AcceptedResponse { + return $this->runTaskWithHttpInfo( + $projectId, + $environmentId, + $taskId, + $taskTriggerInput + ); + } + + /** + * + * @param \Upsun\Model\TaskTriggerInput $taskTriggerInput (required) + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws ClientExceptionInterface + */ + private function runTaskWithHttpInfo( + string $projectId, + string $environmentId, + string $taskId, + TaskTriggerInput $taskTriggerInput + ): AcceptedResponse { + $request = $this->runTaskRequest( + $projectId, + $environmentId, + $taskId, + $taskTriggerInput + ); + + try { + $response = $this->sendAuthenticatedRequest( + $request->getMethod(), + (string) $request->getUri(), + $request->getHeaders(), + $request->getBody() + ); + + return $this->handleResponseWithDataType( + '\Upsun\Model\AcceptedResponse', + $request, + $response + ); + } catch (Exception $exception) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $exception->getCode(), + '/projects/{projectId}/environments/{environmentId}/tasks/{taskId}/run' + ), + $request, + $response ?? null, + $exception + ); + } + } + + /** + * Create request for operation 'runTask' + * + * @param \Upsun\Model\TaskTriggerInput $taskTriggerInput (required) + * + * @throws InvalidArgumentException + */ + private function runTaskRequest( + string $projectId, + string $environmentId, + string $taskId, + TaskTriggerInput $taskTriggerInput + ): RequestInterface { + // verify the required parameter 'projectId' is set + if (empty($projectId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $projectId + when calling runTask' + ); + } + // verify the required parameter 'environmentId' is set + if (empty($environmentId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $environmentId + when calling runTask' + ); + } + // verify the required parameter 'taskId' is set + if (empty($taskId)) { + throw new InvalidArgumentException( + 'Missing the required parameter $taskId + when calling runTask' + ); + } + // verify the required parameter 'taskTriggerInput' is set + if (empty($taskTriggerInput)) { + throw new InvalidArgumentException( + 'Missing the required parameter $taskTriggerInput + when calling runTask' + ); + } + + $resourcePath = '/projects/{projectId}/environments/{environmentId}/tasks/{taskId}/run'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = null; + $multipart = false; + + // path params + + if ($projectId !== null) { + $resourcePath = str_replace( + '{' . 'projectId' . '}', + ObjectSerializer::toPathValue($projectId), + $resourcePath + ); + } + // path params + + if ($environmentId !== null) { + $resourcePath = str_replace( + '{' . 'environmentId' . '}', + ObjectSerializer::toPathValue($environmentId), + $resourcePath + ); + } + // path params + + if ($taskId !== null) { + $resourcePath = str_replace( + '{' . 'taskId' . '}', + ObjectSerializer::toPathValue($taskId), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + 'application/json', + $multipart + ); + + // for model (json/xml) + if (isset($taskTriggerInput)) { + if ($this->headerSelector->isJsonMime($headers['Content-Type'])) { + $httpBody = json_encode( + ObjectSerializer::sanitizeForSerialization($taskTriggerInput) + ); + } else { + $httpBody = $taskTriggerInput; + } + } elseif ($formParams !== []) { + 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 ($this->headerSelector->isJsonMime($headers['Content-Type'])) { + $httpBody = json_encode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if ($this->config->getAccessToken() !== null) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + if ($this->config->getUpsunClientHeader()) { + $defaultHeaders['X-Upsun-Client'] = $this->config->getUpsunClientHeader(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + + $uri = $this->createUri($operationHost, $resourcePath, $queryParams); + + return $this->createRequest('POST', $uri, $headers, $httpBody); + } +} diff --git a/src/Model/Activity.php b/src/Model/Activity.php index 0e22a8ed..a9c31b2c 100644 --- a/src/Model/Activity.php +++ b/src/Model/Activity.php @@ -22,6 +22,8 @@ final class Activity implements Model, JsonSerializable public const STATE_STAGED = 'staged'; public const RESULT_FAILURE = 'failure'; public const RESULT_SUCCESS = 'success'; + public const FAILURE_REASON_ERROR = 'error'; + public const FAILURE_REASON_SHELL = 'shell'; public function __construct( private readonly string $id, @@ -37,6 +39,7 @@ public function __construct( private readonly ?DateTime $createdAt, private readonly ?DateTime $updatedAt, private readonly ?string $result, + private readonly ?string $failureReason, private readonly ?DateTime $startedAt, private readonly ?DateTime $completedAt, private readonly ?DateTime $cancelledAt, @@ -64,6 +67,7 @@ public function jsonSerialize(): array 'project' => $this->project, 'state' => $this->state, 'result' => $this->result, + 'failureReason' => $this->failureReason, 'startedAt' => $this->startedAt?->format(DATE_ATOM), 'completedAt' => $this->completedAt?->format(DATE_ATOM), 'completionPercent' => $this->completionPercent, @@ -149,6 +153,14 @@ public function getResult(): ?string return $this->result; } + /** + * The reason for activity failure + */ + public function getFailureReason(): ?string + { + return $this->failureReason; + } + /** * The start date of the activity */ diff --git a/src/Model/AddonCredential.php b/src/Model/AddonCredential.php index ffa00cd4..11e155f3 100644 --- a/src/Model/AddonCredential.php +++ b/src/Model/AddonCredential.php @@ -6,7 +6,7 @@ /** * Low level AddonCredential (auto-generated) - * The addon credential information (optional). + * The addon credential information (optional) * * @license Apache-2.0 * @see https://docs.upsun.com diff --git a/src/Model/AddonCredential1.php b/src/Model/AddonCredential1.php index 11c1aa30..1cfbbcca 100644 --- a/src/Model/AddonCredential1.php +++ b/src/Model/AddonCredential1.php @@ -6,7 +6,7 @@ /** * Low level AddonCredential1 (auto-generated) - * The addon credential information (optional). + * The addon credential information (optional) * * @license Apache-2.0 * @see https://docs.upsun.com diff --git a/src/Model/BitbucketIntegration.php b/src/Model/BitbucketIntegration.php index 6d0d2147..b6780847 100644 --- a/src/Model/BitbucketIntegration.php +++ b/src/Model/BitbucketIntegration.php @@ -21,6 +21,7 @@ final class BitbucketIntegration implements Model, JsonSerializable, Integration public function __construct( private readonly string $type, + private readonly string $role, private readonly bool $fetchBranches, private readonly bool $pruneBranches, private readonly string $environmentInitResources, @@ -47,6 +48,7 @@ public function jsonSerialize(): array 'createdAt' => $this->createdAt?->format(DATE_ATOM), 'updatedAt' => $this->updatedAt?->format(DATE_ATOM), 'type' => $this->type, + 'role' => $this->role, 'fetchBranches' => $this->fetchBranches, 'pruneBranches' => $this->pruneBranches, 'environmentInitResources' => $this->environmentInitResources, @@ -81,13 +83,24 @@ public function getUpdatedAt(): ?DateTime return $this->updatedAt; } + /** + * The type of the integration + */ public function getType(): string { return $this->type; } /** - * Whether or not to fetch branches. + * The role of the integration + */ + public function getRole(): string + { + return $this->role; + } + + /** + * Whether or not to fetch branches */ public function getFetchBranches(): bool { @@ -95,7 +108,7 @@ public function getFetchBranches(): bool } /** - * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`). + * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) */ public function getPruneBranches(): bool { @@ -111,7 +124,7 @@ public function getEnvironmentInitResources(): string } /** - * The Bitbucket repository (in the form `user/repo`). + * The Bitbucket repository (in the form `user/repo`) */ public function getRepository(): string { @@ -119,7 +132,7 @@ public function getRepository(): string } /** - * Whether or not to build pull requests. + * Whether or not to build pull requests */ public function getBuildPullRequests(): bool { @@ -127,7 +140,7 @@ public function getBuildPullRequests(): bool } /** - * Whether or not to clone parent data when building merge requests. + * Whether or not to clone parent data when building merge requests */ public function getPullRequestsCloneParentData(): bool { @@ -135,7 +148,7 @@ public function getPullRequestsCloneParentData(): bool } /** - * Whether or not pull request environment data should be re-synced on every build. + * Whether or not pull request environment data should be re-synced on every build */ public function getResyncPullRequests(): bool { @@ -151,7 +164,7 @@ public function getId(): ?string } /** - * The OAuth2 consumer information (optional). + * The OAuth2 consumer information (optional) */ public function getAppCredentials(): ?OAuth2Consumer { @@ -159,7 +172,7 @@ public function getAppCredentials(): ?OAuth2Consumer } /** - * The addon credential information (optional). + * The addon credential information (optional) */ public function getAddonCredentials(): ?AddonCredential { diff --git a/src/Model/BitbucketIntegrationCreateInput.php b/src/Model/BitbucketIntegrationCreateInput.php index 42dd5b87..50dbbc1d 100644 --- a/src/Model/BitbucketIntegrationCreateInput.php +++ b/src/Model/BitbucketIntegrationCreateInput.php @@ -58,13 +58,16 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } + /** + * The type of the integration + */ public function getType(): string { return $this->type; } /** - * The Bitbucket repository (in the form `user/repo`). + * The Bitbucket repository (in the form `user/repo`) */ public function getRepository(): string { @@ -72,7 +75,7 @@ public function getRepository(): string } /** - * Whether or not to fetch branches. + * Whether or not to fetch branches */ public function getFetchBranches(): ?bool { @@ -80,7 +83,7 @@ public function getFetchBranches(): ?bool } /** - * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`). + * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) */ public function getPruneBranches(): ?bool { @@ -96,7 +99,7 @@ public function getEnvironmentInitResources(): ?string } /** - * The OAuth2 consumer information (optional). + * The OAuth2 consumer information (optional) */ public function getAppCredentials(): ?OAuth2Consumer1 { @@ -104,7 +107,7 @@ public function getAppCredentials(): ?OAuth2Consumer1 } /** - * The addon credential information (optional). + * The addon credential information (optional) */ public function getAddonCredentials(): ?AddonCredential1 { @@ -112,7 +115,7 @@ public function getAddonCredentials(): ?AddonCredential1 } /** - * Whether or not to build pull requests. + * Whether or not to build pull requests */ public function getBuildPullRequests(): ?bool { @@ -120,7 +123,7 @@ public function getBuildPullRequests(): ?bool } /** - * Whether or not to clone parent data when building merge requests. + * Whether or not to clone parent data when building merge requests */ public function getPullRequestsCloneParentData(): ?bool { @@ -128,7 +131,7 @@ public function getPullRequestsCloneParentData(): ?bool } /** - * Whether or not pull request environment data should be re-synced on every build. + * Whether or not pull request environment data should be re-synced on every build */ public function getResyncPullRequests(): ?bool { diff --git a/src/Model/BitbucketIntegrationPatch.php b/src/Model/BitbucketIntegrationPatch.php index 9f01a691..6111959a 100644 --- a/src/Model/BitbucketIntegrationPatch.php +++ b/src/Model/BitbucketIntegrationPatch.php @@ -58,13 +58,16 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } + /** + * The type of the integration + */ public function getType(): string { return $this->type; } /** - * The Bitbucket repository (in the form `user/repo`). + * The Bitbucket repository (in the form `user/repo`) */ public function getRepository(): string { @@ -72,7 +75,7 @@ public function getRepository(): string } /** - * Whether or not to fetch branches. + * Whether or not to fetch branches */ public function getFetchBranches(): ?bool { @@ -80,7 +83,7 @@ public function getFetchBranches(): ?bool } /** - * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`). + * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) */ public function getPruneBranches(): ?bool { @@ -96,7 +99,7 @@ public function getEnvironmentInitResources(): ?string } /** - * The OAuth2 consumer information (optional). + * The OAuth2 consumer information (optional) */ public function getAppCredentials(): ?OAuth2Consumer1 { @@ -104,7 +107,7 @@ public function getAppCredentials(): ?OAuth2Consumer1 } /** - * The addon credential information (optional). + * The addon credential information (optional) */ public function getAddonCredentials(): ?AddonCredential1 { @@ -112,7 +115,7 @@ public function getAddonCredentials(): ?AddonCredential1 } /** - * Whether or not to build pull requests. + * Whether or not to build pull requests */ public function getBuildPullRequests(): ?bool { @@ -120,7 +123,7 @@ public function getBuildPullRequests(): ?bool } /** - * Whether or not to clone parent data when building merge requests. + * Whether or not to clone parent data when building merge requests */ public function getPullRequestsCloneParentData(): ?bool { @@ -128,7 +131,7 @@ public function getPullRequestsCloneParentData(): ?bool } /** - * Whether or not pull request environment data should be re-synced on every build. + * Whether or not pull request environment data should be re-synced on every build */ public function getResyncPullRequests(): ?bool { diff --git a/src/Model/BitbucketServerIntegration.php b/src/Model/BitbucketServerIntegration.php index b6071cf5..4460dea2 100644 --- a/src/Model/BitbucketServerIntegration.php +++ b/src/Model/BitbucketServerIntegration.php @@ -21,6 +21,7 @@ final class BitbucketServerIntegration implements Model, JsonSerializable, Integ public function __construct( private readonly string $type, + private readonly string $role, private readonly bool $fetchBranches, private readonly bool $pruneBranches, private readonly string $environmentInitResources, @@ -47,6 +48,7 @@ public function jsonSerialize(): array 'createdAt' => $this->createdAt?->format(DATE_ATOM), 'updatedAt' => $this->updatedAt?->format(DATE_ATOM), 'type' => $this->type, + 'role' => $this->role, 'fetchBranches' => $this->fetchBranches, 'pruneBranches' => $this->pruneBranches, 'environmentInitResources' => $this->environmentInitResources, @@ -81,13 +83,24 @@ public function getUpdatedAt(): ?DateTime return $this->updatedAt; } + /** + * The type of the integration + */ public function getType(): string { return $this->type; } /** - * Whether or not to fetch branches. + * The role of the integration + */ + public function getRole(): string + { + return $this->role; + } + + /** + * Whether or not to fetch branches */ public function getFetchBranches(): bool { @@ -95,7 +108,7 @@ public function getFetchBranches(): bool } /** - * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`). + * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) */ public function getPruneBranches(): bool { @@ -111,7 +124,7 @@ public function getEnvironmentInitResources(): string } /** - * The base URL of the Bitbucket Server installation. + * The base URL of the Bitbucket Server installation */ public function getUrl(): string { @@ -119,7 +132,7 @@ public function getUrl(): string } /** - * The Bitbucket Server user. + * The Bitbucket Server user */ public function getUsername(): string { @@ -143,7 +156,7 @@ public function getRepository(): string } /** - * Whether or not to build pull requests. + * Whether or not to build pull requests */ public function getBuildPullRequests(): bool { @@ -151,7 +164,7 @@ public function getBuildPullRequests(): bool } /** - * Whether or not to clone parent data when building merge requests. + * Whether or not to clone parent data when building merge requests */ public function getPullRequestsCloneParentData(): bool { diff --git a/src/Model/BitbucketServerIntegrationCreateInput.php b/src/Model/BitbucketServerIntegrationCreateInput.php index 1d38e965..a6e7b08e 100644 --- a/src/Model/BitbucketServerIntegrationCreateInput.php +++ b/src/Model/BitbucketServerIntegrationCreateInput.php @@ -60,13 +60,16 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } + /** + * The type of the integration + */ public function getType(): string { return $this->type; } /** - * The base URL of the Bitbucket Server installation. + * The base URL of the Bitbucket Server installation */ public function getUrl(): string { @@ -74,7 +77,7 @@ public function getUrl(): string } /** - * The Bitbucket Server user. + * The Bitbucket Server user */ public function getUsername(): string { @@ -82,7 +85,7 @@ public function getUsername(): string } /** - * The Bitbucket Server personal access token. + * The Bitbucket Server personal access token */ public function getToken(): string { @@ -106,7 +109,7 @@ public function getRepository(): string } /** - * Whether or not to fetch branches. + * Whether or not to fetch branches */ public function getFetchBranches(): ?bool { @@ -114,7 +117,7 @@ public function getFetchBranches(): ?bool } /** - * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`). + * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) */ public function getPruneBranches(): ?bool { @@ -130,7 +133,7 @@ public function getEnvironmentInitResources(): ?string } /** - * Whether or not to build pull requests. + * Whether or not to build pull requests */ public function getBuildPullRequests(): ?bool { @@ -138,7 +141,7 @@ public function getBuildPullRequests(): ?bool } /** - * Whether or not to clone parent data when building merge requests. + * Whether or not to clone parent data when building merge requests */ public function getPullRequestsCloneParentData(): ?bool { diff --git a/src/Model/BitbucketServerIntegrationPatch.php b/src/Model/BitbucketServerIntegrationPatch.php index c1adcc28..6d137c02 100644 --- a/src/Model/BitbucketServerIntegrationPatch.php +++ b/src/Model/BitbucketServerIntegrationPatch.php @@ -60,13 +60,16 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } + /** + * The type of the integration + */ public function getType(): string { return $this->type; } /** - * The base URL of the Bitbucket Server installation. + * The base URL of the Bitbucket Server installation */ public function getUrl(): string { @@ -74,7 +77,7 @@ public function getUrl(): string } /** - * The Bitbucket Server user. + * The Bitbucket Server user */ public function getUsername(): string { @@ -82,7 +85,7 @@ public function getUsername(): string } /** - * The Bitbucket Server personal access token. + * The Bitbucket Server personal access token */ public function getToken(): string { @@ -106,7 +109,7 @@ public function getRepository(): string } /** - * Whether or not to fetch branches. + * Whether or not to fetch branches */ public function getFetchBranches(): ?bool { @@ -114,7 +117,7 @@ public function getFetchBranches(): ?bool } /** - * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`). + * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) */ public function getPruneBranches(): ?bool { @@ -130,7 +133,7 @@ public function getEnvironmentInitResources(): ?string } /** - * Whether or not to build pull requests. + * Whether or not to build pull requests */ public function getBuildPullRequests(): ?bool { @@ -138,7 +141,7 @@ public function getBuildPullRequests(): ?bool } /** - * Whether or not to clone parent data when building merge requests. + * Whether or not to clone parent data when building merge requests */ public function getPullRequestsCloneParentData(): ?bool { diff --git a/src/Model/BlackfireIntegration.php b/src/Model/BlackfireIntegration.php index 78970ce0..0601ac6a 100644 --- a/src/Model/BlackfireIntegration.php +++ b/src/Model/BlackfireIntegration.php @@ -16,6 +16,7 @@ final class BlackfireIntegration implements Model, JsonSerializable, Integration { public function __construct( private readonly string $type, + private readonly string $role, private readonly array $environmentsCredentials, private readonly bool $continuousProfiling, private readonly ?DateTime $createdAt, @@ -35,6 +36,7 @@ public function jsonSerialize(): array 'createdAt' => $this->createdAt?->format(DATE_ATOM), 'updatedAt' => $this->updatedAt?->format(DATE_ATOM), 'type' => $this->type, + 'role' => $this->role, 'environmentsCredentials' => $this->environmentsCredentials, 'continuousProfiling' => $this->continuousProfiling, 'id' => $this->id, @@ -62,11 +64,22 @@ public function getUpdatedAt(): ?DateTime return $this->updatedAt; } + /** + * The type of the integration + */ public function getType(): string { return $this->type; } + /** + * The role of the integration + */ + public function getRole(): string + { + return $this->role; + } + /** * Blackfire environments credentials * @return EnvironmentsCredentialsValue[] diff --git a/src/Model/BlackfireIntegrationCreateInput.php b/src/Model/BlackfireIntegrationCreateInput.php index d30a2d36..e0e6bbd6 100644 --- a/src/Model/BlackfireIntegrationCreateInput.php +++ b/src/Model/BlackfireIntegrationCreateInput.php @@ -35,6 +35,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } + /** + * The type of the integration + */ public function getType(): string { return $this->type; diff --git a/src/Model/BlackfireIntegrationPatch.php b/src/Model/BlackfireIntegrationPatch.php index fd416531..5f117fc1 100644 --- a/src/Model/BlackfireIntegrationPatch.php +++ b/src/Model/BlackfireIntegrationPatch.php @@ -35,6 +35,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } + /** + * The type of the integration + */ public function getType(): string { return $this->type; diff --git a/src/Model/BlackfirePhpServerCaches200Response.php b/src/Model/BlackfirePhpServerCaches200Response.php new file mode 100644 index 00000000..c3e405b5 --- /dev/null +++ b/src/Model/BlackfirePhpServerCaches200Response.php @@ -0,0 +1,120 @@ + $this->grain, + 'from' => $this->from, + 'to' => $this->to, + 'agent' => $this->agent, + 'projectId' => $this->projectId, + 'environmentId' => $this->environmentId, + 'branchMachineName' => $this->branchMachineName, + 'distributionCost' => $this->distributionCost, + 'data' => $this->data, + 'contexts' => $this->contexts, + 'contextsMode' => $this->contextsMode, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getGrain(): int + { + return $this->grain; + } + + public function getFrom(): int + { + return $this->from; + } + + public function getTo(): int + { + return $this->to; + } + + public function getAgent(): string + { + return $this->agent; + } + + public function getProjectId(): string + { + return $this->projectId; + } + + public function getEnvironmentId(): string + { + return $this->environmentId; + } + + public function getBranchMachineName(): string + { + return $this->branchMachineName; + } + + public function getDistributionCost(): string + { + return $this->distributionCost; + } + + /** + * @return BlackfirePhpServerCaches200ResponseDataInner[] + */ + public function getData(): array + { + return $this->data; + } + + public function getContexts(): ?array + { + return $this->contexts; + } + + public function getContextsMode(): ?string + { + return $this->contextsMode; + } +} diff --git a/src/Model/BlackfirePhpServerCaches200ResponseDataInner.php b/src/Model/BlackfirePhpServerCaches200ResponseDataInner.php new file mode 100644 index 00000000..12a1e681 --- /dev/null +++ b/src/Model/BlackfirePhpServerCaches200ResponseDataInner.php @@ -0,0 +1,91 @@ + $this->timestamp, + 'opcacheUsage' => $this->opcacheUsage, + 'opcacheIsbUsage' => $this->opcacheIsbUsage, + 'apcuUsage' => $this->apcuUsage, + 'realpathUsage' => $this->realpathUsage, + 'pcreUsage' => $this->pcreUsage, + 'apcuHitrate' => $this->apcuHitrate, + 'opcacheHitrate' => $this->opcacheHitrate, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getTimestamp(): int + { + return $this->timestamp; + } + + public function getOpcacheUsage(): ?float + { + return $this->opcacheUsage; + } + + public function getOpcacheIsbUsage(): ?float + { + return $this->opcacheIsbUsage; + } + + public function getApcuUsage(): ?float + { + return $this->apcuUsage; + } + + public function getRealpathUsage(): ?float + { + return $this->realpathUsage; + } + + public function getPcreUsage(): ?float + { + return $this->pcreUsage; + } + + public function getApcuHitrate(): ?float + { + return $this->apcuHitrate; + } + + public function getOpcacheHitrate(): ?float + { + return $this->opcacheHitrate; + } +} diff --git a/src/Model/BlackfireProfileGraph200Response.php b/src/Model/BlackfireProfileGraph200Response.php new file mode 100644 index 00000000..b76a003e --- /dev/null +++ b/src/Model/BlackfireProfileGraph200Response.php @@ -0,0 +1,164 @@ + $this->projectId, + 'environmentId' => $this->environmentId, + 'branchMachineName' => $this->branchMachineName, + 'agent' => $this->agent, + 'uuid' => $this->uuid, + 'dimensions' => $this->dimensions, + 'root' => $this->root, + 'nodes' => $this->nodes, + 'edges' => $this->edges, + 'comparison' => $this->comparison, + 'language' => $this->language, + 'peaks' => $this->peaks, + 'arguments' => $this->arguments, + 'layers' => $this->layers, + 'labels' => $this->labels, + 'spans' => $this->spans, + 'spansOt' => $this->spansOt, + 'hierarchy' => $this->hierarchy, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getProjectId(): string + { + return $this->projectId; + } + + public function getEnvironmentId(): string + { + return $this->environmentId; + } + + public function getBranchMachineName(): string + { + return $this->branchMachineName; + } + + public function getAgent(): string + { + return $this->agent; + } + + public function getUuid(): string + { + return $this->uuid; + } + + public function getDimensions(): object + { + return $this->dimensions; + } + + public function getRoot(): string + { + return $this->root; + } + + public function getNodes(): object + { + return $this->nodes; + } + + public function getEdges(): object + { + return $this->edges; + } + + public function getComparison(): bool + { + return $this->comparison; + } + + public function getLanguage(): string + { + return $this->language; + } + + public function getPeaks(): ?object + { + return $this->peaks; + } + + public function getArguments(): ?object + { + return $this->arguments; + } + + public function getLayers(): ?object + { + return $this->layers; + } + + public function getLabels(): ?object + { + return $this->labels; + } + + public function getSpans(): ?object + { + return $this->spans; + } + + public function getSpansOt(): ?object + { + return $this->spansOt; + } + + public function getHierarchy(): ?object + { + return $this->hierarchy; + } +} diff --git a/src/Model/BlackfireProfileProfile200Response.php b/src/Model/BlackfireProfileProfile200Response.php new file mode 100644 index 00000000..c1478fd1 --- /dev/null +++ b/src/Model/BlackfireProfileProfile200Response.php @@ -0,0 +1,77 @@ + $this->projectId, + 'environmentId' => $this->environmentId, + 'branchMachineName' => $this->branchMachineName, + 'agent' => $this->agent, + 'uuid' => $this->uuid, + 'profile' => $this->profile, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getProjectId(): string + { + return $this->projectId; + } + + public function getEnvironmentId(): string + { + return $this->environmentId; + } + + public function getBranchMachineName(): string + { + return $this->branchMachineName; + } + + public function getAgent(): string + { + return $this->agent; + } + + public function getUuid(): string + { + return $this->uuid; + } + + public function getProfile(): object + { + return $this->profile; + } +} diff --git a/src/Model/BlackfireProfileSubprofiles200Response.php b/src/Model/BlackfireProfileSubprofiles200Response.php new file mode 100644 index 00000000..7df17213 --- /dev/null +++ b/src/Model/BlackfireProfileSubprofiles200Response.php @@ -0,0 +1,77 @@ + $this->projectId, + 'environmentId' => $this->environmentId, + 'branchMachineName' => $this->branchMachineName, + 'agent' => $this->agent, + 'uuid' => $this->uuid, + 'subprofiles' => $this->subprofiles, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getProjectId(): string + { + return $this->projectId; + } + + public function getEnvironmentId(): string + { + return $this->environmentId; + } + + public function getBranchMachineName(): string + { + return $this->branchMachineName; + } + + public function getAgent(): string + { + return $this->agent; + } + + public function getUuid(): string + { + return $this->uuid; + } + + public function getSubprofiles(): object + { + return $this->subprofiles; + } +} diff --git a/src/Model/BlackfireProfileTimeline200Response.php b/src/Model/BlackfireProfileTimeline200Response.php new file mode 100644 index 00000000..39b8372f --- /dev/null +++ b/src/Model/BlackfireProfileTimeline200Response.php @@ -0,0 +1,101 @@ + $this->projectId, + 'environmentId' => $this->environmentId, + 'branchMachineName' => $this->branchMachineName, + 'agent' => $this->agent, + 'uuid' => $this->uuid, + 'timeline' => $this->timeline, + 'dimension' => $this->dimension, + 'time' => $this->time, + 'language' => $this->language, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getProjectId(): string + { + return $this->projectId; + } + + public function getEnvironmentId(): string + { + return $this->environmentId; + } + + public function getBranchMachineName(): string + { + return $this->branchMachineName; + } + + public function getAgent(): string + { + return $this->agent; + } + + public function getUuid(): string + { + return $this->uuid; + } + + public function getTimeline(): object + { + return $this->timeline; + } + + public function getDimension(): string + { + return $this->dimension; + } + + public function getTime(): int + { + return $this->time; + } + + public function getLanguage(): string + { + return $this->language; + } +} diff --git a/src/Model/BlackfireProfilesListAutomatic200Response.php b/src/Model/BlackfireProfilesListAutomatic200Response.php new file mode 100644 index 00000000..15240b65 --- /dev/null +++ b/src/Model/BlackfireProfilesListAutomatic200Response.php @@ -0,0 +1,94 @@ + $this->projectId, + 'environmentId' => $this->environmentId, + 'branchMachineName' => $this->branchMachineName, + 'agent' => $this->agent, + 'profiles' => $this->profiles, + 'page' => $this->page, + 'pages' => $this->pages, + 'total' => $this->total, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getProjectId(): string + { + return $this->projectId; + } + + public function getEnvironmentId(): string + { + return $this->environmentId; + } + + public function getBranchMachineName(): string + { + return $this->branchMachineName; + } + + public function getAgent(): string + { + return $this->agent; + } + + /** + * @return BlackfireProfilesListAutomatic200ResponseProfilesInner[] + */ + public function getProfiles(): array + { + return $this->profiles; + } + + public function getPage(): int + { + return $this->page; + } + + public function getPages(): int + { + return $this->pages; + } + + public function getTotal(): int + { + return $this->total; + } +} diff --git a/src/Model/BlackfireProfilesListAutomatic200ResponseProfilesInner.php b/src/Model/BlackfireProfilesListAutomatic200ResponseProfilesInner.php new file mode 100644 index 00000000..5765fabf --- /dev/null +++ b/src/Model/BlackfireProfilesListAutomatic200ResponseProfilesInner.php @@ -0,0 +1,63 @@ + $this->uuid, + 'name' => $this->name, + 'links' => $this->links, + 'metadata' => $this->metadata, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getUuid(): string + { + return $this->uuid; + } + + public function getName(): string + { + return $this->name; + } + + public function getLinks(): BlackfireProfilesListAutomatic200ResponseProfilesInnerLinks + { + return $this->links; + } + + public function getMetadata(): ?object + { + return $this->metadata; + } +} diff --git a/src/Model/BlackfireProfilesListAutomatic200ResponseProfilesInnerLinks.php b/src/Model/BlackfireProfilesListAutomatic200ResponseProfilesInnerLinks.php new file mode 100644 index 00000000..f90a7c64 --- /dev/null +++ b/src/Model/BlackfireProfilesListAutomatic200ResponseProfilesInnerLinks.php @@ -0,0 +1,70 @@ + $this->apiSubprofiles, + 'apiProfile' => $this->apiProfile, + 'apiGraph' => $this->apiGraph, + 'graphUrl' => $this->graphUrl, + 'apiTimeline' => $this->apiTimeline, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getApiSubprofiles(): BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiSubprofiles + { + return $this->apiSubprofiles; + } + + public function getApiProfile(): BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiProfile + { + return $this->apiProfile; + } + + public function getApiGraph(): BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiGraph + { + return $this->apiGraph; + } + + public function getGraphUrl(): ?BlackfireProfilesListAutomatic200ResponseProfilesInnerLinksGraphUrl + { + return $this->graphUrl; + } + + public function getApiTimeline(): ?BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiTimeline + { + return $this->apiTimeline; + } +} diff --git a/src/Model/BlackfireProfilesListAutomatic200ResponseProfilesInnerLinksGraphUrl.php b/src/Model/BlackfireProfilesListAutomatic200ResponseProfilesInnerLinksGraphUrl.php new file mode 100644 index 00000000..1d06e52e --- /dev/null +++ b/src/Model/BlackfireProfilesListAutomatic200ResponseProfilesInnerLinksGraphUrl.php @@ -0,0 +1,51 @@ + $this->href, + 'type' => $this->type, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getHref(): string + { + return $this->href; + } + + public function getType(): string + { + return $this->type; + } +} diff --git a/src/Model/BlackfireProfilesRecommendations200Response.php b/src/Model/BlackfireProfilesRecommendations200Response.php new file mode 100644 index 00000000..e3c670ba --- /dev/null +++ b/src/Model/BlackfireProfilesRecommendations200Response.php @@ -0,0 +1,115 @@ + $this->projectId, + 'environmentId' => $this->environmentId, + 'branchMachineName' => $this->branchMachineName, + 'agent' => $this->agent, + 'from' => $this->from, + 'to' => $this->to, + 'recommendations' => $this->recommendations, + 'total' => $this->total, + 'transaction' => $this->transaction, + 'testedTransactions' => $this->testedTransactions, + 'untestedTopTransactions' => $this->untestedTopTransactions, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getProjectId(): string + { + return $this->projectId; + } + + public function getEnvironmentId(): string + { + return $this->environmentId; + } + + public function getBranchMachineName(): string + { + return $this->branchMachineName; + } + + public function getAgent(): string + { + return $this->agent; + } + + public function getFrom(): int + { + return $this->from; + } + + public function getTo(): int + { + return $this->to; + } + + /** + * @return BlackfireProfilesRecommendations200ResponseRecommendationsInner[] + */ + public function getRecommendations(): array + { + return $this->recommendations; + } + + public function getTotal(): int + { + return $this->total; + } + + public function getTransaction(): ?string + { + return $this->transaction; + } + + public function getTestedTransactions(): ?array + { + return $this->testedTransactions; + } + + public function getUntestedTopTransactions(): ?array + { + return $this->untestedTopTransactions; + } +} diff --git a/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInner.php b/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInner.php new file mode 100644 index 00000000..5757ed9d --- /dev/null +++ b/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInner.php @@ -0,0 +1,63 @@ + $this->name, + 'total' => $this->total, + 'constraint' => $this->constraint, + 'links' => $this->links, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getName(): string + { + return $this->name; + } + + public function getTotal(): int + { + return $this->total; + } + + public function getConstraint(): ?object + { + return $this->constraint; + } + + public function getLinks(): ?BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinks + { + return $this->links; + } +} diff --git a/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinks.php b/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinks.php new file mode 100644 index 00000000..d2617585 --- /dev/null +++ b/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinks.php @@ -0,0 +1,63 @@ + $this->apiSubprofiles, + 'apiProfile' => $this->apiProfile, + 'apiGraph' => $this->apiGraph, + 'apiTimeline' => $this->apiTimeline, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getApiSubprofiles(): BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiSubprofiles + { + return $this->apiSubprofiles; + } + + public function getApiProfile(): BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiProfile + { + return $this->apiProfile; + } + + public function getApiGraph(): BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiGraph + { + return $this->apiGraph; + } + + public function getApiTimeline(): ?BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiTimeline + { + return $this->apiTimeline; + } +} diff --git a/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiGraph.php b/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiGraph.php new file mode 100644 index 00000000..878e696f --- /dev/null +++ b/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiGraph.php @@ -0,0 +1,51 @@ + $this->href, + 'type' => $this->type, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getHref(): string + { + return $this->href; + } + + public function getType(): string + { + return $this->type; + } +} diff --git a/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiProfile.php b/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiProfile.php new file mode 100644 index 00000000..158fcfb6 --- /dev/null +++ b/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiProfile.php @@ -0,0 +1,51 @@ + $this->href, + 'type' => $this->type, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getHref(): string + { + return $this->href; + } + + public function getType(): string + { + return $this->type; + } +} diff --git a/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiSubprofiles.php b/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiSubprofiles.php new file mode 100644 index 00000000..cef8ccfc --- /dev/null +++ b/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiSubprofiles.php @@ -0,0 +1,51 @@ + $this->href, + 'type' => $this->type, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getHref(): string + { + return $this->href; + } + + public function getType(): string + { + return $this->type; + } +} diff --git a/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiTimeline.php b/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiTimeline.php new file mode 100644 index 00000000..78a3e56f --- /dev/null +++ b/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiTimeline.php @@ -0,0 +1,51 @@ + $this->href, + 'type' => $this->type, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getHref(): string + { + return $this->href; + } + + public function getType(): string + { + return $this->type; + } +} diff --git a/src/Model/BlackfireProfilesRecommendations400Response.php b/src/Model/BlackfireProfilesRecommendations400Response.php new file mode 100644 index 00000000..02a3e4af --- /dev/null +++ b/src/Model/BlackfireProfilesRecommendations400Response.php @@ -0,0 +1,63 @@ + $this->type, + 'title' => $this->title, + 'status' => $this->status, + 'violations' => $this->violations, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getType(): string + { + return $this->type; + } + + public function getTitle(): string + { + return $this->title; + } + + public function getStatus(): int + { + return $this->status; + } + + public function getViolations(): array + { + return $this->violations; + } +} diff --git a/src/Model/BlackfireServerGlobal200Response.php b/src/Model/BlackfireServerGlobal200Response.php new file mode 100644 index 00000000..24a2f270 --- /dev/null +++ b/src/Model/BlackfireServerGlobal200Response.php @@ -0,0 +1,141 @@ + $this->quota, + 'grain' => $this->grain, + 'from' => $this->from, + 'to' => $this->to, + 'keys' => $this->keys, + 'agent' => $this->agent, + 'contexts' => $this->contexts, + 'contextsMode' => $this->contextsMode, + 'projectId' => $this->projectId, + 'environmentId' => $this->environmentId, + 'branchMachineName' => $this->branchMachineName, + 'alertEvaluations' => $this->alertEvaluations, + 'server' => $this->server, + 'distributionCost' => $this->distributionCost, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getQuota(): BlackfireServerGlobal200ResponseQuota + { + return $this->quota; + } + + public function getGrain(): int + { + return $this->grain; + } + + public function getFrom(): int + { + return $this->from; + } + + public function getTo(): int + { + return $this->to; + } + + public function getKeys(): array + { + return $this->keys; + } + + public function getAgent(): string + { + return $this->agent; + } + + public function getContexts(): ?array + { + return $this->contexts; + } + + public function getContextsMode(): ?string + { + return $this->contextsMode; + } + + public function getProjectId(): string + { + return $this->projectId; + } + + public function getEnvironmentId(): string + { + return $this->environmentId; + } + + public function getBranchMachineName(): string + { + return $this->branchMachineName; + } + + /** + * @return BlackfireServerGlobal200ResponseAlertEvaluationsInner[] + */ + public function getAlertEvaluations(): array + { + return $this->alertEvaluations; + } + + public function getServer(): BlackfireServerGlobal200ResponseServer + { + return $this->server; + } + + public function getDistributionCost(): ?string + { + return $this->distributionCost; + } +} diff --git a/src/Model/BlackfireServerGlobal200ResponseAlertEvaluationsInner.php b/src/Model/BlackfireServerGlobal200ResponseAlertEvaluationsInner.php new file mode 100644 index 00000000..c5d6b79d --- /dev/null +++ b/src/Model/BlackfireServerGlobal200ResponseAlertEvaluationsInner.php @@ -0,0 +1,67 @@ + $this->timestamp, + 'alertRuleUuid' => $this->alertRuleUuid, + 'value' => $this->value, + 'state' => $this->state, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getTimestamp(): int + { + return $this->timestamp; + } + + public function getAlertRuleUuid(): string + { + return $this->alertRuleUuid; + } + + public function getValue(): float + { + return $this->value; + } + + public function getState(): string + { + return $this->state; + } +} diff --git a/src/Model/BlackfireServerGlobal200ResponseQuota.php b/src/Model/BlackfireServerGlobal200ResponseQuota.php new file mode 100644 index 00000000..9edaad95 --- /dev/null +++ b/src/Model/BlackfireServerGlobal200ResponseQuota.php @@ -0,0 +1,71 @@ + $this->allowed, + 'used' => $this->used, + 'exceeded' => $this->exceeded, + 'periodStartedAt' => $this->periodStartedAt?->format(DATE_ATOM), + 'periodEndsAt' => $this->periodEndsAt?->format(DATE_ATOM), + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getAllowed(): int + { + return $this->allowed; + } + + public function getUsed(): int + { + return $this->used; + } + + public function getExceeded(): bool + { + return $this->exceeded; + } + + public function getPeriodStartedAt(): ?DateTime + { + return $this->periodStartedAt; + } + + public function getPeriodEndsAt(): ?DateTime + { + return $this->periodEndsAt; + } +} diff --git a/src/Model/BlackfireServerGlobal200ResponseServer.php b/src/Model/BlackfireServerGlobal200ResponseServer.php new file mode 100644 index 00000000..5f5b5733 --- /dev/null +++ b/src/Model/BlackfireServerGlobal200ResponseServer.php @@ -0,0 +1,52 @@ + $this->total, + 'data' => $this->data, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getTotal(): float + { + return $this->total; + } + + /** + * @return BlackfireServerGlobal200ResponseServerDataInner[] + */ + public function getData(): array + { + return $this->data; + } +} diff --git a/src/Model/BlackfireServerGlobal200ResponseServerDataInner.php b/src/Model/BlackfireServerGlobal200ResponseServerDataInner.php new file mode 100644 index 00000000..3d005223 --- /dev/null +++ b/src/Model/BlackfireServerGlobal200ResponseServerDataInner.php @@ -0,0 +1,84 @@ + $this->timestamp, + 'wt' => $this->wt, + 'mu' => $this->mu, + 'pmu' => $this->pmu, + 'load' => $this->load, + 'stdout' => $this->stdout, + 'rpms' => $this->rpms, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getTimestamp(): int + { + return $this->timestamp; + } + + public function getWt(): ?float + { + return $this->wt; + } + + public function getMu(): ?float + { + return $this->mu; + } + + public function getPmu(): ?float + { + return $this->pmu; + } + + public function getLoad(): ?float + { + return $this->load; + } + + public function getStdout(): ?float + { + return $this->stdout; + } + + public function getRpms(): ?float + { + return $this->rpms; + } +} diff --git a/src/Model/BlackfireServerTopSpans200Response.php b/src/Model/BlackfireServerTopSpans200Response.php new file mode 100644 index 00000000..ebedd5be --- /dev/null +++ b/src/Model/BlackfireServerTopSpans200Response.php @@ -0,0 +1,313 @@ + $this->grain, + 'from' => $this->from, + 'to' => $this->to, + 'agent' => $this->agent, + 'projectId' => $this->projectId, + 'environmentId' => $this->environmentId, + 'branchMachineName' => $this->branchMachineName, + 'sort' => $this->sort, + 'topSpans' => $this->topSpans, + 'advancedFilters' => $this->advancedFilters, + 'contexts' => $this->contexts, + 'contextsMode' => $this->contextsMode, + 'transactions' => $this->transactions, + 'transactionsMode' => $this->transactionsMode, + 'wtSlot' => $this->wtSlot, + 'wtSlotMode' => $this->wtSlotMode, + 'pmuSlot' => $this->pmuSlot, + 'pmuSlotMode' => $this->pmuSlotMode, + 'httpStatusCodes' => $this->httpStatusCodes, + 'httpStatusCodesMode' => $this->httpStatusCodesMode, + 'httpHosts' => $this->httpHosts, + 'httpHostsMode' => $this->httpHostsMode, + 'hosts' => $this->hosts, + 'hostsMode' => $this->hostsMode, + 'frameworks' => $this->frameworks, + 'frameworksMode' => $this->frameworksMode, + 'languages' => $this->languages, + 'languagesMode' => $this->languagesMode, + 'methods' => $this->methods, + 'methodsMode' => $this->methodsMode, + 'runtimes' => $this->runtimes, + 'runtimesMode' => $this->runtimesMode, + 'oss' => $this->oss, + 'ossMode' => $this->ossMode, + 'distributionCost' => $this->distributionCost, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getGrain(): int + { + return $this->grain; + } + + public function getFrom(): int + { + return $this->from; + } + + public function getTo(): int + { + return $this->to; + } + + public function getAgent(): string + { + return $this->agent; + } + + public function getProjectId(): string + { + return $this->projectId; + } + + public function getEnvironmentId(): string + { + return $this->environmentId; + } + + public function getBranchMachineName(): string + { + return $this->branchMachineName; + } + + public function getSort(): ?string + { + return $this->sort; + } + + public function getTopSpans(): BlackfireServerTopSpans200ResponseTopSpans + { + return $this->topSpans; + } + + public function getAdvancedFilters(): BlackfireServerTopSpans200ResponseAdvancedFilters + { + return $this->advancedFilters; + } + + public function getContexts(): ?array + { + return $this->contexts; + } + + public function getContextsMode(): ?string + { + return $this->contextsMode; + } + + public function getTransactions(): ?array + { + return $this->transactions; + } + + public function getTransactionsMode(): ?string + { + return $this->transactionsMode; + } + + public function getWtSlot(): ?array + { + return $this->wtSlot; + } + + public function getWtSlotMode(): ?string + { + return $this->wtSlotMode; + } + + public function getPmuSlot(): ?array + { + return $this->pmuSlot; + } + + public function getPmuSlotMode(): ?string + { + return $this->pmuSlotMode; + } + + public function getHttpStatusCodes(): ?array + { + return $this->httpStatusCodes; + } + + public function getHttpStatusCodesMode(): ?string + { + return $this->httpStatusCodesMode; + } + + public function getHttpHosts(): ?array + { + return $this->httpHosts; + } + + public function getHttpHostsMode(): ?string + { + return $this->httpHostsMode; + } + + public function getHosts(): ?array + { + return $this->hosts; + } + + public function getHostsMode(): ?string + { + return $this->hostsMode; + } + + public function getFrameworks(): ?array + { + return $this->frameworks; + } + + public function getFrameworksMode(): ?string + { + return $this->frameworksMode; + } + + public function getLanguages(): ?array + { + return $this->languages; + } + + public function getLanguagesMode(): ?string + { + return $this->languagesMode; + } + + public function getMethods(): ?array + { + return $this->methods; + } + + public function getMethodsMode(): ?string + { + return $this->methodsMode; + } + + public function getRuntimes(): ?array + { + return $this->runtimes; + } + + public function getRuntimesMode(): ?string + { + return $this->runtimesMode; + } + + public function getOss(): ?array + { + return $this->oss; + } + + public function getOssMode(): ?string + { + return $this->ossMode; + } + + public function getDistributionCost(): ?string + { + return $this->distributionCost; + } +} diff --git a/src/Model/BlackfireServerTopSpans200ResponseAdvancedFilters.php b/src/Model/BlackfireServerTopSpans200ResponseAdvancedFilters.php new file mode 100644 index 00000000..7a569da1 --- /dev/null +++ b/src/Model/BlackfireServerTopSpans200ResponseAdvancedFilters.php @@ -0,0 +1,51 @@ + $this->fields, + 'maxApplicableFilters' => $this->maxApplicableFilters, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + /** + * @return BlackfireServerTopSpans200ResponseAdvancedFiltersFieldsValue[] + */ + public function getFields(): array + { + return $this->fields; + } + + public function getMaxApplicableFilters(): int + { + return $this->maxApplicableFilters; + } +} diff --git a/src/Model/BlackfireServerTopSpans200ResponseAdvancedFiltersFieldsValue.php b/src/Model/BlackfireServerTopSpans200ResponseAdvancedFiltersFieldsValue.php new file mode 100644 index 00000000..92ffa2b5 --- /dev/null +++ b/src/Model/BlackfireServerTopSpans200ResponseAdvancedFiltersFieldsValue.php @@ -0,0 +1,59 @@ + $this->distinctValues, + 'type' => $this->type, + 'values' => $this->values, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getDistinctValues(): int + { + return $this->distinctValues; + } + + public function getType(): string + { + return $this->type; + } + + /** + * @return BlackfireServerTopSpans200ResponseAdvancedFiltersFieldsValueValuesInner[] + */ + public function getValues(): array + { + return $this->values; + } +} diff --git a/src/Model/BlackfireServerTopSpans200ResponseAdvancedFiltersFieldsValueValuesInner.php b/src/Model/BlackfireServerTopSpans200ResponseAdvancedFiltersFieldsValueValuesInner.php new file mode 100644 index 00000000..a092ab66 --- /dev/null +++ b/src/Model/BlackfireServerTopSpans200ResponseAdvancedFiltersFieldsValueValuesInner.php @@ -0,0 +1,49 @@ + $this->value, + 'count' => $this->count, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getValue(): string + { + return $this->value; + } + + public function getCount(): int + { + return $this->count; + } +} diff --git a/src/Model/VersionCreateInput.php b/src/Model/BlackfireServerTopSpans200ResponseTopSpans.php similarity index 61% rename from src/Model/VersionCreateInput.php rename to src/Model/BlackfireServerTopSpans200ResponseTopSpans.php index a40e261e..fac99f60 100644 --- a/src/Model/VersionCreateInput.php +++ b/src/Model/BlackfireServerTopSpans200ResponseTopSpans.php @@ -5,16 +5,16 @@ use JsonSerializable; /** - * Low level VersionCreateInput (auto-generated) + * Low level BlackfireServerTopSpans200ResponseTopSpans (auto-generated) * * @license Apache-2.0 * @see https://docs.upsun.com * @generated This file was generated by OpenAPI Generator. Do not edit manually. */ -final class VersionCreateInput implements Model, JsonSerializable +final class BlackfireServerTopSpans200ResponseTopSpans implements Model, JsonSerializable { public function __construct( - private readonly ?Routing1 $routing = null, + private readonly array $data, ) { } @@ -26,7 +26,7 @@ public function getModelName(): string public function jsonSerialize(): array { return [ - 'routing' => $this->routing, + 'data' => $this->data, ]; } @@ -34,12 +34,11 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Configuration about the traffic routed to this version + * @return BlackfireServerTopSpans200ResponseTopSpansDataInner[] */ - public function getRouting(): ?Routing1 + public function getData(): array { - return $this->routing; + return $this->data; } } diff --git a/src/Model/BlackfireServerTopSpans200ResponseTopSpansDataInner.php b/src/Model/BlackfireServerTopSpans200ResponseTopSpansDataInner.php new file mode 100644 index 00000000..150d5928 --- /dev/null +++ b/src/Model/BlackfireServerTopSpans200ResponseTopSpansDataInner.php @@ -0,0 +1,105 @@ + $this->id, + 'label' => $this->label, + 'percentage' => $this->percentage, + 'wt' => $this->wt, + 'p96' => $this->p96, + 'count' => $this->count, + 'requestWt' => $this->requestWt, + 'metrics' => $this->metrics, + 'serviceName' => $this->serviceName, + 'impact' => $this->impact, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getId(): string + { + return $this->id; + } + + public function getLabel(): string + { + return $this->label; + } + + public function getPercentage(): ?float + { + return $this->percentage; + } + + public function getWt(): float + { + return $this->wt; + } + + public function getP96(): float + { + return $this->p96; + } + + public function getCount(): int + { + return $this->count; + } + + public function getRequestWt(): float + { + return $this->requestWt; + } + + public function getMetrics(): array + { + return $this->metrics; + } + + public function getServiceName(): string + { + return $this->serviceName; + } + + public function getImpact(): float + { + return $this->impact; + } +} diff --git a/src/Model/BlackfireServerTransactionsBreakdown200Response.php b/src/Model/BlackfireServerTransactionsBreakdown200Response.php new file mode 100644 index 00000000..73bc1a33 --- /dev/null +++ b/src/Model/BlackfireServerTransactionsBreakdown200Response.php @@ -0,0 +1,338 @@ + $this->grain, + 'from' => $this->from, + 'to' => $this->to, + 'agent' => $this->agent, + 'projectId' => $this->projectId, + 'environmentId' => $this->environmentId, + 'branchMachineName' => $this->branchMachineName, + 'breakdownDimension' => $this->breakdownDimension, + 'sort' => $this->sort, + 'breakdownLimit' => $this->breakdownLimit, + 'breakdownTopHits' => $this->breakdownTopHits, + 'transactions' => $this->transactions, + 'topHitsTimeline' => $this->topHitsTimeline, + 'contexts' => $this->contexts, + 'contextsMode' => $this->contextsMode, + 'transactions' => $this->transactions, + 'transactionsMode' => $this->transactionsMode, + 'wtSlot' => $this->wtSlot, + 'wtSlotMode' => $this->wtSlotMode, + 'pmuSlot' => $this->pmuSlot, + 'pmuSlotMode' => $this->pmuSlotMode, + 'httpStatusCodes' => $this->httpStatusCodes, + 'httpStatusCodesMode' => $this->httpStatusCodesMode, + 'httpHosts' => $this->httpHosts, + 'httpHostsMode' => $this->httpHostsMode, + 'hosts' => $this->hosts, + 'hostsMode' => $this->hostsMode, + 'frameworks' => $this->frameworks, + 'frameworksMode' => $this->frameworksMode, + 'languages' => $this->languages, + 'languagesMode' => $this->languagesMode, + 'methods' => $this->methods, + 'methodsMode' => $this->methodsMode, + 'runtimes' => $this->runtimes, + 'runtimesMode' => $this->runtimesMode, + 'oss' => $this->oss, + 'ossMode' => $this->ossMode, + 'distributionCost' => $this->distributionCost, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getGrain(): int + { + return $this->grain; + } + + public function getFrom(): int + { + return $this->from; + } + + public function getTo(): int + { + return $this->to; + } + + public function getAgent(): string + { + return $this->agent; + } + + public function getProjectId(): string + { + return $this->projectId; + } + + public function getEnvironmentId(): string + { + return $this->environmentId; + } + + public function getBranchMachineName(): string + { + return $this->branchMachineName; + } + + public function getBreakdownDimension(): string + { + return $this->breakdownDimension; + } + + public function getSort(): ?string + { + return $this->sort; + } + + public function getBreakdownLimit(): int + { + return $this->breakdownLimit; + } + + public function getBreakdownTopHits(): BlackfireServerTransactionsBreakdown200ResponseBreakdownTopHits + { + return $this->breakdownTopHits; + } + + public function getTransactions(): BlackfireServerTransactionsBreakdown200ResponseTransactions + { + return $this->transactions; + } + + public function getTopHitsTimeline(): BlackfireServerTransactionsBreakdown200ResponseTopHitsTimeline + { + return $this->topHitsTimeline; + } + + public function getContexts(): ?array + { + return $this->contexts; + } + + public function getContextsMode(): ?string + { + return $this->contextsMode; + } + + public function getTransactions(): ?array + { + return $this->transactions; + } + + public function getTransactionsMode(): ?string + { + return $this->transactionsMode; + } + + public function getWtSlot(): ?array + { + return $this->wtSlot; + } + + public function getWtSlotMode(): ?string + { + return $this->wtSlotMode; + } + + public function getPmuSlot(): ?array + { + return $this->pmuSlot; + } + + public function getPmuSlotMode(): ?string + { + return $this->pmuSlotMode; + } + + public function getHttpStatusCodes(): ?array + { + return $this->httpStatusCodes; + } + + public function getHttpStatusCodesMode(): ?string + { + return $this->httpStatusCodesMode; + } + + public function getHttpHosts(): ?array + { + return $this->httpHosts; + } + + public function getHttpHostsMode(): ?string + { + return $this->httpHostsMode; + } + + public function getHosts(): ?array + { + return $this->hosts; + } + + public function getHostsMode(): ?string + { + return $this->hostsMode; + } + + public function getFrameworks(): ?array + { + return $this->frameworks; + } + + public function getFrameworksMode(): ?string + { + return $this->frameworksMode; + } + + public function getLanguages(): ?array + { + return $this->languages; + } + + public function getLanguagesMode(): ?string + { + return $this->languagesMode; + } + + public function getMethods(): ?array + { + return $this->methods; + } + + public function getMethodsMode(): ?string + { + return $this->methodsMode; + } + + public function getRuntimes(): ?array + { + return $this->runtimes; + } + + public function getRuntimesMode(): ?string + { + return $this->runtimesMode; + } + + public function getOss(): ?array + { + return $this->oss; + } + + public function getOssMode(): ?string + { + return $this->ossMode; + } + + public function getDistributionCost(): ?string + { + return $this->distributionCost; + } +} diff --git a/src/Model/BlackfireServerTransactionsBreakdown200ResponseBreakdownTopHits.php b/src/Model/BlackfireServerTransactionsBreakdown200ResponseBreakdownTopHits.php new file mode 100644 index 00000000..1888a5e8 --- /dev/null +++ b/src/Model/BlackfireServerTransactionsBreakdown200ResponseBreakdownTopHits.php @@ -0,0 +1,49 @@ + $this->maxQuantity, + 'maxPercentage' => $this->maxPercentage, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getMaxQuantity(): int + { + return $this->maxQuantity; + } + + public function getMaxPercentage(): float + { + return $this->maxPercentage; + } +} diff --git a/src/Model/BlackfireServerTransactionsBreakdown200ResponseTopHitsTimeline.php b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTopHitsTimeline.php new file mode 100644 index 00000000..cd629157 --- /dev/null +++ b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTopHitsTimeline.php @@ -0,0 +1,44 @@ + $this->data, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + /** + * @return BlackfireServerTransactionsBreakdown200ResponseTopHitsTimelineDataInner[] + */ + public function getData(): array + { + return $this->data; + } +} diff --git a/src/Model/BlackfireServerTransactionsBreakdown200ResponseTopHitsTimelineDataInner.php b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTopHitsTimelineDataInner.php new file mode 100644 index 00000000..51c7abb9 --- /dev/null +++ b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTopHitsTimelineDataInner.php @@ -0,0 +1,66 @@ + $this->timestamp, + 'totalConsumed' => $this->totalConsumed, + 'totalCount' => $this->totalCount, + 'transactions' => $this->transactions, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getTimestamp(): int + { + return $this->timestamp; + } + + public function getTotalConsumed(): ?float + { + return $this->totalConsumed; + } + + public function getTotalCount(): ?float + { + return $this->totalCount; + } + + /** + * @return BlackfireServerTransactionsBreakdown200ResponseTopHitsTimelineDataInnerTransactionsValue[]|null + */ + public function getTransactions(): ?array + { + return $this->transactions; + } +} diff --git a/src/Model/BlackfireServerTransactionsBreakdown200ResponseTopHitsTimelineDataInnerTransactionsValue.php b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTopHitsTimelineDataInnerTransactionsValue.php new file mode 100644 index 00000000..8cf480bc --- /dev/null +++ b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTopHitsTimelineDataInnerTransactionsValue.php @@ -0,0 +1,49 @@ + $this->average, + 'count' => $this->count, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getAverage(): float + { + return $this->average; + } + + public function getCount(): float + { + return $this->count; + } +} diff --git a/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactions.php b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactions.php new file mode 100644 index 00000000..1293b4b1 --- /dev/null +++ b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactions.php @@ -0,0 +1,44 @@ + $this->data, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + /** + * @return BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInner[] + */ + public function getData(): array + { + return $this->data; + } +} diff --git a/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInner.php b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInner.php new file mode 100644 index 00000000..7df801fb --- /dev/null +++ b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInner.php @@ -0,0 +1,112 @@ + $this->transaction, + 'wt96thPercentile' => $this->wt96thPercentile, + 'avgWt' => $this->avgWt, + 'avgPmu' => $this->avgPmu, + 'avgStdout' => $this->avgStdout, + 'totalRequests' => $this->totalRequests, + 'totalRequestsUnnamed' => $this->totalRequestsUnnamed, + 'totalErrors' => $this->totalErrors, + 'impact' => $this->impact, + 'topHit' => $this->topHit, + 'links' => $this->links, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getTransaction(): string + { + return $this->transaction; + } + + public function getWt96thPercentile(): float + { + return $this->wt96thPercentile; + } + + public function getAvgWt(): float + { + return $this->avgWt; + } + + public function getAvgPmu(): float + { + return $this->avgPmu; + } + + public function getAvgStdout(): float + { + return $this->avgStdout; + } + + public function getTotalRequests(): float + { + return $this->totalRequests; + } + + public function getTotalRequestsUnnamed(): float + { + return $this->totalRequestsUnnamed; + } + + public function getTotalErrors(): float + { + return $this->totalErrors; + } + + public function getImpact(): ?float + { + return $this->impact; + } + + public function getTopHit(): bool + { + return $this->topHit; + } + + public function getLinks(): BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinks + { + return $this->links; + } +} diff --git a/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinks.php b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinks.php new file mode 100644 index 00000000..331c2491 --- /dev/null +++ b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinks.php @@ -0,0 +1,56 @@ + $this->topSpans, + 'recommendations' => $this->recommendations, + 'automaticProfiles' => $this->automaticProfiles, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getTopSpans(): BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksTopSpans + { + return $this->topSpans; + } + + public function getRecommendations(): BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksRecommendations + { + return $this->recommendations; + } + + public function getAutomaticProfiles(): BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksAutomaticProfiles + { + return $this->automaticProfiles; + } +} diff --git a/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksAutomaticProfiles.php b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksAutomaticProfiles.php new file mode 100644 index 00000000..eafaa564 --- /dev/null +++ b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksAutomaticProfiles.php @@ -0,0 +1,42 @@ + $this->href, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getHref(): string + { + return $this->href; + } +} diff --git a/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksRecommendations.php b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksRecommendations.php new file mode 100644 index 00000000..744c4064 --- /dev/null +++ b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksRecommendations.php @@ -0,0 +1,42 @@ + $this->href, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getHref(): string + { + return $this->href; + } +} diff --git a/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksTopSpans.php b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksTopSpans.php new file mode 100644 index 00000000..84490395 --- /dev/null +++ b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksTopSpans.php @@ -0,0 +1,42 @@ + $this->href, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getHref(): string + { + return $this->href; + } +} diff --git a/src/Model/CacheConfiguration.php b/src/Model/CacheConfiguration.php index c6a5647f..accdc90d 100644 --- a/src/Model/CacheConfiguration.php +++ b/src/Model/CacheConfiguration.php @@ -6,7 +6,7 @@ /** * Low level CacheConfiguration (auto-generated) - * Cache configuration. + * Cache configuration * * @license Apache-2.0 * @see https://docs.upsun.com diff --git a/src/Model/CanCreateNewOrgSubscription200ResponseRequiredAction.php b/src/Model/CanCreateNewOrgSubscription200ResponseRequiredAction.php index b8b09816..4eb5f8ec 100644 --- a/src/Model/CanCreateNewOrgSubscription200ResponseRequiredAction.php +++ b/src/Model/CanCreateNewOrgSubscription200ResponseRequiredAction.php @@ -14,6 +14,8 @@ final class CanCreateNewOrgSubscription200ResponseRequiredAction implements Model, JsonSerializable { public function __construct( + private readonly ?object $credentials = null, + private readonly ?string $reference = null, private readonly ?string $action = null, private readonly ?string $type = null, ) { @@ -29,6 +31,8 @@ public function jsonSerialize(): array return [ 'action' => $this->action, 'type' => $this->type, + 'credentials' => $this->credentials, + 'reference' => $this->reference, ]; } @@ -46,4 +50,14 @@ public function getType(): ?string { return $this->type; } + + public function getCredentials(): ?object + { + return $this->credentials; + } + + public function getReference(): ?string + { + return $this->reference; + } } diff --git a/src/Model/CommunityPackagesInner.php b/src/Model/CommunityPackagesInner.php new file mode 100644 index 00000000..83f442e8 --- /dev/null +++ b/src/Model/CommunityPackagesInner.php @@ -0,0 +1,35 @@ +jsonSerialize(), JSON_PRETTY_PRINT); + } +} diff --git a/src/Model/ComposableImages.php b/src/Model/ComposableImages.php new file mode 100644 index 00000000..c4f261f2 --- /dev/null +++ b/src/Model/ComposableImages.php @@ -0,0 +1,52 @@ + $this->runtimes, + 'packages' => $this->packages, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getRuntimes(): array + { + return $this->runtimes; + } + + /** + * @return CommunityPackagesInner[] + */ + public function getPackages(): array + { + return $this->packages; + } +} diff --git a/src/Model/Config.php b/src/Model/Config.php index 9d4ed473..b4c5af1c 100644 --- a/src/Model/Config.php +++ b/src/Model/Config.php @@ -165,6 +165,9 @@ public function getHealthEmail(): ?HealthEmail return $this->healthEmail; } + /** + * Health Webhook notification integration configurations + */ public function getHealthWebhook(): ?HealthWebHook { return $this->healthWebhook; diff --git a/src/Model/DedicatedDeploymentTarget.php b/src/Model/DedicatedDeploymentTarget.php index 9f2ed6f5..64c6c979 100644 --- a/src/Model/DedicatedDeploymentTarget.php +++ b/src/Model/DedicatedDeploymentTarget.php @@ -15,6 +15,7 @@ final class DedicatedDeploymentTarget implements Model, JsonSerializable, Deploy { public const TYPE_DEDICATED = 'dedicated'; public const TYPE_ENTERPRISE = 'enterprise'; + public const TYPE_KUBERNETES = 'kubernetes'; public const TYPE_LOCAL = 'local'; public function __construct( @@ -66,7 +67,7 @@ public function __toString(): string } /** - * The type of the deployment target. + * The type of the deployment target */ public function getType(): string { @@ -74,7 +75,7 @@ public function getType(): string } /** - * The name of the deployment target. + * The name of the deployment target */ public function getName(): string { @@ -82,7 +83,7 @@ public function getName(): string } /** - * The host to deploy to. + * The host to deploy to */ public function getDeployHost(): ?string { @@ -90,7 +91,7 @@ public function getDeployHost(): ?string } /** - * The port to deploy to. + * The port to deploy to */ public function getDeployPort(): ?int { @@ -98,7 +99,7 @@ public function getDeployPort(): ?int } /** - * The host to use to SSH to app containers. + * The host to use to SSH to app containers */ public function getSshHost(): ?string { @@ -106,7 +107,7 @@ public function getSshHost(): ?string } /** - * The hosts of the deployment target. + * The hosts of the deployment target * @return HostsInner[]|null */ public function getHosts(): ?array @@ -115,7 +116,7 @@ public function getHosts(): ?array } /** - * Whether to take application mounts from the pushed data or the deployment target. + * Whether to take application mounts from the pushed data or the deployment target */ public function getAutoMounts(): bool { @@ -128,7 +129,7 @@ public function getExcludedMounts(): array } /** - * Mounts which are always injected into pushed (e.g. enforce /var/log to be a local mount). + * Mounts which are always injected into pushed (e.g. enforce /var/log to be a local mount) */ public function getEnforcedMounts(): object { @@ -136,7 +137,7 @@ public function getEnforcedMounts(): object } /** - * Whether to take application crons from the pushed data or the deployment target. + * Whether to take application crons from the pushed data or the deployment target */ public function getAutoCrons(): bool { @@ -144,7 +145,7 @@ public function getAutoCrons(): bool } /** - * Whether to take application crons from the pushed data or the deployment target. + * Whether to take application crons from the pushed data or the deployment target */ public function getAutoNginx(): bool { diff --git a/src/Model/DedicatedDeploymentTargetCreateInput.php b/src/Model/DedicatedDeploymentTargetCreateInput.php index dd273f77..c1a6bd1a 100644 --- a/src/Model/DedicatedDeploymentTargetCreateInput.php +++ b/src/Model/DedicatedDeploymentTargetCreateInput.php @@ -15,6 +15,7 @@ final class DedicatedDeploymentTargetCreateInput implements Model, JsonSerializa { public const TYPE_DEDICATED = 'dedicated'; public const TYPE_ENTERPRISE = 'enterprise'; + public const TYPE_KUBERNETES = 'kubernetes'; public const TYPE_LOCAL = 'local'; public function __construct( @@ -44,7 +45,7 @@ public function __toString(): string } /** - * The type of the deployment target. + * The type of the deployment target */ public function getType(): string { @@ -52,7 +53,7 @@ public function getType(): string } /** - * The name of the deployment target. + * The name of the deployment target */ public function getName(): string { @@ -60,7 +61,7 @@ public function getName(): string } /** - * Mounts which are always injected into pushed (e.g. enforce /var/log to be a local mount). + * Mounts which are always injected into pushed (e.g. enforce /var/log to be a local mount) */ public function getEnforcedMounts(): ?object { diff --git a/src/Model/DedicatedDeploymentTargetPatch.php b/src/Model/DedicatedDeploymentTargetPatch.php index c00fd6d9..4218d2c2 100644 --- a/src/Model/DedicatedDeploymentTargetPatch.php +++ b/src/Model/DedicatedDeploymentTargetPatch.php @@ -15,6 +15,7 @@ final class DedicatedDeploymentTargetPatch implements Model, JsonSerializable, D { public const TYPE_DEDICATED = 'dedicated'; public const TYPE_ENTERPRISE = 'enterprise'; + public const TYPE_KUBERNETES = 'kubernetes'; public const TYPE_LOCAL = 'local'; public function __construct( @@ -44,7 +45,7 @@ public function __toString(): string } /** - * The type of the deployment target. + * The type of the deployment target */ public function getType(): string { @@ -52,7 +53,7 @@ public function getType(): string } /** - * The name of the deployment target. + * The name of the deployment target */ public function getName(): string { @@ -60,7 +61,7 @@ public function getName(): string } /** - * Mounts which are always injected into pushed (e.g. enforce /var/log to be a local mount). + * Mounts which are always injected into pushed (e.g. enforce /var/log to be a local mount) */ public function getEnforcedMounts(): ?object { diff --git a/src/Model/Deployment.php b/src/Model/Deployment.php index 22e49d00..690b10d8 100644 --- a/src/Model/Deployment.php +++ b/src/Model/Deployment.php @@ -208,6 +208,9 @@ public function getWorkers(): array return $this->workers; } + /** + * The name of the deployment target + */ public function getContainerProfiles(): string { return $this->containerProfiles; diff --git a/src/Model/DeploymentState.php b/src/Model/DeploymentState.php index e5fbe165..7a2609f4 100644 --- a/src/Model/DeploymentState.php +++ b/src/Model/DeploymentState.php @@ -15,12 +15,19 @@ */ final class DeploymentState implements Model, JsonSerializable { + public const LAST_DEPLOYMENT_FAILURE_REASON_ERROR = 'error'; + public const LAST_DEPLOYMENT_FAILURE_REASON_SHELL = 'shell'; + public function __construct( + private readonly bool $lastStateUpdateSuccessful, private readonly bool $lastDeploymentSuccessful, + private readonly array $lastDeploymentCommands, private readonly CronsDeploymentState $crons, + private readonly ?string $lastDeploymentFailureReason, private readonly ?DateTime $lastDeploymentAt, private readonly ?DateTime $lastAutoscaleUpAt, private readonly ?DateTime $lastAutoscaleDownAt, + private readonly ?DateTime $lastMaintenanceAt, ) { } @@ -32,10 +39,14 @@ public function getModelName(): string public function jsonSerialize(): array { return [ + 'lastStateUpdateSuccessful' => $this->lastStateUpdateSuccessful, 'lastDeploymentSuccessful' => $this->lastDeploymentSuccessful, + 'lastDeploymentFailureReason' => $this->lastDeploymentFailureReason, + 'lastDeploymentCommands' => $this->lastDeploymentCommands, 'lastDeploymentAt' => $this->lastDeploymentAt?->format(DATE_ATOM), 'lastAutoscaleUpAt' => $this->lastAutoscaleUpAt?->format(DATE_ATOM), 'lastAutoscaleDownAt' => $this->lastAutoscaleDownAt?->format(DATE_ATOM), + 'lastMaintenanceAt' => $this->lastMaintenanceAt?->format(DATE_ATOM), 'crons' => $this->crons, ]; } @@ -45,6 +56,14 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } + /** + * Whether the last deployment has correctly switched state (does not mean it was successful) + */ + public function getLastStateUpdateSuccessful(): bool + { + return $this->lastStateUpdateSuccessful; + } + /** * Whether the last deployment was successful */ @@ -53,6 +72,23 @@ public function getLastDeploymentSuccessful(): bool return $this->lastDeploymentSuccessful; } + /** + * The reason for failure of the last deployment + */ + public function getLastDeploymentFailureReason(): ?string + { + return $this->lastDeploymentFailureReason; + } + + /** + * The commands executed during the last deployment + * @return LastDeploymentCommandsInner[] + */ + public function getLastDeploymentCommands(): array + { + return $this->lastDeploymentCommands; + } + /** * Datetime of the last deployment */ @@ -77,6 +113,14 @@ public function getLastAutoscaleDownAt(): ?DateTime return $this->lastAutoscaleDownAt; } + /** + * Datetime of the last maintenance + */ + public function getLastMaintenanceAt(): ?DateTime + { + return $this->lastMaintenanceAt; + } + /** * The crons deployment state */ diff --git a/src/Model/DevelopmentResources.php b/src/Model/DevelopmentResources.php index e6938c28..286c490e 100644 --- a/src/Model/DevelopmentResources.php +++ b/src/Model/DevelopmentResources.php @@ -43,7 +43,7 @@ public function __toString(): string } /** - * Enable legacy development sizing for this environment type. + * Enable legacy development sizing for this environment type */ public function getLegacyDevelopment(): bool { @@ -51,7 +51,7 @@ public function getLegacyDevelopment(): bool } /** - * Maximum number of allocated CPU units. + * Maximum number of allocated CPU units */ public function getMaxCpu(): ?float { @@ -59,7 +59,7 @@ public function getMaxCpu(): ?float } /** - * Maximum amount of allocated RAM. + * Maximum amount of allocated RAM */ public function getMaxMemory(): ?int { diff --git a/src/Model/Diff.php b/src/Model/Diff.php new file mode 100644 index 00000000..fa844e7d --- /dev/null +++ b/src/Model/Diff.php @@ -0,0 +1,92 @@ + $this->id, + 'diff' => $this->diff, + 'newPath' => $this->newPath, + 'newId' => $this->newId, + 'oldPath' => $this->oldPath, + 'oldId' => $this->oldId, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + /** + * The identifier of Diff + */ + public function getId(): string + { + return $this->id; + } + + /** + * The unified diff between two trees + */ + public function getDiff(): string + { + return $this->diff; + } + + /** + * The new path of the file in the diff + */ + public function getNewPath(): ?string + { + return $this->newPath; + } + + /** + * The new object ID of the file in the diff + */ + public function getNewId(): ?string + { + return $this->newId; + } + + /** + * The old path of the file in the diff + */ + public function getOldPath(): ?string + { + return $this->oldPath; + } + + public function getOldId(): array + { + return $this->oldId; + } +} diff --git a/src/Model/DomainClaim.php b/src/Model/DomainClaim.php new file mode 100644 index 00000000..de04bf83 --- /dev/null +++ b/src/Model/DomainClaim.php @@ -0,0 +1,86 @@ + $this->id, + 'createdAt' => $this->createdAt?->format(DATE_ATOM), + 'updatedAt' => $this->updatedAt?->format(DATE_ATOM), + 'name' => $this->name, + 'count' => $this->count, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + /** + * The identifier of DomainClaim + */ + public function getId(): string + { + return $this->id; + } + + /** + * The creation date + */ + public function getCreatedAt(): ?DateTime + { + return $this->createdAt; + } + + /** + * The update date + */ + public function getUpdatedAt(): ?DateTime + { + return $this->updatedAt; + } + + /** + * The claimed domain name + */ + public function getName(): string + { + return $this->name; + } + + /** + * The domain name + */ + public function getCount(): string + { + return $this->count; + } +} diff --git a/src/Model/EmailIntegration.php b/src/Model/EmailIntegration.php index fec2fad4..160b1777 100644 --- a/src/Model/EmailIntegration.php +++ b/src/Model/EmailIntegration.php @@ -16,6 +16,7 @@ final class EmailIntegration implements Model, JsonSerializable, Integration { public function __construct( private readonly string $type, + private readonly string $role, private readonly array $recipients, private readonly ?DateTime $createdAt, private readonly ?DateTime $updatedAt, @@ -35,6 +36,7 @@ public function jsonSerialize(): array 'createdAt' => $this->createdAt?->format(DATE_ATOM), 'updatedAt' => $this->updatedAt?->format(DATE_ATOM), 'type' => $this->type, + 'role' => $this->role, 'fromAddress' => $this->fromAddress, 'recipients' => $this->recipients, 'id' => $this->id, @@ -62,11 +64,22 @@ public function getUpdatedAt(): ?DateTime return $this->updatedAt; } + /** + * The type of the integration + */ public function getType(): string { return $this->type; } + /** + * The role of the integration + */ + public function getRole(): string + { + return $this->role; + } + /** * The email address to use */ diff --git a/src/Model/EmailIntegrationCreateInput.php b/src/Model/EmailIntegrationCreateInput.php index 3988c951..d9768f98 100644 --- a/src/Model/EmailIntegrationCreateInput.php +++ b/src/Model/EmailIntegrationCreateInput.php @@ -39,6 +39,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } + /** + * The type of the integration + */ public function getType(): string { return $this->type; diff --git a/src/Model/EmailIntegrationPatch.php b/src/Model/EmailIntegrationPatch.php index 5228ed75..335dd337 100644 --- a/src/Model/EmailIntegrationPatch.php +++ b/src/Model/EmailIntegrationPatch.php @@ -39,6 +39,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } + /** + * The type of the integration + */ public function getType(): string { return $this->type; diff --git a/src/Model/EnterpriseDeploymentTarget.php b/src/Model/EnterpriseDeploymentTarget.php index 36dee93e..157e4772 100644 --- a/src/Model/EnterpriseDeploymentTarget.php +++ b/src/Model/EnterpriseDeploymentTarget.php @@ -15,6 +15,7 @@ final class EnterpriseDeploymentTarget implements Model, JsonSerializable, Deplo { public const TYPE_DEDICATED = 'dedicated'; public const TYPE_ENTERPRISE = 'enterprise'; + public const TYPE_KUBERNETES = 'kubernetes'; public const TYPE_LOCAL = 'local'; public function __construct( @@ -56,7 +57,7 @@ public function __toString(): string } /** - * The type of the deployment target. + * The type of the deployment target */ public function getType(): string { @@ -64,7 +65,7 @@ public function getType(): string } /** - * The name of the deployment target. + * The name of the deployment target */ public function getName(): string { @@ -72,7 +73,7 @@ public function getName(): string } /** - * The host to deploy to. + * The host to deploy to */ public function getDeployHost(): ?string { @@ -88,6 +89,9 @@ public function getDocroots(): array return $this->docroots; } + /** + * List of URLs of the site + */ public function getSiteUrls(): object { return $this->siteUrls; diff --git a/src/Model/EnterpriseDeploymentTargetCreateInput.php b/src/Model/EnterpriseDeploymentTargetCreateInput.php index a4aaa5d9..250de03e 100644 --- a/src/Model/EnterpriseDeploymentTargetCreateInput.php +++ b/src/Model/EnterpriseDeploymentTargetCreateInput.php @@ -15,6 +15,7 @@ final class EnterpriseDeploymentTargetCreateInput implements Model, JsonSerializ { public const TYPE_DEDICATED = 'dedicated'; public const TYPE_ENTERPRISE = 'enterprise'; + public const TYPE_KUBERNETES = 'kubernetes'; public const TYPE_LOCAL = 'local'; public function __construct( @@ -48,7 +49,7 @@ public function __toString(): string } /** - * The type of the deployment target. + * The type of the deployment target */ public function getType(): string { @@ -56,13 +57,16 @@ public function getType(): string } /** - * The name of the deployment target. + * The name of the deployment target */ public function getName(): string { return $this->name; } + /** + * List of URLs of the site + */ public function getSiteUrls(): ?object { return $this->siteUrls; diff --git a/src/Model/EnterpriseDeploymentTargetPatch.php b/src/Model/EnterpriseDeploymentTargetPatch.php index be2795cc..d877cdf6 100644 --- a/src/Model/EnterpriseDeploymentTargetPatch.php +++ b/src/Model/EnterpriseDeploymentTargetPatch.php @@ -15,6 +15,7 @@ final class EnterpriseDeploymentTargetPatch implements Model, JsonSerializable, { public const TYPE_DEDICATED = 'dedicated'; public const TYPE_ENTERPRISE = 'enterprise'; + public const TYPE_KUBERNETES = 'kubernetes'; public const TYPE_LOCAL = 'local'; public function __construct( @@ -48,7 +49,7 @@ public function __toString(): string } /** - * The type of the deployment target. + * The type of the deployment target */ public function getType(): string { @@ -56,13 +57,16 @@ public function getType(): string } /** - * The name of the deployment target. + * The name of the deployment target */ public function getName(): string { return $this->name; } + /** + * List of URLs of the site + */ public function getSiteUrls(): ?object { return $this->siteUrls; diff --git a/src/Model/EnvironmentActivateInput.php b/src/Model/EnvironmentActivateInput.php index 92f6e3b3..dccff711 100644 --- a/src/Model/EnvironmentActivateInput.php +++ b/src/Model/EnvironmentActivateInput.php @@ -14,7 +14,7 @@ final class EnvironmentActivateInput implements Model, JsonSerializable { public function __construct( - private readonly ?Resources2 $resources, + private readonly ?Resources2 $resources = null, ) { } diff --git a/src/Model/EnvironmentBackupInput.php b/src/Model/EnvironmentBackupInput.php index 38fd589a..34d8a00d 100644 --- a/src/Model/EnvironmentBackupInput.php +++ b/src/Model/EnvironmentBackupInput.php @@ -14,7 +14,7 @@ final class EnvironmentBackupInput implements Model, JsonSerializable { public function __construct( - private readonly bool $safe, + private readonly ?bool $safe = null, ) { } @@ -38,7 +38,7 @@ public function __toString(): string /** * Take a safe or a live backup */ - public function getSafe(): bool + public function getSafe(): ?bool { return $this->safe; } diff --git a/src/Model/EnvironmentBranchInput.php b/src/Model/EnvironmentBranchInput.php index 37aecbde..0fafb425 100644 --- a/src/Model/EnvironmentBranchInput.php +++ b/src/Model/EnvironmentBranchInput.php @@ -19,9 +19,9 @@ final class EnvironmentBranchInput implements Model, JsonSerializable public function __construct( private readonly string $title, private readonly string $name, - private readonly bool $cloneParent, - private readonly string $type, - private readonly ?Resources3 $resources, + private readonly ?Resources3 $resources = null, + private readonly ?bool $cloneParent = null, + private readonly ?string $type = null, ) { } @@ -59,7 +59,7 @@ public function getName(): string /** * Clone data from the parent environment */ - public function getCloneParent(): bool + public function getCloneParent(): ?bool { return $this->cloneParent; } @@ -67,7 +67,7 @@ public function getCloneParent(): bool /** * The type of environment (`staging` or `development`) */ - public function getType(): string + public function getType(): ?string { return $this->type; } diff --git a/src/Model/EnvironmentDeployInput.php b/src/Model/EnvironmentDeployInput.php index 277b4208..29ccc5c1 100644 --- a/src/Model/EnvironmentDeployInput.php +++ b/src/Model/EnvironmentDeployInput.php @@ -17,7 +17,7 @@ final class EnvironmentDeployInput implements Model, JsonSerializable public const STRATEGY_STOPSTART = 'stopstart'; public function __construct( - private readonly string $strategy, + private readonly ?string $strategy = null, ) { } @@ -41,7 +41,7 @@ public function __toString(): string /** * The deployment strategy (`rolling` or `stopstart`) */ - public function getStrategy(): string + public function getStrategy(): ?string { return $this->strategy; } diff --git a/src/Model/EnvironmentInitializeInput.php b/src/Model/EnvironmentInitializeInput.php index c4e69cfc..1ca56db9 100644 --- a/src/Model/EnvironmentInitializeInput.php +++ b/src/Model/EnvironmentInitializeInput.php @@ -16,9 +16,9 @@ final class EnvironmentInitializeInput implements Model, JsonSerializable public function __construct( private readonly string $profile, private readonly string $repository, - private readonly array $files, - private readonly ?string $config, - private readonly ?Resources4 $resources, + private readonly ?string $config = null, + private readonly ?Resources4 $resources = null, + private readonly ?array $files = [], ) { } @@ -69,9 +69,9 @@ public function getConfig(): ?string /** * A list of files to add to the repository during initialization - * @return FilesInner[] + * @return FilesInner[]|null */ - public function getFiles(): array + public function getFiles(): ?array { return $this->files; } diff --git a/src/Model/EnvironmentMergeInput.php b/src/Model/EnvironmentMergeInput.php index d24d55e2..ece296c6 100644 --- a/src/Model/EnvironmentMergeInput.php +++ b/src/Model/EnvironmentMergeInput.php @@ -14,7 +14,7 @@ final class EnvironmentMergeInput implements Model, JsonSerializable { public function __construct( - private readonly ?Resources5 $resources, + private readonly ?Resources5 $resources = null, ) { } diff --git a/src/Model/EnvironmentOperationInput.php b/src/Model/EnvironmentOperationInput.php index bf0c448a..2e857696 100644 --- a/src/Model/EnvironmentOperationInput.php +++ b/src/Model/EnvironmentOperationInput.php @@ -16,7 +16,7 @@ final class EnvironmentOperationInput implements Model, JsonSerializable public function __construct( private readonly string $service, private readonly string $operation, - private readonly array $parameters, + private readonly ?array $parameters = [], ) { } @@ -55,7 +55,7 @@ public function getOperation(): string return $this->operation; } - public function getParameters(): array + public function getParameters(): ?array { return $this->parameters; } diff --git a/src/Model/EnvironmentRestoreInput.php b/src/Model/EnvironmentRestoreInput.php index e4ee869b..b5a90402 100644 --- a/src/Model/EnvironmentRestoreInput.php +++ b/src/Model/EnvironmentRestoreInput.php @@ -14,11 +14,11 @@ final class EnvironmentRestoreInput implements Model, JsonSerializable { public function __construct( - private readonly bool $restoreCode, - private readonly bool $restoreResources, - private readonly ?string $environmentName, - private readonly ?string $branchFrom, - private readonly ?Resources6 $resources, + private readonly ?string $environmentName = null, + private readonly ?string $branchFrom = null, + private readonly ?Resources6 $resources = null, + private readonly ?bool $restoreCode = null, + private readonly ?bool $restoreResources = null, ) { } @@ -56,7 +56,7 @@ public function getBranchFrom(): ?string /** * Whether we should restore the code or only the data */ - public function getRestoreCode(): bool + public function getRestoreCode(): ?bool { return $this->restoreCode; } @@ -64,7 +64,7 @@ public function getRestoreCode(): bool /** * Whether we should restore resources configuration from the backup */ - public function getRestoreResources(): bool + public function getRestoreResources(): ?bool { return $this->restoreResources; } diff --git a/src/Model/EnvironmentSourceOperationInput.php b/src/Model/EnvironmentSourceOperationInput.php index ee4b5e0d..8a603058 100644 --- a/src/Model/EnvironmentSourceOperationInput.php +++ b/src/Model/EnvironmentSourceOperationInput.php @@ -15,7 +15,7 @@ final class EnvironmentSourceOperationInput implements Model, JsonSerializable { public function __construct( private readonly string $operation, - private readonly array $variables, + private readonly ?array $variables = [], ) { } @@ -45,7 +45,7 @@ public function getOperation(): string return $this->operation; } - public function getVariables(): array + public function getVariables(): ?array { return $this->variables; } diff --git a/src/Model/EnvironmentSynchronizeInput.php b/src/Model/EnvironmentSynchronizeInput.php index 33e5e40f..f1f98c2e 100644 --- a/src/Model/EnvironmentSynchronizeInput.php +++ b/src/Model/EnvironmentSynchronizeInput.php @@ -14,10 +14,10 @@ final class EnvironmentSynchronizeInput implements Model, JsonSerializable { public function __construct( - private readonly bool $synchronizeCode, - private readonly bool $rebase, - private readonly bool $synchronizeData, - private readonly bool $synchronizeResources, + private readonly ?bool $synchronizeCode = null, + private readonly ?bool $rebase = null, + private readonly ?bool $synchronizeData = null, + private readonly ?bool $synchronizeResources = null, ) { } @@ -44,7 +44,7 @@ public function __toString(): string /** * Synchronize code? */ - public function getSynchronizeCode(): bool + public function getSynchronizeCode(): ?bool { return $this->synchronizeCode; } @@ -52,7 +52,7 @@ public function getSynchronizeCode(): bool /** * Synchronize code by rebasing instead of merging */ - public function getRebase(): bool + public function getRebase(): ?bool { return $this->rebase; } @@ -60,7 +60,7 @@ public function getRebase(): bool /** * Synchronize data? */ - public function getSynchronizeData(): bool + public function getSynchronizeData(): ?bool { return $this->synchronizeData; } @@ -68,7 +68,7 @@ public function getSynchronizeData(): bool /** * Synchronize resources? */ - public function getSynchronizeResources(): bool + public function getSynchronizeResources(): ?bool { return $this->synchronizeResources; } diff --git a/src/Model/FastlyIntegration.php b/src/Model/FastlyIntegration.php index 472607fb..dcfc0d60 100644 --- a/src/Model/FastlyIntegration.php +++ b/src/Model/FastlyIntegration.php @@ -20,12 +20,14 @@ final class FastlyIntegration implements Model, JsonSerializable, Integration public function __construct( private readonly string $type, + private readonly string $role, private readonly array $events, private readonly array $environments, private readonly array $excludedEnvironments, private readonly array $states, private readonly string $result, private readonly string $serviceId, + private readonly bool $tlsCertificates, private readonly ?DateTime $createdAt, private readonly ?DateTime $updatedAt, private readonly ?string $id = null, @@ -43,12 +45,14 @@ public function jsonSerialize(): array 'createdAt' => $this->createdAt?->format(DATE_ATOM), 'updatedAt' => $this->updatedAt?->format(DATE_ATOM), 'type' => $this->type, + 'role' => $this->role, 'events' => $this->events, 'environments' => $this->environments, 'excludedEnvironments' => $this->excludedEnvironments, 'states' => $this->states, 'result' => $this->result, 'serviceId' => $this->serviceId, + 'tlsCertificates' => $this->tlsCertificates, 'id' => $this->id, ]; } @@ -74,11 +78,22 @@ public function getUpdatedAt(): ?DateTime return $this->updatedAt; } + /** + * The type of the integration + */ public function getType(): string { return $this->type; } + /** + * The role of the integration + */ + public function getRole(): string + { + return $this->role; + } + public function getEvents(): array { return $this->events; @@ -107,11 +122,22 @@ public function getResult(): string return $this->result; } + /** + * The Fastly Service ID + */ public function getServiceId(): string { return $this->serviceId; } + /** + * Push platform-provisioned TLS certificates to Fastly. Requires a Fastly API token with TLS management permissions + */ + public function getTlsCertificates(): bool + { + return $this->tlsCertificates; + } + /** * The identifier of FastlyIntegration */ diff --git a/src/Model/FastlyIntegrationCreateInput.php b/src/Model/FastlyIntegrationCreateInput.php index d4a89641..9d62d19c 100644 --- a/src/Model/FastlyIntegrationCreateInput.php +++ b/src/Model/FastlyIntegrationCreateInput.php @@ -26,6 +26,7 @@ public function __construct( private readonly ?array $excludedEnvironments = [], private readonly ?array $states = [], private readonly ?string $result = null, + private readonly ?bool $tlsCertificates = null, ) { } @@ -45,6 +46,7 @@ public function jsonSerialize(): array 'excludedEnvironments' => $this->excludedEnvironments, 'states' => $this->states, 'result' => $this->result, + 'tlsCertificates' => $this->tlsCertificates, ]; } @@ -53,6 +55,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } + /** + * The type of the integration + */ public function getType(): string { return $this->type; @@ -66,6 +71,9 @@ public function getToken(): string return $this->token; } + /** + * The Fastly Service ID + */ public function getServiceId(): string { return $this->serviceId; @@ -98,4 +106,12 @@ public function getResult(): ?string { return $this->result; } + + /** + * Push platform-provisioned TLS certificates to Fastly. Requires a Fastly API token with TLS management permissions + */ + public function getTlsCertificates(): ?bool + { + return $this->tlsCertificates; + } } diff --git a/src/Model/FastlyIntegrationPatch.php b/src/Model/FastlyIntegrationPatch.php index a9e8cb6a..5a86b841 100644 --- a/src/Model/FastlyIntegrationPatch.php +++ b/src/Model/FastlyIntegrationPatch.php @@ -26,6 +26,7 @@ public function __construct( private readonly ?array $excludedEnvironments = [], private readonly ?array $states = [], private readonly ?string $result = null, + private readonly ?bool $tlsCertificates = null, ) { } @@ -45,6 +46,7 @@ public function jsonSerialize(): array 'excludedEnvironments' => $this->excludedEnvironments, 'states' => $this->states, 'result' => $this->result, + 'tlsCertificates' => $this->tlsCertificates, ]; } @@ -53,6 +55,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } + /** + * The type of the integration + */ public function getType(): string { return $this->type; @@ -66,6 +71,9 @@ public function getToken(): string return $this->token; } + /** + * The Fastly Service ID + */ public function getServiceId(): string { return $this->serviceId; @@ -98,4 +106,12 @@ public function getResult(): ?string { return $this->result; } + + /** + * Push platform-provisioned TLS certificates to Fastly. Requires a Fastly API token with TLS management permissions + */ + public function getTlsCertificates(): ?bool + { + return $this->tlsCertificates; + } } diff --git a/src/Model/FilesInner.php b/src/Model/FilesInner.php index c444e444..fda06855 100644 --- a/src/Model/FilesInner.php +++ b/src/Model/FilesInner.php @@ -15,8 +15,8 @@ final class FilesInner implements Model, JsonSerializable { public function __construct( private readonly string $path, - private readonly int $mode, - private readonly string $contents, + private readonly ?int $mode = null, + private readonly ?string $contents = null, ) { } @@ -44,12 +44,12 @@ public function getPath(): string return $this->path; } - public function getMode(): int + public function getMode(): ?int { return $this->mode; } - public function getContents(): string + public function getContents(): ?string { return $this->contents; } diff --git a/src/Model/Firewall.php b/src/Model/Firewall.php index 6ef6c829..4aaa6cf1 100644 --- a/src/Model/Firewall.php +++ b/src/Model/Firewall.php @@ -14,7 +14,7 @@ final class Firewall implements Model, JsonSerializable { public function __construct( - private readonly array $outbound, + private readonly ?array $outbound, ) { } @@ -35,9 +35,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } /** - * @return OutboundFirewallRestrictionsInner[] + * @return OutboundFirewallRestrictionsInner[]|null */ - public function getOutbound(): array + public function getOutbound(): ?array { return $this->outbound; } diff --git a/src/Model/FoundationDeploymentTarget.php b/src/Model/FoundationDeploymentTarget.php index dc8df4df..beeacdbe 100644 --- a/src/Model/FoundationDeploymentTarget.php +++ b/src/Model/FoundationDeploymentTarget.php @@ -15,6 +15,7 @@ final class FoundationDeploymentTarget implements Model, JsonSerializable, Deplo { public const TYPE_DEDICATED = 'dedicated'; public const TYPE_ENTERPRISE = 'enterprise'; + public const TYPE_KUBERNETES = 'kubernetes'; public const TYPE_LOCAL = 'local'; public function __construct( @@ -50,7 +51,7 @@ public function __toString(): string } /** - * The type of the deployment target. + * The type of the deployment target */ public function getType(): string { @@ -58,7 +59,7 @@ public function getType(): string } /** - * The name of the deployment target. + * The name of the deployment target */ public function getName(): string { @@ -66,7 +67,7 @@ public function getName(): string } /** - * The hosts of the deployment target. + * The hosts of the deployment target * @return HostsInner[]|null */ public function getHosts(): ?array @@ -85,7 +86,7 @@ public function getUseDedicatedGrid(): bool } /** - * The storage type. + * The storage type */ public function getStorageType(): ?string { diff --git a/src/Model/FoundationDeploymentTargetCreateInput.php b/src/Model/FoundationDeploymentTargetCreateInput.php index 1d7c4305..dbaf9d0e 100644 --- a/src/Model/FoundationDeploymentTargetCreateInput.php +++ b/src/Model/FoundationDeploymentTargetCreateInput.php @@ -15,6 +15,7 @@ final class FoundationDeploymentTargetCreateInput implements Model, JsonSerializ { public const TYPE_DEDICATED = 'dedicated'; public const TYPE_ENTERPRISE = 'enterprise'; + public const TYPE_KUBERNETES = 'kubernetes'; public const TYPE_LOCAL = 'local'; public function __construct( @@ -46,7 +47,7 @@ public function __toString(): string } /** - * The type of the deployment target. + * The type of the deployment target */ public function getType(): string { @@ -54,7 +55,7 @@ public function getType(): string } /** - * The name of the deployment target. + * The name of the deployment target */ public function getName(): string { @@ -62,7 +63,7 @@ public function getName(): string } /** - * The hosts of the deployment target. + * The hosts of the deployment target * @return DeploymentHostsInner[]|null */ public function getHosts(): ?array diff --git a/src/Model/FoundationDeploymentTargetPatch.php b/src/Model/FoundationDeploymentTargetPatch.php index 2f359069..490fa0c1 100644 --- a/src/Model/FoundationDeploymentTargetPatch.php +++ b/src/Model/FoundationDeploymentTargetPatch.php @@ -15,6 +15,7 @@ final class FoundationDeploymentTargetPatch implements Model, JsonSerializable, { public const TYPE_DEDICATED = 'dedicated'; public const TYPE_ENTERPRISE = 'enterprise'; + public const TYPE_KUBERNETES = 'kubernetes'; public const TYPE_LOCAL = 'local'; public function __construct( @@ -46,7 +47,7 @@ public function __toString(): string } /** - * The type of the deployment target. + * The type of the deployment target */ public function getType(): string { @@ -54,7 +55,7 @@ public function getType(): string } /** - * The name of the deployment target. + * The name of the deployment target */ public function getName(): string { @@ -62,7 +63,7 @@ public function getName(): string } /** - * The hosts of the deployment target. + * The hosts of the deployment target * @return DeploymentHostsInner[]|null */ public function getHosts(): ?array diff --git a/src/Model/GitLabIntegration.php b/src/Model/GitLabIntegration.php index 4e548143..4e0ddd44 100644 --- a/src/Model/GitLabIntegration.php +++ b/src/Model/GitLabIntegration.php @@ -21,6 +21,7 @@ final class GitLabIntegration implements Model, JsonSerializable, Integration public function __construct( private readonly string $type, + private readonly string $role, private readonly bool $fetchBranches, private readonly bool $pruneBranches, private readonly string $environmentInitResources, @@ -49,6 +50,7 @@ public function jsonSerialize(): array 'createdAt' => $this->createdAt?->format(DATE_ATOM), 'updatedAt' => $this->updatedAt?->format(DATE_ATOM), 'type' => $this->type, + 'role' => $this->role, 'fetchBranches' => $this->fetchBranches, 'pruneBranches' => $this->pruneBranches, 'environmentInitResources' => $this->environmentInitResources, @@ -85,13 +87,24 @@ public function getUpdatedAt(): ?DateTime return $this->updatedAt; } + /** + * The type of the integration + */ public function getType(): string { return $this->type; } /** - * Whether or not to fetch branches. + * The role of the integration + */ + public function getRole(): string + { + return $this->role; + } + + /** + * Whether or not to fetch branches */ public function getFetchBranches(): bool { @@ -99,7 +112,7 @@ public function getFetchBranches(): bool } /** - * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`). + * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) */ public function getPruneBranches(): bool { @@ -114,23 +127,32 @@ public function getEnvironmentInitResources(): string return $this->environmentInitResources; } + /** + * 'expires_at' value of the current token + */ public function getTokenExpiresAt(): ?DateTime { return $this->tokenExpiresAt; } + /** + * Whether or not to rotate token automatically using Gitlab API + */ public function getRotateToken(): bool { return $this->rotateToken; } + /** + * Validity in weeks of a new token after rotation + */ public function getRotateTokenValidityInWeeks(): int { return $this->rotateTokenValidityInWeeks; } /** - * The base URL of the GitLab installation. + * The base URL of the GitLab installation */ public function getBaseUrl(): string { @@ -138,7 +160,7 @@ public function getBaseUrl(): string } /** - * The GitLab project (in the form `namespace/repo`). + * The GitLab project (in the form `namespace/repo`) */ public function getProject(): string { @@ -146,7 +168,7 @@ public function getProject(): string } /** - * Whether or not to build merge requests. + * Whether or not to build merge requests */ public function getBuildMergeRequests(): bool { @@ -154,7 +176,7 @@ public function getBuildMergeRequests(): bool } /** - * Whether or not to build work in progress merge requests (requires `build_merge_requests`). + * Whether or not to build work in progress merge requests (requires `build_merge_requests`) */ public function getBuildWipMergeRequests(): bool { @@ -162,7 +184,7 @@ public function getBuildWipMergeRequests(): bool } /** - * Whether or not to clone parent data when building merge requests. + * Whether or not to clone parent data when building merge requests */ public function getMergeRequestsCloneParentData(): bool { diff --git a/src/Model/GitLabIntegrationCreateInput.php b/src/Model/GitLabIntegrationCreateInput.php index 2d37f94f..b4e302be 100644 --- a/src/Model/GitLabIntegrationCreateInput.php +++ b/src/Model/GitLabIntegrationCreateInput.php @@ -62,13 +62,16 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } + /** + * The type of the integration + */ public function getType(): string { return $this->type; } /** - * The GitLab private token. + * The GitLab private token */ public function getToken(): string { @@ -76,7 +79,7 @@ public function getToken(): string } /** - * The GitLab project (in the form `namespace/repo`). + * The GitLab project (in the form `namespace/repo`) */ public function getProject(): string { @@ -84,7 +87,7 @@ public function getProject(): string } /** - * Whether or not to fetch branches. + * Whether or not to fetch branches */ public function getFetchBranches(): ?bool { @@ -92,7 +95,7 @@ public function getFetchBranches(): ?bool } /** - * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`). + * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) */ public function getPruneBranches(): ?bool { @@ -107,18 +110,24 @@ public function getEnvironmentInitResources(): ?string return $this->environmentInitResources; } + /** + * Whether or not to rotate token automatically using Gitlab API + */ public function getRotateToken(): ?bool { return $this->rotateToken; } + /** + * Validity in weeks of a new token after rotation + */ public function getRotateTokenValidityInWeeks(): ?int { return $this->rotateTokenValidityInWeeks; } /** - * The base URL of the GitLab installation. + * The base URL of the GitLab installation */ public function getBaseUrl(): ?string { @@ -126,7 +135,7 @@ public function getBaseUrl(): ?string } /** - * Whether or not to build merge requests. + * Whether or not to build merge requests */ public function getBuildMergeRequests(): ?bool { @@ -134,7 +143,7 @@ public function getBuildMergeRequests(): ?bool } /** - * Whether or not to build work in progress merge requests (requires `build_merge_requests`). + * Whether or not to build work in progress merge requests (requires `build_merge_requests`) */ public function getBuildWipMergeRequests(): ?bool { @@ -142,7 +151,7 @@ public function getBuildWipMergeRequests(): ?bool } /** - * Whether or not to clone parent data when building merge requests. + * Whether or not to clone parent data when building merge requests */ public function getMergeRequestsCloneParentData(): ?bool { diff --git a/src/Model/GitLabIntegrationPatch.php b/src/Model/GitLabIntegrationPatch.php index 2d78d470..4fe8173e 100644 --- a/src/Model/GitLabIntegrationPatch.php +++ b/src/Model/GitLabIntegrationPatch.php @@ -62,13 +62,16 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } + /** + * The type of the integration + */ public function getType(): string { return $this->type; } /** - * The GitLab private token. + * The GitLab private token */ public function getToken(): string { @@ -76,7 +79,7 @@ public function getToken(): string } /** - * The GitLab project (in the form `namespace/repo`). + * The GitLab project (in the form `namespace/repo`) */ public function getProject(): string { @@ -84,7 +87,7 @@ public function getProject(): string } /** - * Whether or not to fetch branches. + * Whether or not to fetch branches */ public function getFetchBranches(): ?bool { @@ -92,7 +95,7 @@ public function getFetchBranches(): ?bool } /** - * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`). + * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) */ public function getPruneBranches(): ?bool { @@ -107,18 +110,24 @@ public function getEnvironmentInitResources(): ?string return $this->environmentInitResources; } + /** + * Whether or not to rotate token automatically using Gitlab API + */ public function getRotateToken(): ?bool { return $this->rotateToken; } + /** + * Validity in weeks of a new token after rotation + */ public function getRotateTokenValidityInWeeks(): ?int { return $this->rotateTokenValidityInWeeks; } /** - * The base URL of the GitLab installation. + * The base URL of the GitLab installation */ public function getBaseUrl(): ?string { @@ -126,7 +135,7 @@ public function getBaseUrl(): ?string } /** - * Whether or not to build merge requests. + * Whether or not to build merge requests */ public function getBuildMergeRequests(): ?bool { @@ -134,7 +143,7 @@ public function getBuildMergeRequests(): ?bool } /** - * Whether or not to build work in progress merge requests (requires `build_merge_requests`). + * Whether or not to build work in progress merge requests (requires `build_merge_requests`) */ public function getBuildWipMergeRequests(): ?bool { @@ -142,7 +151,7 @@ public function getBuildWipMergeRequests(): ?bool } /** - * Whether or not to clone parent data when building merge requests. + * Whether or not to clone parent data when building merge requests */ public function getMergeRequestsCloneParentData(): ?bool { diff --git a/src/Model/GithubIntegration.php b/src/Model/GithubIntegration.php index 4c2df92c..e11efe8f 100644 --- a/src/Model/GithubIntegration.php +++ b/src/Model/GithubIntegration.php @@ -23,6 +23,7 @@ final class GithubIntegration implements Model, JsonSerializable, Integration public function __construct( private readonly string $type, + private readonly string $role, private readonly bool $fetchBranches, private readonly bool $pruneBranches, private readonly string $environmentInitResources, @@ -50,6 +51,7 @@ public function jsonSerialize(): array 'createdAt' => $this->createdAt?->format(DATE_ATOM), 'updatedAt' => $this->updatedAt?->format(DATE_ATOM), 'type' => $this->type, + 'role' => $this->role, 'fetchBranches' => $this->fetchBranches, 'pruneBranches' => $this->pruneBranches, 'environmentInitResources' => $this->environmentInitResources, @@ -85,13 +87,24 @@ public function getUpdatedAt(): ?DateTime return $this->updatedAt; } + /** + * The type of the integration + */ public function getType(): string { return $this->type; } /** - * Whether or not to fetch branches. + * The role of the integration + */ + public function getRole(): string + { + return $this->role; + } + + /** + * Whether or not to fetch branches */ public function getFetchBranches(): bool { @@ -99,7 +112,7 @@ public function getFetchBranches(): bool } /** - * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`). + * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) */ public function getPruneBranches(): bool { @@ -115,7 +128,7 @@ public function getEnvironmentInitResources(): string } /** - * The base URL of the Github API endpoint. + * The base URL of the Github API endpoint */ public function getBaseUrl(): ?string { @@ -123,7 +136,7 @@ public function getBaseUrl(): ?string } /** - * The GitHub repository (in the form `user/repo`). + * The GitHub repository (in the form `user/repo`) */ public function getRepository(): string { @@ -131,7 +144,7 @@ public function getRepository(): string } /** - * Whether or not to build pull requests. + * Whether or not to build pull requests */ public function getBuildPullRequests(): bool { @@ -139,7 +152,7 @@ public function getBuildPullRequests(): bool } /** - * Whether or not to build draft pull requests (requires `build_pull_requests`). + * Whether or not to build draft pull requests (requires `build_pull_requests`) */ public function getBuildDraftPullRequests(): bool { @@ -147,7 +160,7 @@ public function getBuildDraftPullRequests(): bool } /** - * Whether to build pull requests post-merge (if true) or pre-merge (if false). + * Whether to build pull requests post-merge (if true) or pre-merge (if false) */ public function getBuildPullRequestsPostMerge(): bool { @@ -155,7 +168,7 @@ public function getBuildPullRequestsPostMerge(): bool } /** - * Whether or not to clone parent data when building pull requests. + * Whether or not to clone parent data when building pull requests */ public function getPullRequestsCloneParentData(): bool { diff --git a/src/Model/GithubIntegrationCreateInput.php b/src/Model/GithubIntegrationCreateInput.php index abbc64d3..a7c63c7d 100644 --- a/src/Model/GithubIntegrationCreateInput.php +++ b/src/Model/GithubIntegrationCreateInput.php @@ -60,6 +60,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } + /** + * The type of the integration + */ public function getType(): string { return $this->type; @@ -74,7 +77,7 @@ public function getToken(): string } /** - * The GitHub repository (in the form `user/repo`). + * The GitHub repository (in the form `user/repo`) */ public function getRepository(): string { @@ -82,7 +85,7 @@ public function getRepository(): string } /** - * Whether or not to fetch branches. + * Whether or not to fetch branches */ public function getFetchBranches(): ?bool { @@ -90,7 +93,7 @@ public function getFetchBranches(): ?bool } /** - * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`). + * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) */ public function getPruneBranches(): ?bool { @@ -106,7 +109,7 @@ public function getEnvironmentInitResources(): ?string } /** - * The base URL of the Github API endpoint. + * The base URL of the Github API endpoint */ public function getBaseUrl(): ?string { @@ -114,7 +117,7 @@ public function getBaseUrl(): ?string } /** - * Whether or not to build pull requests. + * Whether or not to build pull requests */ public function getBuildPullRequests(): ?bool { @@ -122,7 +125,7 @@ public function getBuildPullRequests(): ?bool } /** - * Whether or not to build draft pull requests (requires `build_pull_requests`). + * Whether or not to build draft pull requests (requires `build_pull_requests`) */ public function getBuildDraftPullRequests(): ?bool { @@ -130,7 +133,7 @@ public function getBuildDraftPullRequests(): ?bool } /** - * Whether to build pull requests post-merge (if true) or pre-merge (if false). + * Whether to build pull requests post-merge (if true) or pre-merge (if false) */ public function getBuildPullRequestsPostMerge(): ?bool { @@ -138,7 +141,7 @@ public function getBuildPullRequestsPostMerge(): ?bool } /** - * Whether or not to clone parent data when building pull requests. + * Whether or not to clone parent data when building pull requests */ public function getPullRequestsCloneParentData(): ?bool { diff --git a/src/Model/GithubIntegrationPatch.php b/src/Model/GithubIntegrationPatch.php index 3fa7ee4c..8d071c7f 100644 --- a/src/Model/GithubIntegrationPatch.php +++ b/src/Model/GithubIntegrationPatch.php @@ -60,6 +60,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } + /** + * The type of the integration + */ public function getType(): string { return $this->type; @@ -74,7 +77,7 @@ public function getToken(): string } /** - * The GitHub repository (in the form `user/repo`). + * The GitHub repository (in the form `user/repo`) */ public function getRepository(): string { @@ -82,7 +85,7 @@ public function getRepository(): string } /** - * Whether or not to fetch branches. + * Whether or not to fetch branches */ public function getFetchBranches(): ?bool { @@ -90,7 +93,7 @@ public function getFetchBranches(): ?bool } /** - * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`). + * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) */ public function getPruneBranches(): ?bool { @@ -106,7 +109,7 @@ public function getEnvironmentInitResources(): ?string } /** - * The base URL of the Github API endpoint. + * The base URL of the Github API endpoint */ public function getBaseUrl(): ?string { @@ -114,7 +117,7 @@ public function getBaseUrl(): ?string } /** - * Whether or not to build pull requests. + * Whether or not to build pull requests */ public function getBuildPullRequests(): ?bool { @@ -122,7 +125,7 @@ public function getBuildPullRequests(): ?bool } /** - * Whether or not to build draft pull requests (requires `build_pull_requests`). + * Whether or not to build draft pull requests (requires `build_pull_requests`) */ public function getBuildDraftPullRequests(): ?bool { @@ -130,7 +133,7 @@ public function getBuildDraftPullRequests(): ?bool } /** - * Whether to build pull requests post-merge (if true) or pre-merge (if false). + * Whether to build pull requests post-merge (if true) or pre-merge (if false) */ public function getBuildPullRequestsPostMerge(): ?bool { @@ -138,7 +141,7 @@ public function getBuildPullRequestsPostMerge(): ?bool } /** - * Whether or not to clone parent data when building pull requests. + * Whether or not to clone parent data when building pull requests */ public function getPullRequestsCloneParentData(): ?bool { diff --git a/src/Model/HealthWebHook.php b/src/Model/HealthWebHook.php index 828861e0..416d49fd 100644 --- a/src/Model/HealthWebHook.php +++ b/src/Model/HealthWebHook.php @@ -6,6 +6,7 @@ /** * Low level HealthWebHook (auto-generated) + * Health Webhook notification integration configurations * * @license Apache-2.0 * @see https://docs.upsun.com diff --git a/src/Model/HealthWebHookIntegration.php b/src/Model/HealthWebHookIntegration.php index 60218c0f..539e2bcb 100644 --- a/src/Model/HealthWebHookIntegration.php +++ b/src/Model/HealthWebHookIntegration.php @@ -16,6 +16,7 @@ final class HealthWebHookIntegration implements Model, JsonSerializable, Integra { public function __construct( private readonly string $type, + private readonly string $role, private readonly string $url, private readonly ?DateTime $createdAt, private readonly ?DateTime $updatedAt, @@ -34,6 +35,7 @@ public function jsonSerialize(): array 'createdAt' => $this->createdAt?->format(DATE_ATOM), 'updatedAt' => $this->updatedAt?->format(DATE_ATOM), 'type' => $this->type, + 'role' => $this->role, 'url' => $this->url, 'id' => $this->id, ]; @@ -60,11 +62,22 @@ public function getUpdatedAt(): ?DateTime return $this->updatedAt; } + /** + * The type of the integration + */ public function getType(): string { return $this->type; } + /** + * The role of the integration + */ + public function getRole(): string + { + return $this->role; + } + /** * The URL of the webhook */ diff --git a/src/Model/HealthWebHookIntegrationCreateInput.php b/src/Model/HealthWebHookIntegrationCreateInput.php index 51e25f9b..b79734de 100644 --- a/src/Model/HealthWebHookIntegrationCreateInput.php +++ b/src/Model/HealthWebHookIntegrationCreateInput.php @@ -39,6 +39,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } + /** + * The type of the integration + */ public function getType(): string { return $this->type; diff --git a/src/Model/HealthWebHookIntegrationPatch.php b/src/Model/HealthWebHookIntegrationPatch.php index 05485fb4..8a6ce825 100644 --- a/src/Model/HealthWebHookIntegrationPatch.php +++ b/src/Model/HealthWebHookIntegrationPatch.php @@ -39,6 +39,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } + /** + * The type of the integration + */ public function getType(): string { return $this->type; diff --git a/src/Model/Hooks1.php b/src/Model/Hooks1.php new file mode 100644 index 00000000..aac922ad --- /dev/null +++ b/src/Model/Hooks1.php @@ -0,0 +1,56 @@ + $this->build, + 'deploy' => $this->deploy, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + /** + * Hook executed after the build process + */ + public function getBuild(): ?string + { + return $this->build; + } + + /** + * Hook executed before the task's run command + */ + public function getDeploy(): ?string + { + return $this->deploy; + } +} diff --git a/src/Model/HttpLogIntegration.php b/src/Model/HttpLogIntegration.php index 90dd94f2..5a5a85b9 100644 --- a/src/Model/HttpLogIntegration.php +++ b/src/Model/HttpLogIntegration.php @@ -16,6 +16,7 @@ final class HttpLogIntegration implements Model, JsonSerializable, Integration { public function __construct( private readonly string $type, + private readonly string $role, private readonly array $extra, private readonly string $url, private readonly array $headers, @@ -38,6 +39,7 @@ public function jsonSerialize(): array 'createdAt' => $this->createdAt?->format(DATE_ATOM), 'updatedAt' => $this->updatedAt?->format(DATE_ATOM), 'type' => $this->type, + 'role' => $this->role, 'extra' => $this->extra, 'url' => $this->url, 'headers' => $this->headers, @@ -68,16 +70,30 @@ public function getUpdatedAt(): ?DateTime return $this->updatedAt; } + /** + * The type of the integration + */ public function getType(): string { return $this->type; } + /** + * The role of the integration + */ + public function getRole(): string + { + return $this->role; + } + public function getExtra(): array { return $this->extra; } + /** + * The HTTP endpoint + */ public function getUrl(): string { return $this->url; diff --git a/src/Model/HttpLogIntegrationCreateInput.php b/src/Model/HttpLogIntegrationCreateInput.php index 60a3f7c3..191fd25c 100644 --- a/src/Model/HttpLogIntegrationCreateInput.php +++ b/src/Model/HttpLogIntegrationCreateInput.php @@ -45,11 +45,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } + /** + * The type of the integration + */ public function getType(): string { return $this->type; } + /** + * The HTTP endpoint + */ public function getUrl(): string { return $this->url; diff --git a/src/Model/HttpLogIntegrationPatch.php b/src/Model/HttpLogIntegrationPatch.php index 6c57bd91..d76b6356 100644 --- a/src/Model/HttpLogIntegrationPatch.php +++ b/src/Model/HttpLogIntegrationPatch.php @@ -45,11 +45,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } + /** + * The type of the integration + */ public function getType(): string { return $this->type; } + /** + * The HTTP endpoint + */ public function getUrl(): string { return $this->url; @@ -73,6 +79,9 @@ public function getTlsVerify(): ?bool return $this->tlsVerify; } + /** + * The type of the integration + */ public function getExcludedServices(): ?string { return $this->excludedServices; diff --git a/src/Model/HttpMetricsOverview200Response.php b/src/Model/HttpMetricsOverview200Response.php new file mode 100644 index 00000000..3db1f547 --- /dev/null +++ b/src/Model/HttpMetricsOverview200Response.php @@ -0,0 +1,102 @@ + $this->grain, + 'from' => $this->from, + 'to' => $this->to, + 'projectId' => $this->projectId, + 'environmentId' => $this->environmentId, + 'environmentType' => $this->environmentType, + 'branchMachineName' => $this->branchMachineName, + 'topUrlsCount' => $this->topUrlsCount, + 'data' => $this->data, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getGrain(): int + { + return $this->grain; + } + + public function getFrom(): int + { + return $this->from; + } + + public function getTo(): int + { + return $this->to; + } + + public function getProjectId(): string + { + return $this->projectId; + } + + public function getEnvironmentId(): string + { + return $this->environmentId; + } + + public function getEnvironmentType(): string + { + return $this->environmentType; + } + + public function getBranchMachineName(): string + { + return $this->branchMachineName; + } + + public function getTopUrlsCount(): int + { + return $this->topUrlsCount; + } + + public function getData(): HttpMetricsOverview200ResponseData + { + return $this->data; + } +} diff --git a/src/Model/HttpMetricsOverview200ResponseData.php b/src/Model/HttpMetricsOverview200ResponseData.php new file mode 100644 index 00000000..57e88235 --- /dev/null +++ b/src/Model/HttpMetricsOverview200ResponseData.php @@ -0,0 +1,54 @@ + $this->urls, + 'timelines' => $this->timelines, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + /** + * @return HttpMetricsOverview200ResponseDataUrlsValue[] + */ + public function getUrls(): array + { + return $this->urls; + } + + /** + * @return HttpMetricsOverview200ResponseDataTimelinesInner[] + */ + public function getTimelines(): array + { + return $this->timelines; + } +} diff --git a/src/Model/HttpMetricsOverview200ResponseDataTimelinesInner.php b/src/Model/HttpMetricsOverview200ResponseDataTimelinesInner.php new file mode 100644 index 00000000..c4b3fc3f --- /dev/null +++ b/src/Model/HttpMetricsOverview200ResponseDataTimelinesInner.php @@ -0,0 +1,73 @@ + $this->timestamp, + 'requestSize' => $this->requestSize, + 'responseSize' => $this->responseSize, + 'urls' => $this->urls, + 'codes' => $this->codes, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getTimestamp(): int + { + return $this->timestamp; + } + + public function getRequestSize(): ?int + { + return $this->requestSize; + } + + public function getResponseSize(): ?int + { + return $this->responseSize; + } + + /** + * @return HttpMetricsOverview200ResponseDataTimelinesInnerUrlsValue[]|null + */ + public function getUrls(): ?array + { + return $this->urls; + } + + public function getCodes(): ?HttpMetricsOverview200ResponseDataTimelinesInnerCodes + { + return $this->codes; + } +} diff --git a/src/Model/HttpMetricsOverview200ResponseDataTimelinesInnerCodes.php b/src/Model/HttpMetricsOverview200ResponseDataTimelinesInnerCodes.php new file mode 100644 index 00000000..e01ecc4b --- /dev/null +++ b/src/Model/HttpMetricsOverview200ResponseDataTimelinesInnerCodes.php @@ -0,0 +1,77 @@ + $this->uNKNOWN, + '_1xX' => $this->_1xX, + '_2xX' => $this->_2xX, + '_3xX' => $this->_3xX, + '_4xX' => $this->_4xX, + '_5xX' => $this->_5xX, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getUNKNOWN(): int + { + return $this->uNKNOWN; + } + + public function get1xX(): int + { + return $this->_1xX; + } + + public function get2xX(): int + { + return $this->_2xX; + } + + public function get3xX(): int + { + return $this->_3xX; + } + + public function get4xX(): int + { + return $this->_4xX; + } + + public function get5xX(): int + { + return $this->_5xX; + } +} diff --git a/src/Model/HttpMetricsOverview200ResponseDataTimelinesInnerUrlsValue.php b/src/Model/HttpMetricsOverview200ResponseDataTimelinesInnerUrlsValue.php new file mode 100644 index 00000000..5bd9b63a --- /dev/null +++ b/src/Model/HttpMetricsOverview200ResponseDataTimelinesInnerUrlsValue.php @@ -0,0 +1,49 @@ + $this->count, + 'impact' => $this->impact, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getCount(): int + { + return $this->count; + } + + public function getImpact(): ?float + { + return $this->impact; + } +} diff --git a/src/Model/HttpMetricsOverview200ResponseDataUrlsValue.php b/src/Model/HttpMetricsOverview200ResponseDataUrlsValue.php new file mode 100644 index 00000000..1a62743f --- /dev/null +++ b/src/Model/HttpMetricsOverview200ResponseDataUrlsValue.php @@ -0,0 +1,92 @@ + $this->url, + 'method' => $this->method, + 'impact' => $this->impact, + 'average' => $this->average, + 'p50' => $this->p50, + 'p96' => $this->p96, + 'count' => $this->count, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getUrl(): string + { + return $this->url; + } + + public function getMethod(): string + { + return $this->method; + } + + public function getImpact(): ?float + { + return $this->impact; + } + + public function getAverage(): float + { + return $this->average; + } + + public function getP50(): float + { + return $this->p50; + } + + public function getP96(): float + { + return $this->p96; + } + + public function getCount(): int + { + return $this->count; + } +} diff --git a/src/Model/HttpMetricsOverview499Response.php b/src/Model/HttpMetricsOverview499Response.php new file mode 100644 index 00000000..748245cd --- /dev/null +++ b/src/Model/HttpMetricsOverview499Response.php @@ -0,0 +1,49 @@ + $this->error, + 'message' => $this->message, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getError(): string + { + return $this->error; + } + + public function getMessage(): string + { + return $this->message; + } +} diff --git a/src/Model/HttpMetricsTimelineIps200Response.php b/src/Model/HttpMetricsTimelineIps200Response.php new file mode 100644 index 00000000..92dfeba0 --- /dev/null +++ b/src/Model/HttpMetricsTimelineIps200Response.php @@ -0,0 +1,196 @@ + $this->grain, + 'from' => $this->from, + 'to' => $this->to, + 'projectId' => $this->projectId, + 'environmentId' => $this->environmentId, + 'environmentType' => $this->environmentType, + 'branchMachineName' => $this->branchMachineName, + 'breakdownLimit' => $this->breakdownLimit, + 'breakdownTopHits' => $this->breakdownTopHits, + 'breakdown' => $this->breakdown, + 'topHitsTimeline' => $this->topHitsTimeline, + 'methods' => $this->methods, + 'methodsMode' => $this->methodsMode, + 'domains' => $this->domains, + 'domainsMode' => $this->domainsMode, + 'codeSlots' => $this->codeSlots, + 'codeSlotsMode' => $this->codeSlotsMode, + 'codes' => $this->codes, + 'codesMode' => $this->codesMode, + 'requestDurationSlots' => $this->requestDurationSlots, + 'requestDurationSlotsMode' => $this->requestDurationSlotsMode, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getGrain(): int + { + return $this->grain; + } + + public function getFrom(): int + { + return $this->from; + } + + public function getTo(): int + { + return $this->to; + } + + public function getProjectId(): string + { + return $this->projectId; + } + + public function getEnvironmentId(): string + { + return $this->environmentId; + } + + public function getEnvironmentType(): string + { + return $this->environmentType; + } + + public function getBranchMachineName(): string + { + return $this->branchMachineName; + } + + public function getBreakdownLimit(): int + { + return $this->breakdownLimit; + } + + public function getBreakdownTopHits(): HttpMetricsTimelineIps200ResponseBreakdownTopHits + { + return $this->breakdownTopHits; + } + + public function getBreakdown(): HttpMetricsTimelineIps200ResponseBreakdown + { + return $this->breakdown; + } + + public function getTopHitsTimeline(): HttpMetricsTimelineIps200ResponseTopHitsTimeline + { + return $this->topHitsTimeline; + } + + public function getMethods(): ?array + { + return $this->methods; + } + + public function getMethodsMode(): ?string + { + return $this->methodsMode; + } + + public function getDomains(): ?array + { + return $this->domains; + } + + public function getDomainsMode(): ?string + { + return $this->domainsMode; + } + + public function getCodeSlots(): ?array + { + return $this->codeSlots; + } + + public function getCodeSlotsMode(): ?string + { + return $this->codeSlotsMode; + } + + public function getCodes(): ?array + { + return $this->codes; + } + + public function getCodesMode(): ?string + { + return $this->codesMode; + } + + public function getRequestDurationSlots(): ?array + { + return $this->requestDurationSlots; + } + + public function getRequestDurationSlotsMode(): ?string + { + return $this->requestDurationSlotsMode; + } +} diff --git a/src/Model/HttpMetricsTimelineIps200ResponseBreakdown.php b/src/Model/HttpMetricsTimelineIps200ResponseBreakdown.php new file mode 100644 index 00000000..868244c9 --- /dev/null +++ b/src/Model/HttpMetricsTimelineIps200ResponseBreakdown.php @@ -0,0 +1,61 @@ + $this->kind, + 'total' => $this->total, + 'data' => $this->data, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getKind(): string + { + return $this->kind; + } + + public function getTotal(): int + { + return $this->total; + } + + /** + * @return HttpMetricsTimelineIps200ResponseBreakdownDataInner[] + */ + public function getData(): array + { + return $this->data; + } +} diff --git a/src/Model/HttpMetricsTimelineIps200ResponseBreakdownDataInner.php b/src/Model/HttpMetricsTimelineIps200ResponseBreakdownDataInner.php new file mode 100644 index 00000000..47073e70 --- /dev/null +++ b/src/Model/HttpMetricsTimelineIps200ResponseBreakdownDataInner.php @@ -0,0 +1,84 @@ + $this->name, + 'impact' => $this->impact, + 'average' => $this->average, + 'p50' => $this->p50, + 'p96' => $this->p96, + 'count' => $this->count, + 'topHit' => $this->topHit, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getName(): string + { + return $this->name; + } + + public function getImpact(): float + { + return $this->impact; + } + + public function getAverage(): float + { + return $this->average; + } + + public function getP50(): float + { + return $this->p50; + } + + public function getP96(): float + { + return $this->p96; + } + + public function getCount(): int + { + return $this->count; + } + + public function getTopHit(): bool + { + return $this->topHit; + } +} diff --git a/src/Model/HttpMetricsTimelineIps200ResponseBreakdownTopHits.php b/src/Model/HttpMetricsTimelineIps200ResponseBreakdownTopHits.php new file mode 100644 index 00000000..8cf26037 --- /dev/null +++ b/src/Model/HttpMetricsTimelineIps200ResponseBreakdownTopHits.php @@ -0,0 +1,49 @@ + $this->maxQuantity, + 'maxPercentage' => $this->maxPercentage, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getMaxQuantity(): int + { + return $this->maxQuantity; + } + + public function getMaxPercentage(): float + { + return $this->maxPercentage; + } +} diff --git a/src/Model/Routing1.php b/src/Model/HttpMetricsTimelineIps200ResponseTopHitsTimeline.php similarity index 59% rename from src/Model/Routing1.php rename to src/Model/HttpMetricsTimelineIps200ResponseTopHitsTimeline.php index 45068530..e43ff119 100644 --- a/src/Model/Routing1.php +++ b/src/Model/HttpMetricsTimelineIps200ResponseTopHitsTimeline.php @@ -5,17 +5,16 @@ use JsonSerializable; /** - * Low level Routing1 (auto-generated) - * Configuration about the traffic routed to this version + * Low level HttpMetricsTimelineIps200ResponseTopHitsTimeline (auto-generated) * * @license Apache-2.0 * @see https://docs.upsun.com * @generated This file was generated by OpenAPI Generator. Do not edit manually. */ -final class Routing1 implements Model, JsonSerializable +final class HttpMetricsTimelineIps200ResponseTopHitsTimeline implements Model, JsonSerializable { public function __construct( - private readonly ?int $percentage = null, + private readonly array $data, ) { } @@ -27,7 +26,7 @@ public function getModelName(): string public function jsonSerialize(): array { return [ - 'percentage' => $this->percentage, + 'data' => $this->data, ]; } @@ -35,12 +34,11 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The percentage of traffic routed to this version + * @return HttpMetricsTimelineIps200ResponseTopHitsTimelineDataInner[] */ - public function getPercentage(): ?int + public function getData(): array { - return $this->percentage; + return $this->data; } } diff --git a/src/Model/HttpMetricsTimelineIps200ResponseTopHitsTimelineDataInner.php b/src/Model/HttpMetricsTimelineIps200ResponseTopHitsTimelineDataInner.php new file mode 100644 index 00000000..4e8e4e13 --- /dev/null +++ b/src/Model/HttpMetricsTimelineIps200ResponseTopHitsTimelineDataInner.php @@ -0,0 +1,66 @@ + $this->timestamp, + 'totalConsumed' => $this->totalConsumed, + 'totalCount' => $this->totalCount, + 'data' => $this->data, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getTimestamp(): int + { + return $this->timestamp; + } + + public function getTotalConsumed(): ?float + { + return $this->totalConsumed; + } + + public function getTotalCount(): ?int + { + return $this->totalCount; + } + + /** + * @return HttpMetricsTimelineIps200ResponseTopHitsTimelineDataInnerDataValue[]|null + */ + public function getData(): ?array + { + return $this->data; + } +} diff --git a/src/Model/HttpMetricsTimelineIps200ResponseTopHitsTimelineDataInnerDataValue.php b/src/Model/HttpMetricsTimelineIps200ResponseTopHitsTimelineDataInnerDataValue.php new file mode 100644 index 00000000..6435f04e --- /dev/null +++ b/src/Model/HttpMetricsTimelineIps200ResponseTopHitsTimelineDataInnerDataValue.php @@ -0,0 +1,49 @@ + $this->count, + 'impact' => $this->impact, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getCount(): int + { + return $this->count; + } + + public function getImpact(): ?float + { + return $this->impact; + } +} diff --git a/src/Model/HttpMetricsTimelineUrls200Response.php b/src/Model/HttpMetricsTimelineUrls200Response.php new file mode 100644 index 00000000..8c5274eb --- /dev/null +++ b/src/Model/HttpMetricsTimelineUrls200Response.php @@ -0,0 +1,203 @@ + $this->grain, + 'from' => $this->from, + 'to' => $this->to, + 'projectId' => $this->projectId, + 'environmentId' => $this->environmentId, + 'environmentType' => $this->environmentType, + 'branchMachineName' => $this->branchMachineName, + 'breakdownLimit' => $this->breakdownLimit, + 'breakdownTopHits' => $this->breakdownTopHits, + 'breakdown' => $this->breakdown, + 'topHitsTimeline' => $this->topHitsTimeline, + 'filters' => $this->filters, + 'methods' => $this->methods, + 'methodsMode' => $this->methodsMode, + 'domains' => $this->domains, + 'domainsMode' => $this->domainsMode, + 'codeSlots' => $this->codeSlots, + 'codeSlotsMode' => $this->codeSlotsMode, + 'codes' => $this->codes, + 'codesMode' => $this->codesMode, + 'requestDurationSlots' => $this->requestDurationSlots, + 'requestDurationSlotsMode' => $this->requestDurationSlotsMode, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getGrain(): int + { + return $this->grain; + } + + public function getFrom(): int + { + return $this->from; + } + + public function getTo(): int + { + return $this->to; + } + + public function getProjectId(): string + { + return $this->projectId; + } + + public function getEnvironmentId(): string + { + return $this->environmentId; + } + + public function getEnvironmentType(): string + { + return $this->environmentType; + } + + public function getBranchMachineName(): string + { + return $this->branchMachineName; + } + + public function getBreakdownLimit(): int + { + return $this->breakdownLimit; + } + + public function getBreakdownTopHits(): HttpMetricsTimelineIps200ResponseBreakdownTopHits + { + return $this->breakdownTopHits; + } + + public function getBreakdown(): HttpMetricsTimelineUrls200ResponseBreakdown + { + return $this->breakdown; + } + + public function getTopHitsTimeline(): HttpMetricsTimelineUrls200ResponseTopHitsTimeline + { + return $this->topHitsTimeline; + } + + public function getFilters(): HttpMetricsTimelineUrls200ResponseFilters + { + return $this->filters; + } + + public function getMethods(): ?array + { + return $this->methods; + } + + public function getMethodsMode(): ?string + { + return $this->methodsMode; + } + + public function getDomains(): ?array + { + return $this->domains; + } + + public function getDomainsMode(): ?string + { + return $this->domainsMode; + } + + public function getCodeSlots(): ?array + { + return $this->codeSlots; + } + + public function getCodeSlotsMode(): ?string + { + return $this->codeSlotsMode; + } + + public function getCodes(): ?array + { + return $this->codes; + } + + public function getCodesMode(): ?string + { + return $this->codesMode; + } + + public function getRequestDurationSlots(): ?array + { + return $this->requestDurationSlots; + } + + public function getRequestDurationSlotsMode(): ?string + { + return $this->requestDurationSlotsMode; + } +} diff --git a/src/Model/HttpMetricsTimelineUrls200ResponseBreakdown.php b/src/Model/HttpMetricsTimelineUrls200ResponseBreakdown.php new file mode 100644 index 00000000..d576a5bc --- /dev/null +++ b/src/Model/HttpMetricsTimelineUrls200ResponseBreakdown.php @@ -0,0 +1,61 @@ + $this->kind, + 'total' => $this->total, + 'data' => $this->data, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getKind(): string + { + return $this->kind; + } + + public function getTotal(): int + { + return $this->total; + } + + /** + * @return HttpMetricsTimelineUrls200ResponseBreakdownDataInner[] + */ + public function getData(): array + { + return $this->data; + } +} diff --git a/src/Model/HttpMetricsTimelineUrls200ResponseBreakdownDataInner.php b/src/Model/HttpMetricsTimelineUrls200ResponseBreakdownDataInner.php new file mode 100644 index 00000000..5b6264d0 --- /dev/null +++ b/src/Model/HttpMetricsTimelineUrls200ResponseBreakdownDataInner.php @@ -0,0 +1,99 @@ + $this->url, + 'method' => $this->method, + 'impact' => $this->impact, + 'average' => $this->average, + 'p50' => $this->p50, + 'p96' => $this->p96, + 'count' => $this->count, + 'topHit' => $this->topHit, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getUrl(): string + { + return $this->url; + } + + public function getMethod(): string + { + return $this->method; + } + + public function getImpact(): ?float + { + return $this->impact; + } + + public function getAverage(): float + { + return $this->average; + } + + public function getP50(): float + { + return $this->p50; + } + + public function getP96(): float + { + return $this->p96; + } + + public function getCount(): int + { + return $this->count; + } + + public function getTopHit(): bool + { + return $this->topHit; + } +} diff --git a/src/Model/HttpMetricsTimelineUrls200ResponseFilters.php b/src/Model/HttpMetricsTimelineUrls200ResponseFilters.php new file mode 100644 index 00000000..373b7907 --- /dev/null +++ b/src/Model/HttpMetricsTimelineUrls200ResponseFilters.php @@ -0,0 +1,52 @@ + $this->maxApplicableFilters, + 'fields' => $this->fields, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getMaxApplicableFilters(): int + { + return $this->maxApplicableFilters; + } + + /** + * @return HttpMetricsTimelineUrls200ResponseFiltersFieldsValue[]|null + */ + public function getFields(): ?array + { + return $this->fields; + } +} diff --git a/src/Model/HttpMetricsTimelineUrls200ResponseFiltersFieldsValue.php b/src/Model/HttpMetricsTimelineUrls200ResponseFiltersFieldsValue.php new file mode 100644 index 00000000..f53dab6d --- /dev/null +++ b/src/Model/HttpMetricsTimelineUrls200ResponseFiltersFieldsValue.php @@ -0,0 +1,59 @@ + $this->distinctValues, + 'type' => $this->type, + 'values' => $this->values, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getDistinctValues(): int + { + return $this->distinctValues; + } + + public function getType(): string + { + return $this->type; + } + + /** + * @return HttpMetricsTimelineUrls200ResponseFiltersFieldsValueValuesInner[] + */ + public function getValues(): array + { + return $this->values; + } +} diff --git a/src/Model/HttpMetricsTimelineUrls200ResponseFiltersFieldsValueValuesInner.php b/src/Model/HttpMetricsTimelineUrls200ResponseFiltersFieldsValueValuesInner.php new file mode 100644 index 00000000..058a97fa --- /dev/null +++ b/src/Model/HttpMetricsTimelineUrls200ResponseFiltersFieldsValueValuesInner.php @@ -0,0 +1,49 @@ + $this->value, + 'count' => $this->count, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getValue(): string + { + return $this->value; + } + + public function getCount(): int + { + return $this->count; + } +} diff --git a/src/Model/HttpMetricsTimelineUrls200ResponseTopHitsTimeline.php b/src/Model/HttpMetricsTimelineUrls200ResponseTopHitsTimeline.php new file mode 100644 index 00000000..0e7cfbc3 --- /dev/null +++ b/src/Model/HttpMetricsTimelineUrls200ResponseTopHitsTimeline.php @@ -0,0 +1,44 @@ + $this->data, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + /** + * @return HttpMetricsTimelineUrls200ResponseTopHitsTimelineDataInner[] + */ + public function getData(): array + { + return $this->data; + } +} diff --git a/src/Model/HttpMetricsTimelineUrls200ResponseTopHitsTimelineDataInner.php b/src/Model/HttpMetricsTimelineUrls200ResponseTopHitsTimelineDataInner.php new file mode 100644 index 00000000..b2795db9 --- /dev/null +++ b/src/Model/HttpMetricsTimelineUrls200ResponseTopHitsTimelineDataInner.php @@ -0,0 +1,87 @@ + $this->timestamp, + 'totalConsumed' => $this->totalConsumed, + 'totalCount' => $this->totalCount, + 'requestSize' => $this->requestSize, + 'responseSize' => $this->responseSize, + 'urls' => $this->urls, + 'codes' => $this->codes, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getTimestamp(): int + { + return $this->timestamp; + } + + public function getTotalConsumed(): ?float + { + return $this->totalConsumed; + } + + public function getTotalCount(): ?int + { + return $this->totalCount; + } + + public function getRequestSize(): ?int + { + return $this->requestSize; + } + + public function getResponseSize(): ?int + { + return $this->responseSize; + } + + /** + * @return HttpMetricsOverview200ResponseDataTimelinesInnerUrlsValue[]|null + */ + public function getUrls(): ?array + { + return $this->urls; + } + + public function getCodes(): ?HttpMetricsOverview200ResponseDataTimelinesInnerCodes + { + return $this->codes; + } +} diff --git a/src/Model/HttpMetricsTimelineUserAgents200Response.php b/src/Model/HttpMetricsTimelineUserAgents200Response.php new file mode 100644 index 00000000..2ba3d5b0 --- /dev/null +++ b/src/Model/HttpMetricsTimelineUserAgents200Response.php @@ -0,0 +1,196 @@ + $this->grain, + 'from' => $this->from, + 'to' => $this->to, + 'projectId' => $this->projectId, + 'environmentId' => $this->environmentId, + 'environmentType' => $this->environmentType, + 'branchMachineName' => $this->branchMachineName, + 'breakdownLimit' => $this->breakdownLimit, + 'breakdownTopHits' => $this->breakdownTopHits, + 'breakdown' => $this->breakdown, + 'topHitsTimeline' => $this->topHitsTimeline, + 'methods' => $this->methods, + 'methodsMode' => $this->methodsMode, + 'domains' => $this->domains, + 'domainsMode' => $this->domainsMode, + 'codeSlots' => $this->codeSlots, + 'codeSlotsMode' => $this->codeSlotsMode, + 'codes' => $this->codes, + 'codesMode' => $this->codesMode, + 'requestDurationSlots' => $this->requestDurationSlots, + 'requestDurationSlotsMode' => $this->requestDurationSlotsMode, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getGrain(): int + { + return $this->grain; + } + + public function getFrom(): int + { + return $this->from; + } + + public function getTo(): int + { + return $this->to; + } + + public function getProjectId(): string + { + return $this->projectId; + } + + public function getEnvironmentId(): string + { + return $this->environmentId; + } + + public function getEnvironmentType(): string + { + return $this->environmentType; + } + + public function getBranchMachineName(): string + { + return $this->branchMachineName; + } + + public function getBreakdownLimit(): int + { + return $this->breakdownLimit; + } + + public function getBreakdownTopHits(): HttpMetricsTimelineIps200ResponseBreakdownTopHits + { + return $this->breakdownTopHits; + } + + public function getBreakdown(): HttpMetricsTimelineUserAgents200ResponseBreakdown + { + return $this->breakdown; + } + + public function getTopHitsTimeline(): HttpMetricsTimelineUserAgents200ResponseTopHitsTimeline + { + return $this->topHitsTimeline; + } + + public function getMethods(): ?array + { + return $this->methods; + } + + public function getMethodsMode(): ?string + { + return $this->methodsMode; + } + + public function getDomains(): ?array + { + return $this->domains; + } + + public function getDomainsMode(): ?string + { + return $this->domainsMode; + } + + public function getCodeSlots(): ?array + { + return $this->codeSlots; + } + + public function getCodeSlotsMode(): ?string + { + return $this->codeSlotsMode; + } + + public function getCodes(): ?array + { + return $this->codes; + } + + public function getCodesMode(): ?string + { + return $this->codesMode; + } + + public function getRequestDurationSlots(): ?array + { + return $this->requestDurationSlots; + } + + public function getRequestDurationSlotsMode(): ?string + { + return $this->requestDurationSlotsMode; + } +} diff --git a/src/Model/HttpMetricsTimelineUserAgents200ResponseBreakdown.php b/src/Model/HttpMetricsTimelineUserAgents200ResponseBreakdown.php new file mode 100644 index 00000000..7a06e5b9 --- /dev/null +++ b/src/Model/HttpMetricsTimelineUserAgents200ResponseBreakdown.php @@ -0,0 +1,61 @@ + $this->kind, + 'total' => $this->total, + 'data' => $this->data, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getKind(): string + { + return $this->kind; + } + + public function getTotal(): int + { + return $this->total; + } + + /** + * @return HttpMetricsTimelineUserAgents200ResponseBreakdownDataInner[] + */ + public function getData(): array + { + return $this->data; + } +} diff --git a/src/Model/HttpMetricsTimelineUserAgents200ResponseBreakdownDataInner.php b/src/Model/HttpMetricsTimelineUserAgents200ResponseBreakdownDataInner.php new file mode 100644 index 00000000..17759ca3 --- /dev/null +++ b/src/Model/HttpMetricsTimelineUserAgents200ResponseBreakdownDataInner.php @@ -0,0 +1,84 @@ + $this->name, + 'impact' => $this->impact, + 'average' => $this->average, + 'p50' => $this->p50, + 'p96' => $this->p96, + 'count' => $this->count, + 'topHit' => $this->topHit, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getName(): string + { + return $this->name; + } + + public function getImpact(): float + { + return $this->impact; + } + + public function getAverage(): float + { + return $this->average; + } + + public function getP50(): float + { + return $this->p50; + } + + public function getP96(): float + { + return $this->p96; + } + + public function getCount(): int + { + return $this->count; + } + + public function getTopHit(): bool + { + return $this->topHit; + } +} diff --git a/src/Model/HttpMetricsTimelineUserAgents200ResponseTopHitsTimeline.php b/src/Model/HttpMetricsTimelineUserAgents200ResponseTopHitsTimeline.php new file mode 100644 index 00000000..c37bf19c --- /dev/null +++ b/src/Model/HttpMetricsTimelineUserAgents200ResponseTopHitsTimeline.php @@ -0,0 +1,44 @@ + $this->data, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + /** + * @return HttpMetricsTimelineUserAgents200ResponseTopHitsTimelineDataInner[] + */ + public function getData(): array + { + return $this->data; + } +} diff --git a/src/Model/HttpMetricsTimelineUserAgents200ResponseTopHitsTimelineDataInner.php b/src/Model/HttpMetricsTimelineUserAgents200ResponseTopHitsTimelineDataInner.php new file mode 100644 index 00000000..464868af --- /dev/null +++ b/src/Model/HttpMetricsTimelineUserAgents200ResponseTopHitsTimelineDataInner.php @@ -0,0 +1,66 @@ + $this->timestamp, + 'totalConsumed' => $this->totalConsumed, + 'totalCount' => $this->totalCount, + 'data' => $this->data, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getTimestamp(): int + { + return $this->timestamp; + } + + public function getTotalConsumed(): ?float + { + return $this->totalConsumed; + } + + public function getTotalCount(): ?int + { + return $this->totalCount; + } + + /** + * @return HttpMetricsTimelineUserAgents200ResponseTopHitsTimelineDataInnerDataValue[]|null + */ + public function getData(): ?array + { + return $this->data; + } +} diff --git a/src/Model/HttpMetricsTimelineUserAgents200ResponseTopHitsTimelineDataInnerDataValue.php b/src/Model/HttpMetricsTimelineUserAgents200ResponseTopHitsTimelineDataInnerDataValue.php new file mode 100644 index 00000000..472e70c6 --- /dev/null +++ b/src/Model/HttpMetricsTimelineUserAgents200ResponseTopHitsTimelineDataInnerDataValue.php @@ -0,0 +1,49 @@ + $this->count, + 'impact' => $this->impact, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getCount(): int + { + return $this->count; + } + + public function getImpact(): ?float + { + return $this->impact; + } +} diff --git a/src/Model/Integration.php b/src/Model/Integration.php index 9af426e6..d3182684 100644 --- a/src/Model/Integration.php +++ b/src/Model/Integration.php @@ -18,4 +18,6 @@ public function jsonSerialize(): array; public function __toString(): string; public function getType(): mixed; + + public function getRole(): mixed; } diff --git a/src/Model/KubernetesDeploymentTargetStorage.php b/src/Model/KubernetesDeploymentTargetStorage.php new file mode 100644 index 00000000..3033fdfb --- /dev/null +++ b/src/Model/KubernetesDeploymentTargetStorage.php @@ -0,0 +1,100 @@ + $this->type, + 'name' => $this->name, + 'k8sConfig' => $this->k8sConfig, + 'bastionNodesUser' => $this->bastionNodesUser, + 'bastionNodesHost' => $this->bastionNodesHost, + 'id' => $this->id, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + /** + * The type of the deployment target + */ + public function getType(): string + { + return $this->type; + } + + /** + * The name of the deployment target + */ + public function getName(): string + { + return $this->name; + } + + /** + * K8S config + */ + public function getK8sConfig(): string + { + return $this->k8sConfig; + } + + /** + * The bastion-nodes ssh user + */ + public function getBastionNodesUser(): ?string + { + return $this->bastionNodesUser; + } + + /** + * The bastion node endpoint + */ + public function getBastionNodesHost(): ?string + { + return $this->bastionNodesHost; + } + + /** + * The identifier of KubernetesDeploymentTargetStorage + */ + public function getId(): ?string + { + return $this->id; + } +} diff --git a/src/Model/KubernetesDeploymentTargetStorageCreateInput.php b/src/Model/KubernetesDeploymentTargetStorageCreateInput.php new file mode 100644 index 00000000..813a4a0d --- /dev/null +++ b/src/Model/KubernetesDeploymentTargetStorageCreateInput.php @@ -0,0 +1,60 @@ + $this->type, + 'name' => $this->name, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + /** + * The type of the deployment target + */ + public function getType(): string + { + return $this->type; + } + + /** + * The name of the deployment target + */ + public function getName(): string + { + return $this->name; + } +} diff --git a/src/Model/KubernetesDeploymentTargetStoragePatch.php b/src/Model/KubernetesDeploymentTargetStoragePatch.php new file mode 100644 index 00000000..f956c6e0 --- /dev/null +++ b/src/Model/KubernetesDeploymentTargetStoragePatch.php @@ -0,0 +1,60 @@ + $this->type, + 'name' => $this->name, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + /** + * The type of the deployment target + */ + public function getType(): string + { + return $this->type; + } + + /** + * The name of the deployment target + */ + public function getName(): string + { + return $this->name; + } +} diff --git a/src/Model/LastDeploymentCommandsInner.php b/src/Model/LastDeploymentCommandsInner.php new file mode 100644 index 00000000..55886162 --- /dev/null +++ b/src/Model/LastDeploymentCommandsInner.php @@ -0,0 +1,56 @@ + $this->app, + 'type' => $this->type, + 'exitCode' => $this->exitCode, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getApp(): string + { + return $this->app; + } + + public function getType(): string + { + return $this->type; + } + + public function getExitCode(): int + { + return $this->exitCode; + } +} diff --git a/src/Model/Maintenance.php b/src/Model/Maintenance.php new file mode 100644 index 00000000..63c3e107 --- /dev/null +++ b/src/Model/Maintenance.php @@ -0,0 +1,47 @@ + $this->nextMaintenance?->format(DATE_ATOM), + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + /** + * Estimated date and time of the next maintenance activity + */ + public function getNextMaintenance(): DateTime + { + return $this->nextMaintenance; + } +} diff --git a/src/Model/MaintenanceWindowConfiguration.php b/src/Model/MaintenanceWindowConfiguration.php new file mode 100644 index 00000000..da2a15db --- /dev/null +++ b/src/Model/MaintenanceWindowConfiguration.php @@ -0,0 +1,46 @@ + $this->recurrence, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + /** + * Defines the recurring schedule for the maintenance window + */ + public function getRecurrence(): Recurrence + { + return $this->recurrence; + } +} diff --git a/src/Model/NewRelicIntegration.php b/src/Model/NewRelicIntegration.php index 3dfa8385..660c28dd 100644 --- a/src/Model/NewRelicIntegration.php +++ b/src/Model/NewRelicIntegration.php @@ -16,6 +16,7 @@ final class NewRelicIntegration implements Model, JsonSerializable, Integration { public function __construct( private readonly string $type, + private readonly string $role, private readonly array $extra, private readonly string $url, private readonly bool $tlsVerify, @@ -37,6 +38,7 @@ public function jsonSerialize(): array 'createdAt' => $this->createdAt?->format(DATE_ATOM), 'updatedAt' => $this->updatedAt?->format(DATE_ATOM), 'type' => $this->type, + 'role' => $this->role, 'extra' => $this->extra, 'url' => $this->url, 'tlsVerify' => $this->tlsVerify, @@ -66,16 +68,30 @@ public function getUpdatedAt(): ?DateTime return $this->updatedAt; } + /** + * The type of the integration + */ public function getType(): string { return $this->type; } + /** + * The role of the integration + */ + public function getRole(): string + { + return $this->role; + } + public function getExtra(): array { return $this->extra; } + /** + * The NewRelic Logs endpoint + */ public function getUrl(): string { return $this->url; diff --git a/src/Model/NewRelicIntegrationCreateInput.php b/src/Model/NewRelicIntegrationCreateInput.php index 5a2b461e..99c235eb 100644 --- a/src/Model/NewRelicIntegrationCreateInput.php +++ b/src/Model/NewRelicIntegrationCreateInput.php @@ -45,11 +45,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } + /** + * The type of the integration + */ public function getType(): string { return $this->type; } + /** + * The NewRelic Logs endpoint + */ public function getUrl(): string { return $this->url; diff --git a/src/Model/NewRelicIntegrationPatch.php b/src/Model/NewRelicIntegrationPatch.php index db10a443..d88406d8 100644 --- a/src/Model/NewRelicIntegrationPatch.php +++ b/src/Model/NewRelicIntegrationPatch.php @@ -45,11 +45,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } + /** + * The type of the integration + */ public function getType(): string { return $this->type; } + /** + * The NewRelic Logs endpoint + */ public function getUrl(): string { return $this->url; diff --git a/src/Model/OAuth2Consumer.php b/src/Model/OAuth2Consumer.php index c124e76e..abc40eb2 100644 --- a/src/Model/OAuth2Consumer.php +++ b/src/Model/OAuth2Consumer.php @@ -6,7 +6,7 @@ /** * Low level OAuth2Consumer (auto-generated) - * The OAuth2 consumer information (optional). + * The OAuth2 consumer information (optional) * * @license Apache-2.0 * @see https://docs.upsun.com diff --git a/src/Model/OAuth2Consumer1.php b/src/Model/OAuth2Consumer1.php index a625ce83..01d56685 100644 --- a/src/Model/OAuth2Consumer1.php +++ b/src/Model/OAuth2Consumer1.php @@ -6,7 +6,7 @@ /** * Low level OAuth2Consumer1 (auto-generated) - * The OAuth2 consumer information (optional). + * The OAuth2 consumer information (optional) * * @license Apache-2.0 * @see https://docs.upsun.com diff --git a/src/Model/ObservabilityEntrypoint200Response.php b/src/Model/ObservabilityEntrypoint200Response.php new file mode 100644 index 00000000..97cc4d0b --- /dev/null +++ b/src/Model/ObservabilityEntrypoint200Response.php @@ -0,0 +1,111 @@ + $this->message, + 'projectId' => $this->projectId, + 'branchMachineName' => $this->branchMachineName, + 'environmentId' => $this->environmentId, + 'environmentType' => $this->environmentType, + 'vendor' => $this->vendor, + 'pshUserIdentifier' => $this->pshUserIdentifier, + 'links' => $this->links, + 'retention' => $this->retention, + 'dataRetention' => $this->dataRetention, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getMessage(): string + { + return $this->message; + } + + public function getProjectId(): string + { + return $this->projectId; + } + + public function getBranchMachineName(): string + { + return $this->branchMachineName; + } + + public function getEnvironmentId(): string + { + return $this->environmentId; + } + + public function getEnvironmentType(): string + { + return $this->environmentType; + } + + public function getVendor(): string + { + return $this->vendor; + } + + public function getPshUserIdentifier(): string + { + return $this->pshUserIdentifier; + } + + public function getLinks(): ObservabilityEntrypoint200ResponseLinks + { + return $this->links; + } + + public function getRetention(): ObservabilityEntrypoint200ResponseRetention + { + return $this->retention; + } + + public function getDataRetention(): ObservabilityEntrypoint200ResponseDataRetention + { + return $this->dataRetention; + } +} diff --git a/src/Model/ObservabilityEntrypoint200ResponseDataRetention.php b/src/Model/ObservabilityEntrypoint200ResponseDataRetention.php new file mode 100644 index 00000000..ace44594 --- /dev/null +++ b/src/Model/ObservabilityEntrypoint200ResponseDataRetention.php @@ -0,0 +1,84 @@ + $this->unit, + 'unitInSeconds' => $this->unitInSeconds, + 'resources' => $this->resources, + 'serverMonitoring' => $this->serverMonitoring, + 'logs' => $this->logs, + 'httpTraffic' => $this->httpTraffic, + 'continuousProfiling' => $this->continuousProfiling, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getUnit(): string + { + return $this->unit; + } + + public function getUnitInSeconds(): int + { + return $this->unitInSeconds; + } + + public function getResources(): ObservabilityEntrypoint200ResponseDataRetentionResources + { + return $this->resources; + } + + public function getServerMonitoring(): ObservabilityEntrypoint200ResponseDataRetentionServerMonitoring + { + return $this->serverMonitoring; + } + + public function getLogs(): ObservabilityEntrypoint200ResponseDataRetentionLogs + { + return $this->logs; + } + + public function getHttpTraffic(): ObservabilityEntrypoint200ResponseDataRetentionHttpTraffic + { + return $this->httpTraffic; + } + + public function getContinuousProfiling(): ObservabilityEntrypoint200ResponseDataRetentionContinuousProfiling + { + return $this->continuousProfiling; + } +} diff --git a/src/Model/ObservabilityEntrypoint200ResponseDataRetentionContinuousProfiling.php b/src/Model/ObservabilityEntrypoint200ResponseDataRetentionContinuousProfiling.php new file mode 100644 index 00000000..f7867bd4 --- /dev/null +++ b/src/Model/ObservabilityEntrypoint200ResponseDataRetentionContinuousProfiling.php @@ -0,0 +1,56 @@ + $this->retentionPeriod, + 'maxRange' => $this->maxRange, + 'recommendedDefaultRange' => $this->recommendedDefaultRange, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getRetentionPeriod(): int + { + return $this->retentionPeriod; + } + + public function getMaxRange(): int + { + return $this->maxRange; + } + + public function getRecommendedDefaultRange(): int + { + return $this->recommendedDefaultRange; + } +} diff --git a/src/Model/ObservabilityEntrypoint200ResponseDataRetentionHttpTraffic.php b/src/Model/ObservabilityEntrypoint200ResponseDataRetentionHttpTraffic.php new file mode 100644 index 00000000..a59a789e --- /dev/null +++ b/src/Model/ObservabilityEntrypoint200ResponseDataRetentionHttpTraffic.php @@ -0,0 +1,56 @@ + $this->retentionPeriod, + 'maxRange' => $this->maxRange, + 'recommendedDefaultRange' => $this->recommendedDefaultRange, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getRetentionPeriod(): int + { + return $this->retentionPeriod; + } + + public function getMaxRange(): int + { + return $this->maxRange; + } + + public function getRecommendedDefaultRange(): int + { + return $this->recommendedDefaultRange; + } +} diff --git a/src/Model/ObservabilityEntrypoint200ResponseDataRetentionLogs.php b/src/Model/ObservabilityEntrypoint200ResponseDataRetentionLogs.php new file mode 100644 index 00000000..2e2cc9c0 --- /dev/null +++ b/src/Model/ObservabilityEntrypoint200ResponseDataRetentionLogs.php @@ -0,0 +1,56 @@ + $this->retentionPeriod, + 'maxRange' => $this->maxRange, + 'recommendedDefaultRange' => $this->recommendedDefaultRange, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getRetentionPeriod(): int + { + return $this->retentionPeriod; + } + + public function getMaxRange(): int + { + return $this->maxRange; + } + + public function getRecommendedDefaultRange(): int + { + return $this->recommendedDefaultRange; + } +} diff --git a/src/Model/ObservabilityEntrypoint200ResponseDataRetentionResources.php b/src/Model/ObservabilityEntrypoint200ResponseDataRetentionResources.php new file mode 100644 index 00000000..2ff486d0 --- /dev/null +++ b/src/Model/ObservabilityEntrypoint200ResponseDataRetentionResources.php @@ -0,0 +1,56 @@ + $this->retentionPeriod, + 'maxRange' => $this->maxRange, + 'recommendedDefaultRange' => $this->recommendedDefaultRange, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getRetentionPeriod(): int + { + return $this->retentionPeriod; + } + + public function getMaxRange(): int + { + return $this->maxRange; + } + + public function getRecommendedDefaultRange(): int + { + return $this->recommendedDefaultRange; + } +} diff --git a/src/Model/ObservabilityEntrypoint200ResponseDataRetentionServerMonitoring.php b/src/Model/ObservabilityEntrypoint200ResponseDataRetentionServerMonitoring.php new file mode 100644 index 00000000..032e8c65 --- /dev/null +++ b/src/Model/ObservabilityEntrypoint200ResponseDataRetentionServerMonitoring.php @@ -0,0 +1,56 @@ + $this->retentionPeriod, + 'maxRange' => $this->maxRange, + 'recommendedDefaultRange' => $this->recommendedDefaultRange, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getRetentionPeriod(): int + { + return $this->retentionPeriod; + } + + public function getMaxRange(): int + { + return $this->maxRange; + } + + public function getRecommendedDefaultRange(): int + { + return $this->recommendedDefaultRange; + } +} diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinks.php b/src/Model/ObservabilityEntrypoint200ResponseLinks.php new file mode 100644 index 00000000..7605b8af --- /dev/null +++ b/src/Model/ObservabilityEntrypoint200ResponseLinks.php @@ -0,0 +1,164 @@ + $this->self, + 'resourcesByService' => $this->resourcesByService, + 'resourcesOverview' => $this->resourcesOverview, + 'resourcesSummary' => $this->resourcesSummary, + 'blackfirePhpServerCaches' => $this->blackfirePhpServerCaches, + 'blackfireServerGlobal' => $this->blackfireServerGlobal, + 'blackfireServerTransactionsBreakdown' => $this->blackfireServerTransactionsBreakdown, + 'logsQuery' => $this->logsQuery, + 'logsOverview' => $this->logsOverview, + 'httpMetricsOverview' => $this->httpMetricsOverview, + 'httpMetricsTimelineUrls' => $this->httpMetricsTimelineUrls, + 'httpMetricsTimelineIps' => $this->httpMetricsTimelineIps, + 'httpMetricsTimelineUserAgents' => $this->httpMetricsTimelineUserAgents, + 'consoleSandboxAccess' => $this->consoleSandboxAccess, + 'conprofApplications' => $this->conprofApplications, + 'conprofApplicationFilters' => $this->conprofApplicationFilters, + 'conprofTimeline' => $this->conprofTimeline, + 'conprofFlamegraph' => $this->conprofFlamegraph, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getSelf(): ObservabilityEntrypoint200ResponseLinksSelf + { + return $this->self; + } + + /** + * @return ObservabilityEntrypoint200ResponseLinksResourcesByServiceValue[] + */ + public function getResourcesByService(): array + { + return $this->resourcesByService; + } + + public function getResourcesOverview(): ObservabilityEntrypoint200ResponseLinksResourcesOverview + { + return $this->resourcesOverview; + } + + public function getResourcesSummary(): ObservabilityEntrypoint200ResponseLinksResourcesSummary + { + return $this->resourcesSummary; + } + + public function getBlackfirePhpServerCaches(): ObservabilityEntrypoint200ResponseLinksBlackfirePhpServerCaches + { + return $this->blackfirePhpServerCaches; + } + + public function getBlackfireServerGlobal(): ObservabilityEntrypoint200ResponseLinksBlackfireServerGlobal + { + return $this->blackfireServerGlobal; + } + + public function getBlackfireServerTransactionsBreakdown(): ObservabilityEntrypoint200ResponseLinksBlackfireServerTransactionsBreakdown + { + return $this->blackfireServerTransactionsBreakdown; + } + + public function getLogsQuery(): ObservabilityEntrypoint200ResponseLinksLogsQuery + { + return $this->logsQuery; + } + + public function getLogsOverview(): ObservabilityEntrypoint200ResponseLinksLogsOverview + { + return $this->logsOverview; + } + + public function getHttpMetricsOverview(): ObservabilityEntrypoint200ResponseLinksHttpMetricsOverview + { + return $this->httpMetricsOverview; + } + + public function getHttpMetricsTimelineUrls(): ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineUrls + { + return $this->httpMetricsTimelineUrls; + } + + public function getHttpMetricsTimelineIps(): ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineIps + { + return $this->httpMetricsTimelineIps; + } + + public function getHttpMetricsTimelineUserAgents(): ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineUserAgents + { + return $this->httpMetricsTimelineUserAgents; + } + + public function getConsoleSandboxAccess(): ObservabilityEntrypoint200ResponseLinksConsoleSandboxAccess + { + return $this->consoleSandboxAccess; + } + + public function getConprofApplications(): ObservabilityEntrypoint200ResponseLinksConprofApplications + { + return $this->conprofApplications; + } + + public function getConprofApplicationFilters(): ObservabilityEntrypoint200ResponseLinksConprofApplicationFilters + { + return $this->conprofApplicationFilters; + } + + public function getConprofTimeline(): ObservabilityEntrypoint200ResponseLinksConprofTimeline + { + return $this->conprofTimeline; + } + + public function getConprofFlamegraph(): ObservabilityEntrypoint200ResponseLinksConprofFlamegraph + { + return $this->conprofFlamegraph; + } +} diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksBlackfirePhpServerCaches.php b/src/Model/ObservabilityEntrypoint200ResponseLinksBlackfirePhpServerCaches.php new file mode 100644 index 00000000..3a93c1e9 --- /dev/null +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksBlackfirePhpServerCaches.php @@ -0,0 +1,42 @@ + $this->href, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getHref(): string + { + return $this->href; + } +} diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksBlackfireServerGlobal.php b/src/Model/ObservabilityEntrypoint200ResponseLinksBlackfireServerGlobal.php new file mode 100644 index 00000000..4ea1d129 --- /dev/null +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksBlackfireServerGlobal.php @@ -0,0 +1,42 @@ + $this->href, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getHref(): string + { + return $this->href; + } +} diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksBlackfireServerTransactionsBreakdown.php b/src/Model/ObservabilityEntrypoint200ResponseLinksBlackfireServerTransactionsBreakdown.php new file mode 100644 index 00000000..097aed4d --- /dev/null +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksBlackfireServerTransactionsBreakdown.php @@ -0,0 +1,42 @@ + $this->href, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getHref(): string + { + return $this->href; + } +} diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksConprofApplicationFilters.php b/src/Model/ObservabilityEntrypoint200ResponseLinksConprofApplicationFilters.php new file mode 100644 index 00000000..62065997 --- /dev/null +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksConprofApplicationFilters.php @@ -0,0 +1,42 @@ + $this->href, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getHref(): string + { + return $this->href; + } +} diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksConprofApplications.php b/src/Model/ObservabilityEntrypoint200ResponseLinksConprofApplications.php new file mode 100644 index 00000000..291a60a2 --- /dev/null +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksConprofApplications.php @@ -0,0 +1,42 @@ + $this->href, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getHref(): string + { + return $this->href; + } +} diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksConprofFlamegraph.php b/src/Model/ObservabilityEntrypoint200ResponseLinksConprofFlamegraph.php new file mode 100644 index 00000000..10e8f054 --- /dev/null +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksConprofFlamegraph.php @@ -0,0 +1,42 @@ + $this->href, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getHref(): string + { + return $this->href; + } +} diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksConprofTimeline.php b/src/Model/ObservabilityEntrypoint200ResponseLinksConprofTimeline.php new file mode 100644 index 00000000..a0c51fa9 --- /dev/null +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksConprofTimeline.php @@ -0,0 +1,42 @@ + $this->href, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getHref(): string + { + return $this->href; + } +} diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksConsoleSandboxAccess.php b/src/Model/ObservabilityEntrypoint200ResponseLinksConsoleSandboxAccess.php new file mode 100644 index 00000000..d571d07a --- /dev/null +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksConsoleSandboxAccess.php @@ -0,0 +1,42 @@ + $this->href, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getHref(): string + { + return $this->href; + } +} diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksHttpMetricsOverview.php b/src/Model/ObservabilityEntrypoint200ResponseLinksHttpMetricsOverview.php new file mode 100644 index 00000000..786e7af5 --- /dev/null +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksHttpMetricsOverview.php @@ -0,0 +1,42 @@ + $this->href, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getHref(): string + { + return $this->href; + } +} diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineIps.php b/src/Model/ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineIps.php new file mode 100644 index 00000000..6ddcabc0 --- /dev/null +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineIps.php @@ -0,0 +1,42 @@ + $this->href, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getHref(): string + { + return $this->href; + } +} diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineUrls.php b/src/Model/ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineUrls.php new file mode 100644 index 00000000..5a489e96 --- /dev/null +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineUrls.php @@ -0,0 +1,42 @@ + $this->href, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getHref(): string + { + return $this->href; + } +} diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineUserAgents.php b/src/Model/ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineUserAgents.php new file mode 100644 index 00000000..c7428f57 --- /dev/null +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineUserAgents.php @@ -0,0 +1,42 @@ + $this->href, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getHref(): string + { + return $this->href; + } +} diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksLogsOverview.php b/src/Model/ObservabilityEntrypoint200ResponseLinksLogsOverview.php new file mode 100644 index 00000000..aa4bf9c6 --- /dev/null +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksLogsOverview.php @@ -0,0 +1,42 @@ + $this->href, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getHref(): string + { + return $this->href; + } +} diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksLogsQuery.php b/src/Model/ObservabilityEntrypoint200ResponseLinksLogsQuery.php new file mode 100644 index 00000000..2e31a60d --- /dev/null +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksLogsQuery.php @@ -0,0 +1,42 @@ + $this->href, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getHref(): string + { + return $this->href; + } +} diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksResourcesByServiceValue.php b/src/Model/ObservabilityEntrypoint200ResponseLinksResourcesByServiceValue.php new file mode 100644 index 00000000..8afb043b --- /dev/null +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksResourcesByServiceValue.php @@ -0,0 +1,49 @@ + $this->name, + 'href' => $this->href, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getName(): string + { + return $this->name; + } + + public function getHref(): string + { + return $this->href; + } +} diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksResourcesOverview.php b/src/Model/ObservabilityEntrypoint200ResponseLinksResourcesOverview.php new file mode 100644 index 00000000..a925f5db --- /dev/null +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksResourcesOverview.php @@ -0,0 +1,42 @@ + $this->href, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getHref(): string + { + return $this->href; + } +} diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksResourcesSummary.php b/src/Model/ObservabilityEntrypoint200ResponseLinksResourcesSummary.php new file mode 100644 index 00000000..34d8ce3e --- /dev/null +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksResourcesSummary.php @@ -0,0 +1,42 @@ + $this->href, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getHref(): string + { + return $this->href; + } +} diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksSelf.php b/src/Model/ObservabilityEntrypoint200ResponseLinksSelf.php new file mode 100644 index 00000000..a8f3ca1b --- /dev/null +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksSelf.php @@ -0,0 +1,42 @@ + $this->href, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getHref(): string + { + return $this->href; + } +} diff --git a/src/Model/ObservabilityEntrypoint200ResponseRetention.php b/src/Model/ObservabilityEntrypoint200ResponseRetention.php new file mode 100644 index 00000000..e8b93b5b --- /dev/null +++ b/src/Model/ObservabilityEntrypoint200ResponseRetention.php @@ -0,0 +1,63 @@ + $this->resources, + 'logs' => $this->logs, + 'httpTraffic' => $this->httpTraffic, + 'continuousProfiling' => $this->continuousProfiling, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getResources(): int + { + return $this->resources; + } + + public function getLogs(): int + { + return $this->logs; + } + + public function getHttpTraffic(): int + { + return $this->httpTraffic; + } + + public function getContinuousProfiling(): int + { + return $this->continuousProfiling; + } +} diff --git a/src/Model/OrganizationProject.php b/src/Model/OrganizationProject.php index 941334fb..8f4869dc 100644 --- a/src/Model/OrganizationProject.php +++ b/src/Model/OrganizationProject.php @@ -15,7 +15,9 @@ final class OrganizationProject implements Model, JsonSerializable { public function __construct( + private readonly ?string $dedicatedTag = null, private readonly ?array $activities = [], + private readonly ?array $fastlyServiceIds = [], private readonly ?ProjectOptionsAggregated $projectOptions = null, private readonly ?string $id = null, private readonly ?string $organizationId = null, @@ -57,9 +59,11 @@ public function jsonSerialize(): array 'status' => $this->status, 'trialPlan' => $this->trialPlan, 'projectUi' => $this->projectUi, + 'dedicatedTag' => $this->dedicatedTag, 'createdAt' => $this->createdAt?->format(DATE_ATOM), 'updatedAt' => $this->updatedAt?->format(DATE_ATOM), 'activities' => $this->activities, + 'fastlyServiceIds' => $this->fastlyServiceIds, 'projectOptions' => $this->projectOptions, 'links' => $this->links, ]; @@ -174,6 +178,14 @@ public function getProjectUi(): ?string return $this->projectUi; } + /** + * Dedicated tag. + */ + public function getDedicatedTag(): ?string + { + return $this->dedicatedTag; + } + /** * The date and time when the resource was created. */ @@ -199,6 +211,11 @@ public function getActivities(): ?array return $this->activities; } + public function getFastlyServiceIds(): ?array + { + return $this->fastlyServiceIds; + } + public function getProjectOptions(): ?ProjectOptionsAggregated { return $this->projectOptions; diff --git a/src/Model/OtlpLogIntegration.php b/src/Model/OtlpLogIntegration.php new file mode 100644 index 00000000..21dd8c03 --- /dev/null +++ b/src/Model/OtlpLogIntegration.php @@ -0,0 +1,127 @@ + $this->createdAt?->format(DATE_ATOM), + 'updatedAt' => $this->updatedAt?->format(DATE_ATOM), + 'type' => $this->type, + 'role' => $this->role, + 'extra' => $this->extra, + 'url' => $this->url, + 'headers' => $this->headers, + 'tlsVerify' => $this->tlsVerify, + 'excludedServices' => $this->excludedServices, + 'id' => $this->id, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + /** + * The creation date + */ + public function getCreatedAt(): ?DateTime + { + return $this->createdAt; + } + + /** + * The update date + */ + public function getUpdatedAt(): ?DateTime + { + return $this->updatedAt; + } + + /** + * The type of the integration + */ + public function getType(): string + { + return $this->type; + } + + /** + * The role of the integration + */ + public function getRole(): string + { + return $this->role; + } + + public function getExtra(): array + { + return $this->extra; + } + + /** + * The HTTP endpoint + */ + public function getUrl(): string + { + return $this->url; + } + + public function getHeaders(): array + { + return $this->headers; + } + + /** + * Enable/Disable HTTPS certificate verification + */ + public function getTlsVerify(): bool + { + return $this->tlsVerify; + } + + public function getExcludedServices(): array + { + return $this->excludedServices; + } + + /** + * The identifier of OtlpLogIntegration + */ + public function getId(): ?string + { + return $this->id; + } +} diff --git a/src/Model/OtlpLogIntegrationCreateInput.php b/src/Model/OtlpLogIntegrationCreateInput.php new file mode 100644 index 00000000..cdd4c177 --- /dev/null +++ b/src/Model/OtlpLogIntegrationCreateInput.php @@ -0,0 +1,86 @@ + $this->type, + 'url' => $this->url, + 'extra' => $this->extra, + 'headers' => $this->headers, + 'tlsVerify' => $this->tlsVerify, + 'excludedServices' => $this->excludedServices, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + /** + * The type of the integration + */ + public function getType(): string + { + return $this->type; + } + + /** + * The HTTP endpoint + */ + public function getUrl(): string + { + return $this->url; + } + + public function getExtra(): ?array + { + return $this->extra; + } + + public function getHeaders(): ?array + { + return $this->headers; + } + + /** + * Enable/Disable HTTPS certificate verification + */ + public function getTlsVerify(): ?bool + { + return $this->tlsVerify; + } + + public function getExcludedServices(): ?array + { + return $this->excludedServices; + } +} diff --git a/src/Model/OtlpLogIntegrationPatch.php b/src/Model/OtlpLogIntegrationPatch.php new file mode 100644 index 00000000..421036df --- /dev/null +++ b/src/Model/OtlpLogIntegrationPatch.php @@ -0,0 +1,86 @@ + $this->type, + 'url' => $this->url, + 'extra' => $this->extra, + 'headers' => $this->headers, + 'tlsVerify' => $this->tlsVerify, + 'excludedServices' => $this->excludedServices, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + /** + * The type of the integration + */ + public function getType(): string + { + return $this->type; + } + + /** + * The HTTP endpoint + */ + public function getUrl(): string + { + return $this->url; + } + + public function getExtra(): ?array + { + return $this->extra; + } + + public function getHeaders(): ?array + { + return $this->headers; + } + + /** + * Enable/Disable HTTPS certificate verification + */ + public function getTlsVerify(): ?bool + { + return $this->tlsVerify; + } + + public function getExcludedServices(): ?array + { + return $this->excludedServices; + } +} diff --git a/src/Model/PagerDutyIntegration.php b/src/Model/PagerDutyIntegration.php index e15a0385..f7830d34 100644 --- a/src/Model/PagerDutyIntegration.php +++ b/src/Model/PagerDutyIntegration.php @@ -16,6 +16,7 @@ final class PagerDutyIntegration implements Model, JsonSerializable, Integration { public function __construct( private readonly string $type, + private readonly string $role, private readonly string $routingKey, private readonly ?DateTime $createdAt, private readonly ?DateTime $updatedAt, @@ -34,6 +35,7 @@ public function jsonSerialize(): array 'createdAt' => $this->createdAt?->format(DATE_ATOM), 'updatedAt' => $this->updatedAt?->format(DATE_ATOM), 'type' => $this->type, + 'role' => $this->role, 'routingKey' => $this->routingKey, 'id' => $this->id, ]; @@ -60,11 +62,22 @@ public function getUpdatedAt(): ?DateTime return $this->updatedAt; } + /** + * The type of the integration + */ public function getType(): string { return $this->type; } + /** + * The role of the integration + */ + public function getRole(): string + { + return $this->role; + } + /** * The PagerDuty routing key */ diff --git a/src/Model/PagerDutyIntegrationCreateInput.php b/src/Model/PagerDutyIntegrationCreateInput.php index 2bf5d09a..802c12b7 100644 --- a/src/Model/PagerDutyIntegrationCreateInput.php +++ b/src/Model/PagerDutyIntegrationCreateInput.php @@ -37,6 +37,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } + /** + * The type of the integration + */ public function getType(): string { return $this->type; diff --git a/src/Model/PagerDutyIntegrationPatch.php b/src/Model/PagerDutyIntegrationPatch.php index 95a4bf82..2fc8334d 100644 --- a/src/Model/PagerDutyIntegrationPatch.php +++ b/src/Model/PagerDutyIntegrationPatch.php @@ -37,6 +37,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } + /** + * The type of the integration + */ public function getType(): string { return $this->type; diff --git a/src/Model/ProdDomainStorage.php b/src/Model/ProdDomainStorage.php index c56ac918..46526175 100644 --- a/src/Model/ProdDomainStorage.php +++ b/src/Model/ProdDomainStorage.php @@ -68,11 +68,17 @@ public function getUpdatedAt(): ?DateTime return $this->updatedAt; } + /** + * The type of domain + */ public function getType(): string { return $this->type; } + /** + * The domain name + */ public function getName(): string { return $this->name; @@ -91,11 +97,17 @@ public function getId(): ?string return $this->id; } + /** + * The name of the project + */ public function getProject(): ?string { return $this->project; } + /** + * The claimed domain name + */ public function getRegisteredName(): ?string { return $this->registeredName; diff --git a/src/Model/ProdDomainStorageCreateInput.php b/src/Model/ProdDomainStorageCreateInput.php index 46bc69ab..c3ec86f6 100644 --- a/src/Model/ProdDomainStorageCreateInput.php +++ b/src/Model/ProdDomainStorageCreateInput.php @@ -39,6 +39,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } + /** + * The domain name + */ public function getName(): string { return $this->name; diff --git a/src/Model/ProductionResources.php b/src/Model/ProductionResources.php index bb35d031..e2a1fc00 100644 --- a/src/Model/ProductionResources.php +++ b/src/Model/ProductionResources.php @@ -43,7 +43,7 @@ public function __toString(): string } /** - * Enable legacy development sizing for this environment type. + * Enable legacy development sizing for this environment type */ public function getLegacyDevelopment(): bool { @@ -51,7 +51,7 @@ public function getLegacyDevelopment(): bool } /** - * Maximum number of allocated CPU units. + * Maximum number of allocated CPU units */ public function getMaxCpu(): ?float { @@ -59,7 +59,7 @@ public function getMaxCpu(): ?float } /** - * Maximum amount of allocated RAM. + * Maximum amount of allocated RAM */ public function getMaxMemory(): ?int { diff --git a/src/Model/Profile.php b/src/Model/Profile.php index cd6dd444..50091ed8 100644 --- a/src/Model/Profile.php +++ b/src/Model/Profile.php @@ -44,6 +44,7 @@ public function __construct( private readonly ?string $billingContact = null, private readonly ?bool $invoiced = null, private readonly ?string $customerType = null, + private readonly ?string $legalEntityName = null, ) { } @@ -77,6 +78,7 @@ public function jsonSerialize(): array 'billingContact' => $this->billingContact, 'invoiced' => $this->invoiced, 'customerType' => $this->customerType, + 'legalEntityName' => $this->legalEntityName, ]; } @@ -260,4 +262,12 @@ public function getCustomerType(): ?string { return $this->customerType; } + + /** + * The legal entity name of the customer. + */ + public function getLegalEntityName(): ?string + { + return $this->legalEntityName; + } } diff --git a/src/Model/Project.php b/src/Model/Project.php index 417180b2..08a7a3ed 100644 --- a/src/Model/Project.php +++ b/src/Model/Project.php @@ -31,6 +31,7 @@ public function __construct( private readonly ?string $organization, private readonly ?string $defaultBranch, private readonly ?string $defaultDomain, + private readonly ?Maintenance $maintenance, ) { } @@ -58,6 +59,7 @@ public function jsonSerialize(): array 'repository' => $this->repository, 'defaultDomain' => $this->defaultDomain, 'subscription' => $this->subscription, + 'maintenance' => $this->maintenance, ]; } @@ -190,4 +192,12 @@ public function getSubscription(): SubscriptionInformation { return $this->subscription; } + + /** + * The maintenance information of the project + */ + public function getMaintenance(): ?Maintenance + { + return $this->maintenance; + } } diff --git a/src/Model/ProjectCapabilities.php b/src/Model/ProjectCapabilities.php index a810eea6..eb17644d 100644 --- a/src/Model/ProjectCapabilities.php +++ b/src/Model/ProjectCapabilities.php @@ -14,6 +14,7 @@ final class ProjectCapabilities implements Model, JsonSerializable { public function __construct( + private readonly Tasks $tasks, private readonly Metrics $metrics, private readonly LogsForwarding $logsForwarding, private readonly GuaranteedResources $guaranteedResources, @@ -38,6 +39,7 @@ public function getModelName(): string public function jsonSerialize(): array { return [ + 'tasks' => $this->tasks, 'metrics' => $this->metrics, 'logsForwarding' => $this->logsForwarding, 'guaranteedResources' => $this->guaranteedResources, @@ -59,6 +61,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } + public function getTasks(): Tasks + { + return $this->tasks; + } + public function getMetrics(): Metrics { return $this->metrics; diff --git a/src/Model/ProjectSettings.php b/src/Model/ProjectSettings.php index 1cb0ea24..7dd94932 100644 --- a/src/Model/ProjectSettings.php +++ b/src/Model/ProjectSettings.php @@ -83,6 +83,7 @@ public function __construct( private readonly bool $enableDiskHealthMonitoring, private readonly bool $enablePausedEnvironments, private readonly bool $enableUnifiedConfiguration, + private readonly bool $enableExplicitEmptyRoutes, private readonly bool $enableRoutesTracing, private readonly bool $imageDeploymentValidation, private readonly bool $supportGenericImages, @@ -95,14 +96,18 @@ public function __construct( private readonly int $activityLogsMaxSize, private readonly bool $allowManualDeployments, private readonly bool $allowRollingDeployments, + private readonly bool $allowActivityReschedule, private readonly bool $allowBurst, private readonly RouterResources $routerResources, + private readonly bool $allowScalingToZero, + private readonly bool $saveApplicationsVendors, private readonly ?string $developmentDomainTemplate, private readonly ?int $temporaryDiskSize, private readonly ?int $localDiskSize, private readonly ?string $customErrorTemplate, private readonly ?string $appErrorPageTemplate, private readonly ?array $dataRetention, + private readonly ?MaintenanceWindowConfiguration $maintenanceWindow, ) { } @@ -170,6 +175,7 @@ public function jsonSerialize(): array 'enableDiskHealthMonitoring' => $this->enableDiskHealthMonitoring, 'enablePausedEnvironments' => $this->enablePausedEnvironments, 'enableUnifiedConfiguration' => $this->enableUnifiedConfiguration, + 'enableExplicitEmptyRoutes' => $this->enableExplicitEmptyRoutes, 'enableRoutesTracing' => $this->enableRoutesTracing, 'imageDeploymentValidation' => $this->imageDeploymentValidation, 'supportGenericImages' => $this->supportGenericImages, @@ -182,8 +188,12 @@ public function jsonSerialize(): array 'activityLogsMaxSize' => $this->activityLogsMaxSize, 'allowManualDeployments' => $this->allowManualDeployments, 'allowRollingDeployments' => $this->allowRollingDeployments, + 'maintenanceWindow' => $this->maintenanceWindow, + 'allowActivityReschedule' => $this->allowActivityReschedule, 'allowBurst' => $this->allowBurst, 'routerResources' => $this->routerResources, + 'allowScalingToZero' => $this->allowScalingToZero, + 'saveApplicationsVendors' => $this->saveApplicationsVendors, ]; } @@ -605,6 +615,15 @@ public function getEnableUnifiedConfiguration(): bool return $this->enableUnifiedConfiguration; } + /** + * When enabled, explicitly empty routes configuration (routes: or routes: {}) will result in no routes being + * generated instead of fallback routes. + */ + public function getEnableExplicitEmptyRoutes(): bool + { + return $this->enableExplicitEmptyRoutes; + } + /** * Enable tracing support in routes */ @@ -677,7 +696,7 @@ public function getActivityLogsMaxSize(): int } /** - * If deployments can be manual, i.e. explicitly triggered by user. + * If deployments can be manual, i.e. explicitly triggered by user */ public function getAllowManualDeployments(): bool { @@ -685,13 +704,29 @@ public function getAllowManualDeployments(): bool } /** - * If the project can use rolling deployments. + * If the project can use rolling deployments */ public function getAllowRollingDeployments(): bool { return $this->allowRollingDeployments; } + /** + * Configuration for the maintenance window schedule + */ + public function getMaintenanceWindow(): ?MaintenanceWindowConfiguration + { + return $this->maintenanceWindow; + } + + /** + * Allow certain types of activities to be rescheduled + */ + public function getAllowActivityReschedule(): bool + { + return $this->allowActivityReschedule; + } + public function getAllowBurst(): bool { return $this->allowBurst; @@ -704,4 +739,17 @@ public function getRouterResources(): RouterResources { return $this->routerResources; } + + public function getAllowScalingToZero(): bool + { + return $this->allowScalingToZero; + } + + /** + * Save vendors.json files locally after builds for SBOM generation. + */ + public function getSaveApplicationsVendors(): bool + { + return $this->saveApplicationsVendors; + } } diff --git a/src/Model/ProjectSettingsPatch.php b/src/Model/ProjectSettingsPatch.php index d8f41d0a..c4336f81 100644 --- a/src/Model/ProjectSettingsPatch.php +++ b/src/Model/ProjectSettingsPatch.php @@ -15,6 +15,7 @@ final class ProjectSettingsPatch implements Model, JsonSerializable { public function __construct( private readonly ?array $dataRetention = [], + private readonly ?MaintenanceWindowConfiguration $maintenanceWindow = null, private readonly ?object $initialize = null, private readonly ?BuildResources2 $buildResources = null, ) { @@ -31,6 +32,7 @@ public function jsonSerialize(): array 'initialize' => $this->initialize, 'dataRetention' => $this->dataRetention, 'buildResources' => $this->buildResources, + 'maintenanceWindow' => $this->maintenanceWindow, ]; } @@ -57,4 +59,12 @@ public function getBuildResources(): ?BuildResources2 { return $this->buildResources; } + + /** + * Configuration for the maintenance window schedule + */ + public function getMaintenanceWindow(): ?MaintenanceWindowConfiguration + { + return $this->maintenanceWindow; + } } diff --git a/src/Model/ProxyRoute.php b/src/Model/ProxyRoute.php index cc912b01..5f3717b8 100644 --- a/src/Model/ProxyRoute.php +++ b/src/Model/ProxyRoute.php @@ -67,7 +67,7 @@ public function getAttributes(): array } /** - * Route type. + * Route type */ public function getType(): string { @@ -75,13 +75,16 @@ public function getType(): string } /** - * TLS settings for the route. + * TLS settings for the route */ public function getTls(): TLSSettings { return $this->tls; } + /** + * The destination of the proxy + */ public function getTo(): string { return $this->to; @@ -112,7 +115,7 @@ public function getProductionUrl(): ?string } /** - * The configuration of the redirects. + * The configuration of the redirects */ public function getRedirects(): ?RedirectConfiguration { @@ -120,7 +123,7 @@ public function getRedirects(): ?RedirectConfiguration } /** - * Cache configuration. + * Cache configuration */ public function getCache(): ?CacheConfiguration { @@ -128,7 +131,7 @@ public function getCache(): ?CacheConfiguration } /** - * Server-Side Include configuration. + * Server-Side Include configuration */ public function getSsi(): ?SSIConfiguration { @@ -136,7 +139,7 @@ public function getSsi(): ?SSIConfiguration } /** - * The upstream to use for this route. + * The upstream to use for this route */ public function getUpstream(): ?string { @@ -144,7 +147,7 @@ public function getUpstream(): ?string } /** - * Sticky routing configuration. + * Sticky routing configuration */ public function getSticky(): ?StickyConfiguration { diff --git a/src/Model/Recurrence.php b/src/Model/Recurrence.php new file mode 100644 index 00000000..2b28059e --- /dev/null +++ b/src/Model/Recurrence.php @@ -0,0 +1,66 @@ + $this->interval, + 'dayOfWeek' => $this->dayOfWeek, + 'time' => $this->time, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + /** + * Interval in weeks, either 2w or 4w + */ + public function getInterval(): string + { + return $this->interval; + } + + /** + * Day of week, where Monday is 0 + */ + public function getDayOfWeek(): int + { + return $this->dayOfWeek; + } + + /** + * Exact time in HH:MM format + */ + public function getTime(): string + { + return $this->time; + } +} diff --git a/src/Model/RedirectConfiguration.php b/src/Model/RedirectConfiguration.php index 76f13898..46fe591a 100644 --- a/src/Model/RedirectConfiguration.php +++ b/src/Model/RedirectConfiguration.php @@ -6,7 +6,7 @@ /** * Low level RedirectConfiguration (auto-generated) - * The configuration of the redirects. + * The configuration of the redirects * * @license Apache-2.0 * @see https://docs.upsun.com @@ -39,7 +39,7 @@ public function __toString(): string } /** - * The amount of time, in seconds, to cache the redirects. + * The amount of time, in seconds, to cache the redirects */ public function getExpires(): string { diff --git a/src/Model/RedirectRoute.php b/src/Model/RedirectRoute.php index 49fe1038..6bd51f87 100644 --- a/src/Model/RedirectRoute.php +++ b/src/Model/RedirectRoute.php @@ -67,7 +67,7 @@ public function getAttributes(): array } /** - * Route type. + * Route type */ public function getType(): string { @@ -75,13 +75,16 @@ public function getType(): string } /** - * TLS settings for the route. + * TLS settings for the route */ public function getTls(): TLSSettings { return $this->tls; } + /** + * The destination of the proxy + */ public function getTo(): string { return $this->to; @@ -112,7 +115,7 @@ public function getProductionUrl(): ?string } /** - * The configuration of the redirects. + * The configuration of the redirects */ public function getRedirects(): ?RedirectConfiguration { @@ -120,7 +123,7 @@ public function getRedirects(): ?RedirectConfiguration } /** - * Cache configuration. + * Cache configuration */ public function getCache(): ?CacheConfiguration { @@ -128,7 +131,7 @@ public function getCache(): ?CacheConfiguration } /** - * Server-Side Include configuration. + * Server-Side Include configuration */ public function getSsi(): ?SSIConfiguration { @@ -136,7 +139,7 @@ public function getSsi(): ?SSIConfiguration } /** - * The upstream to use for this route. + * The upstream to use for this route */ public function getUpstream(): ?string { @@ -144,7 +147,7 @@ public function getUpstream(): ?string } /** - * Sticky routing configuration. + * Sticky routing configuration */ public function getSticky(): ?StickyConfiguration { diff --git a/src/Model/RegionReference.php b/src/Model/RegionReference.php index d6f73638..475645ca 100644 --- a/src/Model/RegionReference.php +++ b/src/Model/RegionReference.php @@ -25,7 +25,7 @@ public function __construct( private readonly bool $available, private readonly string $endpoint, private readonly RegionProvider $provider, - private readonly RegionDataCenter $datacenter, + private readonly RegionDatacenter $datacenter, private readonly RegionCompliance $compliance, private readonly DateTime $createdAt, private readonly DateTime $updatedAt, @@ -143,7 +143,7 @@ public function getProvider(): RegionProvider /** * Information about the region provider data center. */ - public function getDatacenter(): RegionDataCenter + public function getDatacenter(): RegionDatacenter { return $this->datacenter; } diff --git a/src/Model/ReplacementDomainStorage.php b/src/Model/ReplacementDomainStorage.php index 23a5c1d7..4ed04686 100644 --- a/src/Model/ReplacementDomainStorage.php +++ b/src/Model/ReplacementDomainStorage.php @@ -76,6 +76,9 @@ public function getType(): string return $this->type; } + /** + * The domain name + */ public function getName(): string { return $this->name; @@ -94,18 +97,24 @@ public function getId(): ?string return $this->id; } + /** + * The name of the project + */ public function getProject(): ?string { return $this->project; } + /** + * The claimed domain name + */ public function getRegisteredName(): ?string { return $this->registeredName; } /** - * Prod domain which will be replaced by this domain. + * Prod domain which will be replaced by this domain */ public function getReplacementFor(): ?string { diff --git a/src/Model/ReplacementDomainStorageCreateInput.php b/src/Model/ReplacementDomainStorageCreateInput.php index 6a9dd876..4dc6fe72 100644 --- a/src/Model/ReplacementDomainStorageCreateInput.php +++ b/src/Model/ReplacementDomainStorageCreateInput.php @@ -39,6 +39,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } + /** + * The domain name + */ public function getName(): string { return $this->name; @@ -50,7 +53,7 @@ public function getAttributes(): ?array } /** - * Prod domain which will be replaced by this domain. + * Prod domain which will be replaced by this domain */ public function getReplacementFor(): ?string { diff --git a/src/Model/ReplacementDomainStoragePatch.php b/src/Model/ReplacementDomainStoragePatch.php index 0ca7de5b..094a5a6b 100644 --- a/src/Model/ReplacementDomainStoragePatch.php +++ b/src/Model/ReplacementDomainStoragePatch.php @@ -36,7 +36,7 @@ public function __toString(): string } /** - * TLS settings for the route. + * TLS settings for the route */ public function getAttributes(): ?TLSSettings { diff --git a/src/Model/RepositoryInformation.php b/src/Model/RepositoryInformation.php index 78d5b621..99d95591 100644 --- a/src/Model/RepositoryInformation.php +++ b/src/Model/RepositoryInformation.php @@ -38,13 +38,16 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } + /** + * The Git URL + */ public function getUrl(): string { return $this->url; } /** - * SSH Key used to access external private repositories. + * SSH Key used to access external private repositories */ public function getClientSshKey(): ?string { diff --git a/src/Model/Resources2.php b/src/Model/Resources2.php index 9611c463..67b60bf1 100644 --- a/src/Model/Resources2.php +++ b/src/Model/Resources2.php @@ -18,7 +18,7 @@ final class Resources2 implements Model, JsonSerializable public const INIT_PARENT = 'parent'; public function __construct( - private readonly ?string $init, + private readonly ?string $init = null, ) { } diff --git a/src/Model/Resources3.php b/src/Model/Resources3.php index 363d10a0..b5db0568 100644 --- a/src/Model/Resources3.php +++ b/src/Model/Resources3.php @@ -18,7 +18,7 @@ final class Resources3 implements Model, JsonSerializable public const INIT_PARENT = 'parent'; public function __construct( - private readonly ?string $init, + private readonly ?string $init = null, ) { } diff --git a/src/Model/Resources4.php b/src/Model/Resources4.php index 9e3c90ab..fb1b3489 100644 --- a/src/Model/Resources4.php +++ b/src/Model/Resources4.php @@ -17,7 +17,7 @@ final class Resources4 implements Model, JsonSerializable public const INIT_MINIMUM = 'minimum'; public function __construct( - private readonly ?string $init, + private readonly ?string $init = null, ) { } diff --git a/src/Model/Resources5.php b/src/Model/Resources5.php index a42848d4..9d1bd12f 100644 --- a/src/Model/Resources5.php +++ b/src/Model/Resources5.php @@ -19,7 +19,7 @@ final class Resources5 implements Model, JsonSerializable public const INIT_MINIMUM = 'minimum'; public function __construct( - private readonly ?string $init, + private readonly ?string $init = null, ) { } diff --git a/src/Model/Resources6.php b/src/Model/Resources6.php index e9efd8cc..a4309596 100644 --- a/src/Model/Resources6.php +++ b/src/Model/Resources6.php @@ -19,7 +19,7 @@ final class Resources6 implements Model, JsonSerializable public const INIT_PARENT = 'parent'; public function __construct( - private readonly ?string $init, + private readonly ?string $init = null, ) { } diff --git a/src/Model/ResourcesByService200Response.php b/src/Model/ResourcesByService200Response.php new file mode 100644 index 00000000..c330cc22 --- /dev/null +++ b/src/Model/ResourcesByService200Response.php @@ -0,0 +1,105 @@ + $this->grain, + 'from' => $this->from, + 'to' => $this->to, + 'projectId' => $this->projectId, + 'environmentId' => $this->environmentId, + 'branchMachineName' => $this->branchMachineName, + 'service' => $this->service, + 'data' => $this->data, + 'dg2HostTypesMapping' => $this->dg2HostTypesMapping, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getGrain(): int + { + return $this->grain; + } + + public function getFrom(): int + { + return $this->from; + } + + public function getTo(): int + { + return $this->to; + } + + public function getProjectId(): string + { + return $this->projectId; + } + + public function getEnvironmentId(): string + { + return $this->environmentId; + } + + public function getBranchMachineName(): string + { + return $this->branchMachineName; + } + + public function getService(): string + { + return $this->service; + } + + /** + * @return ResourcesByService200ResponseDataInner[] + */ + public function getData(): array + { + return $this->data; + } + + public function getDg2HostTypesMapping(): ?array + { + return $this->dg2HostTypesMapping; + } +} diff --git a/src/Model/ResourcesByService200ResponseDataInner.php b/src/Model/ResourcesByService200ResponseDataInner.php new file mode 100644 index 00000000..41f861b1 --- /dev/null +++ b/src/Model/ResourcesByService200ResponseDataInner.php @@ -0,0 +1,52 @@ + $this->timestamp, + 'instances' => $this->instances, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getTimestamp(): int + { + return $this->timestamp; + } + + /** + * @return ResourcesByService200ResponseDataInnerInstancesValue[]|null + */ + public function getInstances(): ?array + { + return $this->instances; + } +} diff --git a/src/Model/ResourcesByService200ResponseDataInnerInstancesValue.php b/src/Model/ResourcesByService200ResponseDataInnerInstancesValue.php new file mode 100644 index 00000000..fb4ed45d --- /dev/null +++ b/src/Model/ResourcesByService200ResponseDataInnerInstancesValue.php @@ -0,0 +1,115 @@ + $this->cpuUsed, + 'cpuLimit' => $this->cpuLimit, + 'memoryUsed' => $this->memoryUsed, + 'memoryLimit' => $this->memoryLimit, + 'swapUsed' => $this->swapUsed, + 'swapLimit' => $this->swapLimit, + 'memoryPressure' => $this->memoryPressure, + 'cpuPressure' => $this->cpuPressure, + 'ioPressure' => $this->ioPressure, + 'irqPressure' => $this->irqPressure, + 'mountpoints' => $this->mountpoints, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getCpuUsed(): ?ResourcesByService200ResponseDataInnerInstancesValueCpuUsed + { + return $this->cpuUsed; + } + + public function getCpuLimit(): ?ResourcesByService200ResponseDataInnerInstancesValueCpuLimit + { + return $this->cpuLimit; + } + + public function getMemoryUsed(): ?ResourcesByService200ResponseDataInnerInstancesValueMemoryUsed + { + return $this->memoryUsed; + } + + public function getMemoryLimit(): ?ResourcesByService200ResponseDataInnerInstancesValueMemoryLimit + { + return $this->memoryLimit; + } + + public function getSwapUsed(): ?ResourcesByService200ResponseDataInnerInstancesValueSwapUsed + { + return $this->swapUsed; + } + + public function getSwapLimit(): ?ResourcesOverview200ResponseDataInnerServicesValueSwapLimit + { + return $this->swapLimit; + } + + public function getMemoryPressure(): ?ResourcesByService200ResponseDataInnerInstancesValueMemoryPressure + { + return $this->memoryPressure; + } + + public function getCpuPressure(): ?ResourcesByService200ResponseDataInnerInstancesValueCpuPressure + { + return $this->cpuPressure; + } + + public function getIoPressure(): ?ResourcesByService200ResponseDataInnerInstancesValueIoPressure + { + return $this->ioPressure; + } + + public function getIrqPressure(): ?ResourcesByService200ResponseDataInnerInstancesValueIrqPressure + { + return $this->irqPressure; + } + + /** + * @return ResourcesByService200ResponseDataInnerInstancesValueMountpointsValue[]|null + */ + public function getMountpoints(): ?array + { + return $this->mountpoints; + } +} diff --git a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueCpuLimit.php b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueCpuLimit.php new file mode 100644 index 00000000..67ed75f3 --- /dev/null +++ b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueCpuLimit.php @@ -0,0 +1,42 @@ + $this->max, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getMax(): ?float + { + return $this->max; + } +} diff --git a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueCpuPressure.php b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueCpuPressure.php new file mode 100644 index 00000000..f03e5871 --- /dev/null +++ b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueCpuPressure.php @@ -0,0 +1,105 @@ + $this->min, + 'max' => $this->max, + 'avg' => $this->avg, + 'stddev' => $this->stddev, + 'p50' => $this->p50, + 'p95' => $this->p95, + 'p96' => $this->p96, + 'p97' => $this->p97, + 'p98' => $this->p98, + 'p99' => $this->p99, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getMin(): ?float + { + return $this->min; + } + + public function getMax(): ?float + { + return $this->max; + } + + public function getAvg(): ?float + { + return $this->avg; + } + + public function getStddev(): ?float + { + return $this->stddev; + } + + public function getP50(): ?float + { + return $this->p50; + } + + public function getP95(): ?float + { + return $this->p95; + } + + public function getP96(): ?float + { + return $this->p96; + } + + public function getP97(): ?float + { + return $this->p97; + } + + public function getP98(): ?float + { + return $this->p98; + } + + public function getP99(): ?float + { + return $this->p99; + } +} diff --git a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueCpuUsed.php b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueCpuUsed.php new file mode 100644 index 00000000..7ffa0481 --- /dev/null +++ b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueCpuUsed.php @@ -0,0 +1,105 @@ + $this->min, + 'max' => $this->max, + 'avg' => $this->avg, + 'stddev' => $this->stddev, + 'p50' => $this->p50, + 'p95' => $this->p95, + 'p96' => $this->p96, + 'p97' => $this->p97, + 'p98' => $this->p98, + 'p99' => $this->p99, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getMin(): ?float + { + return $this->min; + } + + public function getMax(): ?float + { + return $this->max; + } + + public function getAvg(): ?float + { + return $this->avg; + } + + public function getStddev(): ?float + { + return $this->stddev; + } + + public function getP50(): ?float + { + return $this->p50; + } + + public function getP95(): ?float + { + return $this->p95; + } + + public function getP96(): ?float + { + return $this->p96; + } + + public function getP97(): ?float + { + return $this->p97; + } + + public function getP98(): ?float + { + return $this->p98; + } + + public function getP99(): ?float + { + return $this->p99; + } +} diff --git a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueIoPressure.php b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueIoPressure.php new file mode 100644 index 00000000..ef1aff2c --- /dev/null +++ b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueIoPressure.php @@ -0,0 +1,105 @@ + $this->min, + 'max' => $this->max, + 'avg' => $this->avg, + 'stddev' => $this->stddev, + 'p50' => $this->p50, + 'p95' => $this->p95, + 'p96' => $this->p96, + 'p97' => $this->p97, + 'p98' => $this->p98, + 'p99' => $this->p99, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getMin(): ?float + { + return $this->min; + } + + public function getMax(): ?float + { + return $this->max; + } + + public function getAvg(): ?float + { + return $this->avg; + } + + public function getStddev(): ?float + { + return $this->stddev; + } + + public function getP50(): ?float + { + return $this->p50; + } + + public function getP95(): ?float + { + return $this->p95; + } + + public function getP96(): ?float + { + return $this->p96; + } + + public function getP97(): ?float + { + return $this->p97; + } + + public function getP98(): ?float + { + return $this->p98; + } + + public function getP99(): ?float + { + return $this->p99; + } +} diff --git a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueIrqPressure.php b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueIrqPressure.php new file mode 100644 index 00000000..ec2ebe2f --- /dev/null +++ b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueIrqPressure.php @@ -0,0 +1,105 @@ + $this->min, + 'max' => $this->max, + 'avg' => $this->avg, + 'stddev' => $this->stddev, + 'p50' => $this->p50, + 'p95' => $this->p95, + 'p96' => $this->p96, + 'p97' => $this->p97, + 'p98' => $this->p98, + 'p99' => $this->p99, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getMin(): ?float + { + return $this->min; + } + + public function getMax(): ?float + { + return $this->max; + } + + public function getAvg(): ?float + { + return $this->avg; + } + + public function getStddev(): ?float + { + return $this->stddev; + } + + public function getP50(): ?float + { + return $this->p50; + } + + public function getP95(): ?float + { + return $this->p95; + } + + public function getP96(): ?float + { + return $this->p96; + } + + public function getP97(): ?float + { + return $this->p97; + } + + public function getP98(): ?float + { + return $this->p98; + } + + public function getP99(): ?float + { + return $this->p99; + } +} diff --git a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMemoryLimit.php b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMemoryLimit.php new file mode 100644 index 00000000..49f6ce9a --- /dev/null +++ b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMemoryLimit.php @@ -0,0 +1,42 @@ + $this->max, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getMax(): ?int + { + return $this->max; + } +} diff --git a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMemoryPressure.php b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMemoryPressure.php new file mode 100644 index 00000000..6174281f --- /dev/null +++ b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMemoryPressure.php @@ -0,0 +1,105 @@ + $this->min, + 'max' => $this->max, + 'avg' => $this->avg, + 'stddev' => $this->stddev, + 'p50' => $this->p50, + 'p95' => $this->p95, + 'p96' => $this->p96, + 'p97' => $this->p97, + 'p98' => $this->p98, + 'p99' => $this->p99, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getMin(): ?float + { + return $this->min; + } + + public function getMax(): ?float + { + return $this->max; + } + + public function getAvg(): ?float + { + return $this->avg; + } + + public function getStddev(): ?float + { + return $this->stddev; + } + + public function getP50(): ?float + { + return $this->p50; + } + + public function getP95(): ?float + { + return $this->p95; + } + + public function getP96(): ?float + { + return $this->p96; + } + + public function getP97(): ?float + { + return $this->p97; + } + + public function getP98(): ?float + { + return $this->p98; + } + + public function getP99(): ?float + { + return $this->p99; + } +} diff --git a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMemoryUsed.php b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMemoryUsed.php new file mode 100644 index 00000000..0835616e --- /dev/null +++ b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMemoryUsed.php @@ -0,0 +1,105 @@ + $this->min, + 'max' => $this->max, + 'avg' => $this->avg, + 'stddev' => $this->stddev, + 'p50' => $this->p50, + 'p95' => $this->p95, + 'p96' => $this->p96, + 'p97' => $this->p97, + 'p98' => $this->p98, + 'p99' => $this->p99, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getMin(): ?int + { + return $this->min; + } + + public function getMax(): ?int + { + return $this->max; + } + + public function getAvg(): ?float + { + return $this->avg; + } + + public function getStddev(): ?float + { + return $this->stddev; + } + + public function getP50(): ?float + { + return $this->p50; + } + + public function getP95(): ?float + { + return $this->p95; + } + + public function getP96(): ?float + { + return $this->p96; + } + + public function getP97(): ?float + { + return $this->p97; + } + + public function getP98(): ?float + { + return $this->p98; + } + + public function getP99(): ?float + { + return $this->p99; + } +} diff --git a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValue.php b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValue.php new file mode 100644 index 00000000..dc1507a1 --- /dev/null +++ b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValue.php @@ -0,0 +1,63 @@ + $this->diskUsed, + 'diskLimit' => $this->diskLimit, + 'inodesUsed' => $this->inodesUsed, + 'inodesLimit' => $this->inodesLimit, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getDiskUsed(): ?ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueDiskUsed + { + return $this->diskUsed; + } + + public function getDiskLimit(): ?ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueDiskLimit + { + return $this->diskLimit; + } + + public function getInodesUsed(): ?ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueInodesUsed + { + return $this->inodesUsed; + } + + public function getInodesLimit(): ?ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueInodesLimit + { + return $this->inodesLimit; + } +} diff --git a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueDiskLimit.php b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueDiskLimit.php new file mode 100644 index 00000000..72e8bafe --- /dev/null +++ b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueDiskLimit.php @@ -0,0 +1,42 @@ + $this->max, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getMax(): ?int + { + return $this->max; + } +} diff --git a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueDiskUsed.php b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueDiskUsed.php new file mode 100644 index 00000000..b3185830 --- /dev/null +++ b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueDiskUsed.php @@ -0,0 +1,105 @@ + $this->min, + 'max' => $this->max, + 'avg' => $this->avg, + 'stddev' => $this->stddev, + 'p50' => $this->p50, + 'p95' => $this->p95, + 'p96' => $this->p96, + 'p97' => $this->p97, + 'p98' => $this->p98, + 'p99' => $this->p99, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getMin(): ?int + { + return $this->min; + } + + public function getMax(): ?int + { + return $this->max; + } + + public function getAvg(): ?float + { + return $this->avg; + } + + public function getStddev(): ?float + { + return $this->stddev; + } + + public function getP50(): ?float + { + return $this->p50; + } + + public function getP95(): ?float + { + return $this->p95; + } + + public function getP96(): ?float + { + return $this->p96; + } + + public function getP97(): ?float + { + return $this->p97; + } + + public function getP98(): ?float + { + return $this->p98; + } + + public function getP99(): ?float + { + return $this->p99; + } +} diff --git a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueInodesLimit.php b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueInodesLimit.php new file mode 100644 index 00000000..26f92050 --- /dev/null +++ b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueInodesLimit.php @@ -0,0 +1,42 @@ + $this->max, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getMax(): ?int + { + return $this->max; + } +} diff --git a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueInodesUsed.php b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueInodesUsed.php new file mode 100644 index 00000000..bf2e6e5a --- /dev/null +++ b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueInodesUsed.php @@ -0,0 +1,105 @@ + $this->min, + 'max' => $this->max, + 'avg' => $this->avg, + 'stddev' => $this->stddev, + 'p50' => $this->p50, + 'p95' => $this->p95, + 'p96' => $this->p96, + 'p97' => $this->p97, + 'p98' => $this->p98, + 'p99' => $this->p99, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getMin(): ?int + { + return $this->min; + } + + public function getMax(): ?int + { + return $this->max; + } + + public function getAvg(): ?float + { + return $this->avg; + } + + public function getStddev(): ?float + { + return $this->stddev; + } + + public function getP50(): ?float + { + return $this->p50; + } + + public function getP95(): ?float + { + return $this->p95; + } + + public function getP96(): ?float + { + return $this->p96; + } + + public function getP97(): ?float + { + return $this->p97; + } + + public function getP98(): ?float + { + return $this->p98; + } + + public function getP99(): ?float + { + return $this->p99; + } +} diff --git a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueSwapUsed.php b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueSwapUsed.php new file mode 100644 index 00000000..85d8d5d7 --- /dev/null +++ b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueSwapUsed.php @@ -0,0 +1,105 @@ + $this->min, + 'max' => $this->max, + 'avg' => $this->avg, + 'stddev' => $this->stddev, + 'p50' => $this->p50, + 'p95' => $this->p95, + 'p96' => $this->p96, + 'p97' => $this->p97, + 'p98' => $this->p98, + 'p99' => $this->p99, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getMin(): ?int + { + return $this->min; + } + + public function getMax(): ?int + { + return $this->max; + } + + public function getAvg(): ?float + { + return $this->avg; + } + + public function getStddev(): ?float + { + return $this->stddev; + } + + public function getP50(): ?float + { + return $this->p50; + } + + public function getP95(): ?float + { + return $this->p95; + } + + public function getP96(): ?float + { + return $this->p96; + } + + public function getP97(): ?float + { + return $this->p97; + } + + public function getP98(): ?float + { + return $this->p98; + } + + public function getP99(): ?float + { + return $this->p99; + } +} diff --git a/src/Model/ResourcesLimits.php b/src/Model/ResourcesLimits.php index 457f7e5e..124c254c 100644 --- a/src/Model/ResourcesLimits.php +++ b/src/Model/ResourcesLimits.php @@ -41,7 +41,7 @@ public function __toString(): string } /** - * Enable support for customizable container profiles. + * Enable support for customizable container profiles */ public function getContainerProfiles(): bool { diff --git a/src/Model/ResourcesOverview200Response.php b/src/Model/ResourcesOverview200Response.php new file mode 100644 index 00000000..bb381a05 --- /dev/null +++ b/src/Model/ResourcesOverview200Response.php @@ -0,0 +1,87 @@ + $this->grain, + 'from' => $this->from, + 'to' => $this->to, + 'projectId' => $this->projectId, + 'environmentId' => $this->environmentId, + 'branchMachineName' => $this->branchMachineName, + 'data' => $this->data, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getGrain(): int + { + return $this->grain; + } + + public function getFrom(): int + { + return $this->from; + } + + public function getTo(): int + { + return $this->to; + } + + public function getProjectId(): string + { + return $this->projectId; + } + + public function getEnvironmentId(): string + { + return $this->environmentId; + } + + public function getBranchMachineName(): string + { + return $this->branchMachineName; + } + + /** + * @return ResourcesOverview200ResponseDataInner[] + */ + public function getData(): array + { + return $this->data; + } +} diff --git a/src/Model/ResourcesOverview200ResponseDataInner.php b/src/Model/ResourcesOverview200ResponseDataInner.php new file mode 100644 index 00000000..4ea1c676 --- /dev/null +++ b/src/Model/ResourcesOverview200ResponseDataInner.php @@ -0,0 +1,52 @@ + $this->timestamp, + 'services' => $this->services, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getTimestamp(): int + { + return $this->timestamp; + } + + /** + * @return ResourcesOverview200ResponseDataInnerServicesValue[]|null + */ + public function getServices(): ?array + { + return $this->services; + } +} diff --git a/src/Model/ResourcesOverview200ResponseDataInnerServicesValue.php b/src/Model/ResourcesOverview200ResponseDataInnerServicesValue.php new file mode 100644 index 00000000..b85a7d78 --- /dev/null +++ b/src/Model/ResourcesOverview200ResponseDataInnerServicesValue.php @@ -0,0 +1,115 @@ + $this->cpuUsed, + 'cpuLimit' => $this->cpuLimit, + 'memoryUsed' => $this->memoryUsed, + 'memoryLimit' => $this->memoryLimit, + 'swapUsed' => $this->swapUsed, + 'swapLimit' => $this->swapLimit, + 'memoryPressure' => $this->memoryPressure, + 'cpuPressure' => $this->cpuPressure, + 'ioPressure' => $this->ioPressure, + 'irqPressure' => $this->irqPressure, + 'mountpoints' => $this->mountpoints, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getCpuUsed(): ?ResourcesOverview200ResponseDataInnerServicesValueCpuUsed + { + return $this->cpuUsed; + } + + public function getCpuLimit(): ?ResourcesOverview200ResponseDataInnerServicesValueCpuLimit + { + return $this->cpuLimit; + } + + public function getMemoryUsed(): ?ResourcesOverview200ResponseDataInnerServicesValueMemoryUsed + { + return $this->memoryUsed; + } + + public function getMemoryLimit(): ?ResourcesOverview200ResponseDataInnerServicesValueMemoryLimit + { + return $this->memoryLimit; + } + + public function getSwapUsed(): ?ResourcesOverview200ResponseDataInnerServicesValueSwapUsed + { + return $this->swapUsed; + } + + public function getSwapLimit(): ?ResourcesOverview200ResponseDataInnerServicesValueSwapLimit + { + return $this->swapLimit; + } + + public function getMemoryPressure(): ?ResourcesOverview200ResponseDataInnerServicesValueMemoryPressure + { + return $this->memoryPressure; + } + + public function getCpuPressure(): ?ResourcesOverview200ResponseDataInnerServicesValueCpuPressure + { + return $this->cpuPressure; + } + + public function getIoPressure(): ?ResourcesOverview200ResponseDataInnerServicesValueIoPressure + { + return $this->ioPressure; + } + + public function getIrqPressure(): ?ResourcesOverview200ResponseDataInnerServicesValueIrqPressure + { + return $this->irqPressure; + } + + /** + * @return ResourcesOverview200ResponseDataInnerServicesValueMountpointsValue[]|null + */ + public function getMountpoints(): ?array + { + return $this->mountpoints; + } +} diff --git a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueCpuLimit.php b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueCpuLimit.php new file mode 100644 index 00000000..8f0b90b1 --- /dev/null +++ b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueCpuLimit.php @@ -0,0 +1,42 @@ + $this->max, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getMax(): ?float + { + return $this->max; + } +} diff --git a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueCpuPressure.php b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueCpuPressure.php new file mode 100644 index 00000000..49ec15d3 --- /dev/null +++ b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueCpuPressure.php @@ -0,0 +1,105 @@ + $this->min, + 'max' => $this->max, + 'avg' => $this->avg, + 'stddev' => $this->stddev, + 'p50' => $this->p50, + 'p95' => $this->p95, + 'p96' => $this->p96, + 'p97' => $this->p97, + 'p98' => $this->p98, + 'p99' => $this->p99, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getMin(): ?float + { + return $this->min; + } + + public function getMax(): ?float + { + return $this->max; + } + + public function getAvg(): ?float + { + return $this->avg; + } + + public function getStddev(): ?float + { + return $this->stddev; + } + + public function getP50(): ?float + { + return $this->p50; + } + + public function getP95(): ?float + { + return $this->p95; + } + + public function getP96(): ?float + { + return $this->p96; + } + + public function getP97(): ?float + { + return $this->p97; + } + + public function getP98(): ?float + { + return $this->p98; + } + + public function getP99(): ?float + { + return $this->p99; + } +} diff --git a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueCpuUsed.php b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueCpuUsed.php new file mode 100644 index 00000000..11acea4f --- /dev/null +++ b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueCpuUsed.php @@ -0,0 +1,105 @@ + $this->min, + 'max' => $this->max, + 'avg' => $this->avg, + 'stddev' => $this->stddev, + 'p50' => $this->p50, + 'p95' => $this->p95, + 'p96' => $this->p96, + 'p97' => $this->p97, + 'p98' => $this->p98, + 'p99' => $this->p99, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getMin(): ?float + { + return $this->min; + } + + public function getMax(): ?float + { + return $this->max; + } + + public function getAvg(): ?float + { + return $this->avg; + } + + public function getStddev(): ?float + { + return $this->stddev; + } + + public function getP50(): ?float + { + return $this->p50; + } + + public function getP95(): ?float + { + return $this->p95; + } + + public function getP96(): ?float + { + return $this->p96; + } + + public function getP97(): ?float + { + return $this->p97; + } + + public function getP98(): ?float + { + return $this->p98; + } + + public function getP99(): ?float + { + return $this->p99; + } +} diff --git a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueIoPressure.php b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueIoPressure.php new file mode 100644 index 00000000..ad12d047 --- /dev/null +++ b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueIoPressure.php @@ -0,0 +1,105 @@ + $this->min, + 'max' => $this->max, + 'avg' => $this->avg, + 'stddev' => $this->stddev, + 'p50' => $this->p50, + 'p95' => $this->p95, + 'p96' => $this->p96, + 'p97' => $this->p97, + 'p98' => $this->p98, + 'p99' => $this->p99, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getMin(): ?float + { + return $this->min; + } + + public function getMax(): ?float + { + return $this->max; + } + + public function getAvg(): ?float + { + return $this->avg; + } + + public function getStddev(): ?float + { + return $this->stddev; + } + + public function getP50(): ?float + { + return $this->p50; + } + + public function getP95(): ?float + { + return $this->p95; + } + + public function getP96(): ?float + { + return $this->p96; + } + + public function getP97(): ?float + { + return $this->p97; + } + + public function getP98(): ?float + { + return $this->p98; + } + + public function getP99(): ?float + { + return $this->p99; + } +} diff --git a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueIrqPressure.php b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueIrqPressure.php new file mode 100644 index 00000000..2a35fcf1 --- /dev/null +++ b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueIrqPressure.php @@ -0,0 +1,105 @@ + $this->min, + 'max' => $this->max, + 'avg' => $this->avg, + 'stddev' => $this->stddev, + 'p50' => $this->p50, + 'p95' => $this->p95, + 'p96' => $this->p96, + 'p97' => $this->p97, + 'p98' => $this->p98, + 'p99' => $this->p99, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getMin(): ?float + { + return $this->min; + } + + public function getMax(): ?float + { + return $this->max; + } + + public function getAvg(): ?float + { + return $this->avg; + } + + public function getStddev(): ?float + { + return $this->stddev; + } + + public function getP50(): ?float + { + return $this->p50; + } + + public function getP95(): ?float + { + return $this->p95; + } + + public function getP96(): ?float + { + return $this->p96; + } + + public function getP97(): ?float + { + return $this->p97; + } + + public function getP98(): ?float + { + return $this->p98; + } + + public function getP99(): ?float + { + return $this->p99; + } +} diff --git a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMemoryLimit.php b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMemoryLimit.php new file mode 100644 index 00000000..95dd8a93 --- /dev/null +++ b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMemoryLimit.php @@ -0,0 +1,42 @@ + $this->max, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getMax(): ?int + { + return $this->max; + } +} diff --git a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMemoryPressure.php b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMemoryPressure.php new file mode 100644 index 00000000..b463fbd2 --- /dev/null +++ b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMemoryPressure.php @@ -0,0 +1,105 @@ + $this->min, + 'max' => $this->max, + 'avg' => $this->avg, + 'stddev' => $this->stddev, + 'p50' => $this->p50, + 'p95' => $this->p95, + 'p96' => $this->p96, + 'p97' => $this->p97, + 'p98' => $this->p98, + 'p99' => $this->p99, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getMin(): ?float + { + return $this->min; + } + + public function getMax(): ?float + { + return $this->max; + } + + public function getAvg(): ?float + { + return $this->avg; + } + + public function getStddev(): ?float + { + return $this->stddev; + } + + public function getP50(): ?float + { + return $this->p50; + } + + public function getP95(): ?float + { + return $this->p95; + } + + public function getP96(): ?float + { + return $this->p96; + } + + public function getP97(): ?float + { + return $this->p97; + } + + public function getP98(): ?float + { + return $this->p98; + } + + public function getP99(): ?float + { + return $this->p99; + } +} diff --git a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMemoryUsed.php b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMemoryUsed.php new file mode 100644 index 00000000..1f126347 --- /dev/null +++ b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMemoryUsed.php @@ -0,0 +1,105 @@ + $this->min, + 'max' => $this->max, + 'avg' => $this->avg, + 'stddev' => $this->stddev, + 'p50' => $this->p50, + 'p95' => $this->p95, + 'p96' => $this->p96, + 'p97' => $this->p97, + 'p98' => $this->p98, + 'p99' => $this->p99, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getMin(): ?int + { + return $this->min; + } + + public function getMax(): ?int + { + return $this->max; + } + + public function getAvg(): ?float + { + return $this->avg; + } + + public function getStddev(): ?float + { + return $this->stddev; + } + + public function getP50(): ?float + { + return $this->p50; + } + + public function getP95(): ?float + { + return $this->p95; + } + + public function getP96(): ?float + { + return $this->p96; + } + + public function getP97(): ?float + { + return $this->p97; + } + + public function getP98(): ?float + { + return $this->p98; + } + + public function getP99(): ?float + { + return $this->p99; + } +} diff --git a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValue.php b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValue.php new file mode 100644 index 00000000..12ba5976 --- /dev/null +++ b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValue.php @@ -0,0 +1,63 @@ + $this->diskUsed, + 'diskLimit' => $this->diskLimit, + 'inodesUsed' => $this->inodesUsed, + 'inodesLimit' => $this->inodesLimit, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getDiskUsed(): ?ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueDiskUsed + { + return $this->diskUsed; + } + + public function getDiskLimit(): ?ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueDiskLimit + { + return $this->diskLimit; + } + + public function getInodesUsed(): ?ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueInodesUsed + { + return $this->inodesUsed; + } + + public function getInodesLimit(): ?ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueInodesLimit + { + return $this->inodesLimit; + } +} diff --git a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueDiskLimit.php b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueDiskLimit.php new file mode 100644 index 00000000..5838ad69 --- /dev/null +++ b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueDiskLimit.php @@ -0,0 +1,42 @@ + $this->max, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getMax(): ?int + { + return $this->max; + } +} diff --git a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueDiskUsed.php b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueDiskUsed.php new file mode 100644 index 00000000..b315c021 --- /dev/null +++ b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueDiskUsed.php @@ -0,0 +1,105 @@ + $this->min, + 'max' => $this->max, + 'avg' => $this->avg, + 'stddev' => $this->stddev, + 'p50' => $this->p50, + 'p95' => $this->p95, + 'p96' => $this->p96, + 'p97' => $this->p97, + 'p98' => $this->p98, + 'p99' => $this->p99, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getMin(): ?int + { + return $this->min; + } + + public function getMax(): ?int + { + return $this->max; + } + + public function getAvg(): ?float + { + return $this->avg; + } + + public function getStddev(): ?float + { + return $this->stddev; + } + + public function getP50(): ?float + { + return $this->p50; + } + + public function getP95(): ?float + { + return $this->p95; + } + + public function getP96(): ?float + { + return $this->p96; + } + + public function getP97(): ?float + { + return $this->p97; + } + + public function getP98(): ?float + { + return $this->p98; + } + + public function getP99(): ?float + { + return $this->p99; + } +} diff --git a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueInodesLimit.php b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueInodesLimit.php new file mode 100644 index 00000000..034fc365 --- /dev/null +++ b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueInodesLimit.php @@ -0,0 +1,42 @@ + $this->max, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getMax(): ?int + { + return $this->max; + } +} diff --git a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueInodesUsed.php b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueInodesUsed.php new file mode 100644 index 00000000..4a47b0d7 --- /dev/null +++ b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueInodesUsed.php @@ -0,0 +1,105 @@ + $this->min, + 'max' => $this->max, + 'avg' => $this->avg, + 'stddev' => $this->stddev, + 'p50' => $this->p50, + 'p95' => $this->p95, + 'p96' => $this->p96, + 'p97' => $this->p97, + 'p98' => $this->p98, + 'p99' => $this->p99, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getMin(): ?int + { + return $this->min; + } + + public function getMax(): ?int + { + return $this->max; + } + + public function getAvg(): ?float + { + return $this->avg; + } + + public function getStddev(): ?float + { + return $this->stddev; + } + + public function getP50(): ?float + { + return $this->p50; + } + + public function getP95(): ?float + { + return $this->p95; + } + + public function getP96(): ?float + { + return $this->p96; + } + + public function getP97(): ?float + { + return $this->p97; + } + + public function getP98(): ?float + { + return $this->p98; + } + + public function getP99(): ?float + { + return $this->p99; + } +} diff --git a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueSwapLimit.php b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueSwapLimit.php new file mode 100644 index 00000000..f9cd3b76 --- /dev/null +++ b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueSwapLimit.php @@ -0,0 +1,42 @@ + $this->max, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getMax(): ?int + { + return $this->max; + } +} diff --git a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueSwapUsed.php b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueSwapUsed.php new file mode 100644 index 00000000..8af89e0e --- /dev/null +++ b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueSwapUsed.php @@ -0,0 +1,105 @@ + $this->min, + 'max' => $this->max, + 'avg' => $this->avg, + 'stddev' => $this->stddev, + 'p50' => $this->p50, + 'p95' => $this->p95, + 'p96' => $this->p96, + 'p97' => $this->p97, + 'p98' => $this->p98, + 'p99' => $this->p99, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getMin(): ?int + { + return $this->min; + } + + public function getMax(): ?int + { + return $this->max; + } + + public function getAvg(): ?float + { + return $this->avg; + } + + public function getStddev(): ?float + { + return $this->stddev; + } + + public function getP50(): ?float + { + return $this->p50; + } + + public function getP95(): ?float + { + return $this->p95; + } + + public function getP96(): ?float + { + return $this->p96; + } + + public function getP97(): ?float + { + return $this->p97; + } + + public function getP98(): ?float + { + return $this->p98; + } + + public function getP99(): ?float + { + return $this->p99; + } +} diff --git a/src/Model/ResourcesSummary200Response.php b/src/Model/ResourcesSummary200Response.php new file mode 100644 index 00000000..5bdad89e --- /dev/null +++ b/src/Model/ResourcesSummary200Response.php @@ -0,0 +1,77 @@ + $this->from, + 'to' => $this->to, + 'projectId' => $this->projectId, + 'environmentId' => $this->environmentId, + 'branchMachineName' => $this->branchMachineName, + 'data' => $this->data, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getFrom(): int + { + return $this->from; + } + + public function getTo(): int + { + return $this->to; + } + + public function getProjectId(): string + { + return $this->projectId; + } + + public function getEnvironmentId(): string + { + return $this->environmentId; + } + + public function getBranchMachineName(): string + { + return $this->branchMachineName; + } + + public function getData(): ResourcesSummary200ResponseData + { + return $this->data; + } +} diff --git a/src/Model/ResourcesSummary200ResponseData.php b/src/Model/ResourcesSummary200ResponseData.php new file mode 100644 index 00000000..6996008f --- /dev/null +++ b/src/Model/ResourcesSummary200ResponseData.php @@ -0,0 +1,42 @@ + $this->services, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getServices(): array + { + return $this->services; + } +} diff --git a/src/Model/ResourcesSummary200ResponseDataServicesValueValue.php b/src/Model/ResourcesSummary200ResponseDataServicesValueValue.php new file mode 100644 index 00000000..1f5693ae --- /dev/null +++ b/src/Model/ResourcesSummary200ResponseDataServicesValueValue.php @@ -0,0 +1,115 @@ + $this->cpuUsed, + 'cpuLimit' => $this->cpuLimit, + 'memoryUsed' => $this->memoryUsed, + 'memoryLimit' => $this->memoryLimit, + 'swapUsed' => $this->swapUsed, + 'swapLimit' => $this->swapLimit, + 'memoryPressure' => $this->memoryPressure, + 'cpuPressure' => $this->cpuPressure, + 'ioPressure' => $this->ioPressure, + 'irqPressure' => $this->irqPressure, + 'mountpoints' => $this->mountpoints, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getCpuUsed(): ?ResourcesSummary200ResponseDataServicesValueValueCpuUsed + { + return $this->cpuUsed; + } + + public function getCpuLimit(): ?ResourcesOverview200ResponseDataInnerServicesValueCpuLimit + { + return $this->cpuLimit; + } + + public function getMemoryUsed(): ?ResourcesSummary200ResponseDataServicesValueValueMemoryUsed + { + return $this->memoryUsed; + } + + public function getMemoryLimit(): ?ResourcesOverview200ResponseDataInnerServicesValueMemoryLimit + { + return $this->memoryLimit; + } + + public function getSwapUsed(): ?ResourcesSummary200ResponseDataServicesValueValueSwapUsed + { + return $this->swapUsed; + } + + public function getSwapLimit(): ?ResourcesOverview200ResponseDataInnerServicesValueSwapLimit + { + return $this->swapLimit; + } + + public function getMemoryPressure(): ?ResourcesSummary200ResponseDataServicesValueValueMemoryPressure + { + return $this->memoryPressure; + } + + public function getCpuPressure(): ?ResourcesSummary200ResponseDataServicesValueValueCpuPressure + { + return $this->cpuPressure; + } + + public function getIoPressure(): ?ResourcesSummary200ResponseDataServicesValueValueIoPressure + { + return $this->ioPressure; + } + + public function getIrqPressure(): ?ResourcesSummary200ResponseDataServicesValueValueIrqPressure + { + return $this->irqPressure; + } + + /** + * @return ResourcesSummary200ResponseDataServicesValueValueMountpointsValue[]|null + */ + public function getMountpoints(): ?array + { + return $this->mountpoints; + } +} diff --git a/src/Model/ResourcesSummary200ResponseDataServicesValueValueCpuPressure.php b/src/Model/ResourcesSummary200ResponseDataServicesValueValueCpuPressure.php new file mode 100644 index 00000000..d64ea4ff --- /dev/null +++ b/src/Model/ResourcesSummary200ResponseDataServicesValueValueCpuPressure.php @@ -0,0 +1,105 @@ + $this->min, + 'max' => $this->max, + 'avg' => $this->avg, + 'stddev' => $this->stddev, + 'p50' => $this->p50, + 'p95' => $this->p95, + 'p96' => $this->p96, + 'p97' => $this->p97, + 'p98' => $this->p98, + 'p99' => $this->p99, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getMin(): ?float + { + return $this->min; + } + + public function getMax(): ?float + { + return $this->max; + } + + public function getAvg(): ?float + { + return $this->avg; + } + + public function getStddev(): ?float + { + return $this->stddev; + } + + public function getP50(): ?float + { + return $this->p50; + } + + public function getP95(): ?float + { + return $this->p95; + } + + public function getP96(): ?float + { + return $this->p96; + } + + public function getP97(): ?float + { + return $this->p97; + } + + public function getP98(): ?float + { + return $this->p98; + } + + public function getP99(): ?float + { + return $this->p99; + } +} diff --git a/src/Model/ResourcesSummary200ResponseDataServicesValueValueCpuUsed.php b/src/Model/ResourcesSummary200ResponseDataServicesValueValueCpuUsed.php new file mode 100644 index 00000000..09d3809a --- /dev/null +++ b/src/Model/ResourcesSummary200ResponseDataServicesValueValueCpuUsed.php @@ -0,0 +1,105 @@ + $this->min, + 'max' => $this->max, + 'avg' => $this->avg, + 'stddev' => $this->stddev, + 'p50' => $this->p50, + 'p95' => $this->p95, + 'p96' => $this->p96, + 'p97' => $this->p97, + 'p98' => $this->p98, + 'p99' => $this->p99, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getMin(): ?float + { + return $this->min; + } + + public function getMax(): ?float + { + return $this->max; + } + + public function getAvg(): ?float + { + return $this->avg; + } + + public function getStddev(): ?float + { + return $this->stddev; + } + + public function getP50(): ?float + { + return $this->p50; + } + + public function getP95(): ?float + { + return $this->p95; + } + + public function getP96(): ?float + { + return $this->p96; + } + + public function getP97(): ?float + { + return $this->p97; + } + + public function getP98(): ?float + { + return $this->p98; + } + + public function getP99(): ?float + { + return $this->p99; + } +} diff --git a/src/Model/ResourcesSummary200ResponseDataServicesValueValueIoPressure.php b/src/Model/ResourcesSummary200ResponseDataServicesValueValueIoPressure.php new file mode 100644 index 00000000..7a0ef1f4 --- /dev/null +++ b/src/Model/ResourcesSummary200ResponseDataServicesValueValueIoPressure.php @@ -0,0 +1,105 @@ + $this->min, + 'max' => $this->max, + 'avg' => $this->avg, + 'stddev' => $this->stddev, + 'p50' => $this->p50, + 'p95' => $this->p95, + 'p96' => $this->p96, + 'p97' => $this->p97, + 'p98' => $this->p98, + 'p99' => $this->p99, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getMin(): ?float + { + return $this->min; + } + + public function getMax(): ?float + { + return $this->max; + } + + public function getAvg(): ?float + { + return $this->avg; + } + + public function getStddev(): ?float + { + return $this->stddev; + } + + public function getP50(): ?float + { + return $this->p50; + } + + public function getP95(): ?float + { + return $this->p95; + } + + public function getP96(): ?float + { + return $this->p96; + } + + public function getP97(): ?float + { + return $this->p97; + } + + public function getP98(): ?float + { + return $this->p98; + } + + public function getP99(): ?float + { + return $this->p99; + } +} diff --git a/src/Model/ResourcesSummary200ResponseDataServicesValueValueIrqPressure.php b/src/Model/ResourcesSummary200ResponseDataServicesValueValueIrqPressure.php new file mode 100644 index 00000000..39bb4df5 --- /dev/null +++ b/src/Model/ResourcesSummary200ResponseDataServicesValueValueIrqPressure.php @@ -0,0 +1,105 @@ + $this->min, + 'max' => $this->max, + 'avg' => $this->avg, + 'stddev' => $this->stddev, + 'p50' => $this->p50, + 'p95' => $this->p95, + 'p96' => $this->p96, + 'p97' => $this->p97, + 'p98' => $this->p98, + 'p99' => $this->p99, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getMin(): ?float + { + return $this->min; + } + + public function getMax(): ?float + { + return $this->max; + } + + public function getAvg(): ?float + { + return $this->avg; + } + + public function getStddev(): ?float + { + return $this->stddev; + } + + public function getP50(): ?float + { + return $this->p50; + } + + public function getP95(): ?float + { + return $this->p95; + } + + public function getP96(): ?float + { + return $this->p96; + } + + public function getP97(): ?float + { + return $this->p97; + } + + public function getP98(): ?float + { + return $this->p98; + } + + public function getP99(): ?float + { + return $this->p99; + } +} diff --git a/src/Model/ResourcesSummary200ResponseDataServicesValueValueMemoryPressure.php b/src/Model/ResourcesSummary200ResponseDataServicesValueValueMemoryPressure.php new file mode 100644 index 00000000..85c171bf --- /dev/null +++ b/src/Model/ResourcesSummary200ResponseDataServicesValueValueMemoryPressure.php @@ -0,0 +1,105 @@ + $this->min, + 'max' => $this->max, + 'avg' => $this->avg, + 'stddev' => $this->stddev, + 'p50' => $this->p50, + 'p95' => $this->p95, + 'p96' => $this->p96, + 'p97' => $this->p97, + 'p98' => $this->p98, + 'p99' => $this->p99, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getMin(): ?float + { + return $this->min; + } + + public function getMax(): ?float + { + return $this->max; + } + + public function getAvg(): ?float + { + return $this->avg; + } + + public function getStddev(): ?float + { + return $this->stddev; + } + + public function getP50(): ?float + { + return $this->p50; + } + + public function getP95(): ?float + { + return $this->p95; + } + + public function getP96(): ?float + { + return $this->p96; + } + + public function getP97(): ?float + { + return $this->p97; + } + + public function getP98(): ?float + { + return $this->p98; + } + + public function getP99(): ?float + { + return $this->p99; + } +} diff --git a/src/Model/ResourcesSummary200ResponseDataServicesValueValueMemoryUsed.php b/src/Model/ResourcesSummary200ResponseDataServicesValueValueMemoryUsed.php new file mode 100644 index 00000000..a312b175 --- /dev/null +++ b/src/Model/ResourcesSummary200ResponseDataServicesValueValueMemoryUsed.php @@ -0,0 +1,105 @@ + $this->min, + 'max' => $this->max, + 'avg' => $this->avg, + 'stddev' => $this->stddev, + 'p50' => $this->p50, + 'p95' => $this->p95, + 'p96' => $this->p96, + 'p97' => $this->p97, + 'p98' => $this->p98, + 'p99' => $this->p99, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getMin(): ?int + { + return $this->min; + } + + public function getMax(): ?int + { + return $this->max; + } + + public function getAvg(): ?float + { + return $this->avg; + } + + public function getStddev(): ?float + { + return $this->stddev; + } + + public function getP50(): ?float + { + return $this->p50; + } + + public function getP95(): ?float + { + return $this->p95; + } + + public function getP96(): ?float + { + return $this->p96; + } + + public function getP97(): ?float + { + return $this->p97; + } + + public function getP98(): ?float + { + return $this->p98; + } + + public function getP99(): ?float + { + return $this->p99; + } +} diff --git a/src/Model/ResourcesSummary200ResponseDataServicesValueValueMountpointsValue.php b/src/Model/ResourcesSummary200ResponseDataServicesValueValueMountpointsValue.php new file mode 100644 index 00000000..c0d6f963 --- /dev/null +++ b/src/Model/ResourcesSummary200ResponseDataServicesValueValueMountpointsValue.php @@ -0,0 +1,63 @@ + $this->diskUsed, + 'diskLimit' => $this->diskLimit, + 'inodesUsed' => $this->inodesUsed, + 'inodesLimit' => $this->inodesLimit, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getDiskUsed(): ?ResourcesSummary200ResponseDataServicesValueValueMountpointsValueDiskUsed + { + return $this->diskUsed; + } + + public function getDiskLimit(): ?ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueDiskLimit + { + return $this->diskLimit; + } + + public function getInodesUsed(): ?ResourcesSummary200ResponseDataServicesValueValueMountpointsValueInodesUsed + { + return $this->inodesUsed; + } + + public function getInodesLimit(): ?ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueInodesLimit + { + return $this->inodesLimit; + } +} diff --git a/src/Model/ResourcesSummary200ResponseDataServicesValueValueMountpointsValueDiskUsed.php b/src/Model/ResourcesSummary200ResponseDataServicesValueValueMountpointsValueDiskUsed.php new file mode 100644 index 00000000..751cd31e --- /dev/null +++ b/src/Model/ResourcesSummary200ResponseDataServicesValueValueMountpointsValueDiskUsed.php @@ -0,0 +1,105 @@ + $this->min, + 'max' => $this->max, + 'avg' => $this->avg, + 'stddev' => $this->stddev, + 'p50' => $this->p50, + 'p95' => $this->p95, + 'p96' => $this->p96, + 'p97' => $this->p97, + 'p98' => $this->p98, + 'p99' => $this->p99, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getMin(): ?int + { + return $this->min; + } + + public function getMax(): ?int + { + return $this->max; + } + + public function getAvg(): ?float + { + return $this->avg; + } + + public function getStddev(): ?float + { + return $this->stddev; + } + + public function getP50(): ?float + { + return $this->p50; + } + + public function getP95(): ?float + { + return $this->p95; + } + + public function getP96(): ?float + { + return $this->p96; + } + + public function getP97(): ?float + { + return $this->p97; + } + + public function getP98(): ?float + { + return $this->p98; + } + + public function getP99(): ?float + { + return $this->p99; + } +} diff --git a/src/Model/ResourcesSummary200ResponseDataServicesValueValueMountpointsValueInodesUsed.php b/src/Model/ResourcesSummary200ResponseDataServicesValueValueMountpointsValueInodesUsed.php new file mode 100644 index 00000000..5ee14e8f --- /dev/null +++ b/src/Model/ResourcesSummary200ResponseDataServicesValueValueMountpointsValueInodesUsed.php @@ -0,0 +1,105 @@ + $this->min, + 'max' => $this->max, + 'avg' => $this->avg, + 'stddev' => $this->stddev, + 'p50' => $this->p50, + 'p95' => $this->p95, + 'p96' => $this->p96, + 'p97' => $this->p97, + 'p98' => $this->p98, + 'p99' => $this->p99, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getMin(): ?int + { + return $this->min; + } + + public function getMax(): ?int + { + return $this->max; + } + + public function getAvg(): ?float + { + return $this->avg; + } + + public function getStddev(): ?float + { + return $this->stddev; + } + + public function getP50(): ?float + { + return $this->p50; + } + + public function getP95(): ?float + { + return $this->p95; + } + + public function getP96(): ?float + { + return $this->p96; + } + + public function getP97(): ?float + { + return $this->p97; + } + + public function getP98(): ?float + { + return $this->p98; + } + + public function getP99(): ?float + { + return $this->p99; + } +} diff --git a/src/Model/ResourcesSummary200ResponseDataServicesValueValueSwapUsed.php b/src/Model/ResourcesSummary200ResponseDataServicesValueValueSwapUsed.php new file mode 100644 index 00000000..929fa018 --- /dev/null +++ b/src/Model/ResourcesSummary200ResponseDataServicesValueValueSwapUsed.php @@ -0,0 +1,105 @@ + $this->min, + 'max' => $this->max, + 'avg' => $this->avg, + 'stddev' => $this->stddev, + 'p50' => $this->p50, + 'p95' => $this->p95, + 'p96' => $this->p96, + 'p97' => $this->p97, + 'p98' => $this->p98, + 'p99' => $this->p99, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getMin(): ?int + { + return $this->min; + } + + public function getMax(): ?int + { + return $this->max; + } + + public function getAvg(): ?float + { + return $this->avg; + } + + public function getStddev(): ?float + { + return $this->stddev; + } + + public function getP50(): ?float + { + return $this->p50; + } + + public function getP95(): ?float + { + return $this->p95; + } + + public function getP96(): ?float + { + return $this->p96; + } + + public function getP97(): ?float + { + return $this->p97; + } + + public function getP98(): ?float + { + return $this->p98; + } + + public function getP99(): ?float + { + return $this->p99; + } +} diff --git a/src/Model/ResourcesSummary400Response.php b/src/Model/ResourcesSummary400Response.php new file mode 100644 index 00000000..347e22a0 --- /dev/null +++ b/src/Model/ResourcesSummary400Response.php @@ -0,0 +1,63 @@ + $this->type, + 'title' => $this->title, + 'status' => $this->status, + 'violations' => $this->violations, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getType(): string + { + return $this->type; + } + + public function getTitle(): string + { + return $this->title; + } + + public function getStatus(): int + { + return $this->status; + } + + public function getViolations(): array + { + return $this->violations; + } +} diff --git a/src/Model/RunConfiguration.php b/src/Model/RunConfiguration.php new file mode 100644 index 00000000..c960445c --- /dev/null +++ b/src/Model/RunConfiguration.php @@ -0,0 +1,56 @@ + $this->command, + 'timeout' => $this->timeout, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + /** + * The command to execute when running the task + */ + public function getCommand(): string + { + return $this->command; + } + + /** + * The maximum timeout in seconds after which the task will be forcefully killed + */ + public function getTimeout(): int + { + return $this->timeout; + } +} diff --git a/src/Model/SSIConfiguration.php b/src/Model/SSIConfiguration.php index e082ace9..059b92c2 100644 --- a/src/Model/SSIConfiguration.php +++ b/src/Model/SSIConfiguration.php @@ -6,7 +6,7 @@ /** * Low level SSIConfiguration (auto-generated) - * Server-Side Include configuration. + * Server-Side Include configuration * * @license Apache-2.0 * @see https://docs.upsun.com diff --git a/src/Model/ScriptIntegration.php b/src/Model/ScriptIntegration.php index 6c8e69e9..736e9b4d 100644 --- a/src/Model/ScriptIntegration.php +++ b/src/Model/ScriptIntegration.php @@ -20,6 +20,7 @@ final class ScriptIntegration implements Model, JsonSerializable, Integration public function __construct( private readonly string $type, + private readonly string $role, private readonly array $events, private readonly array $environments, private readonly array $excludedEnvironments, @@ -43,6 +44,7 @@ public function jsonSerialize(): array 'createdAt' => $this->createdAt?->format(DATE_ATOM), 'updatedAt' => $this->updatedAt?->format(DATE_ATOM), 'type' => $this->type, + 'role' => $this->role, 'events' => $this->events, 'environments' => $this->environments, 'excludedEnvironments' => $this->excludedEnvironments, @@ -74,11 +76,22 @@ public function getUpdatedAt(): ?DateTime return $this->updatedAt; } + /** + * The type of the integration + */ public function getType(): string { return $this->type; } + /** + * The role of the integration + */ + public function getRole(): string + { + return $this->role; + } + public function getEvents(): array { return $this->events; diff --git a/src/Model/ScriptIntegrationCreateInput.php b/src/Model/ScriptIntegrationCreateInput.php index 297cb195..42cc2089 100644 --- a/src/Model/ScriptIntegrationCreateInput.php +++ b/src/Model/ScriptIntegrationCreateInput.php @@ -51,6 +51,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } + /** + * The type of the integration + */ public function getType(): string { return $this->type; diff --git a/src/Model/ScriptIntegrationPatch.php b/src/Model/ScriptIntegrationPatch.php index 783d5662..4bdee781 100644 --- a/src/Model/ScriptIntegrationPatch.php +++ b/src/Model/ScriptIntegrationPatch.php @@ -51,6 +51,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } + /** + * The type of the integration + */ public function getType(): string { return $this->type; diff --git a/src/Model/ServicesValue.php b/src/Model/ServicesValue.php index f275852d..b3fa0aef 100644 --- a/src/Model/ServicesValue.php +++ b/src/Model/ServicesValue.php @@ -27,6 +27,7 @@ public function __construct( private readonly object $access, private readonly object $configuration, private readonly array $relationships, + private readonly bool $supportsHorizontalScaling, private readonly ?int $disk, private readonly ?Firewall $firewall, private readonly ?Resources $resources, @@ -55,6 +56,7 @@ public function jsonSerialize(): array 'containerProfile' => $this->containerProfile, 'endpoints' => $this->endpoints, 'instanceCount' => $this->instanceCount, + 'supportsHorizontalScaling' => $this->supportsHorizontalScaling, ]; } @@ -117,4 +119,9 @@ public function getInstanceCount(): ?int { return $this->instanceCount; } + + public function getSupportsHorizontalScaling(): bool + { + return $this->supportsHorizontalScaling; + } } diff --git a/src/Model/SlackIntegration.php b/src/Model/SlackIntegration.php index d4c72c80..db0ce2f1 100644 --- a/src/Model/SlackIntegration.php +++ b/src/Model/SlackIntegration.php @@ -16,6 +16,7 @@ final class SlackIntegration implements Model, JsonSerializable, Integration { public function __construct( private readonly string $type, + private readonly string $role, private readonly string $channel, private readonly ?DateTime $createdAt, private readonly ?DateTime $updatedAt, @@ -34,6 +35,7 @@ public function jsonSerialize(): array 'createdAt' => $this->createdAt?->format(DATE_ATOM), 'updatedAt' => $this->updatedAt?->format(DATE_ATOM), 'type' => $this->type, + 'role' => $this->role, 'channel' => $this->channel, 'id' => $this->id, ]; @@ -60,11 +62,22 @@ public function getUpdatedAt(): ?DateTime return $this->updatedAt; } + /** + * The type of the integration + */ public function getType(): string { return $this->type; } + /** + * The role of the integration + */ + public function getRole(): string + { + return $this->role; + } + /** * The Slack channel to post messages to */ diff --git a/src/Model/SlackIntegrationCreateInput.php b/src/Model/SlackIntegrationCreateInput.php index f53ba0a8..c447c79f 100644 --- a/src/Model/SlackIntegrationCreateInput.php +++ b/src/Model/SlackIntegrationCreateInput.php @@ -39,6 +39,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } + /** + * The type of the integration + */ public function getType(): string { return $this->type; diff --git a/src/Model/SlackIntegrationPatch.php b/src/Model/SlackIntegrationPatch.php index bfcb5492..d7633838 100644 --- a/src/Model/SlackIntegrationPatch.php +++ b/src/Model/SlackIntegrationPatch.php @@ -39,6 +39,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } + /** + * The type of the integration + */ public function getType(): string { return $this->type; diff --git a/src/Model/Routing.php b/src/Model/SourceCodeConfiguration1.php similarity index 60% rename from src/Model/Routing.php rename to src/Model/SourceCodeConfiguration1.php index 4d3cc52d..508c2a08 100644 --- a/src/Model/Routing.php +++ b/src/Model/SourceCodeConfiguration1.php @@ -5,17 +5,17 @@ use JsonSerializable; /** - * Low level Routing (auto-generated) - * Configuration about the traffic routed to this version + * Low level SourceCodeConfiguration1 (auto-generated) + * Configuration related to the source code of the task * * @license Apache-2.0 * @see https://docs.upsun.com * @generated This file was generated by OpenAPI Generator. Do not edit manually. */ -final class Routing implements Model, JsonSerializable +final class SourceCodeConfiguration1 implements Model, JsonSerializable { public function __construct( - private readonly int $percentage, + private readonly string $root, ) { } @@ -27,7 +27,7 @@ public function getModelName(): string public function jsonSerialize(): array { return [ - 'percentage' => $this->percentage, + 'root' => $this->root, ]; } @@ -37,10 +37,10 @@ public function __toString(): string } /** - * The percentage of traffic routed to this version + * The root of the task relative to the repository root */ - public function getPercentage(): int + public function getRoot(): string { - return $this->percentage; + return $this->root; } } diff --git a/src/Model/SplunkIntegration.php b/src/Model/SplunkIntegration.php index e1de3e38..d4ea9850 100644 --- a/src/Model/SplunkIntegration.php +++ b/src/Model/SplunkIntegration.php @@ -16,6 +16,7 @@ final class SplunkIntegration implements Model, JsonSerializable, Integration { public function __construct( private readonly string $type, + private readonly string $role, private readonly array $extra, private readonly string $url, private readonly string $index, @@ -39,6 +40,7 @@ public function jsonSerialize(): array 'createdAt' => $this->createdAt?->format(DATE_ATOM), 'updatedAt' => $this->updatedAt?->format(DATE_ATOM), 'type' => $this->type, + 'role' => $this->role, 'extra' => $this->extra, 'url' => $this->url, 'index' => $this->index, @@ -70,11 +72,22 @@ public function getUpdatedAt(): ?DateTime return $this->updatedAt; } + /** + * The type of the integration + */ public function getType(): string { return $this->type; } + /** + * The role of the integration + */ + public function getRole(): string + { + return $this->role; + } + public function getExtra(): array { return $this->extra; diff --git a/src/Model/SplunkIntegrationCreateInput.php b/src/Model/SplunkIntegrationCreateInput.php index 581c27c0..b762e566 100644 --- a/src/Model/SplunkIntegrationCreateInput.php +++ b/src/Model/SplunkIntegrationCreateInput.php @@ -49,6 +49,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } + /** + * The type of the integration + */ public function getType(): string { return $this->type; diff --git a/src/Model/SplunkIntegrationPatch.php b/src/Model/SplunkIntegrationPatch.php index 6d4d9e4a..548daa0b 100644 --- a/src/Model/SplunkIntegrationPatch.php +++ b/src/Model/SplunkIntegrationPatch.php @@ -49,6 +49,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } + /** + * The type of the integration + */ public function getType(): string { return $this->type; diff --git a/src/Model/StickyConfiguration.php b/src/Model/StickyConfiguration.php index c111bfde..d260f662 100644 --- a/src/Model/StickyConfiguration.php +++ b/src/Model/StickyConfiguration.php @@ -6,7 +6,7 @@ /** * Low level StickyConfiguration (auto-generated) - * Sticky routing configuration. + * Sticky routing configuration * * @license Apache-2.0 * @see https://docs.upsun.com diff --git a/src/Model/StrictTransportSecurityOptions.php b/src/Model/StrictTransportSecurityOptions.php index 4adf7ec8..a3d2d5a5 100644 --- a/src/Model/StrictTransportSecurityOptions.php +++ b/src/Model/StrictTransportSecurityOptions.php @@ -40,7 +40,7 @@ public function __toString(): string } /** - * Whether strict transport security is enabled or not. + * Whether strict transport security is enabled or not */ public function getEnabled(): ?bool { @@ -48,7 +48,7 @@ public function getEnabled(): ?bool } /** - * Whether the strict transport security policy should include all subdomains. + * Whether the strict transport security policy should include all subdomains */ public function getIncludeSubdomains(): ?bool { @@ -56,7 +56,7 @@ public function getIncludeSubdomains(): ?bool } /** - * Whether the strict transport security policy should be preloaded in browsers. + * Whether the strict transport security policy should be preloaded in browsers */ public function getPreload(): ?bool { diff --git a/src/Model/SumologicIntegration.php b/src/Model/SumologicIntegration.php index 224a7728..5fda2ee1 100644 --- a/src/Model/SumologicIntegration.php +++ b/src/Model/SumologicIntegration.php @@ -16,6 +16,7 @@ final class SumologicIntegration implements Model, JsonSerializable, Integration { public function __construct( private readonly string $type, + private readonly string $role, private readonly array $extra, private readonly string $url, private readonly string $category, @@ -38,6 +39,7 @@ public function jsonSerialize(): array 'createdAt' => $this->createdAt?->format(DATE_ATOM), 'updatedAt' => $this->updatedAt?->format(DATE_ATOM), 'type' => $this->type, + 'role' => $this->role, 'extra' => $this->extra, 'url' => $this->url, 'category' => $this->category, @@ -68,16 +70,30 @@ public function getUpdatedAt(): ?DateTime return $this->updatedAt; } + /** + * The type of the integration + */ public function getType(): string { return $this->type; } + /** + * The role of the integration + */ + public function getRole(): string + { + return $this->role; + } + public function getExtra(): array { return $this->extra; } + /** + * The Sumologic HTTPS endpoint + */ public function getUrl(): string { return $this->url; diff --git a/src/Model/SumologicIntegrationCreateInput.php b/src/Model/SumologicIntegrationCreateInput.php index 5fea48a6..f5fe1c5e 100644 --- a/src/Model/SumologicIntegrationCreateInput.php +++ b/src/Model/SumologicIntegrationCreateInput.php @@ -45,11 +45,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } + /** + * The type of the integration + */ public function getType(): string { return $this->type; } + /** + * The Sumologic HTTPS endpoint + */ public function getUrl(): string { return $this->url; diff --git a/src/Model/SumologicIntegrationPatch.php b/src/Model/SumologicIntegrationPatch.php index d1000dae..2fca2383 100644 --- a/src/Model/SumologicIntegrationPatch.php +++ b/src/Model/SumologicIntegrationPatch.php @@ -45,11 +45,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } + /** + * The type of the integration + */ public function getType(): string { return $this->type; } + /** + * The Sumologic HTTPS endpoint + */ public function getUrl(): string { return $this->url; diff --git a/src/Model/SyslogIntegration.php b/src/Model/SyslogIntegration.php index 5a221966..2784ac8a 100644 --- a/src/Model/SyslogIntegration.php +++ b/src/Model/SyslogIntegration.php @@ -22,6 +22,7 @@ final class SyslogIntegration implements Model, JsonSerializable, Integration public function __construct( private readonly string $type, + private readonly string $role, private readonly array $extra, private readonly string $host, private readonly int $port, @@ -47,6 +48,7 @@ public function jsonSerialize(): array 'createdAt' => $this->createdAt?->format(DATE_ATOM), 'updatedAt' => $this->updatedAt?->format(DATE_ATOM), 'type' => $this->type, + 'role' => $this->role, 'extra' => $this->extra, 'host' => $this->host, 'port' => $this->port, @@ -80,11 +82,22 @@ public function getUpdatedAt(): ?DateTime return $this->updatedAt; } + /** + * The type of the integration + */ public function getType(): string { return $this->type; } + /** + * The role of the integration + */ + public function getRole(): string + { + return $this->role; + } + public function getExtra(): array { return $this->extra; diff --git a/src/Model/SyslogIntegrationCreateInput.php b/src/Model/SyslogIntegrationCreateInput.php index 4dcc1c6e..893a8b85 100644 --- a/src/Model/SyslogIntegrationCreateInput.php +++ b/src/Model/SyslogIntegrationCreateInput.php @@ -63,6 +63,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } + /** + * The type of the integration + */ public function getType(): string { return $this->type; diff --git a/src/Model/SyslogIntegrationPatch.php b/src/Model/SyslogIntegrationPatch.php index 527534be..e635d7dd 100644 --- a/src/Model/SyslogIntegrationPatch.php +++ b/src/Model/SyslogIntegrationPatch.php @@ -63,6 +63,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } + /** + * The type of the integration + */ public function getType(): string { return $this->type; diff --git a/src/Model/TLSSettings.php b/src/Model/TLSSettings.php index f56f3b0d..ba4a9929 100644 --- a/src/Model/TLSSettings.php +++ b/src/Model/TLSSettings.php @@ -6,7 +6,7 @@ /** * Low level TLSSettings (auto-generated) - * TLS settings for the route. + * TLS settings for the route * * @license Apache-2.0 * @see https://docs.upsun.com diff --git a/src/Model/Task.php b/src/Model/Task.php new file mode 100644 index 00000000..806f5461 --- /dev/null +++ b/src/Model/Task.php @@ -0,0 +1,124 @@ + $this->id, + 'type' => $this->type, + 'source' => $this->source, + 'hooks' => $this->hooks, + 'relationships' => $this->relationships, + 'mounts' => $this->mounts, + 'variables' => $this->variables, + 'run' => $this->run, + 'name' => $this->name, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + /** + * The identifier of Task + */ + public function getId(): string + { + return $this->id; + } + + /** + * The runtime type and version for the task (e.g., python:3.8) + */ + public function getType(): string + { + return $this->type; + } + + /** + * Configuration related to the source code of the task + */ + public function getSource(): SourceCodeConfiguration1 + { + return $this->source; + } + + /** + * Scripts executed at various points in the lifecycle of the task + */ + public function getHooks(): Hooks1 + { + return $this->hooks; + } + + /** + * The relationships of the task to defined services and applications + * @return ServiceRelationshipsValue[] + */ + public function getRelationships(): array + { + return $this->relationships; + } + + /** + * Filesystem mounts of this task + * @return MountsValue[] + */ + public function getMounts(): array + { + return $this->mounts; + } + + public function getVariables(): array + { + return $this->variables; + } + + /** + * Configuration for task execution + */ + public function getRun(): RunConfiguration + { + return $this->run; + } + + /** + * The unique name of the task + */ + public function getName(): string + { + return $this->name; + } +} diff --git a/src/Model/TaskTriggerInput.php b/src/Model/TaskTriggerInput.php new file mode 100644 index 00000000..cb1895c1 --- /dev/null +++ b/src/Model/TaskTriggerInput.php @@ -0,0 +1,42 @@ + $this->variables, + ]; + } + + public function __toString(): string + { + return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); + } + + public function getVariables(): ?array + { + return $this->variables; + } +} diff --git a/src/Model/VersionPatch.php b/src/Model/Tasks.php similarity index 63% rename from src/Model/VersionPatch.php rename to src/Model/Tasks.php index f8965f3a..bd768ee2 100644 --- a/src/Model/VersionPatch.php +++ b/src/Model/Tasks.php @@ -5,16 +5,16 @@ use JsonSerializable; /** - * Low level VersionPatch (auto-generated) + * Low level Tasks (auto-generated) * * @license Apache-2.0 * @see https://docs.upsun.com * @generated This file was generated by OpenAPI Generator. Do not edit manually. */ -final class VersionPatch implements Model, JsonSerializable +final class Tasks implements Model, JsonSerializable { public function __construct( - private readonly ?Routing1 $routing = null, + private readonly bool $enabled, ) { } @@ -26,7 +26,7 @@ public function getModelName(): string public function jsonSerialize(): array { return [ - 'routing' => $this->routing, + 'enabled' => $this->enabled, ]; } @@ -36,10 +36,10 @@ public function __toString(): string } /** - * Configuration about the traffic routed to this version + * If true, background tasks can be triggered. */ - public function getRouting(): ?Routing1 + public function getEnabled(): bool { - return $this->routing; + return $this->enabled; } } diff --git a/src/Model/UpdateOrgProfileRequest.php b/src/Model/UpdateOrgProfileRequest.php index bba1d9ad..4970142b 100644 --- a/src/Model/UpdateOrgProfileRequest.php +++ b/src/Model/UpdateOrgProfileRequest.php @@ -21,6 +21,7 @@ public function __construct( private readonly ?string $defaultCatalog = null, private readonly ?string $projectOptionsUrl = null, private readonly ?string $companyName = null, + private readonly ?string $legalEntityName = null, private readonly ?string $customerType = null, private readonly ?string $vatNumber = null, private readonly ?string $billingContact = null, @@ -38,6 +39,7 @@ public function jsonSerialize(): array 'defaultCatalog' => $this->defaultCatalog, 'projectOptionsUrl' => $this->projectOptionsUrl, 'companyName' => $this->companyName, + 'legalEntityName' => $this->legalEntityName, 'customerType' => $this->customerType, 'vatNumber' => $this->vatNumber, 'billingContact' => $this->billingContact, @@ -64,6 +66,11 @@ public function getCompanyName(): ?string return $this->companyName; } + public function getLegalEntityName(): ?string + { + return $this->legalEntityName; + } + public function getCustomerType(): ?string { return $this->customerType; diff --git a/src/Model/UpdateOrgRequest.php b/src/Model/UpdateOrgRequest.php index e6b327b8..27a6d6e1 100644 --- a/src/Model/UpdateOrgRequest.php +++ b/src/Model/UpdateOrgRequest.php @@ -17,6 +17,7 @@ public function __construct( private readonly ?string $name = null, private readonly ?string $label = null, private readonly ?string $country = null, + private readonly ?string $billingProfileId = null, private readonly ?string $securityContact = null, ) { } @@ -32,6 +33,7 @@ public function jsonSerialize(): array 'name' => $this->name, 'label' => $this->label, 'country' => $this->country, + 'billingProfileId' => $this->billingProfileId, 'securityContact' => $this->securityContact, ]; } @@ -56,6 +58,11 @@ public function getCountry(): ?string return $this->country; } + public function getBillingProfileId(): ?string + { + return $this->billingProfileId; + } + public function getSecurityContact(): ?string { return $this->securityContact; diff --git a/src/Model/UpstreamRoute.php b/src/Model/UpstreamRoute.php index 6633053e..81f5d8ce 100644 --- a/src/Model/UpstreamRoute.php +++ b/src/Model/UpstreamRoute.php @@ -67,7 +67,7 @@ public function getAttributes(): array } /** - * Route type. + * Route type */ public function getType(): string { @@ -75,7 +75,7 @@ public function getType(): string } /** - * TLS settings for the route. + * TLS settings for the route */ public function getTls(): TLSSettings { @@ -107,7 +107,7 @@ public function getProductionUrl(): ?string } /** - * Cache configuration. + * Cache configuration */ public function getCache(): ?CacheConfiguration { @@ -115,7 +115,7 @@ public function getCache(): ?CacheConfiguration } /** - * Server-Side Include configuration. + * Server-Side Include configuration */ public function getSsi(): ?SSIConfiguration { @@ -123,7 +123,7 @@ public function getSsi(): ?SSIConfiguration } /** - * The upstream to use for this route. + * The upstream to use for this route */ public function getUpstream(): ?string { @@ -131,7 +131,7 @@ public function getUpstream(): ?string } /** - * The configuration of the redirects. + * The configuration of the redirects */ public function getRedirects(): ?RedirectConfiguration { @@ -139,13 +139,16 @@ public function getRedirects(): ?RedirectConfiguration } /** - * Sticky routing configuration. + * Sticky routing configuration */ public function getSticky(): ?StickyConfiguration { return $this->sticky; } + /** + * The destination of the proxy + */ public function getTo(): ?string { return $this->to; diff --git a/src/Model/Version.php b/src/Model/Version.php deleted file mode 100644 index 7deab9d4..00000000 --- a/src/Model/Version.php +++ /dev/null @@ -1,75 +0,0 @@ - $this->id, - 'commit' => $this->commit, - 'locked' => $this->locked, - 'routing' => $this->routing, - ]; - } - - public function __toString(): string - { - return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); - } - - /** - * The identifier of Version - */ - public function getId(): string - { - return $this->id; - } - - /** - * The SHA of the commit of this version - */ - public function getCommit(): ?string - { - return $this->commit; - } - - /** - * Whether this version is locked and cannot be modified - */ - public function getLocked(): bool - { - return $this->locked; - } - - /** - * Configuration about the traffic routed to this version - */ - public function getRouting(): Routing - { - return $this->routing; - } -} diff --git a/src/Model/WebApplicationsValue.php b/src/Model/WebApplicationsValue.php index bce3c783..5477e3a0 100644 --- a/src/Model/WebApplicationsValue.php +++ b/src/Model/WebApplicationsValue.php @@ -45,16 +45,17 @@ public function __construct( private readonly SourceCodeConfiguration $source, private readonly BuildConfiguration $build, private readonly array $dependencies, + private readonly ComposableImages $stack, private readonly bool $isAcrossSubmodule, private readonly string $configId, private readonly string $slugId, + private readonly bool $supportsHorizontalScaling, private readonly ?Resources $resources, private readonly ?int $disk, private readonly ?string $timezone, private readonly ?Firewall $firewall, private readonly ?string $containerProfile, private readonly ?object $endpoints, - private readonly ?array $stack, private readonly ?int $instanceCount, ) { } @@ -97,6 +98,7 @@ public function jsonSerialize(): array 'instanceCount' => $this->instanceCount, 'configId' => $this->configId, 'slugId' => $this->slugId, + 'supportsHorizontalScaling' => $this->supportsHorizontalScaling, ]; } @@ -242,7 +244,7 @@ public function getDependencies(): array return $this->dependencies; } - public function getStack(): ?array + public function getStack(): ComposableImages { return $this->stack; } @@ -266,4 +268,9 @@ public function getSlugId(): string { return $this->slugId; } + + public function getSupportsHorizontalScaling(): bool + { + return $this->supportsHorizontalScaling; + } } diff --git a/src/Model/WebHookIntegration.php b/src/Model/WebHookIntegration.php index 474bebdb..35484734 100644 --- a/src/Model/WebHookIntegration.php +++ b/src/Model/WebHookIntegration.php @@ -20,6 +20,7 @@ final class WebHookIntegration implements Model, JsonSerializable, Integration public function __construct( private readonly string $type, + private readonly string $role, private readonly array $events, private readonly array $environments, private readonly array $excludedEnvironments, @@ -44,6 +45,7 @@ public function jsonSerialize(): array 'createdAt' => $this->createdAt?->format(DATE_ATOM), 'updatedAt' => $this->updatedAt?->format(DATE_ATOM), 'type' => $this->type, + 'role' => $this->role, 'events' => $this->events, 'environments' => $this->environments, 'excludedEnvironments' => $this->excludedEnvironments, @@ -76,11 +78,22 @@ public function getUpdatedAt(): ?DateTime return $this->updatedAt; } + /** + * The type of the integration + */ public function getType(): string { return $this->type; } + /** + * The role of the integration + */ + public function getRole(): string + { + return $this->role; + } + public function getEvents(): array { return $this->events; diff --git a/src/Model/WebHookIntegrationCreateInput.php b/src/Model/WebHookIntegrationCreateInput.php index df1ab70b..ab0781c6 100644 --- a/src/Model/WebHookIntegrationCreateInput.php +++ b/src/Model/WebHookIntegrationCreateInput.php @@ -53,6 +53,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } + /** + * The type of the integration + */ public function getType(): string { return $this->type; diff --git a/src/Model/WebHookIntegrationPatch.php b/src/Model/WebHookIntegrationPatch.php index 7fac545c..563a0d14 100644 --- a/src/Model/WebHookIntegrationPatch.php +++ b/src/Model/WebHookIntegrationPatch.php @@ -53,6 +53,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } + /** + * The type of the integration + */ public function getType(): string { return $this->type; diff --git a/src/Model/WorkersValue.php b/src/Model/WorkersValue.php index 51313983..269d0e2a 100644 --- a/src/Model/WorkersValue.php +++ b/src/Model/WorkersValue.php @@ -41,14 +41,15 @@ public function __construct( private readonly object $runtime, private readonly WorkerConfiguration $worker, private readonly string $app, + private readonly ComposableImages $stack, private readonly string $slugId, + private readonly bool $supportsHorizontalScaling, private readonly ?Resources $resources, private readonly ?int $disk, private readonly ?string $timezone, private readonly ?Firewall $firewall, private readonly ?string $containerProfile, private readonly ?object $endpoints, - private readonly ?array $stack, private readonly ?int $instanceCount, ) { } @@ -85,6 +86,7 @@ public function jsonSerialize(): array 'stack' => $this->stack, 'instanceCount' => $this->instanceCount, 'slugId' => $this->slugId, + 'supportsHorizontalScaling' => $this->supportsHorizontalScaling, ]; } @@ -207,7 +209,7 @@ public function getApp(): string return $this->app; } - public function getStack(): ?array + public function getStack(): ComposableImages { return $this->stack; } @@ -221,4 +223,9 @@ public function getSlugId(): string { return $this->slugId; } + + public function getSupportsHorizontalScaling(): bool + { + return $this->supportsHorizontalScaling; + } }